@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');
:root{--ink:#202747;--muted:#69718d;--navy:#182954;--purple:#7154cb;--blue:#3978db;--yellow:#ffcf65;--line:#e7eaf4;--bg:#f8f9fe;--shadow:0 18px 45px rgba(30,42,83,.075)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:16px 'DM Sans',system-ui,sans-serif}h1,h2,h3,h4{font-family:Outfit,system-ui,sans-serif;line-height:1.13;margin:0}h1{font-size:clamp(2.6rem,5vw,5rem);letter-spacing:-.045em}h2{font-size:clamp(1.7rem,3vw,2.65rem);letter-spacing:-.025em}h3{font-size:1.35rem}p{line-height:1.7}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.shell{max-width:1190px;margin:auto;padding:0 28px}.top{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.topin{height:86px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:12px;font:800 1.38rem Outfit;letter-spacing:-.035em}.brandmark{width:43px;height:43px;border-radius:14px;background:#ffcc59;display:grid;place-items:center;color:#17264e;font-size:25px;transform:rotate(-7deg)}.brand b{color:#f08a55}.nav{display:flex;gap:8px;align-items:center}.nav a{padding:11px 15px;border-radius:13px;font-size:.91rem;font-weight:800;color:#515c79}.nav a:hover,.nav a.active{background:#eee9ff;color:#5c43b7}.nav .adminlink{background:#172a54;color:white}.nav .adminlink:hover{background:#334b85;color:white}.menu{display:none}.footer{margin-top:85px;background:#192a54;color:#d5dcf2;padding:38px 0}.footer .shell{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}.eyebrow{text-transform:uppercase;font-size:.77rem;font-weight:900;letter-spacing:.14em;color:#7856cb}.lead{font-size:1.12rem;color:#646c85;max-width:650px}.hero{margin-top:42px;border-radius:34px;background:#eee9ff;display:grid;grid-template-columns:1.06fr .94fr;overflow:hidden;min-height:470px}.hero-copy{padding:64px 0 60px 58px;position:relative;z-index:1}.hero-copy p{max-width:470px}.hero-img{width:100%;height:100%;min-height:410px;object-fit:cover}.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:9px;background:#273d78;color:#fff;padding:14px 21px;border-radius:14px;font-weight:800;box-shadow:none}.btn:hover{filter:brightness(1.12)}.btn.alt{background:#fff;color:#2c3970;border:1px solid #dce1ee}.btn.sun{background:#ffd05f;color:#3b3264}.btn.danger{background:#ffe8e9;color:#ae3850}.section-head{display:flex;justify-content:space-between;align-items:end;gap:18px;margin:60px 0 23px}.section-head p{color:var(--muted);margin:8px 0 0}.level-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.level-card,.lesson-card{background:white;border-radius:25px;overflow:hidden;box-shadow:var(--shadow);transition:transform .22s,box-shadow .22s}.level-card:hover,.lesson-card:hover{transform:translateY(-6px);box-shadow:0 22px 55px rgba(30,42,83,.15)}.level-card img{width:100%;height:245px;object-fit:cover;display:block}.level-body{padding:23px}.level-body p{font-size:.9rem;color:var(--muted);margin:7px 0 0}.arrow{color:#7552d3;font-size:1.4rem}.row-between{display:flex;align-items:center;justify-content:space-between;gap:10px}.pill{display:inline-block;border-radius:99px;padding:7px 12px;font-size:.73rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;background:#e9e5ff;color:#6748b9}.intro-banner{margin:42px 0 28px;background:#eae8ff;border-radius:28px;padding:35px 40px;display:flex;justify-content:space-between;align-items:center;gap:20px}.intro-banner h1{font-size:clamp(2.5rem,4vw,4rem)}.intro-banner p{margin-bottom:0}.category{padding:30px;border-radius:28px;margin:30px 0}.category.common{background:#e8f0ff}.category.llce{background:#f3e8fc}.category.general{background:#e5f6ed}.category .section-head{margin:0 0 22px}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px}.lesson-card img{height:205px;width:100%;object-fit:cover;display:block}.lesson-card .body{padding:20px}.lesson-card .body p{font-size:.87rem;color:var(--muted);margin:8px 0 0}.crumb{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:#7a8198;font-size:.84rem;font-weight:700;margin:30px 0}.crumb span{color:#afb4c4}.lesson-hero{display:grid;grid-template-columns:1fr 1fr;background:#e3f3e8;border-radius:30px;overflow:hidden;min-height:340px}.lesson-hero .copy{padding:45px;display:flex;flex-direction:column;justify-content:center}.lesson-hero .copy p{font-size:1.06rem;color:#4b685a}.lesson-hero img{width:100%;height:100%;object-fit:cover;min-height:300px}.lesson-section{margin-top:28px;background:white;border:1px solid #edf0f6;border-radius:27px;padding:31px;box-shadow:var(--shadow)}.sec-title{display:flex;align-items:center;gap:15px;margin-bottom:22px}.sec-icon{display:grid;place-items:center;width:50px;height:50px;flex:none;border-radius:16px;font-size:24px}.sec-title p{margin:5px 0 0;color:var(--muted);font-size:.88rem}.media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.media-card{border-radius:18px;background:#f7f8fd;padding:16px;min-width:0}.media-card h3{font-size:1.08rem;margin:12px 0 4px}.media-card p{font-size:.87rem;color:#68708a;margin:4px 0 8px}.media-card iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:12px;background:#222}.media-card video{width:100%;border-radius:12px}.media-card audio{width:100%;margin:12px 0}.practice{background:#fff3d9}.correction{background:#e8f6ee}.workbook{background:#ececff}.lesson-section.practice,.lesson-section.correction,.lesson-section.workbook{border:0}.practice .sec-icon{background:#ffcf69}.correction .sec-icon{background:#c2ecd6}.workbook .sec-icon{background:#d7d6ff}.media .sec-icon{background:#e6ddff}.exercise-card{background:white;padding:20px;border-radius:18px;margin:13px 0;display:flex;justify-content:space-between;align-items:center;gap:15px}.exercise-card p{margin:5px 0 0;color:#777e94;font-size:.89rem}.correction details{background:white;border-radius:16px;padding:20px}.correction summary{font-weight:800;cursor:pointer}.correction .answer{white-space:pre-wrap;line-height:1.8;padding-top:15px}.pdf-frame{width:100%;height:630px;border:0;background:white;border-radius:16px;margin:10px 0 15px}.empty{padding:25px;border:2px dashed #d9deed;border-radius:16px;color:#80869c;text-align:center}.prevnext{display:flex;justify-content:space-between;gap:14px;margin:35px 0}.admin-layout{display:grid;grid-template-columns:245px 1fr;gap:25px;margin-top:35px;align-items:start}.side{background:#192a54;border-radius:22px;padding:18px;position:sticky;top:110px}.side a,.side button{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:0;border-radius:12px;background:transparent;color:#e2e9ff;padding:14px 13px;font-weight:800;font-size:.92rem}.side a.active,.side button.active,.side a:hover{background:#344b82}.admin-panel{background:white;border-radius:25px;padding:28px;box-shadow:var(--shadow);min-height:550px}.admin-panel h2{margin-bottom:12px}.admin-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin:20px 0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field.wide{grid-column:1/-1}.field label{font-size:.86rem;font-weight:800;color:#4c5677}.field input,.field select,.field textarea{width:100%;padding:12px 13px;border:1px solid #d9dfed;border-radius:12px;background:white;color:#242b4a}.field textarea{min-height:100px;resize:vertical}.field input:focus,.field textarea:focus,.field select:focus{outline:2px solid #a89aee;border-color:#a89aee}.form-section{border:1px solid #e5e9f4;border-radius:19px;padding:20px;margin:18px 0}.form-section h3{margin-bottom:15px}.form-section .hint{font-size:.82rem;color:#7b8298}.item-editor{background:#f7f8fd;padding:15px;border-radius:15px;margin:12px 0}.item-actions{display:flex;gap:7px;flex-wrap:wrap}.tiny{padding:8px 11px;border-radius:9px;font-size:.78rem;border:1px solid #dbe1ef;background:white;color:#3b4974;font-weight:800}.tiny.danger{color:#b4455a}.listrow{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e9ecf5;border-radius:14px;padding:14px;margin:10px 0}.listrow p{margin:4px 0;color:#80869b;font-size:.85rem}.notice{padding:15px 18px;border-radius:14px;background:#fff4dc;color:#765a2c;font-size:.88rem;line-height:1.5}.success{background:#e6f8ed;color:#246747}.hidden{display:none!important}.preview-link{font-size:.85rem;color:#5e49b2;font-weight:800}.muted{color:var(--muted)}.admin-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:17px 0}.admin-tabs button{border:1px solid #dce1ed;background:#fff;color:#596280;padding:10px 14px;border-radius:12px;font-weight:800}.admin-tabs button.active{background:#e8e2ff;color:#5d42b2;border-color:#cfc2ff}.small{font-size:.83rem}.help{background:#eef4ff;border-radius:16px;padding:17px;margin:14px 0}.toast{position:fixed;right:20px;bottom:20px;background:#1f674d;color:white;border-radius:14px;padding:14px 20px;z-index:99;box-shadow:var(--shadow)}@media(max-width:850px){.hero{grid-template-columns:1fr}.hero-copy{padding:35px}.hero-img{max-height:290px;min-height:0}.level-grid,.cards{grid-template-columns:repeat(2,1fr)}.lesson-hero{grid-template-columns:1fr}.lesson-hero img{max-height:300px}.admin-layout{grid-template-columns:1fr}.side{position:static;display:flex;gap:6px;flex-wrap:wrap}.side a,.side button{width:auto}.media-grid{grid-template-columns:1fr}}@media(max-width:600px){.shell{padding:0 17px}.topin{height:73px}.brand{font-size:1.14rem}.nav{display:none;position:absolute;top:72px;left:0;right:0;background:white;padding:15px;box-shadow:var(--shadow);flex-direction:column;align-items:stretch}.nav.open{display:flex}.menu{display:block;background:#f0edff;border:0;padding:10px 13px;border-radius:11px}.hero{margin-top:22px}.hero-copy{padding:28px}.hero-img{max-height:230px}.level-grid,.cards{grid-template-columns:1fr}.category{padding:17px}.intro-banner{padding:26px}.lesson-hero .copy{padding:28px}.lesson-section{padding:20px}.form-grid{grid-template-columns:1fr}.field.wide{grid-column:auto}.admin-panel{padding:18px}.exercise-card{flex-direction:column;align-items:start}.pdf-frame{height:470px}}

/* V5 — media players and full A4 PDF viewport */
.media-grid{align-items:start}.media-card{padding:0;overflow:hidden;background:#f5f6fc}.video-card{align-self:start}.media-caption{padding:16px 19px 19px}.media-kicker{font-size:.7rem;font-weight:900;letter-spacing:.11em;color:#7962bc}.media-card h3{margin:6px 0;font-size:1.12rem}.video-poster,.video-placeholder{position:relative;display:block;width:100%;aspect-ratio:16/9;overflow:hidden;border:0;border-radius:0;background:#252c4b;padding:0}.video-poster{cursor:pointer}.video-poster img,.video-placeholder img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}.video-poster:hover img{transform:scale(1.035)}.poster-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:#ffffffeb;color:#4b3899;font-size:27px;box-shadow:0 8px 25px #0003}.media-card iframe,.media-card video{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:0;background:#20243d}.audio-card{padding:22px;display:flex;flex-direction:column;gap:12px}.audio-header{display:flex;align-items:center;gap:14px}.audio-symbol{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#e5ddff;color:#664cb5;font-size:25px}.audio-card h3{margin:3px 0 0}.audio-card audio{width:100%;height:48px;margin:0;display:block;accent-color:#7052c7}.audio-card p{margin:0;line-height:1.5}.audio-empty{padding:13px 16px;background:white;border-radius:10px;color:#737b92;font-size:.85rem}.media-pending{font-style:italic}.pdf-scroll{max-height:850px;overflow:auto;overscroll-behavior:contain;border-radius:17px;background:#dfe1f2;padding:18px;box-shadow:inset 0 0 0 1px #d1d5e9}.pdf-sheet{width:100%;margin:0 auto;background:white;aspect-ratio:210/297;box-shadow:0 6px 25px #24315c24}.pdf-frame{display:block;width:100%;height:100%;aspect-ratio:210/297;border:0;border-radius:0;margin:0;background:white}.pdf-note{font-size:.83rem;color:#6b7091;margin:10px 0 17px}@media(max-width:600px){.pdf-scroll{max-height:650px;padding:8px}.audio-card{padding:16px}.poster-play{width:56px;height:56px;font-size:22px}}

.home-preview{margin:22px 0;border:1px solid #dedff1;border-radius:22px;padding:18px;background:#f6f4ff}.home-preview>strong{display:block;margin-bottom:12px}.home-preview-inner{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;align-items:center;background:white;border-radius:16px;padding:20px}.home-preview-inner h2{font-size:clamp(22px,3vw,38px);line-height:1.15;margin:8px 0}.home-preview-inner p{color:#626987}.home-preview-inner small{color:#7958ce;text-transform:uppercase;font-weight:800}.home-preview-inner img{width:100%;max-height:240px;object-fit:contain}.home-preview-inner .btn{display:inline-block;margin-top:12px}@media(max-width:650px){.home-preview-inner{grid-template-columns:1fr}}

/* V7 — dedicated red assessment banner */
.assessments{background:linear-gradient(125deg,#b72d49 0%,#d83e55 58%,#ee6b69 100%);color:#fff;border:0;position:relative;overflow:hidden}.assessments::after{content:"";position:absolute;right:-65px;top:-95px;width:260px;height:260px;border:40px solid #ffffff15;border-radius:50%;pointer-events:none}.assessments .sec-title{position:relative;z-index:1}.assessments .sec-title p{color:#ffe5e8}.assessments .sec-icon{background:#ffffff25;color:white}.assessment-card{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:20px;background:#ffffffed;color:#292d4a;padding:20px 22px;border-radius:18px;margin-top:12px}.assessment-card h3{font-size:1.1rem}.assessment-card p{font-size:.9rem;color:#69718d;margin:6px 0 0}.assessment-link{background:#a82040;white-space:nowrap}.assessment-wait{color:#9b4354;font-size:.85rem;font-weight:800}.assessment-empty{position:relative;z-index:1;color:#fff0f2;margin:0;padding:4px 0 6px}@media(max-width:650px){.assessment-card{flex-direction:column;align-items:flex-start}.assessment-link{width:100%}}

/* V9 — Unités pédagogiques */
.unit-group{background:rgba(255,255,255,.58);border:1px solid rgba(80,87,128,.12);border-radius:25px;padding:22px;margin:24px 0}.unit-heading{display:flex;gap:22px;align-items:center;margin-bottom:18px}.unit-heading img{width:160px;height:105px;object-fit:cover;border-radius:16px}.unit-heading h3{font-size:1.6rem;margin:4px 0}.unit-heading p{margin:4px 0;color:#66708b}.unit-group .cards{margin-top:12px}@media(max-width:650px){.unit-heading{flex-direction:column;align-items:flex-start}.unit-heading img{width:100%;height:150px}}

.unit-image-preview{display:block;width:240px;max-width:100%;height:145px;object-fit:cover;border-radius:15px;margin-top:12px;background:#edf0f8}.unit-existing-preview{display:flex;align-items:center;gap:14px}.unit-existing-preview img{width:95px;height:65px;object-fit:cover;border-radius:10px}.unit-replace-label{display:block;margin-top:12px;font-size:.86rem;font-weight:700}.unit-replace-label input{display:block;margin-top:6px;max-width:100%}@media(max-width:640px){.unit-edit-row{flex-direction:column;align-items:stretch}}

/* V9.4 — grouped audiovisual resources */
.media-groups{display:flex;flex-direction:column;gap:28px}
.media-group{min-width:0}
.media-group-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 15px;padding:0 0 11px;border-bottom:2px solid #e9e6f8}
.media-group-heading h3{font-size:1.22rem;color:#272a50;margin:0}
.media-count{font-size:.76rem;color:#7356bc;background:#eee9ff;border-radius:99px;padding:6px 11px;font-weight:800;white-space:nowrap}
.media-group .media-grid{align-items:start}



/* V9.8: diaporamas des niveaux */
.level-slideshow{position:relative;width:100%;height:245px;overflow:hidden;background:#e9edfa}.level-card .level-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transform:scale(1.055);transition:opacity .95s ease-in-out,transform 5.5s ease;pointer-events:none}.level-card .level-slide.is-active{opacity:1;transform:scale(1)}.level-dots{position:absolute;z-index:2;bottom:13px;left:50%;transform:translateX(-50%);display:flex;gap:8px;background:#18295455;padding:7px 10px;border-radius:99px}.level-dot{width:9px;height:9px;border-radius:50%;border:0;background:#ffffff80;padding:0}.level-dot.is-active{background:white;width:22px;border-radius:10px}.level-images{display:grid;gap:9px;margin:12px 0}.level-image-row{display:flex;align-items:center;gap:10px;background:#f6f7fc;padding:8px;border-radius:12px}.level-image-row img{width:92px;height:58px;object-fit:cover;border-radius:8px}.level-image-row span{flex:1;font-size:.88rem;font-weight:700}@media(prefers-reduced-motion:reduce){.level-card .level-slide{transition:none;transform:none!important}}@media(max-width:600px){.level-image-row{flex-wrap:wrap}}

/* Identité visuelle personnalisable */
.brand{display:flex;align-items:center;flex:0 1 auto;min-width:0;max-width:48%;}
.brand .site-logo{display:block;width:auto;height:var(--site-logo-height,70px);max-width:min(300px,100%);object-fit:contain;object-position:left center;}
@media(max-width:600px){.brand{max-width:58%}.brand .site-logo{max-width:100%;height:min(var(--site-logo-height,70px),58px)}.topin{gap:8px}}
.logo-preview{display:flex;align-items:center;min-height:100px;padding:12px;border:1px dashed #d9dfed;border-radius:14px;background:#f7f8fd;margin:12px 0;}
.logo-preview img{display:block;max-width:100%;object-fit:contain;object-position:left center;}

/* V10.1 — Arborescence pédagogique de l’administration */
.admin-level-group{border:1px solid #dce3f4;border-radius:19px;margin:18px 0;overflow:hidden;background:#fff}
.admin-level-group>summary{cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#eae8ff;padding:19px 22px;list-style:none}
.admin-level-group>summary::-webkit-details-marker,.admin-unit-group>summary::-webkit-details-marker{display:none}
.admin-level-group>summary:before,.admin-unit-group>summary:before{content:'▸';color:#7655c8;font-size:1.1rem;transition:transform .2s}
.admin-level-group[open]>summary:before,.admin-unit-group[open]>summary:before{transform:rotate(90deg)}
.admin-level-title{font-size:1.35rem;font-weight:850;margin-right:auto}
.admin-count{background:#fff;border-radius:50px;padding:6px 12px;font-size:.78rem;font-weight:800;color:#5e50a1;white-space:nowrap}
.admin-level-content{padding:16px 19px 21px}
.admin-track-group{margin:9px 0 20px}.admin-track-group h4{font-size:1.04rem;margin:15px 0;color:#34436f}
.admin-unit-group{border:1px solid #e6eaf4;border-radius:15px;margin:12px 0;overflow:hidden}
.admin-unit-group>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;background:#f7f9ff;padding:12px 15px}
.admin-unit-name{display:flex;align-items:center;gap:11px;flex:1;min-width:0}.admin-unit-name img{width:48px;height:40px;object-fit:cover;border-radius:8px}
.admin-unit-content{padding:5px 12px 10px}.admin-unit-content .listrow{margin:8px 0}.admin-lesson-title{min-width:0}.admin-lesson-title strong{overflow-wrap:anywhere}
.status-published{color:#247958}.status-draft{color:#a36a31}
@media(max-width:600px){.admin-level-content{padding:10px}.admin-level-group>summary{padding:15px}.admin-unit-content .listrow{align-items:flex-start;flex-direction:column}.admin-unit-content .item-actions{width:100%}}

.home-images-list{display:grid;gap:10px;margin-top:16px}.home-image-row{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #e3e7f2;border-radius:14px;background:#f8f9fe}.home-image-row img{width:94px;height:65px;object-fit:cover;border-radius:9px}.home-image-row span{flex:1;color:#455072;font-weight:700;font-size:.85rem;min-width:0}.home-image-row button{flex-shrink:0}@media(max-width:650px){.home-image-row{flex-wrap:wrap}.home-image-row span{flex-basis:calc(100% - 110px)}}

/* V10.3 : fond pastel assorti à l'image tirée au sort. */
.hero{background:var(--hero-adaptive-bg,#eee9ff);transition:background-color .55s ease}

.access-card{max-width:610px;margin:65px auto;padding:55px 48px;text-align:center;border-radius:30px;background:#f0ecff;box-shadow:0 18px 40px #18295412}.access-card h1{font-size:clamp(28px,4vw,44px);margin:15px 0}.access-icon{font-size:40px}.access-card form{display:grid;gap:15px;margin:30px auto 0;max-width:360px;text-align:left}.access-card input{width:100%;padding:16px;border:1px solid #cad3ea;border-radius:12px;font-size:18px}.access-card #access-error{color:#a8324a;min-height:20px}.access-card button{justify-content:center}

/* V10.5 — protection flat design, checkbox and animated padlock */
.mec-protection-switch{display:flex!important;align-items:center;gap:20px;padding:22px 25px;margin:12px 0 22px;border:2px solid #dce3f3;border-radius:22px;background:#f7f8ff;cursor:pointer;transition:background .25s,border-color .25s,box-shadow .25s;min-height:105px}
.mec-protection-switch:hover{border-color:#9b8bdc;box-shadow:0 6px 22px #1726500b}
.mec-protection-switch.is-locked{background:#f1edff;border-color:#aa94ed}
.mec-protection-switch input[type=checkbox]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.mec-check{width:44px;height:44px;flex:none;display:grid;place-items:center;border:3px solid #b3bfd9;border-radius:14px;background:white;transition:all .24s cubic-bezier(.2,.8,.2,1)}
.mec-check svg{width:29px;height:29px;fill:none;stroke:white;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;transform:scale(.3);opacity:0;transition:all .22s}
.is-locked .mec-check{background:#7355ce;border-color:#7355ce;transform:scale(1.05)}
.is-locked .mec-check svg{opacity:1;transform:scale(1)}
.mec-protection-switch:has(input:focus-visible){outline:3px solid #7355ce;outline-offset:3px}
.mec-protection-text{display:flex;flex-direction:column;gap:5px;flex:1;color:#1c274c;line-height:1.3}
.mec-protection-text strong{font-size:1.15rem;font-weight:800}
.mec-protection-text small{font-size:.89rem;color:#697491;font-weight:500}
.mec-lock-icon{width:42px;height:42px;color:#7b85a6;overflow:visible;flex:none;transition:color .3s}
.mec-lock-shackle{transform-origin:13px 28px;transform:translateY(-6px) rotate(-25deg);transition:transform .5s cubic-bezier(.22,1.45,.45,1)}
.is-locked .mec-lock-icon{color:#7355ce}
.is-locked .mec-lock-shackle{transform:translateY(0) rotate(0);animation:mec-lock-click .42s .12s both}
@keyframes mec-lock-click{0%{transform:translateY(-7px)}75%{transform:translateY(2px)}100%{transform:translateY(0)}}
.mec-inline-lock{display:inline-flex;vertical-align:middle;margin-right:5px}
.mec-inline-lock .mec-lock-icon{width:22px;height:22px;color:currentColor}
.mec-inline-lock .mec-lock-shackle,.mec-access-lock .mec-lock-shackle{transform:none}
.mec-access-lock .mec-lock-icon{width:58px;height:58px;color:#7355ce}
@media(max-width:600px){.mec-protection-switch{gap:12px;padding:16px}.mec-check{width:38px;height:38px}.mec-protection-text strong{font-size:1rem}.mec-lock-icon{width:34px;height:34px}}
@media(prefers-reduced-motion:reduce){.mec-lock-shackle,.mec-check,.mec-check svg{animation:none!important;transition:none!important}}

/* V10.6 — compact protection panels and breathable login form */
.mec-protection-switch{min-height:76px;padding:13px 19px;gap:15px;margin:9px 0 17px;border-radius:18px}
.mec-check{width:38px;height:38px;border-radius:12px}
.mec-check svg{width:26px;height:26px}
.mec-lock-icon{width:35px;height:35px}
.mec-protection-text{gap:3px}
.mec-protection-text strong{font-size:1.06rem}
.mec-protection-text small{font-size:.83rem}
.mec-login-form{display:grid;grid-template-columns:minmax(0,1fr);gap:23px;margin-top:26px}
.mec-login-form .field{gap:10px}
.mec-login-form .field label{display:block;margin-bottom:2px}
.mec-login-form .field input{min-height:52px}
.mec-login-form .field button{width:100%;min-height:54px;margin-top:6px}
#login-message{margin-top:21px}
@media(max-width:600px){.mec-protection-switch{min-height:70px;padding:12px 14px;gap:12px}.mec-check{width:34px;height:34px}.mec-lock-icon{width:30px;height:30px}.mec-login-form{gap:19px}}

/* V10.8 — Publication switch */
.mec-publish-switch{display:flex!important;align-items:center;gap:16px;min-height:80px;padding:16px 20px;border:2px solid #dce5ef;border-radius:18px;background:#f7f9fc;cursor:pointer;transition:background .25s,border-color .25s,box-shadow .25s}
.mec-publish-switch:hover{border-color:#73bba0;box-shadow:0 6px 20px #1c77501a}
.mec-publish-switch.is-published{background:#eaf8f0;border-color:#70c7a0}
.mec-publish-switch input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.mec-publish-switch:has(input:focus-visible){outline:3px solid #25865f;outline-offset:3px}
.mec-publish-check{flex:none;width:44px;height:44px;border:3px solid #b9c9d1;border-radius:13px;background:white;display:grid;place-items:center;transition:background .22s,border-color .22s,transform .22s}
.mec-publish-check svg{width:30px;height:30px;fill:none;stroke:#fff;stroke-width:3.7;stroke-linecap:round;stroke-linejoin:round;opacity:0;transform:scale(.25);transition:transform .25s,opacity .25s}
.is-published .mec-publish-check{background:#249567;border-color:#249567}
.is-published .mec-publish-check svg{opacity:1;transform:scale(1)}
.mec-publish-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}
.mec-publish-copy strong{font-size:1.13rem;color:#202b50}
.mec-publish-copy small{font-size:.89rem;color:#67758d;font-weight:500}
.mec-publish-state{flex:none;width:43px;height:43px;color:#aebfca;transition:color .25s,transform .25s}
.mec-publish-state svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.is-published .mec-publish-state{color:#249567}
.just-published .mec-publish-state{animation:mec-publish-pop .5s cubic-bezier(.2,1.4,.4,1)}
.just-published .mec-publish-check{animation:mec-publish-pop .5s cubic-bezier(.2,1.4,.4,1)}
@keyframes mec-publish-pop{0%{transform:scale(.65)}55%{transform:scale(1.17)}100%{transform:scale(1)}}
@media(max-width:600px){.mec-publish-switch{padding:13px;gap:11px;min-height:70px}.mec-publish-check{width:37px;height:37px}.mec-publish-state{width:32px;height:32px}.mec-publish-copy strong{font-size:1rem}}
@media(prefers-reduced-motion:reduce){.just-published .mec-publish-state,.just-published .mec-publish-check{animation:none!important}}

/* V11 — compact publication switch and scheduled publishing */
.mec-publish-switch{min-height:68px;padding:11px 16px;gap:13px;border-radius:18px}
.mec-publish-check{width:38px;height:38px;border-radius:11px}
.mec-publish-check svg{width:26px;height:26px}
.mec-publish-state{width:35px;height:35px}
.mec-publish-copy{gap:2px}
.mec-schedule{margin-top:12px;padding:13px 16px;border:1px solid #dce5ef;border-radius:15px;background:#fafbfe}
.mec-schedule-label{display:flex;align-items:center;gap:11px;margin-bottom:10px;color:#202b50}
.mec-schedule-label span:nth-child(2){display:flex;flex-direction:column;gap:3px}
.mec-schedule-label small{color:#67758d;font-size:.83rem;font-weight:400}
.mec-schedule-icon{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:#ece8ff;color:#7053c6;font-size:1.5rem}
.mec-schedule-inputs{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mec-schedule-inputs input{max-width:300px;min-height:42px;padding:8px 12px;border:1px solid #cbd6e8;border-radius:10px;font:inherit;color:#202b50}
.mec-schedule-inputs input:disabled{opacity:.5}
.mec-schedule .hint{margin:8px 0 0}

/* V12 workbook contact sheet */
.workbook-pages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;margin-top:16px}.workbook-thumb{min-width:0;display:flex;flex-direction:column;align-items:center;gap:10px;background:#fff;border:2px solid transparent;border-radius:15px;padding:12px 9px;cursor:pointer;color:#27335b;font:inherit;font-weight:800;transition:transform .2s,border-color .2s,box-shadow .2s}.workbook-thumb:hover,.workbook-thumb:focus-visible{transform:translateY(-3px);border-color:#9d86ec;box-shadow:0 9px 22px #29345720;outline:none}.workbook-thumb-paper{width:100%;aspect-ratio:210/297;background:white;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 3px 12px #1b2b4b22;border:1px solid #e0e3ed}.workbook-thumb-paper canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto}.workbook-thumb-number{font-size:.8rem}.workbook-loading{padding:25px;background:#fff;border-radius:15px;color:#66708d}.workbook-modal[hidden]{display:none}.workbook-modal{position:fixed;inset:0;z-index:10000;background:#131b35dc;display:flex;align-items:center;justify-content:center;padding:18px}.workbook-modal-open{overflow:hidden}.workbook-modal-panel{width:min(1100px,100%);height:min(94vh,1100px);background:#f5f6fd;border-radius:22px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 75px #0005}.workbook-modal-bar,.workbook-modal-nav{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 20px;background:white}.workbook-modal-actions{display:flex;gap:10px;align-items:center}.workbook-fullpage{flex:1;min-height:0;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:16px;background:#e0e4f2}.workbook-fullpage canvas{display:block;max-width:100%;height:auto;background:white;box-shadow:0 8px 25px #16204428}.workbook-modal-nav button:disabled{opacity:.4;cursor:default}@media(max-width:750px){.workbook-pages{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.workbook-modal-bar{flex-wrap:wrap}.workbook-modal-actions .btn{font-size:.75rem;padding:10px}}@media(max-width:430px){.workbook-pages{grid-template-columns:repeat(2,minmax(0,1fr))}.workbook-modal-nav .btn{font-size:.72rem;padding:9px}}

/* V13: consistent white page margins; caption below the white thumbnail card. */
.workbook-thumb{background:transparent;padding:0;border:0;border-radius:12px;gap:9px;justify-content:flex-start}
.workbook-thumb-paper{box-sizing:border-box;width:100%;aspect-ratio:210/297;padding:10px;background:#fff;border:1px solid #e0e3ed;border-radius:5px;box-shadow:0 3px 12px #1b2b4b22;display:flex;align-items:center;justify-content:center;overflow:hidden}
.workbook-thumb-paper canvas{display:block;width:100%;height:100%;object-fit:contain;max-width:100%;max-height:100%;box-shadow:none}
.workbook-thumb-number{display:block;width:100%;background:transparent;padding:3px 2px 7px;text-align:center;color:#27335b;font-size:.85rem;font-weight:800}
.workbook-thumb:hover,.workbook-thumb:focus-visible{box-shadow:none;outline:2px solid #9d86ec;outline-offset:4px}

/* V14 — lesson ordering */
.mec-order-btn{min-width:42px;font-size:22px;line-height:1.1;font-weight:800;color:#7250d4;background:#f0ebff;border-color:#ded5fb}
.mec-order-btn:hover:not(:disabled){background:#ded3ff}
.mec-order-btn:disabled{opacity:.3;cursor:not-allowed}
@media(max-width:650px){.admin-unit-content .listrow{align-items:flex-start;flex-direction:column;gap:12px}.admin-unit-content .item-actions{flex-wrap:wrap}}

.correction-resources{margin-top:22px}.correction-resources .media-group{margin-top:18px}.correction-resource-card .btn{margin-top:14px}.correction-resource-card audio{display:block;width:100%;margin-top:16px}

/* V16 — illustrated practice activities */
.practice .exercise-card{position:relative;isolation:isolate;overflow:hidden;min-height:132px;padding:17px 22px;gap:20px;border:1px solid rgba(220,205,166,.42);box-shadow:0 7px 22px rgba(91,72,38,.045);transition:transform .22s ease,box-shadow .22s ease}
.practice .exercise-card:hover{transform:translateY(-3px);box-shadow:0 13px 30px rgba(91,72,38,.12)}
.practice .exercise-card::after{content:"";position:absolute;width:180px;height:180px;right:18%;top:-125px;border-radius:50%;background:var(--exercise-wash);z-index:-1;opacity:.55}
.exercise-card[data-exercise-kind="quiz"]{--exercise-main:#6c55c7;--exercise-pale:#ece7ff;--exercise-wash:#eee7ff}
.exercise-card[data-exercise-kind="summary"]{--exercise-main:#208e79;--exercise-pale:#e0f5ec;--exercise-wash:#e0f5ec}
.exercise-card[data-exercise-kind="vocabulary"]{--exercise-main:#e07c40;--exercise-pale:#fff0dc;--exercise-wash:#fff0dc}
.exercise-art{position:relative;display:grid;place-items:center;flex:0 0 88px;width:88px;height:88px;border-radius:23px;background:var(--exercise-pale);color:var(--exercise-main);transform:rotate(-5deg)}
.exercise-art-symbol{font-family:Outfit,system-ui,sans-serif;font-size:43px;font-weight:900;line-height:1;transform:rotate(5deg)}
.exercise-art-spark{position:absolute;right:-9px;top:-12px;font-size:23px;color:var(--exercise-main);animation:exercise-twinkle 3.5s ease-in-out infinite}
.exercise-copy{flex:1;min-width:0}.exercise-kicker{display:block;font-size:.67rem;font-weight:900;letter-spacing:.12em;color:var(--exercise-main);margin-bottom:7px}
.practice .exercise-card h3{font-size:1.32rem}.practice .exercise-card p{font-size:.89rem;margin:6px 0 0}
.practice .exercise-card .btn.sun{background:var(--exercise-main);color:white;white-space:nowrap;border-radius:14px;padding:15px 20px;transition:transform .2s,filter .2s}
.practice .exercise-card .btn.sun:hover{transform:translateX(3px);filter:brightness(1.08)}
.practice .exercise-card .muted{display:inline-flex;padding:10px 14px;border-radius:999px;background:var(--exercise-pale);color:var(--exercise-main);font-size:.82rem;font-weight:800;white-space:nowrap}
@keyframes exercise-twinkle{0%,100%{transform:scale(.9) rotate(-12deg);opacity:.65}50%{transform:scale(1.15) rotate(12deg);opacity:1}}
@media(max-width:650px){.practice .exercise-card{display:grid;grid-template-columns:68px minmax(0,1fr);gap:14px;padding:16px}.exercise-art{width:68px;height:68px;flex-basis:68px;border-radius:18px}.exercise-art-symbol{font-size:33px}.practice .exercise-card .btn.sun,.practice .exercise-card .muted{grid-column:1/-1;justify-self:stretch;text-align:center}.practice .exercise-card::after{right:-60px}}
@media(prefers-reduced-motion:reduce){.exercise-art-spark{animation:none}.practice .exercise-card,.practice .exercise-card .btn.sun{transition:none}}

/* V17 — Compact lesson editor */
.mec-editor-overview{border:1px solid #e0e5f3;border-radius:22px;padding:20px;margin:22px 0 18px;background:#fff}
.mec-editor-overview-top{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.mec-editor-overview-top strong{font-size:1.25rem;color:#1c294e}.mec-editor-overview-top p{margin:4px 0 0;color:#727d99}
.mec-editor-overview-actions{display:flex;gap:8px;flex-wrap:wrap}.mec-editor-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.mec-editor-shortcut{border:1px solid var(--mec-line,#e2e7f3);border-radius:12px;background:var(--mec-bg,#f4f6fb);color:#273357;padding:12px 9px;font:inherit;font-weight:700;cursor:pointer;text-align:left;display:flex;align-items:center;gap:9px;transition:transform .16s,border-color .16s}
.mec-editor-shortcut:hover{transform:translateY(-2px);border-color:var(--mec-accent,#8b72d7)}.mec-editor-shortcut span{color:var(--mec-accent,#8b72d7);font-size:1.15rem}
.mec-tone-general{--mec-bg:#eef2ff;--mec-accent:#5069ad;--mec-line:#d9e1f6}
.mec-tone-security{--mec-bg:#f1ebff;--mec-accent:#7954c9;--mec-line:#e0d3fa}
.mec-tone-cover{--mec-bg:#f0efff;--mec-accent:#7966d1;--mec-line:#ded9fb}
.mec-tone-media{--mec-bg:#e7f5fc;--mec-accent:#2489b7;--mec-line:#cce9f7}
.mec-tone-practice{--mec-bg:#fff3d9;--mec-accent:#bd8120;--mec-line:#f6e2b8}
.mec-tone-evaluations{--mec-bg:#fff0f0;--mec-accent:#bc4b58;--mec-line:#f5d6d9}
.mec-tone-correction{--mec-bg:#e9f7f0;--mec-accent:#27835c;--mec-line:#cdebdc}
.mec-tone-workbook{--mec-bg:#eeedff;--mec-accent:#7261bc;--mec-line:#dedaf7}
.mec-editor-accordion{border:1px solid var(--mec-line);border-radius:18px;background:#fff;margin:10px 0;overflow:hidden;scroll-margin-top:110px}
.mec-editor-accordion-head{list-style:none;display:flex;align-items:center;gap:16px;padding:15px 19px;background:var(--mec-bg);cursor:pointer;min-height:74px}
.mec-editor-accordion-head::-webkit-details-marker,.mec-editor-resource>summary::-webkit-details-marker{display:none}
.mec-editor-accordion-icon{width:43px;height:43px;flex:0 0 43px;border-radius:13px;background:#fff;color:var(--mec-accent);display:grid;place-items:center;font-size:22px;font-weight:800}
.mec-editor-accordion-title{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.mec-editor-accordion-title strong{font-size:1.15rem;color:#202c50}.mec-editor-accordion-title small{color:#6b7794;font-size:.87rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mec-editor-chevron{font-size:24px;color:var(--mec-accent);transition:transform .18s}.mec-editor-accordion[open]>.mec-editor-accordion-head .mec-editor-chevron,.mec-editor-resource[open]>summary .mec-editor-chevron{transform:rotate(180deg)}
.mec-editor-accordion-body{padding:20px}.mec-editor-inside-heading{display:none!important}
.mec-editor-resource{border:1px solid #e1e6f0;border-radius:12px;background:#fff;margin:9px 0;overflow:hidden}
.mec-editor-resource>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;padding:13px 15px;background:#f8f9fd;color:#273252;font-weight:700}
.mec-editor-resource-dot{width:9px;height:9px;border-radius:50%;background:var(--mec-accent)}.mec-editor-resource-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mec-editor-resource-body{padding:12px 15px 16px}.mec-editor-resource-body>.row-between{margin-bottom:8px}.mec-editor-accordion-body .form-grid{gap:12px}.mec-editor-accordion-body textarea{min-height:90px}
@media(max-width:850px){.mec-editor-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.mec-editor-shortcuts{grid-template-columns:1fr}.mec-editor-accordion-head{padding:12px}.mec-editor-accordion-body{padding:13px}}
@media(prefers-reduced-motion:reduce){.mec-editor-shortcut,.mec-editor-chevron{transition:none}}

/* V18 — Espacement des ressources audio et PDF dans les corrections */
.correction-resources .media-group{margin-top:26px}
.correction-resources .media-group-heading{margin-bottom:20px;padding-bottom:16px}
.correction-resources .media-grid{gap:22px}
.correction-resources .correction-resource-card{padding:24px 26px 26px;overflow:hidden;border-radius:22px}
.correction-resources .correction-resource-card .audio-header{gap:18px;align-items:center;margin-bottom:22px}
.correction-resources .correction-resource-card .audio-symbol{flex:0 0 58px;width:58px;height:58px;border-radius:17px}
.correction-resources .correction-resource-card .audio-header h3{margin:6px 0 0;line-height:1.3}
.correction-resources .correction-resource-card audio{display:block;width:100%;margin:0;height:48px}
.correction-resources .correction-resource-card p{margin:0 0 18px;line-height:1.6}
.correction-resources .correction-resource-card .btn{margin-top:0}
@media(max-width:600px){.correction-resources .correction-resource-card{padding:18px}.correction-resources .correction-resource-card .audio-header{gap:12px;margin-bottom:17px}.correction-resources .correction-resource-card .audio-symbol{flex-basis:48px;width:48px;height:48px}}

/* V22 — gestion des pièces jointes */
.mec-file-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0 18px;padding:12px 16px;background:#f7f8fc;border:1px solid #e2e7f4;border-radius:14px}
.mec-file-tools .hint{margin:0;flex:1;min-width:180px}

/* V23 — Workbook: slim, symmetric paper margins and complete lazy gallery */
.workbook-pages{gap:14px 12px}
.workbook-thumb{gap:5px}
.workbook-thumb-paper{padding:3px!important;border-radius:4px;box-shadow:0 2px 8px #1b2b4b1c}
.workbook-thumb-paper canvas{width:100%;height:100%;object-fit:contain}
.workbook-thumb-number{padding:3px 0 4px;font-size:.8rem}
.workbook-page-status{font-size:.83rem;color:#697391;margin:4px 0 12px;font-weight:700}
@media(max-width:600px){.workbook-pages{gap:12px 9px}.workbook-thumb-paper{padding:2px!important}}

/* V25 — lecteur vidéo My English Class */
.mec-video{position:relative;aspect-ratio:16/9;width:100%;overflow:hidden;background:#192344;color:white;isolation:isolate}
.mec-video-cover,.mec-video>video,.mec-video>iframe{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:contain;border:0}
.mec-video-cover{object-fit:cover}.mec-video-shade{position:absolute;inset:0;background:linear-gradient(180deg,#101b36a0 0%,transparent 38%,#101b36bb 100%);pointer-events:none}
.mec-video-brand{position:absolute;top:13px;left:16px;z-index:2;font-size:.66rem;font-weight:900;letter-spacing:.12em;color:#fff;text-shadow:0 1px 4px #0008}.mec-video-brand span{color:#e0d6ff}
.mec-video-start{position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);width:68px;height:68px;border:1px solid #ffffff77;border-radius:50%;background:#7353d9e8;color:white;cursor:pointer;box-shadow:0 12px 36px #0006;display:grid;place-items:center;font-size:27px;transition:transform .2s,background .2s}.mec-video-start:hover{transform:translate(-50%,-50%) scale(1.08);background:#5e40c6}
.mec-video-controls{position:absolute;bottom:0;left:0;right:0;z-index:4;display:flex;align-items:center;gap:9px;padding:10px 12px;background:linear-gradient(transparent,#111a34db);opacity:0;transition:opacity .2s}.mec-video:hover .mec-video-controls,.mec-video:focus-within .mec-video-controls,.mec-video-active .mec-video-controls{opacity:1}
.mec-video-controls button{border:0;background:#ffffff20;color:#fff;border-radius:8px;padding:6px 9px;cursor:pointer;font-size:15px}.mec-video-seek{flex:1;min-width:20px;accent-color:#aa8aff}.mec-video-clock{font-size:.72rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.mec-video-active .mec-video-start,.mec-video-active .mec-video-cover,.mec-video-active .mec-video-shade{display:none}.mec-video-external .mec-video-controls{display:none}.mec-video-external .mec-video-brand{display:none}
@media(max-width:600px){.mec-video-brand{font-size:.55rem}.mec-video-start{width:54px;height:54px}.mec-video-controls{gap:5px;padding:7px}.mec-video-clock{font-size:.6rem}}
@media(prefers-reduced-motion:reduce){.mec-video-start,.mec-video-controls{transition:none}}

/* V26 : bouton lecture flat sans contour clair */
.mec-video-start{border:0!important;outline:0;box-shadow:0 12px 36px #0006}
.mec-video-start:focus-visible{outline:3px solid #a68cf0;outline-offset:4px}

/* V29 - Video.js, lecteur eprouve avec miniatures personnalisees */
.mec-vjs-wrap{width:100%;aspect-ratio:16/9;background:#111a34;overflow:hidden;border-radius:14px 14px 0 0}
.mec-vjs-wrap .video-js{width:100%;height:100%;font-family:inherit}
.mec-vjs-wrap .video-js .vjs-poster{background-size:cover;background-position:center}
.mec-vjs-wrap .video-js .vjs-big-play-button{width:70px;height:70px;line-height:68px;border:0;border-radius:50%;background:#7353d9e8;top:50%;left:50%;margin:0;transform:translate(-50%,-50%);box-shadow:0 12px 36px #0006}
.mec-vjs-wrap .video-js:hover .vjs-big-play-button,.mec-vjs-wrap .video-js .vjs-big-play-button:focus{background:#5e40c6}
.mec-vjs-wrap .video-js .vjs-control-bar{background:#111a34d9}
.mec-video-external .mec-video-start{border:0;outline:0}

/* V30 – revision activities */
.rev-admin-head{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:18px}.rev-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:12px}.rev-card{border:1px solid #dedfeb;border-radius:17px;padding:17px;background:white;box-shadow:0 5px 20px #1829540a}.rev-card h3{margin:8px 0}.rev-card small{color:#657087}.rev-card .rev-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.rev-card button,.rev-form button{cursor:pointer}.rev-pill{display:inline-block;padding:5px 10px;border-radius:20px;font-size:12px;font-weight:800;background:#efe8ff;color:#6745b7}.rev-pill.summary{background:#e5f2ff;color:#246db2}.rev-pill.vocabulary{background:#ffe5f1;color:#ad3275}.rev-form{border:1px solid #dddfea;border-radius:18px;padding:18px;margin-top:16px;background:#fafbff}.rev-form label{display:block;font-weight:750;margin:13px 0 5px}.rev-form input,.rev-form textarea,.rev-form select{width:100%;box-sizing:border-box;border:1px solid #c9d1e1;border-radius:10px;padding:10px;font:inherit}.rev-form textarea{min-height:230px;font-family:ui-monospace,monospace;font-size:13px}.rev-status{min-height:22px;margin:10px 0;color:#47627c}.rev-play-card{border:1px solid #e4e5f0;border-radius:18px;padding:22px;margin:14px 0;background:white;box-shadow:0 8px 30px #14214b0b}.rev-play-card h3{margin:5px 0 14px}.rev-play-card button{border:1px solid #d4d8e9;border-radius:12px;background:white;padding:12px 15px;cursor:pointer;font:inherit}.rev-play-card button:hover{border-color:#7754d5}.rev-play-card input{border:1px solid #ccd0df;border-radius:12px;padding:12px;width:100%;box-sizing:border-box;font:inherit}.rev-play-card .rev-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:9px}.rev-play-card .rev-selected{background:#f0eaff;border-color:#7956d8}.rev-play-card .rev-primary{background:#7453d4;color:white;border-color:#7453d4}.rev-play-card .rev-primary:disabled{opacity:.45}.rev-play-card .rev-progress{height:7px;background:#e9e8f2;border-radius:8px;overflow:hidden;margin:14px 0}.rev-play-card .rev-progress>span{display:block;height:100%;background:#7956d8}.rev-play-card .rev-feedback{padding:10px;border-radius:10px;background:#f2f4fb;margin:10px 0}.rev-play-card .rev-nav{display:flex;justify-content:space-between;gap:12px;margin-top:18px}.rev-play-card .rev-bank{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.rev-play-card .rev-bank button{background:#eaf1ff;border-color:#bdd2f4}.rev-play-card .rev-summary-text{line-height:2.7}.rev-play-card .rev-blank{padding:6px 10px;border:1px dashed #8e96bd;border-radius:9px;display:inline-block;min-width:100px;text-align:center;margin:2px;background:#f5f6ff}.rev-play-card .rev-blank.active{border:2px solid #7956d8}.rev-admin-empty{padding:24px;border:1px dashed #ccd3e0;border-radius:15px;text-align:center;color:#657087}@media(max-width:650px){.rev-play-card{padding:15px}.rev-admin-grid{grid-template-columns:1fr}}

/* V31 — practice activity selector and teacher preview */
.mec-activity-picker{margin:16px 0;padding:18px;border:1px solid #d9d8f0;border-radius:16px;background:#f8f7ff}.mec-activity-picker>strong{display:block;margin-bottom:5px}.mec-activity-pick-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #e5e3f3}.mec-activity-pick-row label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;cursor:pointer}.mec-activity-pick-row input{width:auto!important;accent-color:#7956d8}.mec-activity-pick-row small{color:#677089}.mec-preview-heading{display:flex;justify-content:space-between;align-items:center;margin-top:18px;gap:12px}#rev-preview-host:not(:empty){margin-top:18px}#mec-editor-preview:not(:empty){margin-top:12px}@media(max-width:600px){.mec-activity-pick-row{align-items:flex-start;flex-direction:column}}

/* V33 — mini-jeux inspirés du Coin créatif : même présentation côté élève et aperçu admin */
.rev-play-card{--rev-accent:#7652d4;--rev-tint:#f4efff;--rev-dark:#37266c;position:relative;isolation:isolate;overflow:hidden;border:2px solid #e7ddfa;border-radius:25px;padding:clamp(18px,3vw,34px);margin:20px 0;background:linear-gradient(150deg,#fff 0%,var(--rev-tint) 145%);box-shadow:0 12px 34px #25305b14;font-family:inherit}
.rev-play-card.rev-theme-summary{--rev-accent:#2188ba;--rev-tint:#e8f7ff;--rev-dark:#155071;border-color:#cceaf8}
.rev-play-card.rev-theme-vocabulary{--rev-accent:#d84b8c;--rev-tint:#fff0f7;--rev-dark:#842c57;border-color:#f6d3e5}
.rev-play-card:before{content:none;position:absolute;right:-5px;top:64px;color:var(--rev-accent);opacity:.11;font-size:55px;letter-spacing:9px;transform:rotate(-18deg);pointer-events:none;z-index:-1}
.rev-game-head{display:flex;align-items:center;gap:14px;margin-bottom:23px;padding-bottom:17px;border-bottom:1px solid #c8c3da66}
.rev-game-icon{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;flex:none;background:var(--rev-accent);color:white;font-size:30px;box-shadow:0 8px 0 #2222220b;transform:rotate(-6deg)}
.rev-game-head-text{display:flex;flex-direction:column;gap:5px;min-width:0}.rev-game-head-text strong{font-size:clamp(1.18rem,2.3vw,1.55rem);line-height:1.15;color:var(--rev-dark);font-weight:900}.rev-game-eyebrow{font-size:.69rem;font-weight:900;letter-spacing:.11em;color:var(--rev-accent)}
.rev-game-stars{margin-left:auto;color:var(--rev-accent);letter-spacing:.22em;white-space:nowrap}
.rev-play-card h3{font-size:clamp(1.25rem,2.8vw,1.9rem);line-height:1.27;color:var(--rev-dark);font-weight:900;margin:18px 0 22px}
.rev-game-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:var(--rev-accent);font-weight:900;letter-spacing:.05em;font-size:.73rem;margin:14px 0}
.rev-play-card .rev-progress{height:11px;background:#fff;border:1px solid #e5e3ef;border-radius:30px;overflow:hidden;margin:16px 0}.rev-play-card .rev-progress>span{background:var(--rev-accent);border-radius:30px;transition:width .3s ease}
.rev-play-card button{transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease;font-weight:800}
.rev-play-card button:not(:disabled):hover{border-color:var(--rev-accent);transform:translateY(-2px);box-shadow:0 5px 15px #24203812}
.rev-play-card .rev-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rev-play-card .rev-choices button{min-height:74px;padding:16px;background:#fff;border:2px solid #e5e0ee;border-radius:17px;text-align:center;color:var(--rev-dark)}
.rev-play-card .rev-choices button.rev-selected{background:var(--rev-tint);border-color:var(--rev-accent);box-shadow:inset 0 0 0 1px var(--rev-accent)}
.rev-play-card .rev-primary{background:var(--rev-accent);border:2px solid var(--rev-accent);border-radius:14px;color:#fff;box-shadow:0 5px 0 #28223b17}.rev-play-card .rev-primary:disabled{opacity:.45;box-shadow:none}
.rev-play-card input{border:2px solid #e5ddea;border-radius:15px;padding:16px;font-size:1.05rem;background:#fff}.rev-play-card input:focus{outline:3px solid var(--rev-tint);border-color:var(--rev-accent)}
.rev-play-card .rev-nav{align-items:center;margin-top:25px}.rev-play-card .rev-nav button{min-height:45px}
.rev-play-card .rev-summary-text{font-size:1.04rem;line-height:2.8;background:#fff;padding:17px;border-radius:16px;border:1px solid #dcebf3}.rev-play-card .rev-bank{gap:10px}.rev-play-card .rev-bank button{background:#fff;border:2px solid #b9dfef;color:var(--rev-dark);border-radius:13px}
.rev-play-card .rev-blank{background:var(--rev-tint);border:2px dashed #a5d1e8;border-radius:10px;color:var(--rev-dark)}.rev-play-card .rev-blank.active{border-color:var(--rev-accent);background:#fff}
.rev-finish{text-align:center;padding:22px 12px 12px;animation:rev-pop .45s ease-out}.rev-trophy{width:84px;height:84px;margin:0 auto 17px;border-radius:26px;display:grid;place-items:center;background:var(--rev-accent);color:#fff;font-size:53px;transform:rotate(-8deg);box-shadow:0 8px 0 #22222212}.rev-finish h3{font-size:clamp(2.6rem,6vw,4.5rem);margin:6px 0}.rev-finish small{font-size:.43em;color:#8c8ba0}.rev-play-card .rev-feedback{border-radius:13px;background:#fff;border:1px solid #ece7f2;padding:12px 15px}
@keyframes rev-pop{from{opacity:0;transform:translateY(12px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:540px){.rev-play-card .rev-choices{grid-template-columns:1fr}.rev-game-stars{display:none}.rev-game-icon{width:48px;height:48px;font-size:25px}.rev-play-card .rev-nav button{padding:10px}.rev-play-card{border-radius:19px}}
@media(prefers-reduced-motion:reduce){.rev-play-card *{animation:none!important;transition:none!important}}

.rev-import-preview{margin:12px 0;border:1px solid #d8ddeb;border-radius:13px;padding:12px;background:white}.rev-import-preview summary{font-weight:750;cursor:pointer}.rev-import-game{margin-top:12px}

/* V36: single source of truth for lesson activities */
.mec-picker-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.mec-picker-heading span{font-size:.83rem;color:#6b7392}.mec-linked-activity{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 5px;border-top:1px solid #e4e7f3}.mec-linked-activity>div{display:grid;gap:5px}.mec-linked-activity small{color:#68718e}.mec-legacy-exercises{margin-top:18px;border:1px solid #e3e6f2;border-radius:13px;padding:14px}.mec-legacy-exercises>summary{cursor:pointer;font-weight:700;color:#56617e}.mec-activities-intro{display:flex;justify-content:space-between;align-items:center;margin:18px 0 12px;gap:10px}.mec-activities-intro span{font-size:.85rem;color:#63708b}.mec-live-game{display:flex;flex-wrap:wrap;align-items:center;gap:18px;background:#fff;border:1px solid #e4e6f0;border-radius:20px;padding:22px;margin:12px 0;box-shadow:0 8px 20px rgba(29,42,82,.05)}.mec-live-icon{width:78px;height:78px;border-radius:22px;display:grid;place-items:center;background:#ece6ff;color:#7251ce;font-size:2.3rem;font-weight:900;flex-shrink:0}.mec-live-info{flex:1;min-width:180px}.mec-live-info h3{margin:4px 0;font-size:1.4rem}.mec-live-info p{margin:0;color:#75809a}.mec-live-kicker{font-size:.69rem;letter-spacing:.1em;font-weight:800;color:#7251ce}.mec-live-start{border:0;border-radius:13px;padding:16px 20px;color:#fff;background:#7251ce;font:inherit;font-weight:800;cursor:pointer}.mec-live-player{flex-basis:100%;min-width:0;border-top:1px solid #edf0f7;padding-top:16px}.mec-live-player[hidden]{display:none}.mec-live-game[data-kind=summary] .mec-live-icon{background:#ddf5ec;color:#188d77}.mec-live-game[data-kind=summary] .mec-live-kicker{color:#188d77}.mec-live-game[data-kind=summary] .mec-live-start{background:#188d77}.mec-live-game[data-kind=vocabulary] .mec-live-icon{background:#fff0dc;color:#e47838}.mec-live-game[data-kind=vocabulary] .mec-live-kicker{color:#e47838}.mec-live-game[data-kind=vocabulary] .mec-live-start{background:#e47838}.mec-activity-error{padding:14px;border-radius:10px;background:#fff3e8;color:#a14d25}@media(max-width:600px){.mec-live-game{padding:16px;gap:12px}.mec-live-icon{width:58px;height:58px;font-size:1.7rem}.mec-live-start{width:100%}}

/* V38: quiz completion and detailed review */
.rev-quiz-count{margin:12px 0;padding:12px 16px;border:1px solid #dcd7f5;border-radius:12px;background:#f8f6ff;color:#34276d}
.rev-quiz-count[hidden]{display:none}
.rev-quiz-count p{margin:5px 0 0;font-size:.9rem;line-height:1.45}
.rev-result-sub{text-align:center;color:#615b80;font-weight:600}
.rev-review-heading{margin:24px 0 12px;font-size:1.15rem}
.rev-review-item{border:1px solid #e2deee;border-left:4px solid #c24a62;border-radius:12px;padding:14px 16px;margin:10px 0;background:white}
.rev-review-item.is-correct{border-left-color:#27866e}
.rev-review-title{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.rev-review-title span{font-size:.83rem;font-weight:800;white-space:nowrap}
.rev-review-item p{margin:7px 0 0;font-size:.92rem}
.rev-review-explanation{color:#5d567b}

/* V39 — vocabulary: 20 entries at once and pastel review */
.rev-vocab-heading{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:20px 0 16px}.rev-vocab-heading h3{width:100%;margin:0}.rev-vocab-heading p{flex:1 1 260px;margin:0;color:#58617b}.rev-vocab-heading span{font-weight:800;color:#7150cc}.rev-vocab-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.rev-vocab-row{display:grid;grid-template-columns:26px minmax(80px,1fr);grid-template-rows:auto auto;align-items:center;gap:6px 9px;padding:12px 14px;border:1px solid #e3dff0;border-radius:14px;background:#fff}.rev-vocab-number{grid-column:1;grid-row:1;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#f1ecff;color:#6c4ac9;font-weight:800;font-size:12px}.rev-vocab-row strong{grid-column:2;grid-row:1;color:#29234e}.rev-vocab-row input{grid-column:1 / -1;grid-row:2;width:100%;box-sizing:border-box;min-width:0;padding:10px 12px;border:1px solid #d8d5e6;border-radius:9px;font:inherit;background:#fff;color:#252044}.rev-vocab-row input:focus{outline:2px solid #a28be6;outline-offset:1px}.rev-vocab-actions{margin-top:20px;gap:12px;align-items:center}.rev-vocab-actions span{color:#58617b;font-size:13px}.rev-vocab-review.is-correct{background:#e8f7ee!important;border:1px solid #a9dfbc!important;color:#175b38}.rev-vocab-review.is-wrong{background:#fdebed!important;border:1px solid #f0b8c0!important;color:#8d2939}.rev-vocab-review .rev-review-title span{font-weight:800}.rev-vocab-review p{margin:8px 0 0}@media(max-width:650px){.rev-vocab-list{grid-template-columns:1fr}.rev-vocab-actions{flex-direction:column;align-items:stretch}}

/* V40: compact, movable summary word tiles */
.rev-play-card .rev-summary-text{line-height:2.45}
.rev-play-card .rev-blank,.rev-play-card .rev-bank button{box-sizing:border-box;min-height:45px;height:auto;vertical-align:middle;padding:9px 13px;line-height:24px;font-size:inherit;font-weight:750}
.rev-play-card .rev-blank{min-width:96px;margin:2px 3px;cursor:pointer;touch-action:manipulation}
.rev-play-card .rev-blank.is-filled{background:#e4f3fc;border-style:solid;cursor:grab}
.rev-play-card .rev-blank.rev-drop-hover{outline:3px solid #6da9dc;outline-offset:2px}
.rev-play-card .rev-bank button{cursor:grab;touch-action:manipulation}
.rev-play-card .rev-bank button:disabled{opacity:.3;cursor:default}

/* V41 — Summary: uniform tile borders after drag and drop */
.rev-play-card .rev-summary-text .rev-blank,
.rev-play-card .rev-bank button{
  height:44px;min-height:44px;line-height:20px;padding:10px 13px;
  border:2px solid #b9dfef;border-radius:12px;
  box-shadow:none;outline:none;vertical-align:middle;
}
.rev-play-card .rev-summary-text .rev-blank.is-filled,
.rev-play-card .rev-summary-text .rev-blank.is-filled.active{
  background:#e4f3fc;border:2px solid #b9dfef;box-shadow:none;outline:none;
}
.rev-play-card .rev-summary-text .rev-blank.active:not(.is-filled){
  border:2px solid #439bc9;background:#fff;box-shadow:none;outline:none;
}
.rev-play-card .rev-summary-text .rev-blank:focus:not(:focus-visible){outline:none;box-shadow:none}
.rev-play-card .rev-summary-text .rev-blank:focus-visible,
.rev-play-card .rev-bank button:focus-visible{outline:2px solid #267ca9;outline-offset:2px}
.rev-play-card .rev-summary-text .rev-blank.rev-drop-hover{border-color:#439bc9;outline:2px solid #a3d7f0;outline-offset:1px}

/* V42 — Correction du résumé directement dans le texte */
.rev-summary-review{margin:14px 0 24px}
.rev-summary-legend{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;font-size:.86rem;font-weight:750}
.rev-summary-legend span{padding:7px 12px;border-radius:9px}
.rev-legend-good{background:#e4f7e9;color:#24633d}
.rev-legend-bad{background:#fde9e9;color:#a42f3c}
.rev-play-card .rev-summary-corrected{background:#fff;border:1px solid #dcebf3;border-radius:16px;padding:20px 18px;font-size:1.04rem;line-height:3.2;overflow-wrap:anywhere}
.rev-summary-answer{display:inline-flex;flex-direction:column;vertical-align:middle;align-items:center;justify-content:center;border:1.5px solid transparent;border-radius:10px;padding:5px 11px;margin:3px 2px;line-height:1.35;font-weight:750;text-align:center;max-width:100%}
.rev-summary-answer.is-correct{background:#e4f7e9;border-color:#9bd8ac;color:#205c39}
.rev-summary-answer.is-wrong{background:#fde9e9;border-color:#eeb0b5;color:#a42f3c}
.rev-summary-expected{font-size:.78em;color:#23643c;background:#f2fff4;border-radius:5px;padding:2px 5px;margin-top:4px;font-weight:750}
@media(max-width:600px){.rev-play-card .rev-summary-corrected{padding:13px;line-height:2.8}.rev-summary-answer{padding:4px 7px}}

/* V43 — vocabulary correction uses the same 2-column grid as the exercise */
.rev-play-card .rev-vocab-heading h3,.rev-play-card .rev-vocab-heading span{color:var(--rev-accent)}
.rev-play-card .rev-vocab-number{background:var(--rev-tint);color:var(--rev-accent)}
.rev-play-card .rev-vocab-row input:focus{outline-color:var(--rev-accent);border-color:var(--rev-accent)}
.rev-vocab-result-row{grid-template-columns:26px minmax(0,1fr) auto;grid-template-rows:auto auto auto;align-content:start}
.rev-vocab-result-row .rev-vocab-result-state{grid-column:3;grid-row:1;white-space:nowrap;font-size:.76rem;font-weight:800}
.rev-vocab-result-row .rev-vocab-answer-display{grid-column:1/-1;grid-row:2;padding:10px 12px;border:1px solid currentColor;border-radius:9px;background:#ffffffbd;min-height:22px;overflow-wrap:anywhere}
.rev-vocab-result-row .rev-vocab-expected{grid-column:1/-1;grid-row:3;font-size:.85rem;line-height:1.4}
.rev-vocab-result-row.is-correct{background:#e8f7ee;border-color:#a9dfbc;color:#175b38}
.rev-vocab-result-row.is-wrong{background:#fdebed;border-color:#f0b8c0;color:#8d2939}
.rev-vocab-result-row.is-correct strong,.rev-vocab-result-row.is-wrong strong{color:inherit}
.rev-vocab-result-row.is-correct .rev-vocab-number{background:#c7ecd4;color:#175b38}
.rev-vocab-result-row.is-wrong .rev-vocab-number{background:#fad0d5;color:#8d2939}
.rev-vocab-heading-result{margin-top:8px}
/* Align the inner game accent with the activity card: purple / teal / orange. */
.rev-play-card.rev-theme-quiz{--rev-accent:#7652d4;--rev-tint:#f4efff;--rev-dark:#37266c}
.rev-play-card.rev-theme-summary{--rev-accent:#168e7a;--rev-tint:#e8f8f2;--rev-dark:#155d50;border-color:#c5eadd}
.rev-play-card.rev-theme-vocabulary{--rev-accent:#e87934;--rev-tint:#fff1e4;--rev-dark:#974416;border-color:#f6ddc3}
.rev-play-card .rev-vocab-row input{border-color:#e3d9d1}
@media(max-width:650px){.rev-vocab-result-row{grid-template-columns:26px minmax(0,1fr) auto}}

/* V44 — centered retry action below the full correction grid */
.rev-play-card #rev-again{display:block;width:max-content;max-width:100%;margin:32px auto 12px;padding:13px 27px;text-align:center;}
@media(max-width:650px){.rev-play-card #rev-again{margin-top:26px;margin-bottom:10px;}}

/* V45: Quiz review in the original question layout, one question at a time. */
.rev-play-card.rev-theme-quiz .rev-review-choices .rev-review-choice{min-height:74px;padding:16px;border:2px solid #e5e0ee;border-radius:17px;text-align:center;background:#fff;color:var(--rev-dark);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-weight:750;box-sizing:border-box}
.rev-play-card.rev-theme-quiz .rev-review-choices .rev-review-choice.is-correct{background:#e8f7ee;border-color:#a9dfbc;color:#175b38}
.rev-play-card.rev-theme-quiz .rev-review-choices .rev-review-choice.is-wrong{background:#fdebed;border-color:#f0b8c0;color:#8d2939}
.rev-choice-marker{font-size:.76rem;font-weight:800}
.rev-quiz-review-status{font-weight:800}.rev-quiz-review-status.is-correct{color:#237747}.rev-quiz-review-status.is-wrong{color:#b43c50}
.rev-step-explanation{background:#f4f0ff;border:1px solid #e3d9ff;border-radius:12px;padding:13px 16px;margin:17px 0;color:#49367e;line-height:1.5}
.rev-review-nav span{align-self:center;font-weight:800;color:#6c51b9}.rev-review-nav button:disabled{opacity:.4;cursor:default}
@media(max-width:540px){.rev-play-card.rev-theme-quiz .rev-review-choices .rev-review-choice{min-height:60px}}

/* V46 — green Language Passport and red Let's Summarize */
.rev-play-card.rev-theme-summary{--rev-accent:#d74759;--rev-tint:#fff0f1;--rev-dark:#8b2535;border-color:#f4cdd3}
.rev-play-card.rev-theme-summary .rev-summary-text .rev-blank{border-color:#e8a5af;background:#fff1f2;color:#8b2535}
.rev-play-card.rev-theme-summary .rev-bank button{border-color:#f0b9c0;color:#8b2535}
.rev-play-card.rev-theme-summary .rev-summary-text .rev-blank.rev-drop-hover{border-color:#d74759;outline-color:#f5b7c0}
.mec-live-game[data-kind=summary] .mec-live-icon{background:#ffebee;color:#cf4053}
.mec-live-game[data-kind=summary] .mec-live-kicker{color:#cf4053}
.mec-live-game[data-kind=summary] .mec-live-start{background:#cf4053}
.mec-live-game[data-kind=passport] .mec-live-icon{background:#e4f6e9;color:#228650}
.mec-live-game[data-kind=passport] .mec-live-kicker{color:#228650}
.mec-live-game[data-kind=passport] .mec-live-start{background:#228650}
.rev-pill.summary{background:#ffebee;color:#b73448}
.rev-pill.passport{background:#e4f6e9;color:#217a49}
.rev-play-card.rev-theme-passport{--rev-accent:#228650;--rev-tint:#eaf8ee;--rev-dark:#175b39;border-color:#bce4c8}
.rev-passport-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 18px}.rev-play-card .rev-passport-tabs button{background:#fff;color:#246344;border:1.5px solid #bce4c8;padding:10px 14px;border-radius:12px}.rev-play-card .rev-passport-tabs button.active{background:#228650;color:#fff;border-color:#228650}
.rev-passport-instruction{color:#526b5c;margin:0 0 18px}.rev-passport-list{display:grid;gap:12px}.rev-passport-row{display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px 12px;align-items:center;border:1px solid #dce9e0;border-radius:15px;padding:14px;background:#fff}.rev-passport-number{width:30px;height:30px;border-radius:50%;background:#eaf8ee;color:#228650;display:grid;place-items:center;font-weight:900}.rev-passport-question{font-size:1rem;line-height:1.55}.rev-passport-question small{display:block;color:#5b8067}.rev-passport-blank{color:#228650}.rev-play-card .rev-passport-row input{grid-column:2;min-width:0;padding:12px 14px;font-size:1rem;border:1.5px solid #cbded1;border-radius:10px}.rev-passport-feedback{grid-column:2;font-weight:750;font-size:.87rem}.rev-passport-row.is-correct{background:#e8f7ee;border-color:#a9dfbc;color:#175b38}.rev-passport-row.is-wrong{background:#fdebed;border-color:#f0b8c0;color:#8d2939}.rev-passport-row.is-wrong .rev-passport-feedback{color:#8d2939}.rev-passport-row.is-correct .rev-passport-feedback{color:#175b38}
.rev-passport-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:28px}.rev-play-card .rev-passport-actions button{padding:12px 20px}.rev-passport-score{text-align:center;padding:20px;background:#eaf8ee;border:1px solid #bce4c8;border-radius:18px;margin:18px 0;color:#175b39}.rev-passport-score span{display:block;font-size:.73rem;letter-spacing:.09em;font-weight:850}.rev-passport-score strong{font-size:2.8rem;display:block}.rev-passport-score p{margin:0}.rev-play-card.rev-theme-passport .rev-choices button.is-correct{background:#e8f7ee;border-color:#a9dfbc;color:#175b38}.rev-play-card.rev-theme-passport .rev-choices button.is-wrong{background:#fdebed;border-color:#f0b8c0;color:#8d2939}.rev-passport-grammar .rev-step-explanation{background:#fff;border:1px solid #cce7d4;padding:15px;border-radius:12px}
@media(max-width:600px){.rev-passport-row{grid-template-columns:28px minmax(0,1fr);padding:11px}.rev-passport-tabs button{flex:1}}

/* V47 — Activities grouped by lesson, with consistent game colors */
.rev-lesson-groups{display:grid;gap:22px}
.rev-lesson-group{border:1px solid #dfe5ef;border-radius:20px;padding:20px;background:#fafbfe}
.rev-lesson-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.rev-lesson-heading h3{font-size:1.25rem;margin:4px 0 0;color:#1c2850}
.rev-lesson-eyebrow{font-size:.72rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#65738e}
.rev-lesson-count{font-size:.82rem;color:#53617d;background:#fff;border:1px solid #e0e5ee;border-radius:999px;padding:7px 12px}
.rev-lesson-group .rev-admin-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.rev-card{border-top:4px solid var(--rev-color,#7652d4)}
.rev-card-quiz{--rev-color:#7652d4}.rev-card-summary{--rev-color:#d74759}.rev-card-vocabulary{--rev-color:#e87934}.rev-card-passport{--rev-color:#228650}
.rev-card h3{color:var(--rev-color,#7652d4)}
.rev-pill.quiz{background:#f0e9ff;color:#7652d4}
.rev-pill.summary{background:#ffebee;color:#b73448}
.rev-pill.vocabulary{background:#fff0e2;color:#c75f20}
.rev-pill.passport{background:#e4f6e9;color:#217a49}
.rev-card-status{display:block;margin-top:3px;font-weight:700}
.rev-card-status.is-published{color:#217a49}.rev-card-status.is-draft{color:#8b6680}
@media(max-width:650px){.rev-lesson-group{padding:13px}.rev-lesson-heading{align-items:flex-start}}

/* V48: inline save feedback for revision activities */
.rev-save-feedback{margin-top:16px;padding:13px 16px;border-radius:12px;border:1px solid #f0b5bc;background:#fff0f1;color:#9d2738;font-weight:650;line-height:1.5}
.rev-save-feedback:empty{display:none}
.rev-save-feedback[data-state="pending"]{border-color:#c6d7f5;background:#eff5ff;color:#29487e}
.rev-save-feedback[data-state="success"]{border-color:#a9dfbc;background:#e8f7ee;color:#175b38}

/* V50 — Correction Language Passport : conserver le contraste des réponses */
.rev-play-card.rev-theme-passport .rev-choices button[aria-disabled="true"]{opacity:1!important;filter:none!important;cursor:default;pointer-events:none}
.rev-play-card.rev-theme-passport .rev-choices button[aria-disabled="true"]:not(.is-correct):not(.is-wrong){background:#fff;color:#202747;border-color:#d4d8e9}
.rev-play-card.rev-theme-passport .rev-choices button.is-correct{background:#e8f7ee!important;color:#175b38!important;border-color:#a9dfbc!important}
.rev-play-card.rev-theme-passport .rev-choices button.is-wrong{background:#fdebed!important;color:#8d2939!important;border-color:#f0b8c0!important}
.rev-play-card.rev-theme-passport .rev-passport-detailed{padding:12px 15px;margin-top:12px;background:#fff;border:1px solid #d6e7da;border-radius:12px;color:#26394a;font-size:.94rem;line-height:1.55}
.rev-play-card.rev-theme-passport .rev-passport-detailed p{margin:7px 0 0;line-height:1.55}
.rev-play-card.rev-theme-passport .rev-passport-row input[readonly]{opacity:1;color:#202747;background:#fff}

/* V55 — Nuanced translation feedback with visible inline annotations */
.rev-passport-row.is-warning{background:#fff3e3;border-color:#f2bb77;color:#8b4a10}
.rev-passport-row.is-warning .rev-passport-feedback{color:#854710}
.rev-passport-marked{grid-column:2;line-height:1.8;font-size:.95rem;color:#27344a;overflow-wrap:anywhere}
.rev-passport-underline{background:transparent;color:#99500a;text-decoration:underline wavy #e68b2d 2px;text-underline-offset:4px;font-weight:700}
.rev-passport-issues{padding-left:1.3rem;margin:.55rem 0;display:grid;gap:.45rem}
.rev-passport-issues em{display:block;font-style:normal;font-weight:650}
.rev-passport-feedback p{margin:.55rem 0 0;line-height:1.5}

/* V56 — Sidebar inaccessible until Supabase verifies an administrator.
   The initial class is rendered in HTML to avoid a flash of the menu. */
body.mec-admin-locked .admin-layout{grid-template-columns:minmax(0, 860px);justify-content:center}
body.mec-admin-locked .admin-layout>.side{display:none!important}
body.mec-admin-locked .admin-panel{width:100%;min-width:0}
@media(max-width:850px){
 body.mec-admin-locked .admin-layout{grid-template-columns:minmax(0,1fr)}
}

/* V57 - Language Passport speech bubble icon */
.mec-chat-bubble{width:38px;height:38px;display:block}.rev-game-icon .mec-chat-bubble{width:30px;height:30px}@media(max-width:600px){.mec-live-icon .mec-chat-bubble{width:30px;height:30px}}

/* V58 — featured correction PDF */
.mec-correction-feature{display:grid;grid-template-columns:minmax(145px,210px) minmax(0,1fr);gap:24px;align-items:center;padding:22px;margin:24px 0 8px;border:1px solid #cbd8f6;border-radius:22px;background:linear-gradient(120deg,#f0f5ff,#ffffff 65%);box-shadow:0 12px 28px #263c7510}
.mec-correction-cover{position:relative;display:flex;justify-content:center;align-items:center;min-height:230px;max-height:290px;overflow:hidden;border:1px solid #e0e6f3;border-radius:12px;background:white;box-shadow:0 8px 20px #2032551a}
.mec-correction-preview{display:none;max-width:100%;max-height:290px;object-fit:contain}
.mec-correction-feature.has-preview .mec-correction-preview{display:block}
.mec-correction-feature.has-preview .mec-correction-placeholder{display:none}
.mec-correction-placeholder{display:flex;flex-direction:column;align-items:center;gap:12px;font-size:38px;font-weight:900;color:#304d92;text-align:center}
.mec-correction-placeholder small{max-width:150px;font-size:12px;line-height:1.5;font-weight:600;color:#64718d}
.mec-correction-feature-copy{min-width:0}
.mec-correction-eyebrow{display:block;font-size:11px;font-weight:900;letter-spacing:.1em;color:#5369c9}
.mec-correction-feature-copy h3{font-size:clamp(21px,2.6vw,30px);line-height:1.15;margin:10px 0}
.mec-correction-feature-copy p{color:#586784;margin:0 0 22px}
.mec-correction-feature .btn{background:#304d92;color:#fff;border:0;display:inline-flex;align-items:center;justify-content:center;padding:13px 20px;border-radius:13px}
.mec-correction-unlock label{display:block;margin:0 0 8px;font-weight:700;font-size:13px}
.mec-correction-unlock-row{display:flex;gap:10px;flex-wrap:wrap}
.mec-correction-unlock-row input{flex:1;min-width:160px;border:1px solid #cbd8f6;border-radius:12px;padding:12px}
.mec-correction-error{display:block;color:#af263b;margin-top:8px}
.mec-protected-correction-option{padding:14px;border:1px solid #dbe4f3;border-radius:14px;background:#f7f9ff}
.mec-protected-correction-option input[type=checkbox]{width:auto;margin-right:8px}
#mec-correction-secret-wrap{margin-top:12px}
#mec-correction-secret-wrap[hidden]{display:none}
@media(max-width:600px){.mec-correction-feature{grid-template-columns:1fr;padding:16px}.mec-correction-cover{min-height:190px;max-height:240px}.mec-correction-preview{max-height:240px}}

/* V59 — secure, exercise-by-exercise corrections */
.mec-structured-corrections[hidden]{display:none}
.mec-structured-corrections{grid-column:1/-1;border-top:1px solid #e1e8f5;margin-top:8px;padding-top:20px}
.mec-answers-heading span{font-size:11px;letter-spacing:.1em;font-weight:900;color:#4c66bf}
.mec-answers-heading h3{margin:5px 0;font-size:24px}
.mec-answers-heading p{color:#64718d;margin:0 0 16px}
.mec-answer-group{margin:10px 0;border:1px solid #dce4f3;border-radius:15px;background:#fff;overflow:hidden}
.mec-answer-group summary{display:flex;align-items:center;gap:13px;padding:15px;cursor:pointer;list-style:none}
.mec-answer-group summary::-webkit-details-marker{display:none}
.mec-answer-group summary>span:nth-child(2){flex:1;display:flex;flex-direction:column;gap:3px}
.mec-answer-group summary small{color:#687694;font-size:12px}
.mec-answer-number{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#eaf0ff;color:#304d92;font-weight:900}
.mec-answer-items{padding:0 15px 15px}
.mec-answer-item{border-top:1px solid #e9edf6;padding:15px 0}
.mec-answer-item-title{display:flex;align-items:center;gap:10px;color:#203358}
.mec-answer-item-title span{background:#edf2fb;padding:4px 8px;border-radius:7px;font-size:12px;font-weight:800}
.mec-answer-item p{white-space:pre-line;margin:9px 0;color:#253351;line-height:1.65}
.mec-answer-item small{color:#697790}
.mec-answers-admin{border:1px solid #dce4f3;background:#f6f8ff;padding:15px;border-radius:15px}
.mec-answers-admin h4{margin:0 0 8px}
.mec-answers-admin input{margin:8px 0}
.mec-answers-admin button{margin:10px 0}
#mec-answers-upload-status{display:block;color:#304d92;font-size:13px}

.mec-correction-feature.is-protected:not(.is-unlocked) .mec-correction-placeholder{filter:blur(2px);opacity:.7;user-select:none}
.mec-correction-feature.is-unlocked .mec-correction-placeholder{filter:none}

/* V60 — explicit PDF / JSON import workflow */
.mec-correction-import-step{grid-column:1/-1;padding:18px;border:1px solid #dce4f3;border-radius:17px;background:#fff;margin:10px 0}.mec-correction-import-step:nth-of-type(odd){background:#f8faff}.mec-import-step-header{display:flex;align-items:flex-start;gap:14px;margin-bottom:16px}.mec-import-step-index{display:grid;place-items:center;flex:none;width:36px;height:36px;background:#304d92;color:#fff;font-weight:900;border-radius:12px}.mec-import-step-header h4{margin:0 0 6px;font-size:17px}.mec-import-step-header p{margin:0;color:#596984;line-height:1.55}.mec-correction-import-step .mec-answers-admin{background:#f3f6ff}.mec-correction-import-step input[type=file]{width:100%;max-width:100%}

/* V61 — blurred first page, no unprotected full-resolution preview */
.mec-correction-cover .mec-correction-cover-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff}
.mec-correction-feature.has-cover-preview:not(.is-unlocked) .mec-correction-placeholder{display:none}
.mec-correction-feature.is-unlocked .mec-correction-cover-image{display:none}

/* V62 — first PDF page is always displayed clearly; password still protects full document and answers */
.mec-correction-feature.is-protected:not(.is-unlocked) .mec-correction-cover-image{filter:none!important;opacity:1!important}
.mec-correction-feature.is-protected:not(.is-unlocked) .mec-correction-placeholder{filter:none!important;opacity:1!important}

/* V64 — prevent broken image icon; render unlocked PDF page above the cover */
.mec-correction-feature.cover-unavailable .mec-correction-cover-image{display:none!important}
.mec-correction-feature .mec-correction-placeholder{font-size:0}
.mec-correction-feature .mec-correction-placeholder::before{content:'PDF';display:block;font-size:24px;font-weight:900;letter-spacing:.04em;color:#304d92}
.mec-correction-feature .mec-correction-placeholder small{font-size:12px}
.mec-correction-feature.is-unlocked.has-preview .mec-correction-placeholder{display:none!important}
.mec-correction-feature.is-unlocked.has-preview .mec-correction-preview{display:block!important;position:relative;z-index:2;width:auto;height:auto;max-width:100%;max-height:290px}
.mec-correction-feature.is-unlocked.preview-loading .mec-correction-placeholder small{font-size:0}
.mec-correction-feature.is-unlocked.preview-loading .mec-correction-placeholder small::after{content:'Chargement de la première page…';font-size:12px}

/* V65 — Correction & Key Points: consistent green visual identity */
.lesson-section.correction{background:#ecf8f0!important;border-color:#ccebd8!important}
.lesson-section.correction .sec-title h2,.lesson-section.correction .sec-title p{color:#195c3b}
.lesson-section.correction .sec-icon{background:#d7f1e2!important;color:#1b8050!important}
.lesson-section.correction>details>summary{color:#1b7049}
.mec-correction-feature{border-color:#bde5cd;background:linear-gradient(115deg,#e8f7ee,#fff 75%);box-shadow:0 12px 28px #1b704911}
.mec-correction-cover{min-height:230px;background:#e6f6ec;border-color:#bde5cd;flex-direction:column;gap:7px;padding:22px;color:#1c704a;text-align:center}
.mec-correction-icon{width:125px;max-width:85%}
.mec-correction-icon svg{display:block;width:100%;height:auto}
.mec-correction-cover strong{font-size:19px;font-weight:900}
.mec-correction-cover small{font-size:12px;font-weight:650;color:#397b59}
.mec-correction-eyebrow,.mec-answers-heading span{color:#258354}
.mec-correction-feature-copy h3,.mec-answers-heading h3{color:#195c3b}
.mec-correction-feature-copy p,.mec-answers-heading p{color:#4b7760}
.mec-correction-feature .btn{background:#218454;color:#fff}
.mec-correction-feature .btn:hover{background:#176b42}
.mec-correction-unlock-row input{border-color:#b9dfc9}
.mec-structured-corrections{border-top-color:#cde9d8}
.mec-answer-group{border-color:#cde9d8}
.mec-answer-number{background:#e1f4e9;color:#1c794b}
.mec-answer-item-title span{background:#e5f5eb;color:#1c794b}
.mec-answer-item{border-top-color:#e1efe6}
.mec-correction-import-step{border-color:#cce8d7}
.mec-correction-import-step:nth-of-type(odd),.mec-correction-import-step .mec-answers-admin{background:#f2faf5}
.mec-import-step-index{background:#218454}
.mec-protected-correction-option{background:#f3faf6;border-color:#cce8d7}

/* V66: two independent translation exercises */
.rev-vocab-direction{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 22px}
.rev-vocab-direction button{flex:1;min-width:190px;border:1px solid #f5b38c;border-radius:13px;background:#fff;color:#a64c1f;font-weight:800;padding:12px 15px;cursor:pointer}
.rev-vocab-direction button.is-active{background:#ee7935;border-color:#ee7935;color:#fff}
.rev-vocab-finish-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:25px auto}
.rev-vocab-finish-actions .rev-vocab-other{background:#fff!important;color:#a64c1f!important;border:1px solid #ee7935!important}

/* V67 — lesson source panel for revision activities */
.rev-course-box{margin:20px 0 30px;padding:24px;border:1px solid #cbdaf3;background:#f6f9ff;border-radius:20px}
.rev-course-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.rev-course-header h3{margin:4px 0;font-size:23px;color:#1d305c}.rev-course-header p{margin:4px 0 18px;color:#5d6b87}
.rev-source-eyebrow{font-size:11px;letter-spacing:.11em;font-weight:900;color:#5b70c2}.rev-source-badge{font-size:11px;background:#e4edff;padding:8px;border-radius:99px;color:#36528e;font-weight:800;white-space:nowrap}
.rev-course-box label{display:block;font-weight:800;margin:12px 0 6px}.rev-course-box select,.rev-course-box textarea,.rev-course-box input[type=file]{display:block;width:100%;box-sizing:border-box;border:1px solid #d4def0;border-radius:12px;padding:11px;background:white;color:#263759}
.rev-course-box textarea{font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical}
.rev-source-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:10px}.rev-source-two small{display:block;margin-top:7px;color:#697790}
#rev-source-feedback{margin-top:12px;color:#30548d;font-weight:700}.rev-course-box .rev-actions{margin-top:14px;flex-wrap:wrap}
@media(max-width:700px){.rev-source-two{grid-template-columns:1fr}.rev-course-header{display:block}}

/* V69 — visual routing of a global JSON pack */
.rev-pack-top{margin-bottom:22px}.rev-pack-kicker{font-size:11px;letter-spacing:.12em;font-weight:900;color:#5e50bb}.rev-pack-top h3{margin:7px 0}.rev-pack-top p{color:#586584;line-height:1.6}.rev-pack-advanced{border:1px solid #dbe2f2;border-radius:12px;padding:12px;margin:14px 0}.rev-pack-advanced summary{cursor:pointer;font-weight:700}.rev-pack-advanced textarea{margin-top:12px;min-height:160px}.rev-pack-ready{margin-top:22px}.rev-pack-ready h4{font-size:20px;margin:0 0 8px}.rev-pack-routing{display:grid;gap:12px;margin:20px 0}.rev-pack-route{border:1px solid #dfe5f2;border-radius:16px;background:white;overflow:hidden}.rev-pack-route-label{display:flex;align-items:center;gap:12px;padding:17px;cursor:pointer;flex-wrap:wrap}.rev-pack-route-label input{width:18px;height:18px;accent-color:#314f92}.rev-pack-route-name{flex:1;min-width:150px;display:flex;flex-direction:column;gap:4px}.rev-pack-route-name small{color:#63708c}.rev-pack-route-arrow{color:#228657;font-weight:900}.rev-pack-route-quiz{border-left:5px solid #7950d5}.rev-pack-route-summary{border-left:5px solid #d44f57}.rev-pack-route-vocabulary{border-left:5px solid #e97732}.rev-pack-route-passport{border-left:5px solid #218653}.rev-pack-route .rev-import-preview{margin:0 15px 15px;padding:12px;border-top:1px solid #e9edf6}.rev-pack-route .rev-import-preview summary{cursor:pointer;color:#334e8e;font-weight:700}.rev-pack-error{color:#a9243b;background:#ffebed;border:1px solid #f1c0c8;padding:14px;border-radius:12px}

.mec-video-error{padding:10px 14px;color:#9b2c32;background:#fff0f0;border-radius:8px;font-size:.9rem}

/* V73 — HTML5 native video, no Video.js dependency */
.mec-vjs-wrap{position:relative;background:#111a34}
.mec-vjs-wrap .mec-native-video{display:block;width:100%;height:100%;aspect-ratio:16/9;object-fit:contain;background:#111a34}
.mec-vjs-wrap .mec-video-error{position:absolute;bottom:0;left:0;right:0;padding:12px 16px;background:#fff5ef;color:#8a3523;font-weight:650;font-size:14px;z-index:2}
.mec-vjs-wrap .mec-video-error a{display:inline-block;margin-left:6px;color:#8a3523;text-decoration:underline}

/* V77 — progressive reveal: keep image dimensions and avoid empty white cards */
html.mec-images-enhanced :is(.hero-img,.level-card img,.lesson-card img,.lesson-hero img,.unit-heading img,.unit-existing-preview img,.site-logo,.mec-video-cover){opacity:0;transition:opacity .32s ease;}
html.mec-images-enhanced :is(.hero-img,.level-card img,.lesson-card img,.lesson-hero img,.unit-heading img,.unit-existing-preview img,.site-logo,.mec-video-cover).mec-img-ready,
html.mec-images-enhanced :is(.hero-img,.level-card img,.lesson-card img,.lesson-hero img,.unit-heading img,.unit-existing-preview img,.site-logo,.mec-video-cover).mec-img-failed{opacity:1;}
:is(.hero,.level-card,.lesson-card,.lesson-hero,.unit-heading,.mec-video){background-image:linear-gradient(110deg,rgba(230,233,250,.45),rgba(245,247,255,.8),rgba(230,233,250,.45));background-size:200% 100%;}
@media(prefers-reduced-motion:reduce){html.mec-images-enhanced img{transition:none!important}}

/* V89: activities grouped in collapsed lesson accordions */
.rev-lesson-accordion {overflow:hidden;}
.rev-lesson-accordion > summary.rev-lesson-heading {cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;}
.rev-lesson-accordion > summary.rev-lesson-heading::-webkit-details-marker {display:none;}
.rev-lesson-accordion > summary.rev-lesson-heading:focus-visible {outline:3px solid #7a65d7;outline-offset:-3px;}
.rev-lesson-accordion .rev-lesson-chevron {font-size:25px;font-weight:700;display:inline-block;transition:transform .2s ease;}
.rev-lesson-accordion[open] .rev-lesson-chevron {transform:rotate(180deg);}
.rev-lesson-accordion .rev-lesson-heading-right {display:flex;align-items:center;gap:14px;white-space:nowrap;}
.rev-lesson-accordion > .rev-admin-grid {padding-top:16px;}
@media(max-width:600px){.rev-lesson-accordion .rev-lesson-heading-right{white-space:normal;gap:8px;}.rev-lesson-accordion .rev-lesson-count{font-size:12px;}}
@media(prefers-reduced-motion:reduce){.rev-lesson-accordion .rev-lesson-chevron{transition:none;}}

/* V90 — Homepage hero: approximately half the previous desktop height. */
body:has(#home-title) .hero{min-height:235px;align-items:stretch}
body:has(#home-title) .hero-copy{padding:24px 20px 24px 38px;display:flex;flex-direction:column;justify-content:center}
body:has(#home-title) .hero h1{font-size:clamp(1.9rem,3.25vw,3.1rem);line-height:1.08;letter-spacing:-.04em}
body:has(#home-title) .hero-copy p{font-size:.94rem;line-height:1.45;margin:12px 0 16px;max-width:470px}
body:has(#home-title) .hero-copy .eyebrow{font-size:.69rem;margin-bottom:8px}
body:has(#home-title) .hero-copy .btn{align-self:flex-start;padding:11px 17px;font-size:.88rem}
body:has(#home-title) .hero-img{height:100%;min-height:235px;max-height:260px;object-fit:cover}
@media(max-width:850px){body:has(#home-title) .hero{min-height:0}body:has(#home-title) .hero-copy{padding:27px}body:has(#home-title) .hero-img{min-height:0;max-height:210px}}
@media(max-width:600px){body:has(#home-title) .hero-copy{padding:23px}body:has(#home-title) .hero h1{font-size:clamp(1.85rem,7vw,2.5rem)}body:has(#home-title) .hero-img{max-height:180px}}

/* V91 — keep the hero image edge-to-edge in its grid cell. */
body:has(#home-title) .hero{grid-template-columns:minmax(0,1.06fr) minmax(0,.94fr);align-items:stretch;}
body:has(#home-title) .hero-media{position:relative;min-width:0;min-height:0;align-self:stretch;overflow:hidden;}
body:has(#home-title) .hero-media .hero-img{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;max-height:none;object-fit:cover;object-position:center center;}
@media(max-width:850px){body:has(#home-title) .hero{grid-template-columns:1fr;}body:has(#home-title) .hero-media{height:210px;min-height:210px;}}
@media(max-width:600px){body:has(#home-title) .hero-media{height:180px;min-height:180px;}}

/* V111: Programme limitatif cards share the classic lesson-card geometry. */
.mec-literature-category .cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;align-items:stretch}
.mec-literature-category .mec-work-lesson-card{display:block;min-width:0;overflow:hidden;border-radius:25px;background:#fff;box-shadow:var(--shadow);transition:transform .22s,box-shadow .22s}
.mec-literature-category .mec-work-lesson-card:hover{transform:translateY(-6px);box-shadow:0 22px 55px rgba(30,42,83,.15)}
.mec-literature-category .mec-work-lesson-card>img{display:block;width:100%;height:205px;object-fit:cover;object-position:center}
.mec-literature-category .mec-work-lesson-card .card-body{padding:20px}
.mec-literature-category .mec-work-lesson-card .card-body h3{margin:8px 0 0;font-size:1.35rem}
.mec-literature-category .mec-work-lesson-card .card-body p{font-size:.87rem;color:var(--muted);margin:8px 0 0;overflow-wrap:anywhere}
@media(max-width:850px){.mec-literature-category .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.mec-literature-category .cards{grid-template-columns:1fr}}

/* V112 administration commune */
.mec-wide-admin{max-width:1800px}.mec-wide-admin .admin-layout{grid-template-columns:245px minmax(0,1fr)}.mec-wide-admin .admin-panel{min-width:0}.mec-wide-admin .admin-layout.mec-side-collapsed{grid-template-columns:64px minmax(0,1fr)}.mec-side-collapsed .side{padding:10px}.mec-side-collapsed .side>*:not(#mec-side-toggle){display:none}.mec-side-collapsed #mec-side-toggle{font-size:0;padding:12px;justify-content:center}.mec-side-collapsed #mec-side-toggle::before{content:'☰';font-size:20px}.mec-quiz-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.mec-quiz-frame{width:100%;height:80vh;min-height:650px;border:1px solid #dce5f1;border-radius:14px;background:#f4f7fb}.mec-admin-locked .mec-wide-admin .admin-layout{grid-template-columns:minmax(0,860px)}@media(max-width:900px){.mec-wide-admin .admin-layout,.mec-wide-admin .admin-layout.mec-side-collapsed{grid-template-columns:minmax(0,1fr)}.mec-quiz-frame{min-height:600px}}

/* V187: shared header appearance */
.top{isolation:isolate}.top .mec-header-bg{position:absolute;inset:0;z-index:-1;pointer-events:none;background-repeat:no-repeat}.top .topin{height:var(--mec-header-height,86px)}.top .brand{transform:translate(var(--mec-logo-x,0px),var(--mec-logo-y,0px))}.mec-banner-preview{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:16px 0}.mec-banner-preview .top{position:relative;z-index:0}.mec-banner-preview .topin{padding:0 16px}.mec-banner-preview .nav{flex-wrap:wrap}.mec-banner-preview .brand{flex-shrink:1}.mec-banner-preview .site-logo{max-width:100%;object-fit:contain}@media(max-width:800px){.top .brand{transform:translateY(clamp(-10px,var(--mec-logo-y,0px),10px))}.top .topin{height:auto;min-height:86px}.top .site-logo{max-height:80px;max-width:65vw}}

/* V189: reserve the saved banner dimensions before application bootstrap. */
html.mec-brand-pending body{visibility:hidden}
header.top:not(:has(.mec-header-bg))::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:var(--mec-first-bg,none);background-repeat:no-repeat;background-position:var(--mec-first-position,50% 50%);background-size:var(--mec-first-fit,cover);opacity:var(--mec-first-opacity,.35)}
@media(max-width:600px){.top .nav{top:100%}}

/* V190: optional custom background, below the existing image layer. */
html[data-header-color="custom"] body > header.top:not([data-header-color]), header.top[data-header-color="custom"]{background:var(--mec-header-color) !important}
.mec-banner-preview ~ .form-grid [hidden]{display:none!important}
#header-color-a,#header-color-b{width:100%;height:42px;cursor:pointer}

/* V191 — custom menu palette, including first paint and local preview. */
:is(:root[data-nav-colors="custom"] header.top:not([data-nav-colors="default"]),header.top[data-nav-colors="custom"]) .nav a:not([data-nav="admin"]):not(.adminlink):not(.active):not(:hover),:is(:root[data-nav-colors="custom"] header.top:not([data-nav-colors="default"]),header.top[data-nav-colors="custom"]) .menu{background:var(--mec-navIdleBg)!important;color:var(--mec-navIdleText)!important}
:is(:root[data-nav-colors="custom"] header.top:not([data-nav-colors="default"]),header.top[data-nav-colors="custom"]) .nav a:not([data-nav="admin"]):not(.adminlink):is(.active,:hover,:focus-visible){background:var(--mec-navActiveBg)!important;color:var(--mec-navActiveText)!important}
.mec-nav-samples{display:flex;gap:12px;margin:12px 0}.mec-nav-samples span{padding:11px 15px;border-radius:13px;font-weight:800}.mec-nav-samples[hidden],#nav-colors[hidden]{display:none}

/* V192 — Header visibility, without changing the reserved layout height. */
:root[data-header-behavior="scroll"] body > header.top{position:relative;top:auto}
:root[data-header-behavior="smart"] body > header.top{transition:transform .22s ease}
:root[data-header-behavior="smart"].mec-header-hidden body > header.top:not(:focus-within):not(:hover){transform:translateY(-101%)}
@media(prefers-reduced-motion:reduce){:root[data-header-behavior="smart"] body > header.top{transition:none}}

/* V194: reserve image space without showing default illustrations before settings. */
.level-card img[data-fallback]:not([src]){visibility:hidden;}
.hero-img:not([src]){visibility:hidden;}
html.mec-images-enhanced .level-card .level-slide:not(.is-active){opacity:0;}
html.mec-images-enhanced .level-card .level-slide.is-active.mec-img-ready{opacity:1;}

/* V197 — publication des activités */
.rev-form label.rev-publish-panel{position:relative;display:flex;align-items:center;gap:16px;padding:18px 20px;margin:20px 0 16px;border:1px solid #e7c68a;border-radius:14px;background:#fff8e9;color:#795016;cursor:pointer;line-height:1.4;}
.rev-form .rev-publish-panel:has(input:checked){background:#eaf8ef;border-color:#8bc9a4;color:#17643a;}
.rev-form .rev-publish-panel input{position:absolute;opacity:0;width:1px;height:1px;padding:0;}
.rev-publish-track{flex:0 0 54px;height:30px;border-radius:30px;background:#a26b22;position:relative;transition:background .18s;}
.rev-publish-track::after{content:"";position:absolute;left:4px;top:4px;width:22px;height:22px;background:white;border-radius:50%;box-shadow:0 1px 4px #0003;transition:transform .18s;}
.rev-publish-panel input:checked + .rev-publish-track{background:#21834b;}
.rev-publish-panel input:checked + .rev-publish-track::after{transform:translateX(24px);}
.rev-publish-panel input:focus-visible + .rev-publish-track{outline:3px solid #245cb1;outline-offset:4px;}
.rev-publish-copy{display:flex;flex-direction:column;gap:4px;min-width:0;}
.rev-publish-copy strong{font-size:1rem;}.rev-publish-copy small{font-size:.85rem;color:inherit;font-weight:400;}
@media(prefers-reduced-motion:reduce){.rev-publish-track,.rev-publish-track::after{transition:none;}}

/* V205: single page scroll for Teaching Studio */
.mec-quiz-frame{display:block;width:100%;height:650px;min-height:650px;border:0;border-radius:0;background:#f4f7fb}.admin-panel:has(>.mec-quiz-frame){overflow:visible;padding:16px}.mec-wide-admin:has(.mec-quiz-frame){max-width:none;width:calc(100% - 32px)}

/* V231 — constant teacher navigation palette. */
html:root header.top .nav a[data-nav="admin"]:any-link {
 background:#24365d !important; background-color:#24365d !important; color:#fff !important;
 box-shadow:inset 0 0 0 1px #24365d !important;
 transition:background-color .18s ease,color .18s ease;
}
html:root header.top .nav a[data-nav="admin"]:any-link:is(:hover,:focus-visible) {
 background:#24365d !important; background-color:#24365d !important; color:#fff !important;
}
html:root header.top .nav a[data-nav="admin"]:any-link:focus-visible {outline:2px solid #24365d;outline-offset:2px;}
@media(prefers-reduced-motion:reduce){html:root header.top .nav a[data-nav="admin"]:any-link{transition:none;}}

/* V243 — Align homepage heading with the 490px login card. */
@media (min-width:851px){
  .hero-with-login .hero-copy{container-type:inline-size;min-width:0;}
  body:has(#home-title) .hero #home-title{font-size:clamp(1.25rem,7.95cqi,2.55rem);white-space:nowrap;max-width:490px;}
}
