/* ==========================================================================
   GIE-EBH — Couche « Arcade »
   Grammaire relevée sur l'application web d'Arcade (Mobbin, août 2026) :
   blanc, filets 1px, rayons courts, aucune ombre portée, typographie petite
   et dense, UN seul accent saturé. Famille Linear/Vercel.

   Ce qui est repris : la MÉCANIQUE (densité, filets, échelle typographique,
   tuiles de stat, tableaux sans filets verticaux, pastilles de filtre).
   Ce qui ne l'est pas : l'identité d'Arcade. L'accent reste discutable et
   se change sur une ligne — voir --ac plus bas.

   Portée : panneaux Filament /app (membre) et /gie (Direction).
   Chargée par renderHook, sans étape de build : c'est un fichier statique.
   ========================================================================== */

:root {
  /* ---- Encres ---------------------------------------------------------- */
  --ink:      #16181D;   /* texte principal            14,9:1 sur blanc */
  --ink-2:    #4A5260;   /* texte secondaire            8,0:1 */
  --ink-3:    #6B7280;   /* libellés, méta              5,3:1 — plancher AA */

  /* ---- Surfaces -------------------------------------------------------- */
  --bg:       #FFFFFF;   /* fond d'application */
  --bg-sub:   #FAFAFA;   /* fond de zone de contenu, lignes survolées */
  --bg-mute:  #F3F4F6;   /* pastille d'état actif, en-têtes de tableau */
  --line:     #E6E8EB;   /* LE filet — l'unité de composition */
  --line-2:   #D3D7DC;   /* filet appuyé (séparateur de section) */

  /* ---- Accent ---------------------------------------------------------- */
  /* Bleu relevé littéralement dans le sélecteur de couleur d'Arcade. */
  --ac:       #2142E7;
  --ac-hover: #1B36BE;
  --ac-soft:  #EEF1FE;   /* fond de pastille/badge accentué */
  --ac-line:  #C7D0FA;

  /* ---- Sémantique ------------------------------------------------------ */
  --pos:      #067647;   /* delta positif — 4,9:1 sur blanc */
  --pos-soft: #ECFDF3;
  --neg:      #B42318;   /* delta négatif — 6,4:1 */
  --neg-soft: #FEF3F2;
  --warn:     #B54708;
  --warn-soft:#FFFAEB;

  /* ---- Géométrie ------------------------------------------------------- */
  --r-sm:     6px;       /* boutons, champs, badges */
  --r-md:     8px;       /* cartes, sections, tableaux */
  --r-lg:     10px;      /* fenêtres modales */

  /* ---- Typographie ----------------------------------------------------- */
  /* Arcade descend bas : 13px de corps, 11px de libellé. C'est ce qui fait
     la densité. On ne descend pas plus bas — 11px est le plancher lisible. */
  --t-label:  11.5px;
  --t-body:   13.5px;
  --t-title:  15px;
  --t-head:   22px;
  --t-stat:   27px;
}

/* Mode sombre : Arcade n'en a pas dans les écrans relevés. On garde celui de
   Filament mais on lui applique la même géométrie — filets plutôt qu'ombres,
   mêmes rayons — pour que les deux thèmes soient le même dessin. */
.dark {
  --ink:      #E8EAED;
  --ink-2:    #A8B0BC;
  --ink-3:    #8B93A1;
  --bg:       #16181D;
  --bg-sub:   #1B1E24;
  --bg-mute:  #23272F;
  --line:     #2C313A;
  --line-2:   #3A404B;
  --ac:       #6C8BFF;
  --ac-hover: #8AA3FF;
  --ac-soft:  #1E2540;
  --ac-line:  #38477A;
  --pos:      #75E0A7;
  --pos-soft: #12261C;
  --neg:      #FDA29B;
  --neg-soft: #2A1614;
  --warn:     #FEC84B;
  --warn-soft:#2A1F0E;
}

/* ==========================================================================
   1. Fond et texte
   ========================================================================== */

.fi-body {
  background: var(--bg-sub);
  color: var(--ink);
  font-size: var(--t-body);
  -webkit-font-smoothing: antialiased;
}

