/* ==========================================================================
   GK+ — Charte graphique v1.0 « Territoire Lucarne » (octobre 2026)
   Socle commun à toutes les pages : couleurs, typographie, formes, éléments du plan.
   Règles de la charte appliquées ici :
   - Craie 60 %, Encre 25 %, Outremer 10 %, Ligne 5 %. Outremer = actions et le +.
   - Jamais d'Outremer en texte sur Encre (Halo à la place). Ligne : filets seulement, jamais du texte.
   - Archivo Expanded 800 pour titres et chiffres clés, Archivo pour le texte, JetBrains Mono pour
     cotes, étiquettes (capitales) et légendes. Jamais d'italique. Titres en casse phrase.
   - Angles vifs : 2 px boutons et champs, 4 px cartes. Pas d'ombre portée, pas d'effet de verre.
   ========================================================================== */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('polices/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url('polices/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('polices/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url('polices/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Palette de la charte (p. 8) */
  --craie: #F3F1EB;
  --encre: #0F1217;
  --outremer: #3530E8;
  --halo: #A9A7FF;
  --ligne: #CDC8BC;
  --pierre: #5E5D57;
  --pelouse: #1F6B45;
  --carton: #C4352B;
  --blanc: #FFFFFF;
  /* Teintes dérivées, pour les fonds légers seulement (jamais pour du texte) */
  --outremer-voile: #E9E8FC;
  --pelouse-voile: #E4EEE8;
  --carton-voile: #F8E6E4;
  --craie-fonce: #EAE7DE;
  --outremer-appui: #2A26C4;

  /* Rôles (version Couleur, par défaut) */
  --gk-fond: var(--craie);
  --gk-surface: var(--blanc);
  --gk-texte: var(--encre);
  --gk-texte-2: var(--pierre);
  --gk-filet: var(--ligne);
  --gk-accent: var(--outremer);
  --gk-sur-accent: var(--craie);
  --gk-succes: var(--pelouse);
  --gk-erreur: var(--carton);

  /* Typographie (p. 10-11) */
  --gk-police: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gk-police-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gk-large: 125%;

  /* Formes (p. 12) */
  --gk-r-champ: 2px;
  --gk-r-carte: 4px;
  --gk-cadre: 3px;

  /* Espacements : base 4 */
  --gk-e1: 4px; --gk-e2: 8px; --gk-e3: 12px; --gk-e4: 16px; --gk-e5: 24px; --gk-e6: 32px; --gk-e7: 48px; --gk-e8: 64px;
}

/* Version Sombre : sur Encre, lettres Craie, + Halo (p. 4) */
.gk-sombre, [data-gk-sombre="true"] {
  --gk-fond: var(--encre);
  --gk-surface: #171B21;
  --gk-texte: var(--craie);
  --gk-texte-2: #B8B6AE;
  --gk-filet: #2C3038;
  --gk-accent: var(--halo);
  --gk-sur-accent: var(--encre);
  --gk-succes: #7FC49E;
  --gk-erreur: #EE8A82;
}

/* ---------- Pages simples du site (accueil, pages légales, 404, formulaires) ---------- */
.gk-page {
  margin: 0;
  background: var(--gk-fond);
  color: var(--gk-texte);
  font-family: var(--gk-police);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
.gk-page *, .gk-page *::before, .gk-page *::after { box-sizing: border-box; }
.gk-page em, .gk-page i { font-style: normal; font-weight: 700; }
.gk-page a { color: var(--gk-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.gk-page a:hover { text-decoration-thickness: 2px; }
.gk-page :focus-visible { outline: 2px solid var(--gk-accent); outline-offset: 2px; }
.gk-page ::selection { background: var(--outremer); color: var(--craie); }

.gk-conteneur { width: 100%; max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
.gk-lecture { max-width: 720px; }

/* En-tête et pied de page */
.gk-entete { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.gk-entete .gk-logo { display: block; width: 72px; height: auto; }
.gk-entete nav { display: flex; gap: 20px; align-items: center; }
.gk-entete nav a { color: var(--gk-texte); text-decoration: none; }
.gk-entete nav a:hover { color: var(--gk-accent); }
.gk-pied { border-top: 1px solid var(--gk-filet); margin-top: 64px; padding-top: 24px; padding-bottom: 40px; color: var(--gk-texte-2); font-size: 14px; }
.gk-pied nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 8px; }
.gk-pied a { color: var(--gk-texte-2); }
.gk-pied a:hover { color: var(--gk-accent); }

/* Hiérarchie (p. 11) — mobile, puis bureau à partir de 900 px */
.gk-display, .gk-h1, .gk-h2, .gk-h3 { font-stretch: var(--gk-large); font-weight: 800; margin: 0; text-wrap: balance; }
.gk-display { font-size: 44px; line-height: 0.95; letter-spacing: -0.02em; }
.gk-h1 { font-size: 38px; line-height: 1; letter-spacing: -0.02em; }
.gk-h2 { font-size: 30px; line-height: 1.05; letter-spacing: -0.015em; }
.gk-h3 { font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }
.gk-h4 { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0; }
.gk-chapo { font-size: 18px; line-height: 1.5; }
.gk-corps { font-size: 16px; line-height: 1.55; }
.gk-petit { font-size: 14px; line-height: 1.5; }
.gk-etiquette { font-family: var(--gk-police-mono); font-weight: 500; font-size: 12px; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gk-texte-2); }
.gk-legende { font-family: var(--gk-police-mono); font-weight: 400; font-size: 12px; line-height: 1.4; letter-spacing: 0.02em; color: var(--gk-texte-2); }
.gk-chiffre { font-stretch: var(--gk-large); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .gk-display { font-size: 88px; }
  .gk-h1 { font-size: 64px; }
  .gk-h2 { font-size: 44px; }
  .gk-h3 { font-size: 28px; }
  .gk-h4 { font-size: 20px; }
  .gk-chapo { font-size: 20px; }
  .gk-corps, .gk-page { font-size: 17px; }
  .gk-etiquette { font-size: 13px; }
  .gk-conteneur { padding-left: 32px; padding-right: 32px; }
}

/* Boutons (p. 12) : 2 px, pas d'ombre */
.gk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--gk-r-champ);
  font: 700 16px/1.2 var(--gk-police); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.gk-btn-primaire { background: var(--gk-accent); color: var(--gk-sur-accent); }
.gk-btn-primaire:hover { background: var(--outremer-appui); }
.gk-sombre .gk-btn-primaire:hover, [data-gk-sombre="true"] .gk-btn-primaire:hover { background: var(--craie); }
.gk-btn-secondaire { background: transparent; color: var(--gk-texte); border-color: var(--gk-texte); }
.gk-btn-secondaire:hover { background: var(--gk-texte); color: var(--gk-fond); }
.gk-page a.gk-btn { text-decoration: none; }
.gk-page a.gk-btn-primaire { color: var(--gk-sur-accent); }
.gk-page a.gk-btn-secondaire { color: var(--gk-texte); }
.gk-page a.gk-btn-secondaire:hover { color: var(--gk-fond); }

/* Champs */
.gk-champ { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--gk-r-champ); border: 1px solid var(--gk-filet);
  background: var(--gk-surface); color: var(--gk-texte); font: 400 16px/1.4 var(--gk-police); }
.gk-champ:focus { outline: 2px solid var(--gk-accent); outline-offset: 0; border-color: var(--gk-accent); }

/* Profondeur (p. 12) : fond Craie, cartes blanches et filet Ligne */
.gk-carte { background: var(--gk-surface); border: 1px solid var(--gk-filet); border-radius: var(--gk-r-carte); padding: 20px; }

/* Le + (p. 3) : seul élément en couleur, toujours en haut à droite de l'angle */
.gk-plus { display: inline-block; width: 10px; height: 10px; flex-shrink: 0;
  background: var(--gk-accent);
  clip-path: polygon(30% 0, 70% 0, 70% 30%, 100% 30%, 100% 70%, 70% 70%, 70% 100%, 30% 100%, 30% 70%, 0 70%, 0 30%, 30% 30%); }

/* Les cotes (p. 12) : filet 1 px, valeur en mono */
.gk-cote { display: flex; align-items: center; gap: 10px; font-family: var(--gk-police-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--gk-texte); }
.gk-cote::before, .gk-cote::after { content: ''; flex: 1; height: 1px; background: currentColor; }
.gk-cote::before { box-shadow: -0.5px 0 0 0 currentColor; border-left: 1px solid currentColor; height: 9px; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
.gk-cote::after { border-right: 1px solid currentColor; height: 9px; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }

/* Le cadre 3:1 (p. 12) : barre et poteaux tracés à 3 px, jamais de ligne de but */
.gk-cadre { position: relative; aspect-ratio: 3 / 1; border: var(--gk-cadre) solid var(--gk-texte); border-bottom: 0; overflow: hidden; }
.gk-cadre > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gk-cadre > .gk-plus { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; }
/* Emplacement photo à fournir : motif de la charte (p. 13) */
.gk-photo-vide { background: repeating-linear-gradient(135deg, #E7E3D8 0 14px, #DDD8CB 14px 28px); }
.gk-sombre .gk-photo-vide, [data-gk-sombre="true"] .gk-photo-vide { background: repeating-linear-gradient(135deg, #161A21 0 14px, #1C2129 14px 28px); }
.gk-photo-legende { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); background: var(--encre); color: var(--craie);
  font-family: var(--gk-police-mono); font-size: 12px; line-height: 1.35; padding: 6px 8px; }

/* Listes « à faire / à éviter » de la charte : carrés pleins */
.gk-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.gk-liste li { position: relative; padding-left: 22px; }
.gk-liste li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 10px; height: 10px; background: var(--gk-accent); }
.gk-liste.gk-non li::before { background: var(--gk-erreur); }

/* Icônes : trait 2 px, terminaisons carrées, angles vifs (p. 12) */
.gk-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }

/* Messages */
.gk-message { border-left: 3px solid var(--gk-accent); background: var(--gk-surface); padding: 12px 14px; border-radius: 0 var(--gk-r-carte) var(--gk-r-carte) 0; }
.gk-message.gk-succes { border-color: var(--gk-succes); }
.gk-message.gk-erreur { border-color: var(--gk-erreur); }

/* Contenu long (pages légales) */
.gk-texte-long h1 { font-stretch: var(--gk-large); font-weight: 800; font-size: 38px; line-height: 1; letter-spacing: -0.02em; margin: 8px 0 12px; }
.gk-texte-long h2 { font-stretch: var(--gk-large); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; margin: 40px 0 10px; }
.gk-texte-long h3 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
.gk-texte-long p, .gk-texte-long li { color: var(--gk-texte); }
.gk-texte-long ul, .gk-texte-long ol { padding-left: 22px; }
.gk-texte-long li { margin: 6px 0; }
.gk-texte-long table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.gk-texte-long th { text-align: left; font-family: var(--gk-police-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gk-texte-2); }
.gk-texte-long th, .gk-texte-long td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--gk-filet); vertical-align: top; }
.gk-texte-long .gk-maj { font-family: var(--gk-police-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--gk-texte-2); }
@media (min-width: 900px) { .gk-texte-long h1 { font-size: 56px; } .gk-texte-long h2 { font-size: 26px; } }

@media (prefers-reduced-motion: reduce) { .gk-page * { transition: none !important; animation: none !important; } }
