/* DGCBF · base & composants
   Charte institutionnelle navy / or / crème + bandeau tricolore Gabon.
   Surfaces plates, une seule élévation, focus visible. */

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

.tnum, table, .kpi-value, .mono { font-variant-numeric: tabular-nums; }

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

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

/* Scrollbar 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; }

/* 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 #C6A24A; }
.nav-link.is-active .nav-ico { color:#fff; }
.nav-link.is-wip { opacity:.72; }
.nav-ico { width:18px; height:18px; flex:none; color:#8CA1BC; }

/* Pastilles de statut */
.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:#FBF6EA; color:#8F6F24; border-color:#F1E4C2; }

/* 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; border:1px solid transparent;
  white-space:nowrap; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.btn svg { width:16px; height:16px; }
.btn-primary { background:#0F2A5E; color:#fff; }
.btn-primary:hover { background:#0A1C40; }
.btn-gold { background:#C6A24A; color:#241a00; }
.btn-gold:hover { background:#B08D34; }
.btn-accent { background:#2C5FA0; color:#fff; }
.btn-accent:hover { background:#234C82; }
.btn-outline { background:#fff; color:#142033; border-color:#E3E8EF; }
.btn-outline:hover { background:#F7F9FB; border-color:#C2CCD9; }
.btn-ghost { background:transparent; color:#5A6B82; }
.btn-ghost:hover { background:#EEF2F7; color:#142033; }
.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 / panneau */
.card { background:#fff; border:1px solid #E3E8EF; border-radius:.625rem;
  box-shadow:0 1px 2px 0 rgba(15,42,94,.06),0 1px 3px 0 rgba(15,42,94,.05); }

/* Champs */
.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:#142033; min-height:42px;
  transition:border-color .15s ease,box-shadow .15s ease; }
.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); }
.field-help { font-size:.75rem; color:#5A6B82; margin-top:.3rem; }

/* Tableaux */
.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 */
.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:#0F2A5E; background:#0F2A5E; color:#fff; }
.step.is-done .step-dot { border-color:#0F2A5E; background:#EEF2F8; color:#0F2A5E; }
.step-label { font-size:.8125rem; font-weight:600; color:#5A6B82; }
.step.is-active .step-label, .step.is-done .step-label { color:#142033; }

/* ============================================================
   CARTE PROFESSIONNELLE (recto / verso) — namespace .idcard
   ============================================================ */
.idcard { position:relative; width:340px; height:531px; border-radius:16px; overflow:hidden;
  background:#F4F1EA; color:#182036; box-shadow:0 18px 44px rgba(15,42,94,.28),0 0 0 1px rgba(15,42,94,.08); }
.idcard.card-bg { background-size:cover; background-position:center; }
.idcard[hidden] { display:none !important; }
.idcard .recto-in { position:absolute; inset:0; padding:14px 16px 0; text-align:center; }
.rec-armoiries { height:38px; object-fit:contain; margin:1px auto 2px; display:block; }
.rec-rep { font-family:'Libre Baskerville',serif; font-size:9px; letter-spacing:1.4px; color:#20304f; }
.rec-min { font-family:'Playfair Display',serif; font-weight:800; font-size:14px; line-height:1.1; color:#0A1C40; margin-top:3px; }
.rec-dgcbf { font-family:'Playfair Display',serif; font-weight:700; font-size:19px; color:#0F2A5E; letter-spacing:2px; margin-top:1px; }
.tri-rule { display:flex; width:110px; height:3px; margin:5px auto 0; border-radius:2px; overflow:hidden; }
.tri-rule i { flex:1; }
.tri-rule i:nth-child(1){ background:#009639; } .tri-rule i:nth-child(2){ background:#FCD116; } .tri-rule i:nth-child(3){ background:#3A75C4; }
.rec-banner { margin:8px auto 9px; background:linear-gradient(180deg,#163A7D,#0F2A5E); color:#fff; font-weight:800;
  font-size:13px; letter-spacing:1px; padding:6px 0; border-radius:8px; box-shadow:0 3px 8px rgba(15,42,94,.3); }
.rec-photo { width:112px; height:132px; margin:0 auto 9px; border:2px solid #fff; box-shadow:0 3px 10px rgba(0,0,0,.22);
  background:#dfe3ea center/cover no-repeat; display:grid; place-items:center; overflow:hidden; }
.ph-silhouette { width:52px; height:52px; border-radius:50%;
  background:radial-gradient(circle at 50% 34%, #9aa3b2 0 34%, transparent 35%), linear-gradient(#9aa3b2,#9aa3b2) 50% 100%/44px 28px no-repeat; opacity:.7; }
.rec-body { display:flex; gap:8px; text-align:left; padding:0 2px; }
.rec-fields { flex:1; min-width:0; }
.rf { margin-bottom:5.5px; }
.rl { display:block; font-family:'Libre Baskerville',serif; font-style:italic; font-size:8.5px; color:#5a647a; line-height:1; }
.rv { display:block; font-family:'Libre Baskerville',serif; font-weight:700; font-size:13.5px; color:#0A1C40; line-height:1.14; word-break:normal; }
.rec-side { width:80px; flex:none; display:flex; flex-direction:column; align-items:center; gap:3px; }
.rec-qr { width:76px; height:76px; background:#fff; padding:3px; border-radius:4px; }
.rec-qr img, .rec-qr canvas { width:100% !important; height:100% !important; display:block; }
.rec-sceau { width:86px; object-fit:contain; }
.rec-footer { position:absolute; left:0; right:0; bottom:0; background:#0F2A5E; color:#fff; font-size:10px;
  letter-spacing:.5px; text-align:center; padding:5px 0; font-weight:600; }
.idcard .verso-in { position:absolute; inset:0; padding:30px 26px; text-align:center; display:flex; flex-direction:column; align-items:center; }
.ver-logo { width:150px; object-fit:contain; margin-bottom:4px; }
.ver-dgcbf { font-family:'Playfair Display',serif; font-weight:900; font-size:46px; color:#0F2A5E; letter-spacing:2px; line-height:1; }
.ver-sub { font-family:'Libre Baskerville',serif; font-weight:700; font-size:10px; color:#33405c; letter-spacing:.5px; margin-top:5px; }
.ver-notice { font-family:'Libre Baskerville',serif; font-style:italic; font-size:13px; line-height:1.5; color:#1e2740; text-align:justify; margin:auto 0 16px; }
.ver-rule { width:100%; height:3px; background:#0F2A5E; border-radius:2px; }

#fiche-host { position:fixed; left:-99999px; top:0; }

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