/* inerWeb Fluide — © 2026 Franck Henninot — Tous droits réservés (voir LICENSE) — inerweb.ovh */
/* ============================================================
   inerWeb Fluide — tokens.css
   Variables de la charte (maquette Claude Design validée 02/07/2026),
   reset minimal, base typographique, scrollbars, animations.
   ============================================================ */

/* ============================================================
   Polices auto-hébergées (CF-9)
   Sous-ensemble latin uniquement, poids réellement utilisés par
   la charte. Fichiers dans v8/polices/ — aucun appel réseau externe
   (hors-ligne complet, aucune IP transmise à un CDN de polices).
   ============================================================ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../polices/ibm-plex-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../polices/ibm-plex-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../polices/ibm-plex-sans-600.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../polices/ibm-plex-sans-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../polices/space-grotesk-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../polices/space-grotesk-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../polices/space-grotesk-700.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-400.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-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../polices/ibm-plex-mono-600.woff2') format('woff2');
}

:root {
  /* ---- Structure ---- */
  --marine-900: #0e2a47;   /* sidebar (fond), texte fort sur clair */
  --marine-800: #163c61;   /* dégradé sidebar (haut), survols sidebar */
  --marine-700: #1a3a63;   /* variantes marine */
  --fond:       #f5f8fb;   /* fond général de l'application */
  --fond-2:     #eef2f6;   /* fonds secondaires, rayures tableaux */
  --fond-3:     #fafbfd;   /* cartes secondaires */
  --carte:      #ffffff;   /* cartes, panneaux */
  --bordure:    #e2e8f0;   /* bordures par défaut */
  --bordure-2:  #e9eef4;   /* bordures fines */
  --bordure-3:  #dbe1e8;   /* séparateurs */

  /* ---- Texte (échelle slate) ---- */
  --texte:        #1e293b;
  --texte-2:      #475569;
  --texte-3:      #64748b;
  --texte-faible: #66768d;  /* IM-21 : #94a3b8 (2,56:1) trop clair sur blanc, remonté à 4,6:1 AA */

  /* ---- Accent (turquoise) ---- */
  --accent:        #12b5c9;  /* liens, actifs, icônes (jamais du texte seul sur blanc) */
  --accent-fort:   #0a7482;  /* IM-21 : texte accent/survol, assombri de #0e93a3 (3,67:1) à 5,48:1 AA */
  --accent-clair:  #19c3d6;  /* dégradés (aplats larges, pas de texte dessus) */
  --accent-fond:   #e0f7fa;  /* fonds de chips */
  --accent-fond-2: #f0fcfe;  /* fonds très clairs */
  --accent-halo:   #a5e9f1;  /* halos */

  /* ---- Sémantique ---- */
  --succes:         #16a34a;
  --succes-fond:    #dcfce7;
  --danger:         #dc2626;
  --danger-2:       #e11d48;
  --danger-fond:    #fee2e2;
  --danger-bordure: #fecaca;
  --avert:          #b45309;
  --avert-icone:    #f59e0b;
  --avert-fond:     #fef3c7;
  --violet:         #7c3aed;
  --violet-fond:    #f3e8ff;
  --info:           #2563eb;
  --info-fond:      #e0f2fe;
  --info-fond-2:    #e0efff;
  --orange:         #ea580c;
  --orange-fond:    #ffedd5;

  /* ---- Polices ---- */
  --police-corps:  'IBM Plex Sans', system-ui, sans-serif;
  --police-titres: 'Space Grotesk', sans-serif;
  --police-mono:   'IBM Plex Mono', monospace;

  /* ---- Rayons ---- */
  --rayon-carte:  14px;   /* cartes, panneaux */
  --rayon-bouton: 10px;   /* boutons, champs */
  --rayon-chip:   999px;  /* chips, pilules, pastilles */

  /* ---- Ombres ---- */
  --ombre-douce: 0 1px 3px rgba(15, 23, 42, .06);
  --ombre-haute: 0 12px 32px rgba(15, 23, 42, .18);

  /* ---- Dégradés ---- */
  /* IM-21 : bornes assombries (#19c3d6→#0e93a3 descendait à 2,86:1 avec du texte
     blanc dessus) ; la nouvelle plage tient 4,5:1 AA sur toute la surface du bouton. */
  --degrade-bouton:  linear-gradient(150deg, #0e7d8c, #0a6270);
  --degrade-sidebar: linear-gradient(150deg, #163c61, #0e2a47);
}

/* ============================================================
   Reset minimal
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* L'attribut `hidden` DOIT masquer, toujours.
   Le navigateur ne lui donne qu'un `display: none` de feuille utilisateur-agent,
   que N'IMPORTE QUELLE règle d'auteur posant un `display` écrase (une règle de
   l'auteur bat celle du navigateur, quelle que soit la spécificité). Résultat,
   avant le 14/07 : `.btn`, `.badge-rouge`, `.pied-session` et `.chip` déclarant
   tous un `display`, le code avait beau faire `element.hidden = true`, le bouton
   « Réinitialiser » des filtres, le badge d'alertes et le pied de session
   restaient AFFICHÉS. Prouvé au navigateur, corrigé ici en une ligne. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police-corps);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--police-titres);
  font-weight: 600;
  color: var(--texte);
  line-height: 1.25;
}

p {
  margin: 0;
}

a {
  color: var(--accent-fort);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

code, kbd, samp {
  font-family: var(--police-mono);
}

/* Valeurs mesurées, codes fluides, numéros CERFA */
.mono {
  font-family: var(--police-mono);
  font-variant-numeric: tabular-nums;
}

/* Visible uniquement pour les lecteurs d'écran */
.sr-uniquement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Scrollbars fines personnalisées
   ============================================================ */

* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================================
   Animations discrètes
   ============================================================ */

/* Apparition : léger glissement vertical + fondu */
@keyframes ifFade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulsation douce (pastilles d'état) */
@keyframes ifPulse {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70%  { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.anim-fade {
  animation: ifFade .28s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