.fi-main-ctn { background: var(--bg-sub); }

/* Arcade laisse respirer horizontalement mais serre la verticale. */
.fi-main { padding-block: 1.75rem; }

/* Titre de page : 22px, poids 600, pas de 30px bold par défaut. */
.fi-header-heading {
  font-size: var(--t-head);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.fi-header-subheading {
  font-size: var(--t-body);
  color: var(--ink-3);
}

/* ==========================================================================
   2. Barre latérale — étroite, blanche, filet à droite, actif = pastille
   ========================================================================== */

.fi-sidebar {
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.fi-sidebar-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

/* Libellé de groupe : minuscule, gris, espacé — le repère de section. */
.fi-sidebar-group-label {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: none;
}

.fi-sidebar-item-button {
  font-size: var(--t-body);
  font-weight: 450;
  border-radius: var(--r-sm);
  padding-block: 0.375rem;
  color: var(--ink-2);
  transition: background-color .12s ease, color .12s ease;
}

.fi-sidebar-item-button:hover { background: var(--bg-mute); color: var(--ink); }

/* L'état actif d'Arcade est une pastille grise, PAS une couleur d'accent :
   l'accent reste réservé aux actions. Repère non chromatique, donc lisible
   sans percevoir la couleur. */
.fi-sidebar-item-active .fi-sidebar-item-button {
  background: var(--bg-mute);
  color: var(--ink);
  font-weight: 550;
}

.fi-sidebar-item-icon { color: var(--ink-3); }
.fi-sidebar-item-active .fi-sidebar-item-icon { color: var(--ink); }

/* ==========================================================================
   3. Barre supérieure
   ========================================================================== */

.fi-topbar > nav {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

/* ==========================================================================
   4. Sections et cartes — filet, rayon court, AUCUNE ombre
   C'est le geste le plus caractéristique d'Arcade.
   ========================================================================== */

.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn > .fi-section {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: none;
}

.fi-section-header { border-bottom: 1px solid var(--line); }

.fi-section-header-heading {
  font-size: var(--t-title);
  font-weight: 600;
  color: var(--ink);
}

.fi-section-header-description {
  font-size: var(--t-body);
  color: var(--ink-3);
}

/* ==========================================================================
   5. Tuiles de statistique
   Arcade : libellé gris 11px → grand nombre → delta ▲▼ coloré. Rien d'autre.
   ========================================================================== */

.fi-wi-stats-overview-stat { padding: 1rem 1.125rem; }

.fi-wi-stats-overview-stat-label {
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}

.fi-wi-stats-overview-stat-value {
  font-size: var(--t-stat);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  /* Chiffres tabulaires : les colonnes de nombres s'alignent, comme dans
     Insights. Sans ça, « 2 206 » et « 1 154 » ne tombent pas en face. */
  font-variant-numeric: tabular-nums;
}

.fi-wi-stats-overview-stat-description {
  font-size: var(--t-label);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   6. Tableaux — séparateurs horizontaux fins, zéro filet vertical
   ========================================================================== */

.fi-ta-header-cell {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: var(--t-label);
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.01em;
  text-transform: none;
  padding-block: 0.625rem;
}

.fi-ta-row { border-bottom: 1px solid var(--line); }
.fi-ta-row:last-child { border-bottom: 0; }
.fi-ta-row:hover { background: var(--bg-sub); }

.fi-ta-cell {
  font-size: var(--t-body);
  color: var(--ink-2);
  padding-block: 0.6875rem;
}

.fi-ta-text-item-label { font-variant-numeric: tabular-nums; }

/* La première colonne porte le nom : elle est l'ancre de la ligne. */
.fi-ta-cell:first-child .fi-ta-text-item-label {
  color: var(--ink);
  font-weight: 550;
}

.fi-ta-header-ctn,
.fi-ta-header { border-bottom: 1px solid var(--line); }

.fi-ta-empty-state { background: var(--bg); }
.fi-ta-empty-state-heading { font-size: var(--t-title); color: var(--ink); }
.fi-ta-empty-state-description { font-size: var(--t-body); color: var(--ink-3); }

/* ==========================================================================
   7. Boutons
   Primaire = l'accent, plein, rayon 6px. Secondaire = fileté sur blanc.
   ========================================================================== */

.fi-btn {
  border-radius: var(--r-sm);
  font-size: var(--t-body);
  font-weight: 550;
  box-shadow: none;
  transition: background-color .12s ease, border-color .12s ease;
}

.fi-btn.fi-color-primary,
.fi-btn.fi-btn-color-primary {
  background: var(--ac);
  color: #fff;
  border: 1px solid var(--ac);
}

.fi-btn.fi-color-primary:hover,
.fi-btn.fi-btn-color-primary:hover {
  background: var(--ac-hover);
  border-color: var(--ac-hover);
}

.fi-btn.fi-color-gray {
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}

.fi-btn.fi-color-gray:hover { background: var(--bg-mute); color: var(--ink); }

/* Anneau de focus visible et non ambigu — obligation d'accessibilité, et
   Arcade le respecte. Ne jamais le retirer au nom du dessin. */
.fi-btn:focus-visible,
.fi-input:focus-visible,
.fi-sidebar-item-button:focus-visible {
  outline: 2px solid var(--ac);
  outline-offset: 2px;
}

/* ==========================================================================
   8. Champs de formulaire
   ========================================================================== */

.fi-input-wrp {
  border-radius: var(--r-sm);
  box-shadow: none;
  border: 1px solid var(--line-2);
  background: var(--bg);
}

.fi-input-wrp:focus-within {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px var(--ac-soft);
}

.fi-input { font-size: var(--t-body); color: var(--ink); }
.fi-input::placeholder { color: var(--ink-3); }

.fi-fo-field-wrp-label {
  font-size: var(--t-body);
  font-weight: 550;
  color: var(--ink);
}

.fi-fo-field-wrp-hint,
.fi-fo-field-wrp-helper-text { font-size: var(--t-label); color: var(--ink-3); }

/* ==========================================================================
   9. Badges — pastilles fines, fond doux, pas de saturation pleine
   ========================================================================== */

.fi-badge {
  border-radius: var(--r-sm);
  font-size: var(--t-label);
  font-weight: 550;
  box-shadow: none;
  padding-inline: 0.4375rem;
}

.fi-badge.fi-color-success { background: var(--pos-soft); color: var(--pos); }
.fi-badge.fi-color-danger  { background: var(--neg-soft); color: var(--neg); }
.fi-badge.fi-color-warning { background: var(--warn-soft); color: var(--warn); }
.fi-badge.fi-color-primary { background: var(--ac-soft); color: var(--ac); }

/* ==========================================================================
   10. Onglets, pagination, menus, modales
   ========================================================================== */

.fi-tabs {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: none;
}

.fi-tabs-item { font-size: var(--t-body); font-weight: 500; border-radius: var(--r-sm); }
.fi-tabs-item-active { background: var(--bg-mute); color: var(--ink); }

.fi-pagination { font-size: var(--t-body); }

.fi-dropdown-panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  /* Une seule ombre dans tout le système : celle des calques flottants, qui
     doivent se détacher du fond. Partout ailleurs, c'est le filet qui porte. */
  box-shadow: 0 4px 12px rgb(16 24 40 / .08);
}

.fi-dropdown-list-item { font-size: var(--t-body); border-radius: var(--r-sm); }

.fi-modal-window {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgb(16 24 40 / .12);
}

.fi-modal-heading { font-size: var(--t-title); font-weight: 600; }
.fi-modal-description { font-size: var(--t-body); color: var(--ink-3); }

/* ==========================================================================
   11. Bandeau d'information
   Arcade s'en sert pour « Don't worry, this isn't your data » : boîte filetée,
   titre, explication, action à droite. Jamais de couleur pleine.
   ========================================================================== */

.fi-section.fi-notice {
  background: var(--bg);
  border: 1px solid var(--line);
}

/* ==========================================================================
   12. Respect des préférences système
   ========================================================================== */

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