/* SIM Libreville · base & composants
   Charte drapeau gabonais (vert/jaune/bleu) sur fond institutionnel.
   Aucun dégradé de couleur, une seule élévation, focus visible. */

:root { color-scheme: light; }
html { scroll-behavior: smooth; }
body {
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Chiffres tabulaires (données alignées) */
.tnum, table, .kpi-value, .mono { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* Bandeau drapeau gabonais · trois bandes solides (motif civique, pas un dégradé) */
.flag-strip { height: 4px; background: linear-gradient(90deg, #009E49 0 33.34%, #FCD116 33.34% 66.67%, #3A75C4 66.67% 100%); }
.flag-strip-v { width: 4px; background: linear-gradient(180deg, #009E49 0 33.34%, #FCD116 33.34% 66.67%, #3A75C4 66.67% 100%); }

/* Focus clavier visible (jamais supprimé) */
:focus-visible { outline: 2px solid #2C5FA0; outline-offset: 2px; border-radius: 4px; }
a, button, input, select, textarea { outline: none; }

/* Scrollbar custom sobre */
* { scrollbar-width: thin; scrollbar-color: #C2CCD9 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #C2CCD9; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: content-box; }

/* Lien de navigation (sidebar) */
.nav-link {
  display: flex; align-items: center; gap: .625rem;
  padding: .5rem .75rem; border-radius: .5rem;
  font-size: .875rem; font-weight: 500; color: #C7D3E2;
  transition: background-color .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.is-active { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 #FCD116; }
.nav-link.is-active .nav-ico { color: #fff; }
.nav-ico { width: 18px; height: 18px; flex: none; color: #8CA1BC; }

/* Pastilles de statut : couleur + texte + icône */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem;
  border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.4; border: 1px solid transparent; }
.pill svg { width: 13px; height: 13px; }
.pill-success { background: #ECFDF3; color: #047A37; border-color: #BBF7D0; }
.pill-warning { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.pill-danger  { background: #FEF2F2; color: #DC2626; border-color: #FECACA; }
.pill-neutral { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }
.pill-accent  { background: #EEF3FA; color: #234C82; border-color: #DCE7F4; }
.pill-gold    { background: #FFFBEB; color: #92580B; border-color: #FDE68A; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem .9rem; border-radius: .5rem; font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  border: 1px solid transparent; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: #047A37; color: #fff; }        /* VERT drapeau */
.btn-primary:hover { background: #036A30; }
.btn-accent { background: #2C5FA0; color: #fff; }          /* BLEU drapeau */
.btn-accent:hover { background: #234C82; }
.btn-outline { background: #fff; color: #0F1B2D; border-color: #E3E8EF; }
.btn-outline:hover { background: #F7F9FB; border-color: #C2CCD9; }
.btn-ghost { background: transparent; color: #5A6B82; }
.btn-ghost:hover { background: #EEF2F7; color: #0F1B2D; }
.btn-danger { background: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .35rem .6rem; font-size: .8125rem; }

/* Carte */
.card { background: #fff; border: 1px solid #E3E8EF; border-radius: .625rem; box-shadow: 0 1px 2px 0 rgba(11,44,82,.06), 0 1px 3px 0 rgba(11,44,82,.05); }

/* Champs de formulaire */
.field-label { display: block; font-size: .8125rem; font-weight: 600; color: #334155; margin-bottom: .35rem; }
.field-req::after { content: " *"; color: #DC2626; }
.input, .select, .textarea {
  width: 100%; background: #fff; border: 1px solid #C2CCD9; border-radius: .5rem;
  padding: .55rem .75rem; font-size: .875rem; color: #0F1B2D;
  transition: border-color .15s ease, box-shadow .15s ease; min-height: 42px; }
.input::placeholder, .textarea::placeholder { color: #94A3B8; }
.input:focus, .select:focus, .textarea:focus { border-color: #2C5FA0; box-shadow: 0 0 0 3px rgba(44,95,160,.14); }
.input.has-error { border-color: #DC2626; }
.field-help { font-size: .75rem; color: #5A6B82; margin-top: .3rem; }
.field-error { font-size: .75rem; color: #DC2626; margin-top: .3rem; display: flex; align-items: center; gap: .3rem; }
.field-error svg { width: 13px; height: 13px; }

/* Tableau de données */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .875rem; }
.tbl thead th { position: sticky; top: 0; background: #F2F5F9; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5A6B82;
  padding: .65rem .9rem; border-bottom: 1px solid #E3E8EF; }
.tbl tbody td { padding: .75rem .9rem; border-bottom: 1px solid #EEF2F7; color: #334155; vertical-align: middle; }
.tbl tbody tr { transition: background-color .12s ease; }
.tbl tbody tr:hover { background: #F7F9FB; }

/* Stepper (parcours d'enrôlement) */
.step { display: flex; align-items: center; gap: .6rem; }
.step-dot { width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700; border: 2px solid #C2CCD9; color: #5A6B82; background: #fff; flex: none; }
.step.is-active .step-dot { border-color: #047A37; background: #047A37; color: #fff; }
.step.is-done .step-dot { border-color: #047A37; background: #ECFDF3; color: #047A37; }
.step-label { font-size: .8125rem; font-weight: 600; color: #5A6B82; }
.step.is-active .step-label, .step.is-done .step-label { color: #0F1B2D; }
.step-line { flex: 1; height: 2px; background: #E3E8EF; }
.step-line.is-done { background: #047A37; }

/* Animations respectueuses */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
