/* ==========================================================================
   GameTrad – feuille de style unique, partagée par toutes les pages
   --------------------------------------------------------------------------
   ✏️ Pour changer l'apparence du site, modifiez UNIQUEMENT les variables
   ci-dessous (couleurs, polices, espacements). Le reste s'adapte tout seul.
   ========================================================================== */

:root {
  /* --- COULEURS (mode clair) --- */
  --fond: #f6f1e7;            /* fond de page (crème) */
  --fond-alt: #efe8d9;        /* fond des sections alternées */
  --fond-carte: #fffdf8;      /* fond des cartes */
  --texte: #26262b;           /* texte principal (anthracite) */
  --texte-doux: #5a5852;      /* texte secondaire */
  --accent: #c2410c;          /* ✏️ COULEUR D'ACCENT : boutons, liens, icônes */
  --accent-fonce: #9a3209;    /* accent au survol */
  --sur-accent: #ffffff;      /* texte posé sur la couleur d'accent */
  --bordure: #ddd3c0;         /* bordures des cartes */
  --ombre: 0 1px 2px rgba(38, 38, 43, .06), 0 8px 24px rgba(38, 38, 43, .07);

  /* --- POLICES (polices système : rien à télécharger, conforme RGPD) --- */
  --police-texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --taille-texte: 1.0625rem;  /* taille du texte courant (17 px) */

  /* --- ESPACEMENTS ET FORMES --- */
  --largeur: 68rem;                          /* largeur maximale du contenu */
  --marge: 1.25rem;                          /* marge latérale sur mobile */
  --espace-section: clamp(3.5rem, 8vw, 6rem);/* espace vertical entre les sections */
  --rayon: 14px;                             /* arrondi des cartes */

  /* --- MOTIF HEXAGONAL de fond (hero et contact) --- */
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16.2v32.3L28 64.7 0 48.5V16.2zM28 64.7V97' fill='none' stroke='%23888' stroke-opacity='.17'/%3E%3C/svg%3E");
}

/* --- COULEURS (mode sombre, activé automatiquement selon le réglage du visiteur) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --fond: #17181c;
    --fond-alt: #1e2025;
    --fond-carte: #24262c;
    --texte: #ece8df;
    --texte-doux: #b3aea3;
    --accent: #ff8a4c;        /* ✏️ couleur d'accent en mode sombre */
    --accent-fonce: #ffa878;
    --sur-accent: #1b1b1f;
    --bordure: #383b43;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ==========================================================================
   À partir d'ici : mise en forme. Inutile d'y toucher pour un usage courant.
   ========================================================================== */

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: var(--taille-texte)/1.65 var(--police-texte); }
h1, h2, h3, h4 { font-family: var(--police-titre); line-height: 1.2; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.15rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; margin-bottom: .3em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-fonce); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--fond-carte); }

/* --- En-tête --- */
.site-header { position: sticky; top: 0; background: var(--fond); border-bottom: 1px solid var(--bordure); z-index: 5; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding-block: .6rem; }
.logo { margin-right: auto; font: 700 1.4rem var(--police-titre); color: var(--texte); text-decoration: none; }
.logo span { color: var(--accent); }
.logo:hover { color: var(--texte); }
/* Menu burger (smartphone et tablette) : une case à cocher invisible ouvre et ferme le menu, sans JavaScript */
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; }
.burger { order: 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: 10px; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 1.2rem; height: 2px; background: var(--texte); border-radius: 2px; transition: transform .2s; }
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.nav-toggle:checked + .burger span { background: transparent; }
.nav-toggle:checked + .burger span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle:checked + .burger span::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle:focus-visible + .burger { outline: 3px solid var(--accent); outline-offset: 3px; }
.menu { order: 3; width: 100%; display: none; flex-direction: column; max-height: calc(100vh - 5rem); overflow-y: auto; }
.nav-toggle:checked ~ .menu { display: flex; }
.menu a { padding: .65rem 0; border-top: 1px solid var(--bordure); color: var(--texte); text-decoration: none; }
.menu a:hover { color: var(--accent); }
.lang { order: 1; display: flex; gap: .15rem; font-size: .85rem; font-weight: 700; }
.lang a { padding: .3rem .5rem; border-radius: 6px; color: var(--texte-doux); text-decoration: none; }
.lang a:hover { color: var(--accent); }
.lang a[aria-current] { background: var(--texte); color: var(--fond); }

