/* =====================================================================
   KUYIR — TOKENS (source de vérité visuelle)  ·  site kuyir.com + gestion
   Auteur : cuir-design  ·  2026-10-22
   Zéro CDN, zéro style en ligne : compatible CSP stricte (style-src 'self').
   Charger EN PREMIER :  <link rel="stylesheet" href="css/kuyir-tokens.css">
   Chemins des polices/textures relatifs à CE fichier (../...).
   ===================================================================== */

/* ---------- POLICES (licence SIL OFL 1.1, fichiers locaux) ---------- */
@font-face { font-family: "Josefin Sans"; src: url("../fonts/josefin-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("../fonts/josefin-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url("../fonts/josefin-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-500.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-500-italic.woff2") format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* ---------- 1. PALETTE KUYIR (valeurs brutes) ---------- */
  /* Marque */
  --k-brun:          #4E150C;  /* Brun KUYIR — logo, bande de ceinture, CTA      */
  --k-brun-profond:  #3A0F08;  /* ombre de la bande, survol des CTA             */
  --k-brun-clair:    #6B2416;  /* reflet haut de la bande                       */
  /* Cuirs */
  --k-ebene:         #2B1A0F;  /* texte principal (16,7:1 sur blanc)            */
  --k-chocolat:      #4A2C17;  /* menu latéral gestion, pied de page            */
  --k-tabac:         #7B4A26;  /* texte secondaire fort (7,4:1 sur blanc)       */
  --k-cognac:        #A0602E;  /* accent cuir — décor, grands titres seulement  */
  --k-cognac-fonce:  #8C4F22;  /* liens et accents TEXTE (6,5:1 sur blanc)      */
  --k-havane:        #C9A16B;  /* cuir clair — décor, texte sur fond foncé      */
  /* Fil & métal */
  --k-fil:           #F8E6BA;  /* fil de surpiqûre crème (relevé sur le logo)   */
  --k-laiton:        #B8873B;  /* boucle, filets, anneau de focus               */
  --k-laiton-clair:  #D8B877;  /* reflet de la boucle, texte or sur foncé       */
  --k-laiton-sombre: #8A6424;  /* ombre de la boucle, or lisible sur clair      */
  /* Neutres */
  --k-blanc:         #FFFFFF;  /* blanc pur — fond gestion, fond logo couleur   */
  --k-ivoire:        #FBF7EF;  /* cartes, champs                                */
  --k-creme:         #F5EEE1;  /* fond du site                                  */
  --k-parchemin:     #EBE0CC;  /* sections alternées, en-têtes de tableau       */
  --k-lin:           #DDCEB4;  /* bordures                                      */
  --k-encre-2:       #5A4635;  /* texte secondaire (8,9:1 sur blanc)            */
  /* États (accordés au cuir, tous ≥ 4,5:1 sur blanc/ivoire) */
  --k-succes:        #4E6A2C;
  --k-alerte:        #8A5A0E;
  --k-erreur:        #9B2C1F;
  --k-succes-fond:   #EEF2E3;
  --k-alerte-fond:   #F8EDD6;
  --k-erreur-fond:   #F7E3DF;

  /* ---------- 2. RÔLES (utiliser CEUX-CI dans les composants) ---------- */
  --bg:             var(--k-creme);
  --bg-alt:         var(--k-parchemin);
  --surface:        var(--k-ivoire);
  --surface-pure:   var(--k-blanc);
  --texte:          var(--k-ebene);
  --texte-2:        var(--k-encre-2);
  --texte-inverse:  var(--k-fil);
  --lien:           var(--k-cognac-fonce);
  --lien-survol:    var(--k-brun);
  --accent:         var(--k-brun);
  --filet:          var(--k-laiton);
  --bordure:        var(--k-lin);
  --focus:          var(--k-laiton);
  --cuir-bande:     var(--k-brun);
  --cuir-lateral:   var(--k-chocolat);

  /* ---------- 3. TYPOGRAPHIE ---------- */
  --f-titre: "Josefin Sans", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --f-texte: "Cormorant Garamond", "Garamond", "Baskerville", "Times New Roman", serif;
  --f-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Échelle (mobile-first). Cormorant a un petit œil : corps à 18 px minimum. */
  --fs-xs:   0.8125rem; /* 13 — mentions (Josefin uniquement)       */
  --fs-sm:   0.9375rem; /* 15 — méta, libellés                       */
  --fs-base: 1.125rem;  /* 18 — corps Cormorant                      */
  --fs-md:   1.3125rem; /* 21 — chapô                                */
  --fs-lg:   1.625rem;  /* 26 — titre de carte                       */
  --fs-xl:   2.125rem;  /* 34 — titre de section                     */
  --fs-2xl:  2.75rem;   /* 44 — titre de page                        */
  --fs-3xl:  clamp(2.6rem, 6vw, 4.5rem); /* héros                    */
  --lh-titre: 1.15;
  --lh-texte: 1.6;
  --ls-caps:  0.18em;   /* capitales Josefin interlettrées          */
  --ls-titre: 0.06em;

  /* ---------- 4. ESPACES (base 4 px) ---------- */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-8: 3rem; --sp-10: 4rem; --sp-12: 6rem;

  /* ---------- 5. FORMES, OMBRES ---------- */
  --r-sm: 3px; --r-md: 6px; --r-lg: 12px; --r-pill: 999px;
  --ombre-douce: 0 2px 10px rgba(43,26,15,.08);
  --ombre-carte: 0 10px 30px rgba(43,26,15,.12);
  --ombre-flot:  0 18px 50px rgba(43,26,15,.28);
  --ombre-bande: 0 3px 0 rgba(0,0,0,.18), 0 8px 18px rgba(43,26,15,.25);

  /* ---------- 6. SURPIQÛRE (pointillés réguliers, contrôlés) ---------- */
  --pique-couleur: var(--k-fil);
  --pique-trait: 9px;    /* longueur du point            */
  --pique-vide: 6px;     /* espace entre deux points     */
  --pique-epaisseur: 1.5px;
  --pique-retrait: 6px;  /* distance au bord du cuir     */

  /* ---------- 7. TEXTURES (calques à poser sur n'importe quelle couleur) ---------- */
  --tex-grain:     url("../textures/cuir-grain-calque.png");
  --tex-grain-fin: url("../textures/cuir-grain-fin-calque.png");

  /* ---------- 8. MOUVEMENT ---------- */
  --t-rapide: 160ms cubic-bezier(.4,0,.2,1);
  --t-douce:  320ms cubic-bezier(.22,.61,.36,1);
  --t-deroule: 420ms cubic-bezier(.2,.8,.2,1);

  /* ---------- 9. GABARITS ---------- */
  --max-w: 1240px;
  --max-w-texte: 68ch;
  --h-ceinture: 64px;          /* site   */
  --h-ceinture-gestion: 56px;  /* gestion */
  --l-lateral: 264px;
  --z-ceinture: 50; --z-deroulant: 60; --z-voile: 40;
}

/* Mouvement réduit : on coupe toutes les animations */
@media (prefers-reduced-motion: reduce) {
  :root { --t-rapide: 1ms; --t-douce: 1ms; --t-deroule: 1ms; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
