/* Campus N.A Formations · charte : bleu nuit, bleu roi, bleu vif, bleu clair, Poppins et Montserrat */
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:Poppins,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--night);background:var(--bg);font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:var(--royal)}a:hover{color:var(--night)}
img{max-width:100%}
h1,h2,h3{font-family:Montserrat,Poppins,sans-serif;line-height:1.2;margin:0}
h1{font-size:30px;font-weight:800;letter-spacing:-.02em}
h2{font-size:20px;font-weight:700}
h3{font-size:16px;font-weight:700}
p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--bright);outline-offset:2px}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.boot{display:flex;align-items:center;justify-content:center;min-height:100vh;color:#5A6B8C}
.muted{color:#5A6B8C}.small{font-size:13px}.xs{font-size:12px}
.stack{display:flex;flex-direction:column;gap:14px}
.row{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.between{justify-content:space-between}
.grow{flex:1 1 auto}

/* Mise en page */
.shell{display:flex;flex-wrap:wrap;min-height:100vh}
.side{flex:1 1 248px;max-width:280px;background:#fff;border-right:1px solid #DCE3EE;padding:24px 18px;display:flex;flex-direction:column;gap:20px}
.nafa-gestion .side{background:var(--night);color:#fff;border-right:0}
.brand{display:flex;flex-direction:column;gap:2px;padding:4px 6px 12px;border-bottom:1px solid #DCE3EE}
.nafa-gestion .brand{border-bottom-color:#22355C}
.brand strong{font-family:Montserrat,sans-serif;font-size:20px;letter-spacing:.06em}
.brand strong span{color:var(--bright)}
.brand small{font-size:13px;color:#5A6B8C}.nafa-gestion .brand small{color:#A9BCE0}
.nav{display:flex;flex-direction:column;gap:4px}
.nav a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;color:#31456F;text-decoration:none;min-height:44px}
.nav a:hover{background:#F2F4F7;color:var(--night)}
.nav a.on{background:#E8F0FE;color:var(--night);font-weight:600}
.nafa-gestion .nav a{color:#DCE7FA}.nafa-gestion .nav a:hover{background:#12284F;color:#fff}
.nafa-gestion .nav a.on{background:var(--royal);color:#fff}
.nav .badge{margin-left:auto;background:var(--bright);color:var(--night);font-size:12px;font-weight:700;padding:1px 9px;border-radius:99px}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px;padding-top:16px;border-top:1px solid #DCE3EE}
.nafa-gestion .side-foot{border-top-color:#22355C}
.side-foot .label{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#5A6B8C}
.side-foot a.tool{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-radius:10px;border:1px solid #DCE3EE;color:var(--night);text-decoration:none;font-weight:500;min-height:44px}
.side-foot button.link{background:none;border:0;color:inherit;text-align:left;padding:10px 14px;cursor:pointer;border-radius:10px;min-height:44px}
.side-foot button.link:hover{background:rgba(127,140,170,.12)}
.main{flex:999 1 560px;min-width:0;padding:24px clamp(16px,4vw,56px) 56px}
.wrap{max-width:1160px;margin:0 auto;display:flex;flex-direction:column;gap:24px}
.topbar{display:flex;justify-content:flex-end;align-items:center;gap:16px}
.topbar .logo{height:64px;width:auto;border-radius:10px}

/* Avatar */
.avatar{position:relative;flex:none;width:48px;height:48px}
.avatar .pic{width:100%;height:100%;border-radius:50%;background:var(--royal);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;overflow:hidden;border:3px solid #fff;box-shadow:0 0 0 1px #DCE3EE}
.avatar .pic img{width:100%;height:100%;object-fit:cover}
.avatar.sm{width:36px;height:36px;font-size:13px}.avatar.sm .pic{border-width:2px}
.avatar.lg{width:64px;height:64px;font-size:20px}
.avatar .cam{position:absolute;right:-10px;bottom:-10px;width:44px;height:44px;border:0;background:transparent;padding:0;cursor:pointer;display:flex;align-items:flex-end;justify-content:flex-end}
.avatar .cam span{width:26px;height:26px;border-radius:50%;background:var(--bright);color:var(--night);border:2px solid #fff;display:flex;align-items:center;justify-content:center}

/* Cartes et blocs */
.card{background:#fff;border:1px solid #DCE3EE;border-radius:16px;padding:24px;display:flex;flex-direction:column;gap:14px}
.card.flat{padding:18px}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}
.tile{background:#fff;border:1px solid #DCE3EE;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:4px}
.tile .k{font-size:13px;color:#5A6B8C}.tile .v{font-family:Montserrat,sans-serif;font-size:26px;font-weight:700}
.tile strong{font-size:17px}
.cols{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.cols>.c2{flex:2 1 420px;min-width:0}.cols>.c1{flex:1 1 280px;min-width:0}.cols>.c3{flex:3 1 560px;min-width:0}
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:18px}
.mcard{background:#fff;border:1px solid #DCE3EE;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;text-decoration:none;color:inherit}
.mcard .img{position:relative;height:150px;background:var(--night)}
.mcard .img img{width:100%;height:100%;object-fit:cover;display:block}
.mcard .img .chip{position:absolute;top:12px;left:12px}
.mcard .body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:10px;flex:1}
.mcard.locked .img img{opacity:.55}
.eyebrow{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--royal)}
.hero{display:flex;flex-wrap:wrap;background:var(--night);border-radius:20px;overflow:hidden;color:#fff}
.hero>img{flex:1 1 320px;min-height:230px;max-width:460px;object-fit:cover}
.hero .in{flex:1 1 360px;padding:30px 34px;display:flex;flex-direction:column;gap:12px}
.hero .eyebrow{color:var(--light)}.hero p{color:#C9D8F2}

/* Boutons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700;color:#fff;background:var(--royal);border:0;padding:12px 22px;border-radius:99px;min-height:44px;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:hover{background:var(--night);color:#fff}
.btn.bright{background:var(--bright);color:var(--night)}.btn.bright:hover{background:#fff}
.btn2{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;color:var(--royal);background:#fff;border:1.5px solid var(--royal);padding:11px 20px;border-radius:99px;min-height:44px;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn2:hover{background:#E8F0FE}
.btn-link{background:none;border:0;color:var(--royal);font-weight:600;cursor:pointer;padding:8px 4px;min-height:44px;text-decoration:none;display:inline-flex;align-items:center;gap:6px}
.btn-danger{color:#A61B1B;border-color:#A61B1B}
button[disabled],.btn[aria-disabled=true]{opacity:.55;cursor:not-allowed}
.pills{display:flex;flex-wrap:wrap;gap:10px}
.pill{font-weight:600;padding:10px 18px;border-radius:99px;min-height:44px;border:1.5px solid var(--royal);color:var(--royal);background:#fff;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center}
.pill.on{background:var(--royal);color:#fff}

/* Étiquettes et barres */
.chip{display:inline-flex;align-self:flex-start;font-size:12px;font-weight:600;padding:4px 10px;border-radius:99px;background:#E8F0FE;color:var(--royal)}
.chip.ok{background:#DDF5E8;color:#0C5B33}.chip.wait{background:#FFF1CF;color:#6B4A00}.chip.off{background:#EEF1F6;color:#3D4D6A}.chip.ko{background:#FDE3E3;color:#8A1414}
.bar{height:8px;border-radius:99px;background:#E6EDF8;overflow:hidden}.bar>i{display:block;height:100%;border-radius:99px;background:var(--royal)}
.hero .bar{background:#23386B}.hero .bar>i{background:var(--bright)}

/* Leçon */
.lesson-side .step{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:12px;color:var(--night);text-decoration:none}
.lesson-side .step:hover{background:#F2F4F7}
.lesson-side .step.on{background:#E8F0FE}
.lesson-side .step.locked{opacity:.55}
.dot{flex:none;width:28px;height:28px;border-radius:50%;border:2px solid #AFC2DE;color:#31456F;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
.dot.done{background:#0C5B33;border-color:#0C5B33;color:#fff}.dot.cur{background:var(--royal);border-color:var(--royal);color:#fff}
.banner{position:relative;border-radius:20px;overflow:hidden;min-height:230px;display:flex;align-items:flex-end;background:var(--night);color:#fff}
.banner>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.banner .veil{position:absolute;inset:0;background:rgba(8,22,60,.62)}
.banner svg.ribbons{position:absolute;right:0;top:0;width:62%;height:100%}
.banner .in{position:relative;padding:30px 34px;display:flex;flex-direction:column;gap:10px;max-width:760px}
.banner .eyebrow{color:var(--light)}
.banner h1{font-size:clamp(24px,3.4vw,36px)}
.video{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#10244F}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* Contenu des leçons, veilles et newsletters : mise en page soignée (identique dans l'éditeur) */
.content{line-height:1.75;font-size:16px;color:#1B2B4B;overflow-wrap:anywhere}
.content:not(.raw)>*{margin:0}.content:not(.raw)>*+*{margin-top:14px}
.content:not(.raw) h2{font-family:Montserrat,sans-serif;font-size:22px;font-weight:700;color:var(--night);margin-top:30px;padding-left:14px;border-left:5px solid var(--bright);line-height:1.3}
.content:not(.raw) h3{font-family:Montserrat,sans-serif;font-size:18px;font-weight:700;color:var(--royal);margin-top:24px;line-height:1.35}
.content:not(.raw) h4{font-size:16px;font-weight:700;color:var(--night);margin-top:18px;text-transform:uppercase;letter-spacing:.04em}
.content:not(.raw)>h2:first-child,.content:not(.raw)>h3:first-child{margin-top:0}
.content:not(.raw) p{margin-top:12px}
.content:not(.raw) strong{color:var(--night);font-weight:700}
.content:not(.raw) a{color:var(--royal);font-weight:600;text-decoration:underline;text-decoration-color:var(--light);text-underline-offset:3px}
.content:not(.raw) a:hover{text-decoration-color:var(--royal)}
.content:not(.raw) mark{background:#FFF1B8;padding:0 3px;border-radius:4px}
.content:not(.raw) ul,.content:not(.raw) ol{padding-left:0;list-style:none}
.content:not(.raw) li{position:relative;padding-left:28px;margin-top:8px}
.content:not(.raw) ul>li::before{content:"";position:absolute;left:8px;top:.68em;width:8px;height:8px;border-radius:50%;background:var(--bright)}
.content:not(.raw) ul ul>li::before{background:transparent;border:2px solid var(--light);width:7px;height:7px}
.content:not(.raw) ol{counter-reset:nafa}
.content:not(.raw) ol>li{counter-increment:nafa}
.content:not(.raw) ol>li::before{content:counter(nafa);position:absolute;left:0;top:.18em;width:20px;height:20px;border-radius:50%;background:var(--royal);color:#fff;font-size:12px;font-weight:700;line-height:20px;text-align:center}
.content:not(.raw) li>ul,.content:not(.raw) li>ol{margin-top:6px}
.content:not(.raw) table{border-collapse:separate;border-spacing:0;width:100%;font-size:14.5px;border:1px solid #DCE3EE;border-radius:14px;overflow:hidden}
.content:not(.raw) th{background:var(--night);color:#fff;text-align:left;padding:11px 14px;font-weight:600;white-space:nowrap}
.content:not(.raw) td{border-top:1px solid #E6EBF3;padding:10px 14px;vertical-align:top}
.content:not(.raw) tbody tr:nth-child(even) td{background:#F7F9FC}
.content:not(.raw) blockquote{margin-left:0;margin-right:0;padding:14px 18px;border-radius:14px;background:#E8F0FE;border-left:5px solid var(--royal);color:#1B2B4B}
.content:not(.raw) blockquote>*+*{margin-top:8px}
.content:not(.raw) hr{border:0;height:1px;background:linear-gradient(90deg,transparent,#C9D6EA,transparent);margin:26px 0}
.content:not(.raw) code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.9em;background:#EEF2F8;padding:2px 6px;border-radius:6px}
.content:not(.raw) pre{background:var(--night);color:#E8F0FE;padding:14px 16px;border-radius:12px;overflow-x:auto}
.content:not(.raw) pre code{background:none;color:inherit;padding:0}
.content:not(.raw) img{max-width:100%;height:auto;border-radius:12px}
@media (max-width:640px){.content{font-size:15.5px}.content:not(.raw) h2{font-size:19px}.content:not(.raw) h3{font-size:17px}.content:not(.raw) table{display:block;overflow-x:auto}}
.res{display:flex;align-items:center;gap:12px;padding:12px;border-radius:12px;background:var(--bg);text-decoration:none;color:var(--night);min-height:44px}
.q{display:flex;gap:14px}.q.reply{padding-left:52px}
.q .who{font-size:14px}.q .who span{color:#5A6B8C}

/* QCM */
.quiz-q{padding:18px;border:1px solid #DCE3EE;border-radius:14px;display:flex;flex-direction:column;gap:10px}
.quiz-q label{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:10px;background:var(--bg);cursor:pointer;min-height:44px}
.quiz-q label input{margin-top:4px;width:18px;height:18px}
.quiz-q.good{border-color:#0C5B33;background:#F4FBF7}.quiz-q.bad{border-color:#A61B1B;background:#FFF7F7}
.stars{display:flex;gap:6px}.stars button{width:48px;height:48px;border-radius:12px;border:1.5px solid #AFC2DE;background:#fff;cursor:pointer;font-weight:700;font-size:16px}
.stars button.on{background:var(--royal);border-color:var(--royal);color:#fff}

/* Formulaires */
.field{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px;flex:1 1 200px;min-width:0}
.field input,.field select,.field textarea{font-weight:400;padding:12px 14px;border:1px solid #AFC2DE;border-radius:12px;background:#fff;width:100%}
.field textarea{resize:vertical;min-height:90px}
.field .hint{font-weight:400;font-size:12px;color:#5A6B8C}
.check{display:flex;align-items:center;gap:10px;font-size:14px;min-height:44px}
.check input{width:20px;height:20px}
.drop{display:flex;align-items:center;justify-content:center;gap:8px;font-weight:600;color:var(--royal);background:#E8F0FE;border:1.5px dashed var(--light);border-radius:12px;min-height:48px;padding:10px 14px;cursor:pointer;text-align:center}
.editor{border:1px solid #AFC2DE;border-radius:12px;overflow:hidden;background:#fff}
.editor .tb{display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:var(--bg);border-bottom:1px solid #DCE3EE}
.editor .tb button{border:0;background:none;padding:6px 10px;border-radius:8px;cursor:pointer;font-weight:600;font-size:13px;color:#31456F;min-height:36px}
.editor .tb button:hover{background:#fff}
.editor .area{min-height:180px;padding:14px 16px;outline:none;line-height:1.65}
.editor textarea.src{width:100%;min-height:220px;border:0;padding:14px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:13px}

/* Tableaux */
.tablebox{overflow-x:auto}
table.list{width:100%;border-collapse:collapse;font-size:14px;min-width:720px}
table.list th{text-align:left;color:#5A6B8C;font-size:13px;font-weight:600;padding:10px 8px;border-bottom:1px solid #DCE3EE}
table.list td{padding:12px 8px;border-bottom:1px solid #EDF1F7;vertical-align:middle}
table.list tr.click{cursor:pointer}table.list tr.click:hover td{background:#F7F9FC}
.search{display:flex;align-items:center;gap:8px;border:1px solid #AFC2DE;border-radius:99px;padding:0 14px;min-height:44px;background:#fff}
.search input{border:0;outline:none;background:transparent;min-width:180px;padding:10px 0}
.item-row{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--bg)}
.item-row .t{flex:1 1 auto;min-width:0}
.icon-btn{width:40px;height:40px;border-radius:10px;border:1px solid #DCE3EE;background:#fff;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:#31456F}
.icon-btn:hover{background:#E8F0FE}
.cert-preview{position:relative;overflow:hidden;border:1px solid #DCE3EE;border-radius:14px;background:#fff;aspect-ratio:1.414/1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:28px}
.cert-preview svg{position:absolute;left:0;right:0;width:100%}

/* Notifications et fenêtres */
.toasts{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:1000;width:min(92vw,520px)}
.toast{background:var(--night);color:#fff;padding:12px 18px;border-radius:12px;box-shadow:0 8px 24px rgba(10,28,61,.25)}
.toast.err{background:#8A1414}
.modal-back{position:fixed;inset:0;background:rgba(10,28,61,.45);display:flex;align-items:flex-start;justify-content:center;padding:5vh 16px;z-index:900;overflow:auto}
.modal{background:#fff;border-radius:18px;width:min(720px,100%);padding:26px;display:flex;flex-direction:column;gap:16px;box-shadow:0 20px 60px rgba(10,28,61,.3)}
.modal.wide{width:min(980px,100%)}
.empty{padding:28px;text-align:center;color:#5A6B8C;border:1.5px dashed #DCE3EE;border-radius:14px}

/* Connexion */
.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--night)}
.login .box{background:#fff;border-radius:20px;width:min(440px,100%);padding:32px;display:flex;flex-direction:column;gap:16px}
.login .box img{height:90px;width:auto;align-self:center}
.notice{padding:12px 14px;border-radius:12px;background:#FFF1CF;color:#6B4A00;font-size:14px}
.notice.info{background:#E8F0FE;color:var(--night)}.notice.ok{background:#DDF5E8;color:#0C5B33}

/* Téléphone */
@media (max-width:760px){
  .side{max-width:none;flex-basis:100%;padding:12px 14px;gap:10px;border-right:0;border-bottom:1px solid #DCE3EE;position:sticky;top:0;z-index:50}
  .brand{padding:0;border:0;flex-direction:row;align-items:baseline;gap:10px}
  .nav{flex-direction:row;overflow-x:auto;gap:6px;padding-bottom:4px;scrollbar-width:none}
  .nav a{white-space:nowrap;padding:8px 12px;min-height:40px}
  .nav a svg{display:none}
  .side-foot{display:none}
  .main{padding:16px 14px 48px}
  .topbar .logo{height:48px}
  h1{font-size:24px}
  .hero .in,.banner .in{padding:22px}
  .card{padding:18px}
}

/* Newsletters archivées (HTML Brevo) */
.nafa-newsletter{max-width:640px;margin:0 auto;overflow-x:auto}
.nafa-newsletter img{max-width:100%;height:auto}
.nafa-newsletter table{max-width:100%}

/* Leçons par blocs */
.blk-add{gap:6px;padding:12px;border:1.5px dashed #AFC2DE;border-radius:14px;background:#F7F9FC}
.btn2.sm{min-height:36px;padding:6px 12px;font-size:13px}
.blk{gap:10px;background:var(--bg);border:1px solid #DCE3EE}
.blk-fig{margin:0;display:flex;flex-direction:column;gap:8px}
.blk-title{display:flex;align-items:center;gap:8px;font-weight:600;font-size:15px}
.pdf-view{width:100%;height:70vh;min-height:420px;border:1px solid #DCE3EE;border-radius:14px;background:#fff}
.blk-sep{border:0;border-top:1px solid #DCE3EE;margin:8px 0}
.blk-quiz{display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:16px;background:#F4F8FF;border:1px solid #CFE0FA}
.callout{padding:14px 16px;border-radius:14px;display:flex;flex-direction:column;gap:6px;border-left:5px solid var(--royal);background:#E8F0FE}
.callout.astuce{border-color:#0C7A4A;background:#EAF7F0}
.callout.attention{border-color:#C26A00;background:#FFF4E0}
.callout.retenir{border-color:#6B3FC4;background:#F1ECFC}

/* Communauté */
.space-card{display:flex;align-items:center;gap:16px;padding:18px;border-radius:18px;background:#fff;border:1px solid #DCE3EE;text-decoration:none;color:var(--night);transition:box-shadow .15s,transform .15s}
.space-card:hover{box-shadow:0 8px 24px rgba(10,28,61,.08);transform:translateY(-1px)}
.space-emo{width:54px;height:54px;flex:0 0 54px;border-radius:16px;background:#E8F0FE;display:flex;align-items:center;justify-content:center;font-size:28px}
.post{gap:12px}
.post.pinned{border:2px solid var(--light);background:linear-gradient(#F4F8FF,#fff 120px)}
.pbody{line-height:1.65;white-space:normal;word-wrap:break-word}
.pgrid{display:grid;gap:6px;border-radius:14px;overflow:hidden}
.pgrid.n1{grid-template-columns:1fr}.pgrid.n2{grid-template-columns:1fr 1fr}.pgrid.n3{grid-template-columns:2fr 1fr}.pgrid.n3 .pimg:first-child{grid-row:span 2}.pgrid.n4{grid-template-columns:1fr 1fr}
.pimg{position:relative;padding:0;border:0;background:#EEF2F8;cursor:zoom-in;display:block;aspect-ratio:4/3;overflow:hidden}
.pgrid.n1 .pimg{aspect-ratio:auto;max-height:520px}
.pimg img{width:100%;height:100%;object-fit:cover;display:block}
.pimg .more{position:absolute;inset:0;background:rgba(10,28,61,.55);color:#fff;font-size:28px;font-weight:700;display:flex;align-items:center;justify-content:center}
.reacts{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.react{border:1px solid #DCE3EE;background:#fff;border-radius:99px;padding:4px 10px;min-height:32px;font:inherit;font-size:14px;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.react.mine{background:#E8F0FE;border-color:var(--light);color:var(--royal);font-weight:600}
.react.add{color:#5A6B8C}
.comments{display:flex;flex-direction:column;gap:10px;padding-top:12px;border-top:1px solid #EDF1F7}
.cmt{display:flex;gap:10px;align-items:flex-start}
.bubble{background:var(--bg);border-radius:14px;padding:8px 12px;display:flex;flex-direction:column;gap:2px}
.cmt .reacts .react{min-height:26px;padding:2px 8px;font-size:12px}
.cform textarea,#cpost textarea{font:inherit;padding:10px 12px;border:1px solid #AFC2DE;border-radius:14px;resize:vertical;min-height:42px}
.cprev{display:flex;flex-wrap:wrap;gap:8px}
.cprev:empty{display:none}
.thumb{position:relative;width:84px;height:84px;border-radius:12px;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb button{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;border:0;background:rgba(10,28,61,.75);color:#fff;cursor:pointer;line-height:1}
.emoji-pop{position:absolute;z-index:1000;background:#fff;border:1px solid #DCE3EE;border-radius:14px;box-shadow:0 12px 32px rgba(10,28,61,.16);padding:8px;display:grid;grid-template-columns:repeat(9,36px);gap:2px}
.emoji-pop.small-pop{grid-template-columns:repeat(8,36px)}
.emoji-pop button{width:36px;height:36px;border:0;background:none;font-size:20px;border-radius:8px;cursor:pointer}
.emoji-pop button:hover{background:var(--bg)}
.light{display:flex;flex-direction:column;gap:12px}
.light img{max-width:100%;max-height:72vh;object-fit:contain;align-self:center;border-radius:12px}
@media (max-width:560px){.emoji-pop{grid-template-columns:repeat(6,36px)}}
.news-body:not(.raw){padding:28px clamp(18px,4vw,40px)}
.blk-text:not(.raw)+.blk-text{margin-top:0}
.content:not(.raw) li.task{padding-left:4px}.content:not(.raw) li.task::before{display:none}

/* Vidéo directe, blocs dépliables (flashcards, « en savoir plus ») */
.vfile{width:100%;border-radius:16px;background:#0A1C3D;aspect-ratio:16/9}
.content:not(.raw) details{border:1px solid #DCE3EE;border-radius:14px;background:#fff;padding:0 16px;margin-top:12px}
.content:not(.raw) details>summary{cursor:pointer;list-style:none;padding:14px 28px 14px 0;font-weight:600;color:var(--night);position:relative}
.content:not(.raw) details>summary::-webkit-details-marker{display:none}
.content:not(.raw) details>summary::after{content:"+";position:absolute;right:0;top:10px;width:24px;height:24px;border-radius:50%;background:#E8F0FE;color:var(--royal);text-align:center;line-height:24px;font-weight:700}
.content:not(.raw) details[open]>summary::after{content:"–"}
.content:not(.raw) details>*:not(summary){padding-bottom:14px}
.content:not(.raw) details.flash>summary::before{content:"❓ "}

.vprog{display:flex;flex-direction:column;gap:6px}.vprog .vbar{height:8px;background:#E3ECF7;border-radius:99px;overflow:hidden}.vprog .vbar span{display:block;height:100%;width:0;background:#1F6FD1;transition:width .2s}
.notice.err{background:#FDE7E7;color:#8A1C1C}

/* ===== Téléphone : en-tête compact, barre d'onglets en bas, aucun débordement horizontal ===== */
html,body{overflow-x:hidden;max-width:100%}
.side,.main,.wrap,.nav{min-width:0}
.mhead,.mtabs,.msheet{display:none}
@media (max-width:760px){
  body{font-size:15px}
  .nafa-eleve .side{display:none}
  .nafa-eleve .shell{display:block}
  .mhead{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:60;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid #DCE3EE;padding:10px 16px;padding-top:calc(10px + env(safe-area-inset-top))}
  .mhead .brand{padding:0;border:0;flex-direction:row;align-items:baseline;gap:8px;min-width:0}
  .mhead .brand strong{font-size:17px}
  .mhead .brand small{font-size:12px;white-space:nowrap}
  .mav{text-decoration:none;flex:none}
  .mtabs{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:70;background:#fff;border-top:1px solid #DCE3EE;padding:6px 4px calc(6px + env(safe-area-inset-bottom));box-shadow:0 -4px 18px rgba(13,30,62,.06)}
  .mtabs a,.mtabs button{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px;border:0;background:none;color:#5A6B8C;text-decoration:none;font-size:11px;font-weight:500;line-height:1.2;cursor:pointer;border-radius:12px}
  .mtabs a span:last-child,.mtabs button span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .mtabs .on{color:var(--royal);font-weight:700}
  .mtabs .on .ti{background:#E8F0FE}
  .mtabs .ti{position:relative;display:flex;align-items:center;justify-content:center;width:52px;height:30px;border-radius:99px}
  .mtabs .ti b{position:absolute;top:-2px;right:6px;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#E5484D;color:#fff;font-size:11px;line-height:18px;text-align:center}
  .msheet:not([hidden]){display:block;position:fixed;inset:0;z-index:80;background:rgba(13,30,62,.35)}
  .msheet-in{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:20px 20px 0 0;padding:10px 12px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;box-shadow:0 -10px 30px rgba(13,30,62,.15)}
  .msheet-in::before{content:"";width:40px;height:4px;border-radius:9px;background:#C9D3E3;align-self:center;margin:2px 0 10px}
  .msheet-in a,.msheet-in button{display:flex;align-items:center;gap:14px;padding:14px 12px;border-radius:12px;color:var(--night);text-decoration:none;font-size:16px;border:0;background:none;text-align:left;min-height:52px}
  .msheet-in a:active,.msheet-in button:active{background:#F2F4F7}
  .msheet-in .mlogout{color:#B42318;margin-top:6px;border-top:1px solid #EEF1F6;border-radius:0}
  .nafa-eleve .main{padding:16px 16px calc(96px + env(safe-area-inset-bottom))}
  .nafa-eleve .topbar{display:none}
  .wrap{gap:18px}
  input,select,textarea{font-size:16px}
}
@media (max-width:760px){
  .nafa-eleve .toasts{bottom:calc(84px + env(safe-area-inset-bottom))}
  .mtabs a,.mtabs button{font-size:10.5px;letter-spacing:-.01em}
  .mtabs .ti{width:46px}
  .cform textarea{min-width:0;font-size:16px;min-height:42px}
  .cform .avatar{display:none}
  .cform .csend{padding:8px 12px}
}
.card svg,.row svg{flex-shrink:0}
@media (max-width:760px){
  .mtabs a span:last-child,.mtabs button span:last-child{overflow:visible;text-overflow:clip}
  .mtabs .on{font-weight:600}
}
@media (max-width:760px){.nafa-eleve header .avatar.lg,.nafa-eleve header>.avatar{display:none}}
.pbody.rich{font-size:15px}.pbody.rich.clamp{max-height:260px;overflow:hidden;-webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}.btn-link.more{align-self:flex-start}
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:16px}.tool-card{height:100%}.tico{flex:none;display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:14px;background:#E8F0FE;color:var(--royal)}.row.wrap{flex-wrap:wrap}@media (max-width:760px){.tool-grid{grid-template-columns:1fr}}
.tool-grid{align-items:start}.tool-card{height:auto}.tool-card .tc{display:flex;gap:14px;align-items:flex-start}.tool-card .tcb{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;align-items:flex-start}.tool-card h2{font-size:18px;margin:0}.tool-card p{margin:0}.tool-card .acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:40px;height:44px;border:1px solid #DCE3EE;border-radius:12px;background:#fff;color:#5A6B8C;cursor:pointer;flex:none}.btn-icon:hover{color:#B42318;border-color:#F3C4C4}

/* Leçon : pleine largeur + mode agrandi */
.wrap.wide{max-width:1560px}
.lesson-cols>.lesson-side{flex:0 1 300px;max-width:320px}
.lesson-cols>.c3{flex:1 1 560px}
.res-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.lesson-bar{flex-wrap:wrap;gap:10px}
.btn2.small{padding:8px 14px;font-size:14px}
.shell.focus .lesson-side{display:none}
@media (min-width:1024px){.shell.focus>.side{display:none}}