/* --- Hero --- */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem); background-image: var(--motif); }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
.hero-text { animation: monte .6s ease both; }
.dispo { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1.2rem; padding: .3rem .9rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: 999px; font-size: .88rem; font-weight: 700; }
.dispo span { width: .6rem; height: .6rem; background: var(--accent); border-radius: 50%; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tagline { font: italic 1.4rem/1.4 var(--police-titre); color: var(--accent); }
.lead { max-width: 38rem; font-size: 1.12rem; color: var(--texte-doux); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 0; }
.btn { display: inline-flex; align-items: center; padding: .8rem 1.5rem; border: 2px solid var(--accent); border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .15s, background-color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--sur-accent); }
.btn--primary:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: var(--sur-accent); }
.btn--ghost { background: var(--fond); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--sur-accent); }

/* Éventail de cartes (décor du hero, visible sur grand écran) */
.fan { display: none; position: relative; height: 18rem; }
.fan span { position: absolute; left: 50%; bottom: 1rem; width: 8.5rem; height: 12rem; margin-left: -4.25rem; padding: .7rem .8rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); font: 700 1.3rem var(--police-titre); transform-origin: 50% 130%; transform: rotate(var(--r)); animation: eventail .8s ease both; }
.fan span:nth-child(1) { --r: -27deg; }
.fan span:nth-child(2) { --r: -9deg; }
.fan span:nth-child(3) { --r: 9deg; }
.fan span:nth-child(4) { --r: 27deg; background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.fan span:nth-child(4) .ico { color: var(--sur-accent); }
.fan .ico { width: 1.7rem; height: 1.7rem; margin-bottom: .15rem; }
@keyframes eventail { from { transform: rotate(0); } }
@keyframes monte { from { opacity: 0; transform: translateY(12px); } }

/* --- Sections --- */
.section { padding-block: var(--espace-section); }
.section--alt { background: var(--fond-alt); }
.intro { max-width: 44rem; margin-bottom: 2rem; font-size: 1.1rem; color: var(--texte-doux); }
.sub { margin-top: 2.5rem; }
.note { margin-top: 1.5rem; color: var(--texte-doux); }

/* --- Cartes (façon cartes à jouer) --- */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card { position: relative; margin: 0; padding: 1.5rem 1.4rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); }
/* Effet au survol : uniquement sur les cartes « univers » et les chiffres clés.
   Pour l'ajouter ailleurs, ajouter le sélecteur de la section à ces deux lignes. */
