/* GTA Dex — un seul thème, sombre : la nuit de Leonida, avec des illustrations colorées. */
:root {
  --nuit: #0b101b;
  --surface: #141c2e;
  --surface-2: #1d2840;
  --trait: #2c3a58;
  --encre: #f3f0e8;
  --discret: #a3aec4;
  --lagon: #1fc8b5;
  --soleil: #ffc233;
  --corail: #ff6b63;
  --sur-aplat: #0b101b;
  --ton: var(--lagon);

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --espace-1: 4px;
  --espace-2: 8px;
  --espace-3: 16px;
  --espace-4: 24px;
  --espace-5: 48px;
  --rayon-s: 2px;
  --rayon-m: 6px;
  --rayon-l: 14px;
  color-scheme: dark;
}
/* Une couleur par rubrique. */
.t-actu { --ton: #ff6b63; }
.t-guide { --ton: #1fc8b5; }
.t-personnage { --ton: #c99bff; }
.t-lieu { --ton: #ffc233; }
.t-vehicule { --ton: #6aa8ff; }
.t-arme { --ton: #ff8a5b; }
.t-mission { --ton: #7ad98a; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nuit); color: var(--encre); font: 400 16px/24px var(--font-sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lagon); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--lagon); outline-offset: 2px; }

h1, h2 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 6.4vw, 60px); line-height: 1; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 26px; line-height: 30px; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding-left: 1.2em; }

.cadre { max-width: 1080px; margin-inline: auto; padding-inline: max(var(--espace-3), env(safe-area-inset-left, 0px)) max(var(--espace-3), env(safe-area-inset-right, 0px)); }
main.cadre { display: flex; flex-direction: column; gap: var(--espace-5); padding-block: var(--espace-5); }
main section, .fiche { display: flex; flex-direction: column; gap: var(--espace-3); }
main section p, .fiche p, main > p { max-width: 65ch; }

.evitement { position: absolute; left: -9999px; }
.evitement:focus { left: var(--espace-3); top: var(--espace-3); background: var(--lagon); color: var(--sur-aplat); padding: var(--espace-2) var(--espace-3); z-index: 30; }

.etiquette { font: 700 12px/16px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ton); }
.petit { font-size: 13px; line-height: 18px; color: var(--discret); }
.discret { color: var(--discret); }
.donnee { font: 500 14px/20px var(--font-mono); font-variant-numeric: tabular-nums; }

/* En-tête */
.entete { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 27, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--trait); }
.entete-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--espace-2) var(--espace-4); padding-block: 12px; }
.logo img { height: 30px; width: auto; }
.entete nav { display: flex; flex-wrap: wrap; gap: var(--espace-1) var(--espace-3); min-width: 0; }
.entete nav a { color: var(--encre); text-decoration: none; font-weight: 600; font-size: 15px; padding-block: var(--espace-1); border-bottom: 2px solid transparent; }
.entete nav a:hover, .entete nav a[aria-current] { border-bottom-color: var(--lagon); }
@media (max-width: 720px) {
  .entete nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .entete nav a { white-space: nowrap; }
}

/* Bandeau illustré : accueil, rubriques, fiches */
.bandeau { position: relative; display: flex; align-items: flex-end; overflow: hidden; background: var(--surface); }
.bandeau > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bandeau::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--nuit) 0%, rgba(11, 16, 27, 0.82) 38%, rgba(11, 16, 27, 0.15) 100%); }
.bandeau-texte { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--espace-3); width: 100%; }
.bandeau-accueil { min-height: 520px; }
.bandeau-accueil::after { background: linear-gradient(90deg, var(--nuit) 0%, rgba(11, 16, 27, 0.9) 34%, rgba(11, 16, 27, 0.1) 72%), linear-gradient(0deg, var(--nuit) 0%, rgba(11, 16, 27, 0) 30%); }
.bandeau-accueil .bandeau-texte { padding-block: var(--espace-5); }
.bandeau-accueil h1 { max-width: 12ch; }
.hero-texte { font-size: 18px; line-height: 28px; color: var(--encre); max-width: 46ch; }
@media (max-width: 720px) {
  .bandeau-accueil { min-height: 0; }
  .bandeau-accueil::after { background: linear-gradient(0deg, var(--nuit) 0%, rgba(11, 16, 27, 0.88) 55%, rgba(11, 16, 27, 0.25) 100%); }
  .bandeau-accueil .bandeau-texte { padding-top: 140px; }
}
.bandeau-page { min-height: 380px; border-radius: var(--rayon-l); border: 1px solid var(--trait); }
.bandeau-page::after { background: linear-gradient(0deg, rgba(11, 16, 27, 0.96) 0%, rgba(11, 16, 27, 0.7) 32%, rgba(11, 16, 27, 0) 62%); }
.bandeau-page .bandeau-texte { padding: var(--espace-4); }
.bandeau-page h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.04; max-width: 22ch; }
@media (max-width: 720px) { .bandeau-page { min-height: 340px; } .bandeau-page .bandeau-texte { padding: var(--espace-3); } }

