*{box-sizing:border-box}
body{margin:0;background:#07111f;color:#fff;font-family:Arial,Helvetica,sans-serif}
button{border:0;border-radius:12px;cursor:pointer;color:#fff;background:#2d6cdf;padding:12px 20px;font-size:17px}
button:hover:not(:disabled){filter:brightness(1.15)}
button:disabled{opacity:.35;cursor:default}
a{color:#9dc4ff}

/* Accueil */
.home{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}
.home h1{font-size:clamp(36px,6vw,64px);margin:18px 0 6px}.home h1 span{color:#72aaff}
.intro{font-size:19px;opacity:.75;margin:0 0 28px}
.brand3d{margin:auto;width:100px;height:100px;border-radius:22px;display:grid;place-items:center;font-size:38px;font-weight:bold;background:linear-gradient(145deg,#3a7bf0,#123b83);box-shadow:7px 10px 20px #0008,inset 2px 2px 5px #fff5}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;width:min(980px,100%)}
.chcard{display:flex;flex-direction:column;gap:6px;text-align:left;padding:20px;border-radius:18px;background:linear-gradient(145deg,#112641,#0b1728);border:1px solid #ffffff14;color:#fff;text-decoration:none;position:relative;transition:.2s}
a.chcard:hover{transform:translateY(-4px);border-color:#63a1ff}
.chcard .ico{font-size:30px;color:#74aaff;font-weight:bold}.chcard b{font-size:20px}.chcard small{opacity:.7;line-height:1.4}
.chcard.soon{opacity:.45}.chcard em{position:absolute;top:14px;right:16px;font-size:12px;color:#ffcf62;font-style:normal;letter-spacing:1px}
.foot{margin-top:30px;opacity:.7;font-size:14px}

/* Lecteur */
.app{height:100vh;height:100dvh;display:flex;flex-direction:column}
.bar{min-height:54px;background:#0d1c30;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 18px}
.bar a{text-decoration:none}.who{opacity:.7;font-size:14px}
.progress{height:4px;background:#ffffff12}.progress i{display:block;height:100%;width:0;background:#63a1ff;transition:.4s}
.stage{flex:1;position:relative;overflow:hidden}
.slide{position:absolute;inset:0;padding:22px;display:grid;place-items:center;overflow-y:auto;opacity:0;visibility:hidden;transform:translateX(30px);transition:opacity .4s,transform .4s,visibility .4s}
.slide.active{opacity:1;visibility:visible;transform:none}
.card{width:min(940px,100%);background:linear-gradient(145deg,#112641,#0b1728);border:1px solid #ffffff12;border-radius:24px;padding:32px;box-shadow:0 20px 60px #0009;margin:auto}
.center{text-align:center}
.badge,.tag{color:#74aaff;letter-spacing:2px;font-weight:bold}.tag{font-size:13px}
.slide h1{font-size:clamp(42px,8vw,82px);margin:14px 0}
.slide h2{font-size:clamp(28px,4.6vw,48px);margin:8px 0 24px}
.lead{font-size:22px;line-height:1.5;opacity:.82;max-width:760px;margin:0 auto 20px}
.primary,.secondary,.linkbtn{display:inline-block;margin-top:14px;padding:14px 24px;border-radius:12px;font-size:18px}
.primary{background:#2d6cdf;color:#fff}.secondary{background:#1f3a66;color:#fff}.linkbtn{text-decoration:none;color:#fff}

/* Étapes révélées pas à pas */
.step{opacity:0;visibility:hidden;transform:translateY(16px);transition:opacity .5s,transform .5s,visibility .5s;margin:12px 0;font-size:20px;line-height:1.5}
.step.on{opacity:1;visibility:visible;transform:none}
.step.formula{font-size:32px;text-align:center;padding:18px;background:#ffffff0a;border-radius:15px}
.step.big{font-size:42px}
.callout,.example{padding:15px 17px;border-left:4px solid #62a1ff;background:#ffffff08}
.example{border-left-color:#ffcf62}
.step.grid4{display:inline-block;width:calc(50% - 8px);vertical-align:top}
.grid4 div{padding:20px;text-align:center;background:#ffffff0a;border-radius:15px;font-size:24px}
.grid4 small{display:block;font-size:19px;opacity:.85;margin-top:8px}
.dots{display:inline-flex;gap:6px;min-width:60px;justify-content:center}
.dots i{width:9px;height:9px;border-radius:50%;background:#ffffff25}.dots i.on{background:#63a1ff}

/* Quiz */
.q{font-size:22px;line-height:1.5}
.answers{display:grid;gap:12px;margin:18px 0}
.choice{text-align:left;background:#ffffff0d;font-size:19px}
.choice.good{background:#1d6b43}.choice.bad{background:#7a2b2b}
.feedback{font-weight:bold;font-size:20px;min-height:28px;margin-top:10px}
.feedback.good{color:#69e29a}.feedback.bad{color:#ff8c8c}
.explain,.hint{display:none;margin-top:14px;padding:15px;border-left:4px solid #62a1ff;background:#ffffff08;line-height:1.5}
.defi-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
input[type=text]{padding:14px;border-radius:10px;border:1px solid #ffffff30;background:#07111f;color:#fff;font-size:18px;width:200px}
.check{font-size:80px;color:#67e49b}
.scorebox{font-size:28px;margin:14px 0}.savemsg{opacity:.7;min-height:22px}

/* Widgets */
.intro-w{opacity:.85;margin:0 0 12px}
.widget{margin-top:14px}
.wcontrols{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.wcontrols label{display:flex;align-items:center;gap:8px;font-size:18px}
.wcontrols input[type=range]{width:150px;accent-color:#63a1ff}
.wcontrols button{margin:0;padding:10px 16px;font-size:16px}
.plot{width:100%;max-height:44vh;background:#07111f;border-radius:14px;border:1px solid #ffffff12}
.plot .grid{stroke:#ffffff14;stroke-width:1}.plot .axis{stroke:#ffffff70;stroke-width:1.5}
.plot .tick{fill:#ffffff99;font-size:12px}.plot .ptl{fill:#cfe0ff;font-size:12px}
.plot .pt{fill:#4e8dff;stroke:#fff;stroke-width:1.5}.plot .pt2{fill:#ffcf62;stroke:#07111f}
.plot .dash{fill:none;stroke:#ffcf6280;stroke-width:2;stroke-dasharray:6 5}
.plot .diag{stroke:#ffffff80;stroke-width:1.5}.plot .curve{fill:none;stroke:#4e8dff;stroke-width:3}
.plot .stair{fill:none;stroke:#ffcf62;stroke-width:2.5}
.wnote{margin-top:10px;font-size:18px;line-height:1.5;min-height:28px}
.dominos-row{display:flex;justify-content:center;gap:50px;margin:30px 0 14px;overflow:hidden;padding:0 30px}
.domino{width:38px;height:96px;flex:none;background:linear-gradient(145deg,#fff,#c9d7ee);color:#123b83;border-radius:6px;font-size:11px;font-weight:bold;display:flex;align-items:flex-start;justify-content:center;padding-top:6px;transform-origin:bottom right;transition:transform .35s ease-in}
.domino.fall{transform:rotate(72deg)}

/* Commandes */
.controls{height:68px;background:#0d1c30;display:flex;justify-content:center;align-items:center;gap:12px;padding:0 10px}
.controls button{width:50px;height:46px;padding:0;font-size:21px}
#voice.off{opacity:.5}

/* Suivi enseignant */
.prof{max-width:1000px;margin:0 auto;padding:30px}
.prof table{width:100%;border-collapse:collapse;margin-top:16px}
.prof th,.prof td{padding:10px;border-bottom:1px solid #ffffff18;text-align:left}
.prof select{padding:8px;border-radius:8px;background:#0d1c30;color:#fff;border:1px solid #ffffff30}

@media(max-width:650px){
 .bar{font-size:13px;padding:0 10px}.card{padding:20px}.slide{padding:12px}
 .step{font-size:17px}.step.formula{font-size:22px}.step.big{font-size:28px}
 .step.grid4{width:100%}.lead{font-size:18px}.wcontrols input[type=range]{width:110px}
 .dominos-row{gap:28px}.domino{width:28px;height:80px}
 .controls{gap:7px}.controls button{width:42px}
}

/* Logo */
.logo{display:flex;align-items:center;text-decoration:none}
.logo img{width:40px;height:40px;display:block}
.biglogo{width:120px;height:120px;display:block;margin:auto;filter:drop-shadow(4px 8px 14px #0008)}
.brand{display:block}

/* Probabilités / géométrie */
.step.formula.small{font-size:24px}
.v{position:relative;display:inline-block;padding-top:.45em;line-height:1}
.v::before{content:'→';position:absolute;top:-.15em;left:0;right:0;text-align:center;font-size:.85em}
.wnote{line-height:1.8}
.plot .edge{stroke:#ffffff80;stroke-width:2}
.plot .node{fill:#193b6b;stroke:#74aaff;stroke-width:2}.plot .node.b{fill:#7a5a10;stroke:#ffcf62}
.plot .nodel{fill:#fff;font-size:14px;font-weight:bold}
.plot .joint{fill:#cfe0ff;font-size:13px}.plot .joint.b{fill:#ffcf62;font-weight:bold}
.plot .bar{fill:#4e8dff}.plot .bar.hi{fill:#ffcf62}
.plot .va{stroke:#4e8dff;fill:#4e8dff;stroke-width:3}
.plot .vb{stroke:#ffcf62;fill:#ffcf62;stroke-width:3}
.plot .vc{stroke:#5fe39a;fill:#5fe39a;stroke-width:3}
.plot .vd{stroke:#ff7a59;fill:#ff7a59;stroke-width:3}
.plot .edge2{stroke:#fff;stroke-width:2.5}
.plot .hid{stroke:#ffffff70;stroke-width:2;stroke-dasharray:6 5}
.plot .vl{fill:#fff;font-weight:bold;font-size:14px}
.plot .plane{fill:#4e8dff33;stroke:#4e8dff;stroke-width:1.5}
.plot .lineD{stroke:#ffcf62;stroke-width:3}
.plot .drop{stroke:#ffffff66;stroke-width:1.5;stroke-dasharray:3 4}
.plot .ptI{fill:#ff7a59;stroke:#fff;stroke-width:2}
.wcontrols button.sel{background:#2d6cdf;outline:2px solid #9dc4ff}
.plot .band{fill:#ffcf6226}
.plot .tg{fill:none;stroke-width:2.5}
.plot .tg.cvx{stroke:#5fe39a}.plot .tg.ccv{stroke:#ff7a59}.plot .tg.inf{stroke:#fff}
.plot .rect{fill:#4e8dff55;stroke:#4e8dff;stroke-width:1}
.plot .area{fill:#4e8dff55;stroke:none}
.plot .slope{stroke:#ffffff55;stroke-width:1.6;stroke-linecap:round}
.plot .peg{fill:#ffffff70}
.plot .exp{fill:none;stroke:#ffcf62;stroke-width:2}
.plot .ball{fill:#ff7a59;stroke:#fff;stroke-width:2}
.plot .pas{fill:#ffffff88;font-size:15px;text-anchor:middle}
.plot .pas.hl{fill:#ffcf62;font-weight:bold}
.plot .pas.par{fill:#5fe39a;font-weight:bold}

/* Bilan */
.bilan{max-width:1000px;margin:0 auto;padding:30px;text-align:center}
.midlogo{width:84px;height:84px;display:block;margin:auto;filter:drop-shadow(4px 8px 14px #0008)}
.bilan h1{margin:14px 0 4px}
.summary{margin:24px auto 30px;max-width:640px}
.sumbar,.cbar{height:12px;border-radius:8px;background:#ffffff18;overflow:hidden}
.sumbar i,.cbar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2d6cdf,#63a1ff);transition:width .8s}
.cbar{height:8px;margin:8px 0 2px}
.bcard.isdone{border-color:#3bbf7a}.bcard.isdone .cbar i{background:#3bbf7a}
.bcard .status{opacity:.9}.bcard .score{color:#ffcf62}
.champion{font-size:22px;color:#ffcf62;font-weight:bold}
.bilan .cards{text-align:left}

/* Onglets de niveau */
.tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 auto 18px}
.tab{padding:9px 16px;border-radius:999px;background:#112641;border:1px solid #ffffff1a;color:#cfe0ff;text-decoration:none;font-size:15px}
.tab:hover{border-color:#63a1ff}.tab.on{background:#2d6cdf;color:#fff;border-color:#63a1ff}

/* Maths expertes */
.plot .clock{fill:none;stroke:#ffffff33;stroke-width:2}
.plot .sq0{fill:none;stroke:#ffffff80;stroke-width:1.5;stroke-dasharray:5 4}
.erows{margin:10px 0;display:grid;gap:6px;font-size:20px}
.erow{opacity:.15;transform:translateX(-8px);transition:.4s;padding:8px 14px;background:#ffffff0a;border-radius:10px;font-family:'Courier New',monospace}
.erow.on{opacity:1;transform:none}.erow.last.on{background:#1d6b4366;border:1px solid #3bbf7a}
.erow b{color:#ffcf62}
.mat{border-collapse:collapse;margin:8px auto}.mat td{padding:5px 14px;border:1px solid #ffffff22;text-align:center;min-width:34px}
.mat td.hl{background:#ffcf6233;font-weight:bold;color:#ffcf62}
.wcontrols select{padding:8px 10px;border-radius:8px;background:#0d1c30;color:#fff;border:1px solid #ffffff30;font-size:16px}

/* Tableau à double entrée */
.tab2{border-collapse:collapse;margin:10px auto;font-size:19px}
.tab2 th,.tab2 td{padding:9px 18px;border:1px solid #ffffff26;text-align:center}
.tab2 th{background:#ffffff0d;font-weight:normal}.tab2 th.sel{background:#2d6cdf;color:#fff}
.tab2 td.tot{background:#ffffff08;font-weight:bold}
.tab2 td.hl{background:#ffcf6233;color:#ffcf62;font-weight:bold}
.wcontrols button.sel{background:#2d6cdf;outline:2px solid #9dc4ff}

/* Information chiffrée et statistiques */
.plot .cell{stroke:#ffffff22;stroke-width:1}
.plot .cell.c0{fill:#ffffff12}.plot .cell.c1{fill:#4e8dffaa}.plot .cell.c2{fill:#ffcf62}
.plot .box{fill:#4e8dff55;stroke:#4e8dff;stroke-width:2}
.plot .med{stroke:#ffcf62;stroke-width:4}

/* Intervalles (Seconde) */
.plot .ivl{stroke-width:7;stroke-linecap:butt}
.plot .i1{stroke:#4e8dff}.plot .i2{stroke:#ffcf62}.plot .i3{stroke:#5fe39a}.plot .i4{stroke:#ff7a59}
.plot .ep{stroke-width:3}
.plot .c1{fill:#4e8dff;stroke:#4e8dff}.plot .c2{fill:#ffcf62;stroke:#ffcf62}.plot .c3{fill:#5fe39a;stroke:#5fe39a}.plot .c4{fill:#ff7a59;stroke:#ff7a59}
.plot .o1{fill:#0b1728;stroke:#4e8dff}.plot .o2{fill:#0b1728;stroke:#ffcf62}.plot .o3{fill:#0b1728;stroke:#5fe39a}.plot .o4{fill:#0b1728;stroke:#ff7a59}
.plot .area.warm{fill:#ffcf6299;stroke:#ffcf62;stroke-width:1}
