:root{--bleu:#0B2A4A;--sauge:#5D7B66;--ocre:#D6A637;--bg:#fff;--surf:#fff;--line:#D5DAE0;--txt:#1C1C1C;--sub:#5E5E5E;--title:#0B2A4A;--sage-txt:#5D7B66;--sh:0 1px 2px rgba(11,42,74,.10),0 8px 22px rgba(11,42,74,.08);--shin:inset 0 1px 3px rgba(11,42,74,.10)}
@media (prefers-color-scheme:dark){:root{--bg:#1C1C1C;--surf:#0B2A4A;--line:rgba(255,255,255,.22);--txt:#fff;--sub:rgba(255,255,255,.72);--title:#fff;--sage-txt:#9DBBA8;--sh:0 1px 2px rgba(0,0,0,.5),0 8px 22px rgba(0,0,0,.35);--shin:inset 0 1px 3px rgba(0,0,0,.5)}}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--txt);font-family:Inter,system-ui,sans-serif;-webkit-text-size-adjust:100%}
a{color:inherit;text-decoration:none}
button,input,textarea{font-family:inherit}
#app{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:var(--bg)}
.band{position:relative;background:var(--bleu);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;border-bottom:3px solid var(--ocre);box-shadow:0 6px 18px rgba(11,42,74,.18);padding:18px 0}
.band img{display:block;width:auto}
.band .mot{font-family:Montserrat,sans-serif;font-weight:600;font-size:11px;letter-spacing:4px;color:#fff;text-transform:uppercase}
.band .qui{position:absolute;top:14px;right:20px;font-size:13px;font-weight:600;color:#fff}
main{flex:1;padding:20px 20px 24px;display:flex;flex-direction:column;gap:18px}
main.avecnav{padding-bottom:96px}
h1{font-family:Montserrat,sans-serif;font-weight:700;margin:0;color:var(--title);font-size:26px;line-height:1.2}
h1.grand{font-size:30px}
.sub{font-size:15px;line-height:1.5;color:var(--sub)}
.petit{font-size:14px;line-height:1.4;color:var(--sub)}
.lib{font-family:Montserrat,sans-serif;font-size:17px;font-weight:600;color:var(--title);line-height:1.3}
.etape{font-size:13px;font-weight:600;color:var(--sage-txt)}
.champ{display:flex;flex-direction:column;gap:8px}
input[type=text],input[type=password],textarea{width:100%;border:1px solid var(--line);border-radius:3px;box-shadow:var(--shin);background:var(--surf);padding:12px 14px;font-size:16px;line-height:1.45;color:var(--txt)}
textarea{resize:none;field-sizing:content;min-height:76px;max-height:200px;overflow-y:auto}
input.code{min-height:60px;font-size:24px;font-weight:600;letter-spacing:8px;text-transform:uppercase;padding:0 18px}
:focus-visible{outline:2px solid var(--ocre);outline-offset:2px}
.btn{display:flex;align-items:center;justify-content:center;min-height:54px;border:0;border-radius:3px;letter-spacing:.3px;font-size:16px;font-weight:600;background:var(--sauge);color:#fff;box-shadow:0 1px 2px rgba(28,28,28,.25),0 8px 18px rgba(93,123,102,.28);cursor:pointer;width:100%}
.btn.sec{background:transparent;color:var(--title);border:1px solid var(--line);box-shadow:none}
.btn:disabled{opacity:.6}
.carte{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surf);border:1px solid var(--line);border-radius:3px;box-shadow:var(--sh);padding:14px 16px;min-height:56px;width:100%;text-align:left;color:inherit;font-size:inherit;cursor:pointer}
.carte.vide{background:transparent;border-style:dashed;box-shadow:none;cursor:default}
.carte b{font-size:15px;font-weight:600;display:block}
.carte small{font-size:14px;color:var(--sub);display:block;margin-top:3px}
.carte .act{font-size:14px;font-weight:600;color:var(--title)}
.retour{display:flex;align-items:center;gap:6px;min-height:44px;font-size:14px;font-weight:600;color:var(--sub);background:none;border:0;padding:0;cursor:pointer}
.ligne{display:flex;align-items:center;justify-content:space-between}
.qui2{font-size:13px;font-weight:600;color:var(--sub)}
.consigne{background:var(--surf);border:1px solid var(--line);border-radius:3px;box-shadow:var(--sh);padding:22px 20px;font-size:19px;line-height:1.5;font-weight:500}
.msg{font-size:14px;color:var(--sub)}
.err{font-size:15px;color:var(--txt);border-left:3px solid var(--ocre);padding:4px 0 4px 12px}
.sugg{background:var(--surf);border:1px solid var(--line);border-left:3px solid var(--ocre);border-radius:3px;box-shadow:var(--sh);padding:14px 16px;font-size:15px;line-height:1.5}
nav.bas{position:fixed;left:0;right:0;bottom:0;max-width:480px;margin:0 auto;display:grid;grid-template-columns:repeat(3,1fr);background:var(--surf);border-top:1px solid var(--line);padding:0 8px 12px}
nav.bas button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:56px;border:0;border-top:3px solid transparent;margin-top:-1px;background:none;font-size:12px;font-weight:600;color:var(--sub);cursor:pointer}
nav.bas button.on{color:var(--title);border-top-color:var(--ocre)}
nav.bas svg{stroke:currentColor}
.palier{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:10px}
.palier .mk{display:flex;flex-direction:column;align-items:center;padding-bottom:4px}
.palier .mk i{width:26px;height:26px;border-radius:13px;flex:none;display:flex;align-items:center;justify-content:center}
.palier .mk u{flex:1;width:2px;margin-top:4px;background:var(--line)}
.palier .corps{padding-bottom:12px}
.pa-fait .mk i{background:var(--sauge)}
.pa-fait .corps>div{background:var(--sauge);color:#fff;border-radius:3px;padding:10px 14px}
.pa-cur .mk i{background:var(--surf);border:3px solid var(--ocre)}
.pa-cur .corps>div{background:var(--surf);border:2px solid var(--ocre);border-radius:3px;padding:14px 16px;box-shadow:var(--sh)}
.pa-next .mk i{border:2px solid var(--line)}
.pa-next .corps>div{border:1px dashed var(--line);border-radius:3px;padding:10px 14px;color:var(--sub)}
.pa-t{font-family:Montserrat,sans-serif;font-weight:600;font-size:14px}
.pa-cur .pa-t{font-weight:700;font-size:18px;color:var(--title);margin-top:8px}
.pa-p{font-size:14px;line-height:1.4;margin-top:3px}
.ici{display:inline-block;background:var(--ocre);color:#1C1C1C;font-size:11px;font-weight:600;letter-spacing:1px;text-transform:uppercase;padding:3px 8px;border-radius:2px}
.echelle{position:relative;height:230px;touch-action:none;user-select:none;cursor:grab;max-width:350px;margin:0 auto;width:100%}
.echelle .rail{position:absolute;left:50%;top:28px;bottom:28px;width:6px;margin-left:-3px;border-radius:3px;background:var(--line)}
.echelle .mid{position:absolute;left:calc(50% - 25px);width:50px;border-top:1.5px dashed var(--sub);top:50%}
.echelle .mot{position:absolute;left:24px;font-family:Montserrat,sans-serif;font-size:15px;font-weight:600;color:var(--title)}
.echelle .mot.h{top:22px}.echelle .mot.b{bottom:22px}
.point{position:absolute;left:50%;width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:50%;background:radial-gradient(circle,rgba(214,166,55,.65) 0,rgba(214,166,55,.3) 45%,rgba(214,166,55,0) 70%);display:flex;align-items:center;justify-content:center}
.point::after{content:"";width:24px;height:24px;border-radius:50%;background:var(--ocre)}
.mini{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--sub)}
.tip{position:absolute;background:var(--surf);border:1px solid var(--line);border-radius:3px;box-shadow:var(--sh);padding:8px 10px;font-size:13px;max-width:200px;pointer-events:none}
.graph{position:relative;background:var(--surf);border:1px solid var(--line);border-radius:3px;box-shadow:var(--sh);padding:12px 0 8px;display:flex;justify-content:center}
.pied{font-size:13px;color:var(--sub);text-align:center;padding:8px 0}
.pied a{text-decoration:underline}
.cache{display:none}

/* ---------- Affichage ordinateur ---------- */
.graph svg{width:100%;height:auto;max-width:420px}
@media (min-width:900px){
  #app{max-width:none;display:grid;grid-template-columns:minmax(0,1fr) 240px minmax(0,800px) minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start}
  .band{grid-column:1/-1;min-height:84px!important;flex-direction:row;gap:18px;justify-content:flex-start;padding:16px max(40px,calc((100vw - 1180px)/2 + 40px))}
  .band img{height:30px!important}
  .band .qui{top:50%;transform:translateY(-50%);right:max(40px,calc((100vw - 1180px)/2 + 40px));font-size:15px}
  main{grid-column:2/4;width:100%;max-width:680px;margin:0 auto;padding:44px 24px 56px;gap:22px}
  main.avecnav{grid-column:3;grid-row:2;max-width:800px;margin:0;padding:44px 48px 56px}
  nav.bas{grid-column:2;grid-row:2;position:sticky;top:0;display:flex;flex-direction:column;gap:6px;max-width:none;margin:0;background:transparent;border-top:0;border-right:1px solid var(--line);padding:32px 16px;min-height:calc(100vh - 84px)}
  nav.bas button{flex-direction:row;justify-content:flex-start;gap:12px;min-height:48px;padding:0 14px;border:0;border-left:3px solid transparent;margin:0;border-radius:3px;font-size:15px}
  nav.bas button.on{border-left-color:var(--ocre);background:var(--surf);box-shadow:var(--sh)}
  h1{font-size:30px}h1.grand{font-size:36px}
  .consigne{font-size:21px}
  .grille2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .echelle{max-width:420px}
  .pied{text-align:left}
}
@media (min-width:900px) and (hover:hover){
  .carte:hover,.btn:hover{filter:brightness(1.04)}
  nav.bas button:hover{color:var(--title)}
}

/* ---------- Chargement ---------- */
.pulse{width:84px;height:84px;display:flex;align-items:center;justify-content:center}
.pulse span{width:22px;height:22px;border-radius:50%;background:var(--ocre);box-shadow:0 0 0 0 rgba(214,166,55,.55);animation:souffle 1.6s ease-in-out infinite}
@keyframes souffle{0%{transform:scale(.8);box-shadow:0 0 0 0 rgba(214,166,55,.5)}60%{transform:scale(1);box-shadow:0 0 0 26px rgba(214,166,55,0)}100%{transform:scale(.8);box-shadow:0 0 0 0 rgba(214,166,55,0)}}
.btn.attente{position:relative;gap:10px;opacity:.85}
.btn.attente::before{content:"";width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;animation:tour .8s linear infinite}
@keyframes tour{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.pulse span,.btn.attente::before{animation:none}}