/* Compte à rebours */
.rebours { display: flex; flex-direction: column; gap: var(--espace-2); margin-top: var(--espace-2); }
.rebours .etiquette { color: var(--soleil); }
.rebours-chiffres { display: flex; flex-wrap: wrap; gap: var(--espace-2); }
.rebours-chiffres div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 78px; padding: 14px var(--espace-2); background: rgba(11, 16, 27, 0.78); border: 1px solid var(--trait); border-radius: var(--rayon-m); }
.rebours-chiffres b { font: 500 34px/38px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--soleil); }
.rebours-chiffres span { font: 700 11px/14px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--discret); }
.rebours .petit { max-width: 46ch; }

/* Cartes */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--espace-3); }
.carte { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-l); color: var(--encre); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
.carte:hover { transform: translateY(-3px); border-color: var(--ton); }
@media (prefers-reduced-motion: reduce) { .carte { transition: none; } .carte:hover { transform: none; } }
.carte-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--surface-2); }
.carte-corps { display: flex; flex-direction: column; gap: var(--espace-2); padding: var(--espace-3); }
.carte-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.carte-titre { font: 800 19px/24px var(--font-display); }
.carte-texte { color: var(--discret); font-size: 14px; line-height: 21px; }
/* La fiche mise en avant : grande image, coin coupé de la marque. */
.carte-avant { grid-column: 1 / -1; flex-direction: row-reverse; border-radius: 0; clip-path: polygon(0 0, calc(100% - var(--espace-5)) 0, 100% var(--espace-5), 100% 100%, 0 100%); background: var(--lagon); border: 0; color: var(--sur-aplat); }
.carte-avant .carte-img { flex: 1 1 55%; width: 55%; aspect-ratio: auto; min-height: 280px; }
.carte-avant .carte-corps { flex: 1 1 45%; justify-content: center; gap: var(--espace-3); padding: var(--espace-4) var(--espace-4) var(--espace-4) var(--espace-5); }
.carte-avant .etiquette, .carte-avant .carte-texte { color: var(--sur-aplat); }
.carte-avant .carte-titre { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.06; }
.carte-avant .carte-texte { font-size: 16px; line-height: 24px; }
.carte-avant .fleche { align-self: flex-start; padding: 10px var(--espace-3); background: var(--sur-aplat); color: var(--encre); border-radius: var(--rayon-m); font-weight: 600; font-size: 15px; }
@media (max-width: 720px) {
  .carte-avant { flex-direction: column; }
  .carte-avant .carte-img { width: 100%; min-height: 0; aspect-ratio: 16 / 9; flex: none; }
  .carte-avant .carte-corps { padding: var(--espace-3); }
}

/* Tuiles de rubriques */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--espace-3); }
.tuile { position: relative; display: flex; align-items: flex-end; min-height: 190px; overflow: hidden; border-radius: var(--rayon-l); border: 1px solid var(--trait); color: var(--encre); text-decoration: none; transition: transform .15s ease, border-color .15s ease; }
a.tuile:hover { transform: translateY(-3px); border-color: var(--ton); }
.tuile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tuile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11, 16, 27, 0.95) 0%, rgba(11, 16, 27, 0.55) 50%, rgba(11, 16, 27, 0.05) 100%); }
.tuile-texte { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; padding: var(--espace-3); }
.tuile-texte strong { font: 800 22px/26px var(--font-display); }
.tuile-texte .donnee { color: var(--ton); }
.tuile-attente > img { filter: grayscale(1) brightness(0.6); }
@media (prefers-reduced-motion: reduce) { .tuile { transition: none; } a.tuile:hover { transform: none; } }