.card--jeu, .stats .card { transition: transform .2s; }
.card--jeu:hover, .stats .card:hover { transform: translateY(-4px) rotate(-.4deg); }
.card > :last-child { margin-bottom: 0; }
.card p, .card ul { color: var(--texte-doux); }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li::marker { color: var(--accent); }
.beyond { margin-top: 1.1rem; }
.card--jeu::after { content: "◆"; position: absolute; top: .7rem; right: .9rem; font-size: .7rem; color: var(--accent); opacity: .6; }
.ico { display: block; width: 2.6rem; height: 2.6rem; margin-bottom: .8rem; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* --- Langues : pions de niveau et combinaisons --- */
.langs { display: grid; gap: 2rem; align-items: center; }
.langmap { display: block; width: 100%; max-width: 23rem; margin-inline: auto; }
.langmap line { stroke: var(--texte-doux); stroke-width: 1.5; }
.langmap marker path { fill: var(--texte-doux); }
.langmap use { fill: var(--accent); }
.langmap text { fill: var(--texte); font: 700 17px var(--police-titre); text-anchor: middle; }
.langlist { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.langlist li { padding: .8rem 1rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: var(--rayon); font-weight: 700; }
.langlist b { margin-right: .4rem; font-family: var(--police-titre); color: var(--accent); }

/* --- Chiffres clés (statistiques de personnage) --- */
.stats { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); margin: 0; padding: 0; list-style: none; }
.stats li { text-align: center; color: var(--texte-doux); }
.stats strong { display: grid; place-items: center; width: 5.4rem; height: 6rem; margin: 0 auto .9rem; background: var(--accent); color: var(--sur-accent); font: 700 1.7rem var(--police-titre); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.stats span { display: block; }

/* --- Exemple avant / après --- */
.compare { display: grid; gap: 1.1rem; }
.tag { margin-bottom: .8rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-doux); }
.card .card-title { margin-bottom: .4rem; font: 700 1.25rem var(--police-titre); color: var(--texte); }
.card--bad { border-style: dashed; box-shadow: none; }
.card--good { border: 2px solid var(--accent); }
.card--good .tag { color: var(--accent); }
.notes { max-width: 48rem; margin: 1.75rem 0 0; padding-left: 1.2rem; color: var(--texte-doux); }
.notes li { margin-bottom: .4rem; }
.notes li::marker { color: var(--accent); }

/* --- Étapes (jetons numérotés) --- */
.steps { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: etape; }
.steps li { padding-top: 4.4rem; counter-increment: etape; }
.steps li::before { content: counter(etape); position: absolute; top: 1.3rem; left: 1.4rem; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; background: var(--accent); border-radius: 8px; color: var(--sur-accent); font: 700 1.15rem var(--police-titre); transform: rotate(-6deg); }

/* --- Expérience (ligne de temps) et formation --- */
.xp { display: grid; gap: 2.5rem; align-items: start; }
.open { margin-top: 1.2rem; padding: .7rem 1rem; background: var(--fond-carte); border-left: 4px solid var(--accent); border-radius: 0 var(--rayon) var(--rayon) 0; font-weight: 700; }
.timeline { display: grid; gap: 1.5rem; padding-left: 1.5rem; border-left: 2px solid var(--bordure); }
.timeline article { position: relative; }
.timeline article::before { content: ""; position: absolute; top: .4rem; left: calc(-1.5rem - 7px); width: 12px; height: 12px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.timeline p { margin: 0; color: var(--texte-doux); }
.timeline .date { margin-bottom: .2rem; font-size: .82rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }

.timeline h3 { margin-bottom: .15em; font-size: 1.12rem; }
.timeline .ctx { margin-bottom: .3rem; font-weight: 700; color: var(--texte); }

/* --- Outils (badges) --- */
.card .tags { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.tags li { padding: .2rem .75rem; background: var(--fond); border: 1px solid var(--bordure); border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--texte); }

/* --- Contact --- */
.contact { background-image: var(--motif); text-align: center; }
.contact .intro { margin-inline: auto; }
.mail { font: 700 clamp(1.35rem, 6vw, 2.3rem) var(--police-titre); overflow-wrap: anywhere; }
.badge { display: inline-block; padding: .35rem 1rem; background: var(--fond-carte); border: 1px solid var(--bordure); border-radius: 999px; font-size: .9rem; font-weight: 700; }

/* --- Pied de page --- */
.site-footer { padding-block: 2rem; border-top: 1px solid var(--bordure); font-size: .92rem; color: var(--texte-doux); }
.site-footer p { margin-bottom: .5rem; }
.site-footer a { display: inline-block; margin-right: 1.2rem; }

/* --- Pages annexes (Impressum, Datenschutz, 404) --- */
.legal { max-width: 46rem; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
.legal h2 { margin-top: 2em; font-size: 1.35rem; }
.gameover { min-height: 75vh; display: grid; place-content: center; justify-items: center; text-align: center; background-image: var(--motif); }
.gameover .ico { width: 4.5rem; height: 4.5rem; margin-inline: auto; }
.gameover .lead { margin-inline: auto; }
.gameover ul { margin: 1.5rem 0; padding: 0; list-style: none; color: var(--texte-doux); }

/* --- Grands écrans --- */
@media (min-width: 54rem) {
  :root { --marge: 2rem; }
  .site-header .wrap { gap: .3rem 1.5rem; padding-block: .7rem; }
  .nav-toggle, .burger, .menu .m-extra { display: none; }
  .menu { order: 0; width: auto; display: flex; flex-direction: row; gap: 1.2rem; overflow: visible; }
  .menu a { padding: .35rem 0; border-top: 0; border-bottom: 2px solid transparent; font-size: .95rem; white-space: nowrap; }
  .menu a:hover { border-bottom-color: var(--accent); color: var(--texte); }
  .lang { order: 0; }
  .hero .wrap { grid-template-columns: 1.3fr .7fr; }
  .fan { display: block; }
  .compare { grid-template-columns: repeat(3, 1fr); }
  .xp { grid-template-columns: 1.6fr 1fr; }
  .langs { grid-template-columns: 1fr 1fr; }
}

/* --- Animations coupées si le visiteur le demande --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card--jeu:hover, .stats .card:hover, .btn:hover { transform: none; }
}

/* --- Impression (le site sert aussi de CV) --- */
@media print {
  :root { --fond: #fff; --fond-alt: #fff; --fond-carte: #fff; --texte: #000; --texte-doux: #333; --accent: #000; --accent-fonce: #000; --sur-accent: #fff; --bordure: #999; --ombre: none; --motif: none; }
  body { font-size: 10.5pt; }
  .site-header { position: static; border: 0; }
  .menu, .lang, .fan, .actions, .skip, .burger, .nav-toggle { display: none !important; }
  .hero { padding-block: 0 1rem; }
  .section { padding-block: .9rem; }
  .grid, .steps, .compare { gap: .5rem; }
  .card { padding: .7rem .9rem; break-inside: avoid; }
  .steps li { padding-top: 3.2rem; }
  .steps li::before { top: .7rem; left: .9rem; }
  .timeline article, .stats li { break-inside: avoid; }
  .dispo { border: 0; padding: 0; }
  .dispo span { display: none; }
  h2, h3, h4 { break-after: avoid; }
  a { color: #000; text-decoration: none; }
  * { animation: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
