/* Habillage RDR2 : serif, tons crème et encre. */
body[data-theme="rdr2"] { font-family: 'Libre Baskerville', Georgia, serif; }

body[data-theme="rdr2"] .btn {
  background: rgba(14, 11, 8, 0.82);
  color: #efe6d2;
  border: 2px solid rgba(226, 208, 170, 0.45);
  font-size: 19px;
  font-variant: small-caps;
  letter-spacing: 0.06em;
}
body[data-theme="rdr2"] .btn:active { background: #efe6d2; color: #1a140e; }
.key {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font-style: normal;
  font-variant: normal;
  font-size: 15px;
}

/* Radar : même vue inclinée que GTA, dans les tons du jeu (encre, taupe, crème).
   Fondu sombre en haut et vignettage sépia sur les bords. */
body[data-theme="rdr2"][data-view="radar"] .fx-radar {
  display: block;
  background:
    linear-gradient(to bottom, #15120e 0%, rgba(21, 18, 14, 0.9) 10%, rgba(21, 18, 14, 0) 34%),
    radial-gradient(ellipse at 50% 70%, transparent 50%, rgba(40, 26, 12, 0.55) 100%);
}

/* Rappels discrets du radar rond du jeu : N sur un médaillon, épingle rouge au bord,
   trois « cœurs » (santé / endurance / Dead Eye) détournés en jauges, en bas au centre. */
body[data-theme="rdr2"] .north {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0f0d0a;
  border: 2px solid rgba(226, 208, 170, 0.7);
  box-shadow: 0 0 0 2px #0f0d0a;
  color: #f2eee4;
  font-size: 17px;
  display: grid;
  place-items: center;
}
body[data-theme="rdr2"] .wp-edge {
  width: 26px;
  height: 34px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 31 C9 25 3 19 3 12 A9 9 0 1 1 21 12 C21 19 15 25 12 31Z' fill='%23c30000' stroke='%233a0909' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%23f1e4c9'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}
.cores { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 14px; opacity: 0.92; }
.core { width: 46px; height: 46px; }
.core-bg { fill: #101010; stroke: #2e2e2e; stroke-width: 0.8; }
.core-track { fill: none; stroke: #3a3a3a; stroke-width: 1.8; }
.core-fill { fill: none; stroke: #f1f1f1; stroke-width: 1.8; transition: stroke-dasharray 0.5s; }
.core-icon { fill: #f4f4f4; }
.core-eye { fill: none; stroke: #f4f4f4; stroke-width: 1; }

body[data-theme="rdr2"] .dist,
body[data-theme="rdr2"] .place { color: #f1ead9; text-shadow: 0 0 6px #000, 2px 2px 4px #000; max-width: 38vw; }
body[data-theme="rdr2"] .dist { left: 28px; bottom: 32px; }
body[data-theme="rdr2"] .mini-btn.armed { background: #7a1b12; border-color: #e2d0aa; }
body[data-theme="rdr2"] .countdown { background: #e2d0aa; }
body[data-theme="rdr2"] .dist b { font-size: clamp(30px, 4.2vw, 46px); font-weight: 400; }
body[data-theme="rdr2"] .dist span { font-size: clamp(15px, 2vw, 20px); font-style: italic; }
body[data-theme="rdr2"] .place { right: 28px; bottom: 32px; }
body[data-theme="rdr2"] .place b { font-size: clamp(22px, 3.2vw, 34px); font-weight: 400; font-style: italic; line-height: 1.2; }
body[data-theme="rdr2"] .place span { font-size: clamp(13px, 1.7vw, 17px); letter-spacing: 0.55em; text-transform: uppercase; margin-right: -0.55em; }

/* Compteur : chiffre au-dessus du nom du lieu, panneau émaillé à gauche. */
.speedo-rdr { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.speedo-rdr .speed-num { font-size: clamp(34px, 4.4vw, 52px); font-weight: 400; line-height: 1; }
.speedo-rdr .speed-unit { align-self: flex-end; margin-bottom: 6px; font-size: 19px; }
.speedo-rdr.over .speed-num { color: #d6392b; }
body[data-theme="rdr2"] .speed-sign {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #efe6cf;
  color: #2a1d12;
  border: 4px solid #7a1b12;
  font-size: 16px;
  font-style: normal;
  text-shadow: none;
  box-shadow: 0 0 6px #000;
}

/* Niveau de recherche : « Recherché » et prime ; le texte pâlit pendant la fuite. */
.wanted-rdr {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #f1ead9;
  text-shadow: 0 0 6px #000, 2px 2px 4px #000;
  transition: opacity 0.4s;
}
.wanted-rdr strong { font-size: 26px; font-weight: 400; font-variant: small-caps; letter-spacing: 0.14em; color: #d6392b; }
.wanted-rdr i { font-size: 18px; }
.wanted.evading .wanted-rdr { opacity: 0.45; }

/* Carte pause : grain de papier et bords brûlés par-dessus le parchemin. */
body[data-theme="rdr2"][data-view="pause"] .fx-paper {
  display: block;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(107, 74, 34, 0.5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .27 0 0 0 0 .13 0 0 0 .9 -.33'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body[data-theme="rdr2"] #searchInput,
body[data-theme="rdr2"] #results li,
body[data-theme="rdr2"] .search-tip,
body[data-theme="rdr2"] .dest {
  background: rgba(22, 17, 12, 0.86);
  color: #ecdfc3;
  border: 1px solid rgba(215, 190, 147, 0.35);
}
body[data-theme="rdr2"] #searchInput { font-style: italic; }
body[data-theme="rdr2"] #searchInput::placeholder { color: rgba(236, 223, 195, 0.6); }
body[data-theme="rdr2"] #results li { border-top: 0; }
body[data-theme="rdr2"] #results li:first-child:not(.empty),
body[data-theme="rdr2"] #results li:active { background: #ecdfc3; color: #1a140e; }
body[data-theme="rdr2"] .hint {
  left: 18px;
  top: 88px;
  font-style: italic;
  font-size: 16px;
  color: #3d3528;
  text-shadow: 0 0 6px rgba(236, 223, 195, 0.8);
}
body[data-theme="rdr2"] .dest { line-height: 1.55; }
/* Fenêtre étroite : l'encart destination passe au-dessus des boutons. */
@media (max-width: 999px) {
  body[data-theme="rdr2"] .dest { bottom: 88px; }
}
body[data-theme="rdr2"] .dest-h { font-size: 12px; letter-spacing: 0.35em; opacity: 0.7; }
body[data-theme="rdr2"] .dest-name { font-size: 24px; }
body[data-theme="rdr2"] .dest-info { font-size: 16px; font-style: italic; }
body[data-theme="rdr2"][data-view="pause"] .attrib { color: rgba(60, 50, 35, 0.75); }

/* Blips : légende sur le bord droit, fiche sombre à liseré crème. */
body[data-theme="rdr2"] .legend {
  top: 88px;
  right: 16px;
  width: min(34%, 340px);
  max-height: calc(100% - 88px - 96px);
  background: rgba(22, 17, 12, 0.88);
  color: #ecdfc3;
  border: 1px solid rgba(215, 190, 147, 0.4);
  font-size: 16px;
}
body[data-theme="rdr2"] .legend-h { font-variant: small-caps; letter-spacing: 0.12em; border-bottom: 1px solid rgba(215, 190, 147, 0.4); }
body[data-theme="rdr2"] .legend .switch { background: rgba(236, 223, 195, 0.25); }
body[data-theme="rdr2"] .legend .switch::after { background: #ecdfc3; }
body[data-theme="rdr2"] .legend li.on .switch { background: #9b1c1c; }
body[data-theme="rdr2"] .poi-card { background: rgba(22, 17, 12, 0.92); color: #ecdfc3; border: 1px solid rgba(215, 190, 147, 0.55); }
body[data-theme="rdr2"] .poi-card-text b { font-weight: 400; }
body[data-theme="rdr2"] .poi-card-text span { font-size: 14px; font-style: italic; opacity: 0.85; }
body[data-theme="rdr2"] #btnPoiGo { background: #7a1b12; border-color: #e2d0aa; }
body[data-theme="rdr2"] #btnPoiRob { border-color: #d6392b; color: #f3c7b8; }
body[data-theme="rdr2"] #btnPoiRob:disabled { border-color: rgba(226, 208, 170, 0.35); color: rgba(243, 199, 184, 0.55); cursor: default; }

body[data-theme="rdr2"] .banner {
  background: rgba(22, 17, 12, 0.9);
  color: #ecdfc3;
  border: 1px solid rgba(215, 190, 147, 0.5);
  font-style: italic;
  font-size: 18px;
}
body[data-theme="rdr2"] .arrival {
  font: 400 clamp(36px, 5.5vw, 70px) 'Libre Baskerville', serif;
  color: #f3e6cc;
  letter-spacing: 0.12em;
  text-shadow: 0 2px 10px #000, 0 0 30px rgba(0, 0, 0, 0.8);
}

/* Icônes de carte : goutte blanche et épingle rouge. */
body[data-theme="rdr2"] .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 C5 8 3.5 13 5.5 17 C7.2 20.3 12.8 20.3 14.5 17 C16.5 13 15 8 10 1Z' fill='%23f7f4ec' stroke='%232b2b2b' stroke-width='1.2'/%3E%3C/svg%3E");
}
body[data-theme="rdr2"] .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 C9 25 3 19 3 12 A9 9 0 1 1 21 12 C21 19 15 25 12 31Z' fill='%23c30000' stroke='%233a0909' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='12' r='3.2' fill='%23f1e4c9'/%3E%3C/svg%3E");
}
