/* Charte reprise de voixdutogo.gouv.tg (jetons --ll-*), polices OFL embarquées pour la borne hors ligne. */
@font-face { font-family: "Plus Jakarta Sans Variable"; font-weight: 200 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans Variable"; font-weight: 200 800; font-display: swap;
  src: url(fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Unbounded Variable"; font-weight: 200 900; font-display: swap;
  src: url(fonts/unbounded-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded Variable"; font-weight: 200 900; font-display: swap;
  src: url(fonts/unbounded-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Borne CETEF : maquettes « Borne Langues » (ui-ux/), scène fixe 1456 × 819 mise à l'échelle de
   l'écran par stage.js — aucun défilement, quelle que soit la résolution. Thème clair seul. */
:root {
  --ll-c-fond: #F6F5F0; --ll-c-surface: #FFFFFF; --ll-c-fond-soutenu: #E4E3DC; --ll-c-piste: #ECEBE5;
  --ll-c-bordure: #E4E3DC; --ll-c-texte: #141414; --ll-c-texte-doux: #646460; --ll-c-texte-pale: #8A8A84;
  --ll-c-vert: #C6F23D; --ll-c-vert-texte: #41501B; --ll-c-olive: #41501B; --ll-c-encre: #141414;
  --ll-c-encre-texte: #FFFDF3; --ll-c-desactive: #9E9E99; --ll-c-rouge: #D64545;
  --ll-t-famille: "Plus Jakarta Sans Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ll-t-famille-accent: "Unbounded Variable", "Plus Jakarta Sans Variable", sans-serif;
  /* textes en langue (ɖ ƒ ɛ ɔ ŋ ʋ ɩ ʊ + tons combinés) : polices système à large couverture */
  --ll-t-famille-langue: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
  --gx: 61px;            /* gouttière des maquettes */
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ll-c-fond); }
body { color: var(--ll-c-texte); font: 400 16px/1.45 var(--ll-t-famille); -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--ll-c-olive); outline-offset: 3px; }
[hidden] { display: none !important; }

.scene { position: absolute; left: 0; top: 0; width: 1456px; height: 819px; transform-origin: 0 0;
  background: var(--ll-c-fond); overflow: hidden; }

/* --- en-tête --- */
.entete { position: absolute; left: var(--gx); top: 50px; right: 0; }
.sur-titre { margin: 0; font: 700 14px/1.2 var(--ll-t-famille); letter-spacing: .05em; text-transform: uppercase;
  color: var(--ll-c-vert-texte); }
h1 { margin: 14px 0 0; font: 800 53px/1.13 var(--ll-t-famille-accent); text-transform: uppercase;
  letter-spacing: -.005em; }
.kpi h1 { font-size: 50px; }
.logo { position: absolute; right: 60px; top: 42px; width: 229px; height: auto; }
.logo { cursor: pointer; }
.logo.petit { width: 146px; top: 42px; right: 62px; }

/* --- barre du bas --- */
.barre-bas { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: var(--ll-c-encre);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 46px;
  font-size: 13px; color: #D8D7D0; }
.barre-bas .droite { justify-self: end; font-size: 12.5px; color: #9A9A94; }
.lien-pilule { justify-self: start; display: inline-flex; align-items: center; gap: 9px; height: 33px; padding: 0 17px;
  border: 1px solid #3A3A36; border-radius: 999px; color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; }
.lien-pilule::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ll-c-vert); }

/* ================= Écran interactions ================= */
.libelle { margin: 0; font: 700 14px/1 var(--ll-t-famille); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ll-c-texte-doux); text-align: center; }
.zone { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; }
#zone-accueil { top: 295px; }
.scene[data-etat="enregistrement"] #zone-accueil, .scene[data-etat="traitement"] #zone-accueil { top: 250px; }

.pilules { display: flex; gap: 15px; margin-top: 35px; }
.pilule { height: 61px; padding: 0 33px; border: 0; border-radius: 999px; background: var(--ll-c-encre);
  color: #fff; font: 800 24px/1 var(--ll-t-famille-accent); transition: background .15s, color .15s; }
.pilule[aria-checked="true"] { background: var(--ll-c-vert); color: var(--ll-c-encre); }
.pilule:disabled:not([aria-checked="true"]) { background: var(--ll-c-desactive); color: #fff; }

.micro { margin-top: 34px; width: 212px; height: 212px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--ll-c-fond-soutenu); box-shadow: 0 10px 24px rgba(20,20,20,.18); transition: background .2s, transform .1s; }
.micro svg { width: 56px; height: 76px; fill: none; stroke: var(--ll-c-encre); stroke-width: 2.4; stroke-linecap: round; }
.micro.pret { background: var(--ll-c-vert); }
.micro.pret:active { transform: scale(.97); }
.consigne { margin: 34px 0 0; height: 24px; font: 600 18px/24px var(--ll-t-famille); color: #7A7A75; text-align: center; }
.consigne.erreur { color: var(--ll-c-rouge); }

/* enregistrement */
.onde { margin-top: 34px; width: 838px; height: 113px; border-radius: 14px; background: var(--ll-c-vert);
  display: flex; align-items: center; gap: 22px; padding: 0 14px 0 30px; }
.barres { flex: 1; height: 72px; display: flex; align-items: center; justify-content: space-between; }
.barres span { width: 6px; height: 10%; min-height: 8px; border-radius: 3px; background: var(--ll-c-encre);
  transition: height .08s linear; }
.chrono { display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 22px; border-radius: 999px;
  background: #2A2A27; color: var(--ll-c-vert); font: 800 22px/1 var(--ll-t-famille-accent); font-variant-numeric: tabular-nums; }
.chrono::before { content: ""; width: 15px; height: 15px; border-radius: 50%; background: var(--ll-c-vert);
  animation: pouls 1s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: .35; } }
.stop { margin-top: 34px; width: 212px; height: 212px; border-radius: 50%; border: 0; background: var(--ll-c-rouge);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  font: 700 22px/1 var(--ll-t-famille); box-shadow: 0 10px 24px rgba(20,20,20,.18); }
.stop::before { content: ""; width: 44px; height: 44px; border-radius: 8px; background: #fff; }
.scene[data-etat="traitement"] .stop { background: var(--ll-c-fond-soutenu); color: var(--ll-c-texte-doux); }
.scene[data-etat="traitement"] .stop::before { width: 44px; height: 44px; border-radius: 50%; background: none;
  border: 5px solid #C9C8C1; border-top-color: var(--ll-c-olive); animation: tourne .9s linear infinite; }
.scene[data-etat="traitement"] .onde { background: #E8F7B8; }
.scene[data-etat="traitement"] .chrono::before { animation: none; }
@keyframes tourne { to { transform: rotate(1turn); } }

/* veille (BORNE·00) */
#zone-veille { top: 316px; }
.chiffres { margin-top: 30px; display: flex; gap: 19px; }
.chiffre { height: 144px; min-width: 194px; padding: 0 30px; border-radius: 22px; background: var(--ll-c-surface);
  border: 1px solid var(--ll-c-bordure); display: flex; flex-direction: column; justify-content: center; }
.chiffre b { font: 800 40px/1 var(--ll-t-famille-accent); white-space: nowrap; }
.chiffre span { margin-top: 12px; font-size: 14px; line-height: 1.3; color: var(--ll-c-texte-doux); }
.chiffre.fort { min-width: 279px; background: var(--ll-c-encre); border-color: var(--ll-c-encre); }
.chiffre.fort b { color: var(--ll-c-vert); }
.chiffre.fort span { color: #D8D7D0; }
.tester { margin-top: 35px; width: 378px; height: 88px; border: 0; border-radius: 999px; background: var(--ll-c-vert);
  font: 700 24px/1 var(--ll-t-famille); box-shadow: 0 12px 26px rgba(65,80,27,.22); }
.tester:active { transform: scale(.98); }
.indice { margin: 34px 0 0; font-size: 17px; font-weight: 600; color: var(--ll-c-texte-doux); }
#zone-veille.sans-chiffres { top: 380px; }

/* résultat */
#zone-resultat { top: 237px; }
.lecteur { display: flex; align-items: center; gap: 16px; height: 62px; padding: 0 24px 0 10px; border-radius: 999px;
  background: var(--ll-c-surface); border: 1px solid var(--ll-c-bordure); }
.lecture { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ll-c-encre); display: grid; place-items: center; }
.lecture svg { width: 14px; height: 14px; fill: var(--ll-c-vert); }
.mini-barres { display: flex; align-items: center; gap: 4px; height: 26px; }
.mini-barres span { width: 3px; border-radius: 2px; background: #C9C8C1; }
.mini-barres span.joue { background: var(--ll-c-encre); }
.duree { font: 800 18px/1 var(--ll-t-famille-accent); font-variant-numeric: tabular-nums; }
.lecteur small { font-size: 13px; color: var(--ll-c-texte-doux); }

.cartes { margin-top: 28px; display: grid; grid-template-columns: 484px 484px 249px; grid-template-rows: 274px; gap: 20px; }
.cartes.sans-trad { grid-template-columns: 988px 249px; }
.carte { border-radius: 22px; background: var(--ll-c-surface); border: 1px solid var(--ll-c-bordure);
  padding: 50px 34px 50px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.carte .libelle { text-align: left; font-size: 13px; color: #7A7A75; }
.carte.trad { background: var(--ll-c-olive); border-color: var(--ll-c-olive); color: #fff; }
.carte.trad .libelle { color: #C9D2A9; }
.texte { flex: 1; min-height: 0; margin: 18px 0 18px; overflow: hidden; font: 800 30px/1.35 var(--ll-t-famille-accent);
  overflow-wrap: anywhere; }
.texte.langue { font-family: var(--ll-t-famille-langue); font-weight: 700; }
.avis { display: flex; gap: 11px; }
.avis button { height: 39px; padding: 0 17px; border-radius: 999px; border: 1px solid #9A9A94; background: none;
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.avis svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.carte.trad .avis button { border-color: #8D9877; color: #fff; }
.avis button[aria-pressed="true"] { background: var(--ll-c-vert); border-color: var(--ll-c-vert); color: var(--ll-c-encre); }
.avis button:disabled:not([aria-pressed="true"]) { opacity: .4; }
.avis-merci { align-self: center; font-size: 13px; color: inherit; opacity: .75; }
.carte.qr { padding: 46px 20px 0; align-items: center; text-align: center; }
.carte.qr .libelle { text-align: center; font-size: 11px; letter-spacing: .04em; }
.carte.qr img { width: 121px; height: 121px; margin-top: 15px; }
.carte.qr strong { margin-top: 13px; font: 800 17px/1.2 var(--ll-t-famille-accent); }
.recommencer { margin-top: 28px; width: 288px; height: 65px; border: 0; border-radius: 999px; background: var(--ll-c-vert);
  font: 600 20px/1 var(--ll-t-famille); }
.actions { margin-top: 28px; display: flex; gap: 16px; }
.actions .recommencer { margin-top: 0; }
.rester { height: 65px; padding: 0 30px; border-radius: 999px; border: 2px solid var(--ll-c-encre); background: var(--ll-c-surface);
  font: 600 20px/1 var(--ll-t-famille); animation: appel 1.6s ease-in-out infinite; }
@keyframes appel { 50% { box-shadow: 0 0 0 8px rgba(198,242,61,.45); } }
.retour { margin: 26px 0 0; font-size: 15px; color: #7A7A75; }

/* ================= Écran KPI ================= */
.grille { position: absolute; left: var(--gx); top: 228px; display: grid; grid-template-columns: 424px 871px;
  grid-template-rows: 302px 212px; gap: 19px 20px; }
.bloc { position: relative; border-radius: 20px; background: var(--ll-c-surface); border: 1px solid var(--ll-c-bordure);
  padding: 22px 24px; overflow: hidden; }
.bloc h2 { margin: 0; font: 700 13px/1.2 var(--ll-t-famille); letter-spacing: .02em; text-transform: uppercase; }
.bloc .note { position: absolute; left: 32px; bottom: 11px; margin: 0; font-size: 12px; color: var(--ll-c-texte-doux); }
.vide-val { color: var(--ll-c-texte-pale); }

/* B1-B2 : avant / après */
.histo { position: absolute; left: 44px; right: 36px; top: 66px; height: 178px; display: flex; align-items: flex-end; gap: 76px; }
.histo .paire { display: flex; align-items: flex-end; gap: 16px; position: relative; }
.histo .col { width: 53px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--ll-c-texte-doux); }
.histo .col.apres { color: var(--ll-c-vert-texte); font-weight: 700; }
.histo .col i { display: block; width: 100%; border-radius: 6px; background: #CCCBC4; }
.histo .col.apres i { background: var(--ll-c-vert); }
.histo .nom { position: absolute; top: calc(100% + 8px); left: -8px; white-space: nowrap; font-size: 12.5px; font-weight: 600; }
.legende { position: absolute; left: 44px; bottom: 7px; display: flex; gap: 14px; font-size: 11.5px; color: var(--ll-c-texte-doux); }
.legende span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: #CCCBC4; }
.legende span + span::before { background: var(--ll-c-vert); }

/* D : projection */
#courbe { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
#courbe text { font-family: var(--ll-t-famille); }

/* B5-B6 : bloc sombre */
.bloc.sombre { background: var(--ll-c-encre); border-color: var(--ll-c-encre); color: #fff; padding: 40px 24px 0; }
.bloc.sombre h2 { color: #A3A29B; }
.ligne-cout { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.ligne-cout b { flex: none; font: 800 24px/1 var(--ll-t-famille-accent); color: var(--ll-c-vert); }
.ligne-cout.colonne { flex-direction: column; align-items: flex-start; gap: 6px; }
.ligne-cout b.petit { font-size: 15px; }
.ligne-cout span { font-size: 12px; line-height: 1.35; color: #D8D7D0; }

/* C1-C3 : en direct */
.badge { display: inline-block; margin-left: 12px; padding: 3px 9px; border-radius: 999px; background: var(--ll-c-vert);
  font: 600 10.5px/1.3 var(--ll-t-famille); text-transform: none; letter-spacing: 0; vertical-align: 1px; }
.langues { position: absolute; left: 22px; top: 56px; width: 530px; display: grid; gap: 15px; }
.langues .l { display: grid; grid-template-columns: 66px 1fr 40px; align-items: center; gap: 0 0; font-size: 13px; font-weight: 600; }
.langues .piste { height: 13px; border-radius: 999px; background: var(--ll-c-piste); overflow: hidden; }
.langues .piste i { display: block; height: 100%; border-radius: 999px; background: var(--ll-c-vert); transition: width .6s; }
.langues .n { text-align: right; font-variant-numeric: tabular-nums; }
.tuiles { position: absolute; right: 22px; top: 49px; width: 251px; display: grid; gap: 11px; }
.tuile { height: 66px; border-radius: 14px; background: var(--ll-c-fond); padding: 13px 15px; }
.tuile h3 { margin: 0 0 8px; font: 700 10.5px/1 var(--ll-t-famille); letter-spacing: .04em; text-transform: uppercase; color: var(--ll-c-texte-doux); }
.tuile p { margin: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; }

/* ================= Motion design (motion.js) ================= */
.mot { display: inline-block; }                       /* mots animés un à un */
.morph { position: absolute; z-index: 5; background: var(--ll-c-vert); pointer-events: none; }

/* Passage / ↔ /kpi : l'en-tête, le logo et la barre du bas restent en place, le contenu glisse en fondu. */
@view-transition { navigation: auto; }
.entete { view-transition-name: entete; }
.logo { view-transition-name: logo; }
.barre-bas { view-transition-name: barre; }
::view-transition-old(root) { animation: 220ms cubic-bezier(.4,0,1,1) both vt-sortie; }
::view-transition-new(root) { animation: 420ms cubic-bezier(.2,.8,.2,1) 90ms both vt-entree; }
@keyframes vt-sortie { to { opacity: 0; transform: translateY(16px); } }
@keyframes vt-entree { from { opacity: 0; transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Accueil : halo qui « respire » autour du micro prêt */
.micro { position: relative; }
.scene[data-etat="accueil"] .micro.pret::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--ll-c-vert); animation: halo 2.4s cubic-bezier(.2,.8,.2,1) infinite; pointer-events: none; }
@keyframes halo { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.32); opacity: 0; } }

/* Résultat : anneau du compte à rebours autour de « Recommencer » */
@property --reste { syntax: "<number>"; inherits: false; initial-value: 1; }
.recommencer { position: relative; }
.recommencer.compte::before { content: ""; position: absolute; inset: -6px; border-radius: 999px; padding: 3px;
  background: conic-gradient(from 0deg, var(--ll-c-olive) calc(var(--reste) * 1turn), #DAD9D2 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: compte var(--duree-compte, 30s) linear forwards; pointer-events: none; }
@keyframes compte { from { --reste: 1; } to { --reste: 0; } }

/* Veille : mode ambiant (attire l'œil, évite le marquage de l'écran) */
.scene[data-etat="veille"] .chiffre { animation: flotte 7s ease-in-out infinite; }
.scene[data-etat="veille"] .chiffre:nth-child(2) { animation-delay: -1.7s; }
.scene[data-etat="veille"] .chiffre:nth-child(3) { animation-delay: -3.4s; }
.scene[data-etat="veille"] .chiffre:nth-child(4) { animation-delay: -5.1s; }
@keyframes flotte { 50% { translate: 0 -6px; } }
.scene[data-etat="veille"] .tester { animation: lueur 3.2s ease-in-out infinite; }
@keyframes lueur { 50% { box-shadow: 0 12px 26px rgba(65,80,27,.22), 0 0 0 14px rgba(198,242,61,.28); } }

/* KPI : histogramme qui pousse depuis la base */
.histo .col i { transform-origin: 50% 100%; }

@media (prefers-reduced-motion: reduce) {
  .micro.pret::after, .scene[data-etat="veille"] .chiffre, .scene[data-etat="veille"] .tester { animation: none !important; }
  .recommencer.compte::before { animation: none; }
}
