/* Habillage GTA V : typo condensée, noir translucide, violet des waypoints. */
body[data-theme="gta"] { font-family: 'Oswald', 'Arial Narrow', sans-serif; }

body[data-theme="gta"] .btn {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border-radius: 3px;
}
body[data-theme="gta"] .btn:active { background: #fff; color: #000; }

/* Radar : fondu sombre en haut et vignettage, comme la mini-carte inclinée. */
body[data-theme="gta"][data-view="radar"] .fx-radar {
  display: block;
  background:
    linear-gradient(to bottom, #161616 0%, rgba(22, 22, 22, 0.9) 10%, rgba(22, 22, 22, 0) 34%),
    radial-gradient(ellipse at 50% 78%, transparent 55%, rgba(0, 0, 0, 0.45) 100%);
}
body[data-theme="gta"] .dist,
body[data-theme="gta"] .place { text-shadow: 0 0 4px #000, 2px 2px 3px #000; }
body[data-theme="gta"] .dist { left: 24px; bottom: 44px; }
body[data-theme="gta"] .dist-text { flex-direction: row; align-items: baseline; gap: 10px; }
body[data-theme="gta"] .mini-btn.armed { background: #b01e1e; }
body[data-theme="gta"] .countdown { background: #a56cda; }
body[data-theme="gta"] .dist b { font-size: clamp(30px, 4.4vw, 50px); font-weight: 500; }
body[data-theme="gta"] .dist span { font-size: clamp(18px, 2.6vw, 30px); opacity: 0.85; }
body[data-theme="gta"] .place { right: 24px; bottom: 44px; line-height: 1.05; max-width: 58vw; }
body[data-theme="gta"] .place b { font-size: clamp(28px, 4.2vw, 48px); font-weight: 700; text-transform: uppercase; }
body[data-theme="gta"] .place span { font-size: clamp(16px, 2.2vw, 24px); }

body[data-theme="gta"] .north {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0d0d0d;
  border: 2px solid #d8d8d8;
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
}
/* Le losange est tourné via un pseudo-élément : une rotation sur l'élément
   lui-même ferait aussi tourner le translate() posé par le JS. */
body[data-theme="gta"] .wp-edge { width: 24px; height: 24px; }
body[data-theme="gta"] .wp-edge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #a56cda;
  border: 3px solid #fff;
  transform: rotate(45deg);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

/* Compteur : cadran rond au-dessus de la distance (plus bas sans destination). L'arc jaune
   (270°, longueur 207,3) est rempli par hud.js ; panneau de limitation en haut à droite. */
.speedo-gta {
  position: absolute;
  left: 24px;
  bottom: 110px;
  width: 118px;
  height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 4px #000, 2px 2px 3px #000;
}
body:has(#dist[hidden]) .speedo-gta { bottom: 44px; }
.speedo-gta .dial { position: absolute; inset: 0; width: 100%; height: 100%; }
.dial-bg { fill: rgba(0, 0, 0, 0.62); }
.dial-track, .dial-fill { fill: none; stroke-width: 7; }
.dial-track { stroke: #3b3b3b; stroke-dasharray: 207.3 999; }
.dial-fill { stroke: #dcb84c; transition: stroke-dasharray 0.5s; }
.speedo-gta .speed-num { position: relative; font-size: 38px; line-height: 1; }
.speedo-gta .speed-unit { position: relative; font-size: 13px; font-weight: 500; font-style: normal; }
.speedo-gta.over .speed-num { color: #e03232; }
body[data-theme="gta"] .speed-sign {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #111;
  border: 4px solid #d52b1e;
  font-size: 14px;
  font-weight: 700;
  font-style: normal;
  text-shadow: none;
  box-shadow: 0 0 4px #000;
}

/* Niveau de recherche : cinq étoiles, grises et clignotantes pendant la fuite. */
.stars { display: flex; gap: 4px; }
.stars svg { width: 34px; height: 34px; overflow: visible; }
.stars path { fill: rgba(255, 255, 255, 0.18); stroke: #000; stroke-width: 2.4; stroke-linejoin: round; }
.stars svg.on path { fill: #fff; }
.wanted.evading .stars svg.on path { animation: star-blink 1s steps(1) infinite; }
@keyframes star-blink { 0% { fill: #8d8d8d; } 50% { fill: #fff; } }

.bars { position: absolute; left: 24px; right: 24px; bottom: 18px; height: 12px; display: flex; gap: 6px; }
.bars i { position: relative; flex: 2; background: rgba(0, 0, 0, 0.7); }
.bars i + i { flex: 1; }
.bars i::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--v, 0) * 100%);
  background: var(--c);
  transition: width 0.5s;
}
.bars [data-g="progress"] { --c: #58a04e; }
.bars [data-g="gps"] { --c: #4d90d0; }
.bars [data-g="speed"] { --c: #dcb84c; }

/* Carte pause : le menu du jeu. La carte est un panneau inséré (marges 22,2 % en haut,
   18,2 % en bas, 5 % sur les côtés ; mêmes valeurs que CAMERA.gta.panel dans map.js)
   posé sur un décor flouté, sous le titre, le bloc joueur et les onglets. */
body[data-theme="gta"][data-view="pause"] #map { clip-path: inset(22.2% 5% 18.2% 5%); }
body[data-theme="gta"][data-view="pause"] {
  background:
    radial-gradient(ellipse 45% 35% at 18% 12%, rgba(84, 120, 58, 0.9), transparent 70%),
    radial-gradient(ellipse 35% 30% at 72% 8%, rgba(150, 160, 130, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 35% 100%, rgba(203, 176, 123, 0.85), transparent 70%),
    radial-gradient(ellipse 40% 60% at 100% 50%, rgba(0, 0, 0, 0.9), transparent 70%),
    #26351f;
}
body[data-theme="gta"][data-view="pause"] .topbar { display: none; }

.pause-head { position: absolute; left: 0; right: 0; top: 0; height: 22.2%; pointer-events: none; }
.gta-title {
  position: absolute;
  left: 5%;
  top: 9vh;
  font-size: clamp(28px, 4.6vh, 46px);
  font-weight: 400;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.gta-player { position: absolute; right: 5%; top: 8.5vh; display: flex; align-items: center; gap: 10px; }
.gta-player-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  font-size: clamp(14px, 2vh, 19px);
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.gta-player-info b { font-weight: 500; }
.gta-portrait { width: 6.5vh; height: 6.5vh; min-width: 44px; min-height: 44px; border: 2px solid #111; }
.gta-tabs { position: absolute; left: 2.5%; right: 2.5%; top: 16.6vh; height: max(34px, 3.9vh); display: flex; gap: 2px; }
.gta-tabs .tab {
  flex: 1;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  font-size: clamp(13px, 1.9vh, 18px);
  letter-spacing: 0.04em;
}
.gta-tabs .tab.active { background: #f0f0f2; color: #111; box-shadow: inset 0 3px 0 #8fe08f; }
.gta-tabs .arrow { width: 2.5%; display: grid; place-items: center; font-size: clamp(22px, 3.2vh, 32px); }

body[data-theme="gta"][data-view="pause"] .search { top: calc(22.2% + 12px); left: calc(5% + 12px); width: min(40%, 480px); }
body[data-theme="gta"] #searchInput { height: 52px; font-size: 20px; background: rgba(0, 0, 0, 0.8); color: #fff; border-bottom: 3px solid #a56cda; }
body[data-theme="gta"] #searchInput::placeholder { color: rgba(255, 255, 255, 0.6); }
body[data-theme="gta"] #results li,
body[data-theme="gta"] .search-tip { background: rgba(0, 0, 0, 0.8); color: #fff; }
body[data-theme="gta"] #results li:first-child:not(.empty),
body[data-theme="gta"] #results li:active { background: #fff; color: #000; }
body[data-theme="gta"] .hint {
  left: 5%;
  bottom: 22px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 17px;
}
/* Fenêtre étroite : l'aide passe au-dessus de la barre d'invites. */
@media (max-width: 999px) {
  body[data-theme="gta"] .hint { bottom: 84px; }
}

/* Invites en bas à droite, comme « Retour [Échap] » dans le jeu. */
body[data-theme="gta"][data-view="pause"] .prompts { right: 5%; bottom: 14px; gap: 0; padding: 0 6px; background: rgba(0, 0, 0, 0.55); }
body[data-theme="gta"] .prompts .btn { background: transparent; min-height: 52px; padding: 0 12px; font-size: 18px; font-weight: 400; letter-spacing: 0.02em; }
body[data-theme="gta"] .prompts .btn:active { background: rgba(255, 255, 255, 0.2); color: #fff; }
body[data-theme="gta"] .key {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  border: 0;
  border-radius: 3px;
  background: #f6f6f6;
  color: #111;
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
}

body[data-theme="gta"][data-view="pause"] .attrib { left: auto; right: calc(5% + 8px); bottom: calc(18.2% + 4px); transform: none; }

body[data-theme="gta"] .dest {
  left: calc(5% + 12px);
  bottom: calc(18.2% + 12px);
  width: min(30%, 360px);
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.8);
  line-height: 1.35;
}
body[data-theme="gta"] .dest-h { font-size: 12px; letter-spacing: 0.14em; opacity: 0.7; }
body[data-theme="gta"] .dest-name { font-size: 20px; font-weight: 500; }
body[data-theme="gta"] .dest-info { font-size: 16px; }

/* Blips : légende à droite dans le panneau de carte, fiche noire façon menu. */
body[data-theme="gta"] .legend {
  top: calc(22.2% + 12px);
  right: calc(5% + 12px);
  width: min(30%, 330px);
  max-height: calc(100% - 22.2% - 18.2% - 24px);
  background: rgba(0, 0, 0, 0.82);
  font-size: 17px;
}
body[data-theme="gta"] .legend-h { font-size: 15px; letter-spacing: 0.14em; opacity: 0.75; border-bottom: 3px solid #a56cda; }
body[data-theme="gta"] .legend .switch { background: rgba(255, 255, 255, 0.25); }
body[data-theme="gta"] .legend .switch::after { background: #fff; }
body[data-theme="gta"] .legend li.on .switch { background: #a56cda; }
body[data-theme="gta"] .poi-card { background: rgba(0, 0, 0, 0.88); border-left: 4px solid #a56cda; }
body[data-theme="gta"][data-view="pause"] .poi-card { bottom: calc(18.2% + 12px); }
body[data-theme="gta"][data-view="pause"]:has(#dest:not([hidden])) .poi-card { bottom: calc(18.2% + 130px); } /* au-dessus de l'encart destination */
body[data-theme="gta"] .poi-card-text span { font-size: 15px; opacity: 0.8; }
body[data-theme="gta"] #btnPoiGo { background: #fff; color: #000; }
body[data-theme="gta"] #btnPoiRob { background: #c62828; color: #fff; }
body[data-theme="gta"] #btnPoiRob:disabled { background: #4a4a4a; color: #cfcfcf; cursor: default; }

body[data-theme="gta"] .banner {
  background: rgba(0, 0, 0, 0.85);
  font-size: 18px;
  letter-spacing: 0.06em;
  border-left: 4px solid #a56cda;
}
body[data-theme="gta"] .arrival {
  font: 700 clamp(44px, 7vw, 90px) 'Oswald', sans-serif;
  color: #f0c850;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.04em;
}

/* Icônes de carte : flèche blanche et épingle violette. */
body[data-theme="gta"] .car-marker {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Cpath d='M10 1 L19 22 L10 17 L1 22Z' fill='%23f2f2f2' stroke='%231a1a1a' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body[data-theme="gta"] .wp-marker {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 31 L4.5 17.5 A9 9 0 1 1 19.5 17.5 Z' fill='%23a56cda' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='11' r='3.5' fill='%23fff'/%3E%3C/svg%3E");
}