/* Actus */
.titre-ligne { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--espace-2); }
.actus { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--espace-2); }
.actus a { display: flex; align-items: center; gap: var(--espace-3); padding: var(--espace-2); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-l); color: var(--encre); text-decoration: none; }
.actus a:hover { border-color: #ff6b63; }
.actus img { width: 128px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.actu-texte { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.actu-texte .donnee { color: #ff6b63; }
.actu-texte strong { font: 700 17px/22px var(--font-display); }
@media (max-width: 480px) { .actus img { width: 88px; } }

/* Progression */
.bloc-progression { flex-direction: row; flex-wrap: wrap; align-items: end; justify-content: space-between; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-l); padding: var(--espace-4); }
.bloc-progression > div { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: var(--espace-3); }
.jauge { display: flex; flex-direction: column; gap: var(--espace-2); }
.jauge-barre { height: 14px; background: var(--surface-2); border-radius: var(--rayon-s); overflow: hidden; }
.jauge-barre span { display: block; height: 100%; width: 0; background: var(--lagon); transition: width .25s ease; }
.jauge-texte { color: var(--discret); }
@media (prefers-reduced-motion: reduce) { .jauge-barre span { transition: none; } }

/* Boutons */
.bouton, .bouton-suivi { font: 600 15px/20px var(--font-sans); border-radius: var(--rayon-m); cursor: pointer; text-decoration: none; }
.bouton { display: inline-block; padding: 12px 20px; background: var(--lagon); color: var(--sur-aplat); border: 0; }
.bouton-discret { background: transparent; color: var(--encre); border: 1px solid var(--trait); }
.bouton-suivi { display: inline-flex; align-items: center; gap: var(--espace-2); align-self: flex-start; padding: 12px 20px; background: var(--surface); color: var(--encre); border: 1px solid var(--trait); }
.bouton-suivi .coche { width: 18px; height: 18px; border: 2px solid var(--discret); border-radius: var(--rayon-s); }
.bouton-suivi[aria-pressed="true"] { background: var(--lagon); border-color: var(--lagon); color: var(--sur-aplat); }
.bouton-suivi[aria-pressed="true"] .coche { border-color: var(--sur-aplat); background: linear-gradient(var(--sur-aplat), var(--sur-aplat)) center / 8px 8px no-repeat; }

/* Fiche */
.fil { font-size: 13px; color: var(--discret); }
.fil a { color: var(--discret); }
.fil + * { margin-top: calc(var(--espace-3) - var(--espace-5)); }
.fiche { gap: var(--espace-4); }
.fiche-corps { display: flex; flex-direction: column; gap: var(--espace-4); max-width: 760px; }
.fiche-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--espace-2); }
.statut { font: 700 11px/16px var(--font-sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 2px var(--espace-2); border-radius: var(--rayon-s); background: rgba(11, 16, 27, 0.7); border: 1px solid var(--trait); color: var(--discret); }
.statut-confirme { color: var(--lagon); border-color: var(--lagon); }
.statut-a-confirmer { color: var(--soleil); border-color: var(--soleil); }
.statut-rumeur, .statut-spoiler { color: var(--corail); border-color: var(--corail); }
.reponse { display: flex; flex-direction: column; gap: var(--espace-2); padding: var(--espace-4); padding-right: var(--espace-5); background: var(--lagon); color: var(--sur-aplat); font: 600 20px/29px var(--font-sans); clip-path: polygon(0 0, calc(100% - var(--espace-4)) 0, 100% var(--espace-4), 100% 100%, 0 100%); }
.fiche .reponse { max-width: none; }
.reponse .etiquette { color: var(--sur-aplat); opacity: 0.75; }
.avertissement { padding: 12px var(--espace-3); background: var(--surface); border: 1px solid var(--soleil); border-radius: var(--rayon-m); color: var(--encre); font-size: 14px; line-height: 21px; }
.infos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--espace-2); margin: 0; }
.infos div { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-m); padding: 12px var(--espace-3); min-width: 0; }
.infos dt { font: 700 11px/16px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--discret); }
.infos dd { margin: 4px 0 0; font: 500 17px/22px var(--font-mono); color: var(--soleil); overflow-wrap: anywhere; }
.fiche li { margin-block: 6px; max-width: 65ch; }
.fiche li::marker { color: var(--ton); }
.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--espace-2); }
.checklist li { margin: 0; max-width: none; }
.checklist label { display: flex; align-items: flex-start; gap: var(--espace-3); padding: var(--espace-3); background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon-m); cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--lagon); }
.checklist input:checked + span { color: var(--discret); text-decoration: line-through; }
.fiche-pied { display: flex; flex-direction: column; gap: var(--espace-2); padding-top: var(--espace-4); border-top: 1px solid var(--trait); }
.fiche-pied h2 { font: 700 12px/16px var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--discret); }
.sources { font-size: 14px; }

/* Ma progression */
#liste-progression { display: flex; flex-direction: column; gap: var(--espace-4); }
#liste-progression h2 { margin-bottom: var(--espace-2); font-size: 20px; }
.ligne-suivi { display: flex; align-items: flex-start; gap: var(--espace-3); padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.ligne-suivi input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--lagon); }
.ligne-suivi a { color: var(--encre); min-width: 0; }

/* Pied de page */
.pied { border-top: 1px solid var(--trait); padding-block: var(--espace-4); color: var(--discret); font-size: 13px; line-height: 18px; }
.pied .cadre { display: flex; flex-direction: column; gap: var(--espace-2); }
.pied a { color: var(--discret); }
