/* Titre Transport Moto Kinshasa · base & composants
   Charte navy/cyan reprise de la proposition MOA. Surfaces de travail plates
   (tableaux, formulaires) ; degrades reserves aux elements de marque (hero,
   icones KPI) pour un rendu premium sans nuire a la lisibilite des donnees. */

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

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

/* Bandeau de marque · trait plein accent (motif d'identite, pas un degrade) */
.brand-strip { height: 4px; background: #0891B2; }
.brand-strip-v { width: 4px; background: #0891B2; }

/* Focus clavier visible (jamais supprime) */
:focus-visible { outline: 2px solid #0891B2; 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 #22D3EE; }
.nav-link.is-active .nav-ico { color: #fff; }
.nav-ico { width: 18px; height: 18px; flex: none; color: #8CA1BC; }

/* Pastilles de statut : couleur + texte + icone */
.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: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.pill-warning { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.pill-danger  { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.pill-neutral { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }
.pill-accent  { background: #ECFEFF; color: #0E7490; border-color: #CFFAFE; }

/* 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: #0891B2; color: #fff; }         /* accent cyan */
.btn-primary:hover { background: #0E7490; }
.btn-accent { background: #1B2C4D; color: #fff; }           /* navy */
.btn-accent:hover { background: #131F35; }
.btn-outline { background: #fff; color: #0F172A; border-color: #E3E8EF; }
.btn-outline:hover { background: #F7F9FB; border-color: #C2CCD9; }
.btn-ghost { background: transparent; color: #5A6B82; }
.btn-ghost:hover { background: #EEF2F7; color: #0F172A; }
.btn-danger { background: #B91C1C; color: #fff; }
.btn-danger:hover { background: #991B1B; }
.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,18,32,.06), 0 1px 3px 0 rgba(11,18,32,.05); }

/* Champs de formulaire */
.field-label { display: block; font-size: .8125rem; font-weight: 600; color: #334155; margin-bottom: .35rem; }
.field-req::after { content: " *"; color: #B91C1C; }
.input, .select, .textarea {
  width: 100%; background: #fff; border: 1px solid #C2CCD9; border-radius: .5rem;
  padding: .55rem .75rem; font-size: .875rem; color: #0F172A;
  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: #0891B2; box-shadow: 0 0 0 3px rgba(8,145,178,.14); }
.input.has-error { border-color: #B91C1C; }
.field-help { font-size: .75rem; color: #5A6B82; margin-top: .3rem; }
.field-error { font-size: .75rem; color: #B91C1C; margin-top: .3rem; display: flex; align-items: center; gap: .3rem; }
.field-error svg { width: 13px; height: 13px; }

/* Tableau de donnees */
.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'enrolement) */
.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: #0891B2; background: #0891B2; color: #fff; }
.step.is-done .step-dot { border-color: #0891B2; background: #ECFEFF; color: #0E7490; }
.step-label { font-size: .8125rem; font-weight: 600; color: #5A6B82; }
.step.is-active .step-label, .step.is-done .step-label { color: #0F172A; }
.step-line { flex: 1; height: 2px; background: #E3E8EF; }
.step-line.is-done { background: #0891B2; }

/* ===========================================================
   PREMIUM : hero degrade (identite couverture proposition),
   cartes surelevees au survol, sparklines, donut, timeline.
   Degrades reserves aux elements de marque (hero, icones KPI,
   texte de titre) : les surfaces de travail (tableaux, formulaires)
   restent plates pour la lisibilite.
=========================================================== */

/* Carte surelevee au survol (listes cliquables, KPI, raccourcis) */
.card { transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card-hover:hover { box-shadow: 0 12px 28px -8px rgba(11,18,32,.16), 0 4px 10px -4px rgba(11,18,32,.08); transform: translateY(-2px); border-color: #CFFAFE; }

/* Bandeau hero sombre (meme recette que la couverture PDF : navy + halos cyan/bleu) */
.hero-band { position: relative; overflow: hidden; border-radius: .875rem; background: #0B1220;
  background-image:
    radial-gradient(60% 140% at 92% -10%, rgba(34,211,238,0.22) 0%, rgba(11,18,32,0) 60%),
    radial-gradient(55% 130% at 4% 120%, rgba(59,130,246,0.20) 0%, rgba(11,18,32,0) 60%); }
.hero-band::before { content:''; position:absolute; inset:0; opacity:.05; pointer-events:none;
  background-image: radial-gradient(circle, #ffffff 1px, transparent 1px); background-size: 22px 22px; }

/* Texte en degrade (titres/valeurs de marque uniquement) */
.grad-text { background: linear-gradient(120deg, #ffffff 0%, #a5f3fc 55%, #22d3ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Puce/chip translucide sur fond sombre (reprise de .covnotice/.chip du PDF) */
.glass-chip { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px); border-radius: .625rem; }

/* Icone KPI teintee en degrade doux (seul usage de degrade hors hero) */
.kpi-ico { width: 40px; height: 40px; border-radius: .625rem; display: flex; align-items: center; justify-content: center; flex: none; }
.kpi-ico svg { width: 19px; height: 19px; }
.kpi-ico-accent { background: linear-gradient(135deg, #ECFEFF, #CFFAFE); color: #0E7490; }
.kpi-ico-navy   { background: linear-gradient(135deg, #EEF2F8, #DCE3F0); color: #1B2C4D; }
.kpi-ico-success{ background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #047857; }
.kpi-ico-warning{ background: linear-gradient(135deg, #FFFBEB, #FEF3C7); color: #B45309; }
.kpi-ico-danger { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #B91C1C; }

/* Delta de tendance (KPI) */
.trend { display: inline-flex; align-items: center; gap: .2rem; font-size: .75rem; font-weight: 700; }
.trend svg { width: 13px; height: 13px; }
.trend-up { color: #047857; }
.trend-down { color: #B91C1C; }

/* Sparkline (mini-graphe de tendance dans une carte KPI) */
.sparkline { display: block; overflow: visible; }
.sparkline polyline { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .spark-fill { stroke: none; }

/* Donut (repartition), construit en conic-gradient pur CSS */
.donut { width: 132px; height: 132px; border-radius: 999px; flex: none; display: flex; align-items: center; justify-content: center; }
.donut-hole { width: 78px; height: 78px; border-radius: 999px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* Timeline d'activite (fil vertical) */
.tl-item { position: relative; padding-left: 26px; padding-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: 5px; top: 22px; bottom: 0; width: 2px; background: #E3E8EF; }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 0 0 1px #E3E8EF; }

/* Barre de progression fine (jauges de conformite, capacite) */
.gauge { height: 6px; border-radius: 999px; background: #F1F5F9; overflow: hidden; }
.gauge > span { display: block; height: 100%; border-radius: 999px; }

/* Onglets (segmented control) */
.tabs { display: inline-flex; padding: 3px; background: #F1F5F9; border-radius: .625rem; gap: 2px; }
.tab { padding: .4rem .85rem; border-radius: .5rem; font-size: .8125rem; font-weight: 600; color: #5A6B82; cursor: pointer; transition: background-color .15s ease, color .15s ease; white-space: nowrap; }
.tab.is-active { background: #fff; color: #0F172A; box-shadow: 0 1px 2px 0 rgba(11,18,32,.08); }

/* Interrupteur (parametres) */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track { position: absolute; inset: 0; background: #C2CCD9; border-radius: 999px; transition: background-color .15s ease; cursor: pointer; }
.switch-track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 999px; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-track { background: #0891B2; }
.switch input:checked + .switch-track::before { transform: translateX(16px); }

/* Heatmap communes (carte des zones) */
.heat-tile { border-radius: .5rem; padding: .6rem .7rem; border: 1px solid #E3E8EF; transition: transform .15s ease, box-shadow .15s ease; }
.heat-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -6px rgba(11,18,32,.14); }

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