/* ==========================================================================
   Kaskalya · charte graphique E « Aube alpine » · SOURCE UNIQUE
   --------------------------------------------------------------------------
   Toute couleur, police ou forme de la marque se définit ICI et nulle part
   ailleurs. Le site vitrine, la page des maquettes et la maquette 3D sont
   reconstruits à partir de ce fichier (tools/build_all.py, tools/build.py).
   Règles d'usage : identite/CHARTE.md. Contrôle : tools/verifier_charte.py.
   Thème clair sur :root ; thème sombre sur [data-theme="dark"] et selon la
   préférence du système. La maquette 3D est en thème clair par défaut (sombre
   si site.json > theme = sombre). Une zone Nuit alpine (.lk-zone-nuit) reprend
   localement les rôles du thème sombre dans une page claire.
   ========================================================================== */
/* Polices de la charte, servies depuis identite/polices/ (WOFF2, sous-ensemble latin, licence SIL OFL 1.1 :
   polices/OFL-*.txt). Aucun appel à un service tiers. Les constructions copient ces fichiers ou les
   embarquent en data: URI (tools/charte.py). */
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:400;font-display:swap;src:url("polices/instrument-sans-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:500;font-display:swap;src:url("polices/instrument-sans-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:600;font-display:swap;src:url("polices/instrument-sans-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"Instrument Sans";font-style:normal;font-weight:700;font-display:swap;src:url("polices/instrument-sans-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"Instrument Serif";font-style:normal;font-weight:400;font-display:swap;src:url("polices/instrument-serif-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Instrument Serif";font-style:italic;font-weight:400;font-display:swap;src:url("polices/instrument-serif-latin-400-italic.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:400;font-display:swap;src:url("polices/ibm-plex-mono-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-weight:500;font-display:swap;src:url("polices/ibm-plex-mono-latin-500-normal.woff2") format("woff2")}

:root{
  /* Palette de marque */
  --lk-nuit:#0C1B2A;          /* Nuit alpine : fonds de salle de conduite */
  --lk-ardoise:#1F3A4D;       /* Ardoise : panneaux sombres */
  --lk-lac:#1B6F8F;           /* Lac : eau, données, liens */
  --lk-glacier:#9FC7D6;       /* Glacier : texte secondaire sur fond nuit */
  --lk-neve:#EEF3F5;          /* Névé : fond clair */
  --lk-aube:#F0A04B;          /* Aube : centrales, production, bouton principal */
  --lk-braise:#D9502A;        /* Braise : chantiers, alertes */
  --lk-aube-clair:#F7C388;    /* accent en italique sur fond nuit */
  --lk-sur-nuit:#EEF3F5;      /* texte principal sur fond nuit */
  --lk-sur-nuit-2:#CFE0E7;    /* texte courant sur fond nuit */

  /* Polices */
  --lk-police-titre:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --lk-police-texte:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --lk-police-accent:"Instrument Serif",Georgia,serif;
  --lk-police-donnees:"IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace;

  /* Formes */
  --lk-rayon:10px;
  --lk-rayon-carte:14px;
  --lk-approche-logo:-.045em;

  /* Rôles, thème clair */
  --lk-fond:#EEF3F5;
  --lk-fond-profond:#E2EBEF;
  --lk-surface:#FFFFFF;
  --lk-surface-2:#F6F9FA;
  --lk-creux:#E2EBEF;
  --lk-encre:#0C1B2A;
  --lk-encre-2:#2E4A5C;
  --lk-encre-3:#587486;
  --lk-encre-4:#7D95A3;
  --lk-trait:#C9D8DF;
  --lk-trait-2:#B3C7D1;
  --lk-eau:#1B6F8F;
  --lk-eau-doux:#D6E9F0;
  --lk-production:#A85A12;    /* Aube foncée, lisible sur fond clair */
  --lk-chantier:#D9502A;
  --lk-chantier-doux:#FBE1D6;
  --lk-perte:#B3372B;
  --lk-ok:#2D7A55;
  --lk-alerte:#B7861A;
  --lk-critique:#C62828;
  --lk-prevu:#7D95A3;
  --lk-equipe:#1E8F63;
  --lk-neige:#DCEBFA;
  --lk-ombre:0 1px 2px rgba(12,27,42,.06),0 10px 30px rgba(12,27,42,.08);
  --lk-aube-doux:#FCE9D2;     /* fond léger associé à l'Aube : action principale, onglet actif */

  /* Signature et relief de l'interface du logiciel (issue #116) */
  --lk-filet-signature:linear-gradient(90deg,var(--lk-aube) 0%,var(--lk-aube-clair) 45%,var(--lk-glacier) 100%);   /* anneau de l'emblème, déplié */
  --lk-fond-signature:linear-gradient(160deg,var(--lk-ardoise) 0%,var(--lk-nuit) 74%);                              /* zones Nuit alpine localisées */
  --lk-lueur-aube:radial-gradient(120% 140% at 50% 135%,color-mix(in srgb,var(--lk-aube) 34%,transparent) 0%,color-mix(in srgb,var(--lk-aube) 10%,transparent) 38%,transparent 62%);   /* lumière d'horizon */
  --lk-focus:#0C1B2A;         /* anneau de focus clavier (double anneau : surface puis focus) */
  --lk-elevation-1:0 1px 0 rgba(12,27,42,.04),0 1px 3px rgba(12,27,42,.09);                       /* carte posée */
  --lk-elevation-2:0 1px 2px rgba(12,27,42,.10),0 8px 20px -6px rgba(12,27,42,.22);               /* surface flottant sur la scène */
  --lk-elevation-3:0 2px 4px rgba(12,27,42,.12),0 22px 44px -10px rgba(12,27,42,.42);             /* menu, roue, dialogue */
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --lk-fond:#0C1B2A; --lk-fond-profond:#07121D; --lk-surface:#13283A; --lk-surface-2:#1A3347; --lk-creux:#0F2233;
    --lk-encre:#EEF3F5; --lk-encre-2:#B5CAD4; --lk-encre-3:#87A1AE; --lk-encre-4:#5A7688;
    --lk-trait:#22405A; --lk-trait-2:#2E5570;
    --lk-eau:#6FC1E0; --lk-eau-doux:#14384A; --lk-production:#F7B25C; --lk-chantier:#F07A52; --lk-chantier-doux:#3A1F16;
    --lk-perte:#F07A62; --lk-ok:#6CC592; --lk-alerte:#F59E42; --lk-critique:#EF5350; --lk-prevu:#9AA9B5; --lk-equipe:#3DDC97; --lk-neige:#DCEBFA;
    --lk-ombre:0 1px 2px rgba(0,0,0,.3),0 10px 30px rgba(0,0,0,.25);
    --lk-aube-doux:#3A2A16; --lk-focus:#EEF3F5;
    --lk-elevation-1:0 1px 0 rgba(0,0,0,.25),0 1px 3px rgba(0,0,0,.35);
    --lk-elevation-2:0 1px 2px rgba(0,0,0,.4),0 8px 22px -6px rgba(0,0,0,.6);
    --lk-elevation-3:0 2px 6px rgba(0,0,0,.45),0 24px 50px -10px rgba(0,0,0,.72);
  }
}
/* thème sombre explicite, et zone Nuit alpine d'une page claire (en-tête de la maquette, moyeu de la roue d'actions) */
:root[data-theme="dark"],.lk-zone-nuit{
  color-scheme:dark;
  --lk-fond:#0C1B2A; --lk-fond-profond:#07121D; --lk-surface:#13283A; --lk-surface-2:#1A3347; --lk-creux:#0F2233;
  --lk-encre:#EEF3F5; --lk-encre-2:#B5CAD4; --lk-encre-3:#87A1AE; --lk-encre-4:#5A7688;
  --lk-trait:#22405A; --lk-trait-2:#2E5570;
  --lk-eau:#6FC1E0; --lk-eau-doux:#14384A; --lk-production:#F7B25C; --lk-chantier:#F07A52; --lk-chantier-doux:#3A1F16;
  --lk-perte:#F07A62; --lk-ok:#6CC592; --lk-alerte:#F59E42; --lk-critique:#EF5350; --lk-prevu:#9AA9B5; --lk-equipe:#3DDC97; --lk-neige:#DCEBFA;
  --lk-ombre:0 1px 2px rgba(0,0,0,.3),0 10px 30px rgba(0,0,0,.25);
  --lk-aube-doux:#3A2A16; --lk-focus:#EEF3F5;
  --lk-elevation-1:0 1px 0 rgba(0,0,0,.25),0 1px 3px rgba(0,0,0,.35);
  --lk-elevation-2:0 1px 2px rgba(0,0,0,.4),0 8px 22px -6px rgba(0,0,0,.6);
  --lk-elevation-3:0 2px 6px rgba(0,0,0,.45),0 24px 50px -10px rgba(0,0,0,.72);
}
