*{box-sizing:border-box} :root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172334;background:#dce8f6;font-synthesis:none}body{margin:0;min-height:100dvh;background:linear-gradient(135deg,#e8eff9 0%,#dce8f6 52%,#e3eaf5 100%)}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation;color:inherit}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #245e9e;outline-offset:3px}[hidden]{display:none!important}h1,h2,p{margin:0}#educator{max-width:1200px;margin:0 auto;padding:clamp(12px,3vw,30px);display:flex;flex-direction:column;gap:14px;min-height:100dvh}header{display:flex;align-items:center;justify-content:space-between;gap:10px}h1{font-size:clamp(24px,3.5vw,39px);font-weight:850;letter-spacing:-.035em}.mode{font-weight:700;font-size:14px;background:#c8dcf1;border-radius:30px;padding:9px 16px;white-space:nowrap}.panel{background:#ffffffdf;border:1px solid #c8d9eb;border-radius:20px;padding:16px 20px;box-shadow:0 3px 9px #31496512}.count-panel,.panel-head,.search-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}h2{font-size:clamp(16px,2.15vw,23px);font-weight:760;display:flex;align-items:center;gap:12px}.step{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#d5e6f7;color:#24547c;flex:none}.segments{display:flex;gap:8px}.segments button,.secondary,.primary{border:1px solid #a9bfd7;background:#fff;color:#23415f;min-height:44px;border-radius:11px;padding:8px 15px;font-weight:700}.segments button{min-width:60px;font-size:20px}.segments button[aria-pressed=true],.primary{background:#245e9e;color:white;border-color:#245e9e}.primary{font-size:18px;padding:12px 21px}.secondary:hover{background:#edf4ff}.slots{display:flex;justify-content:center;gap:clamp(7px,2vw,20px);padding:16px 0 10px}.slot{position:relative;flex:0 1 112px;aspect-ratio:1;background:#eff4fa;border:2px dashed #a4b7ce;border-radius:15px;display:grid;place-items:center;color:#71859c;font-size:43px;padding:4px;min-width:0}.slot.active{border-color:#245e9e;box-shadow:0 0 0 3px #245e9e2a}.slot.has{border:2px solid #172334;background:white;font-size:14px}.slot img,.lib-pic img{width:100%;height:100%;object-fit:contain;min-width:0;min-height:0;pointer-events:none;border-radius:7%}.slot-wrap{position:relative;flex:0 1 112px;min-width:0}.slot-wrap .slot{width:100%}.remove{position:absolute;right:-5px;top:-6px;border:1px solid #c6d0df;background:white;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;padding:0;font-weight:750;color:#8d3030}.hint,.muted,.status{font-size:13px;color:#526477}.hint{text-align:center}.tools,.footer-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.search-row{margin:10px 0}.search-row input{min-height:40px;border:1px solid #bfcede;border-radius:10px;background:white;padding:8px 12px;flex:1;min-width:120px}.library{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:14px;max-height:clamp(175px,28vh,350px);overflow-y:auto;padding:5px 5px 15px;overscroll-behavior:contain}.lib-item{min-width:0;text-align:center}.lib-pic{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:1;background:white;border:2px solid #172334;border-radius:13px;padding:6px;box-shadow:0 3px 4px #263a5020,0 8px 12px #263a502c}.lib-pic.used{border-color:#278b36;box-shadow:0 0 0 2px #278b3620}.lib-name{display:block;font-size:12px;font-weight:650;margin-top:6px;overflow-wrap:anywhere}.lib-edit{background:#e7eff9;border:0;border-radius:8px;padding:5px 8px;font-size:12px;margin-top:5px;min-height:32px}footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:auto}.status{min-height:1.2em}.empty{padding:20px;grid-column:1/-1;color:#526477}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:16px}.close{border:0;background:#edf3fa;border-radius:50%;font-size:24px;width:42px;height:42px;flex:none}dialog{border:1px solid #b4c5db;border-radius:19px;padding:22px;width:min(92vw,490px);max-height:90dvh;color:#172334;box-shadow:0 12px 50px #17233444}dialog::backdrop{background:#17233477}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}.field{display:grid;gap:5px;font-size:14px;font-weight:650;margin:12px 0}.field input,.field select{min-height:44px;border:1px solid #b4c5db;border-radius:9px;padding:8px 10px;width:100%}.dialog-note{color:#526477;font-size:14px;line-height:1.5;margin-bottom:10px}.error{color:#a62c2c;font-size:14px;margin-top:8px}.dialog-stack{display:grid;gap:10px}.danger{color:#a62c2c}.edit-preview{width:100px;height:100px;object-fit:contain;border:1px solid #b4c5db;border-radius:12px}
/* Julien : géométrie exacte du repère de référence 1024 × 768. */
#julien{position:fixed;inset:0;display:grid;place-items:center;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:manipulation} .preview{width:min(100vw,calc(100dvh * 4 / 3));aspect-ratio:4/3;position:relative;overflow:hidden;container-type:inline-size}.screen{position:absolute;inset:0;background:linear-gradient(135deg,#e8eff9 0%,#dce8f6 52%,#e3eaf5 100%);--main:325;--small:140;--unit:calc(100cqw / 1024);overflow:hidden}.title{position:absolute;top:calc(38 * var(--unit));left:0;width:100%;text-align:center;margin:0;padding:0;border:0;background:transparent;font-size:calc(78 * var(--unit));line-height:1.15;letter-spacing:-.035em;font-weight:850;color:#11161c}.big,.tile{padding:0;display:grid;place-items:center;background:white;border-style:solid;border-color:#171c23;overflow:hidden;box-shadow:0 calc(4 * var(--unit)) calc(9 * var(--unit)) #31496524}.big{position:absolute;width:calc(var(--main) * var(--unit));height:calc(var(--main) * var(--unit));left:50%;top:calc(350 * var(--unit));transform:translate(-50%,-50%);border-width:calc(4 * var(--unit));border-radius:calc(23 * var(--unit))}.big.selected{border-color:#278b36;border-width:calc(5 * var(--unit))}.velcro{width:35%;height:35%;border:1px solid #d2d7dc;border-radius:10%;background:radial-gradient(circle,#bdc5ce 17%,transparent 23%) 0 0/calc(5 * var(--unit)) calc(5 * var(--unit)),#edf0f3;box-shadow:0 2px 5px #0001}.big img,.tile img{width:92%;height:92%;object-fit:contain;pointer-events:none;border-radius:7%;min-width:0;min-height:0}.choices{position:absolute;bottom:calc(42 * var(--unit));left:0;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:calc(16 * var(--unit));padding-inline:calc(24 * var(--unit))}.tile{flex:none;width:calc(var(--small) * var(--unit));height:calc(var(--small) * var(--unit));border-width:calc(3 * var(--unit));border-radius:calc(13 * var(--unit));box-shadow:0 calc(3 * var(--unit)) calc(4 * var(--unit)) #263a5020,0 calc(10 * var(--unit)) calc(15 * var(--unit)) #263a502c}.tile.selected{border-color:#278b36;border-width:calc(4 * var(--unit))}.tile:active{transform:translateY(calc(2 * var(--unit)))}.unlock{position:absolute;top:0;right:0;width:calc(60 * var(--unit));height:calc(60 * var(--unit));border:0;background:transparent;touch-action:none}.unlock:focus-visible{outline-offset:-4px}.big img.arrive{animation:arrive .22s ease-out}@keyframes arrive{from{opacity:.6;transform:scale(.87)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.big img.arrive{animation:none}}#printArea{display:none}
@media(max-width:650px){#educator{gap:10px;padding:12px}.panel{padding:12px}.segments{gap:5px}.segments button{min-width:43px;padding:6px 10px}.step{width:30px;height:30px}.mode{font-size:11px;padding:7px 9px}.library{grid-template-columns:repeat(auto-fill,minmax(75px,1fr));gap:10px}.primary{font-size:15px}.footer-right{justify-content:flex-end}.slot-wrap{flex-basis:95px}.remove{width:23px;height:23px}.tools .secondary{font-size:13px;padding:7px 10px}}
@page{size:A4 landscape;margin:10mm}@media print{html,body{background:#fff!important;margin:0!important}#educator,#julien,dialog{display:none!important}#printArea{display:block!important;color:#000;width:100%;page-break-inside:avoid}.print-title{display:block;text-align:center;font-size:29pt;font-weight:850;margin:0 0 7mm}.print-target{width:75mm;height:75mm;border:1mm solid #000;border-radius:5mm;margin:0 auto 9mm}.print-row{display:flex;justify-content:center;gap:4mm}.print-card{width:32mm;height:32mm;border:.6mm solid #000;border-radius:3mm;display:grid;place-items:center;break-inside:avoid}.print-card img{width:92%;height:92%;object-fit:contain}.print-large .print-title{font-size:40pt}.print-large .print-target{width:108mm;height:108mm;margin-bottom:14mm}.print-large .print-card{width:47mm;height:47mm}.print-large .print-row{gap:6mm}}
/* Garder les actions visibles sur un iPad paysage standard. */
@media(min-width:651px) and (max-height:850px){#educator{padding:16px 24px;gap:10px}#educator h1{font-size:32px}.panel{padding:12px 16px}.step{width:34px;height:34px}.slots{padding:12px 0 8px}.slot-wrap{flex-basis:100px}.library{max-height:clamp(142px,23vh,190px);grid-template-columns:repeat(auto-fill,minmax(94px,1fr));gap:12px}.search-row{margin:7px 0}.status:empty{display:none}}
@media print{#printArea{margin:0!important}}

/* Après sélection : la géométrie de référence ne change jamais. */
.choices{transition:opacity .4s ease,visibility .4s ease}.tile{transition:filter .3s ease,opacity .3s ease}.tile.muted-choice{filter:grayscale(1);opacity:.28;pointer-events:none;cursor:default}@media(prefers-reduced-motion:reduce){.choices,.tile{transition:none}}

/* Pouce de confirmation, dans l’angle supérieur droit. */
.final-thumb{position:absolute;display:flex;align-items:center;pointer-events:none}
.final-thumb svg{width:calc(120 * var(--unit));height:calc(120 * var(--unit));fill:#36a553;stroke:#247d3b;stroke-width:2.5;stroke-linejoin:round}
.final-thumb.celebrate svg{animation:thumb-in .8s ease-out both}@keyframes thumb-in{0%{opacity:0;transform:scale(.65)}45%{opacity:1;transform:scale(1.10)}100%{opacity:1;transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.final-thumb.celebrate svg{animation:none}}

/* V1.0.3 : accès aidant identifiable, discret et protégé par une addition. */
.unlock{display:grid;place-items:center;top:calc(12 * var(--unit));right:calc(12 * var(--unit));border:0;border-radius:calc(12 * var(--unit));background:transparent;color:#63778e;touch-action:manipulation}.unlock svg{width:50%;height:50%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.unlock:active{background:#cbd9e9}.math-question{font-size:38px;font-weight:800;text-align:center;padding:14px;color:#245e9e;letter-spacing:.02em}#mathAnswer{font-size:24px;text-align:center;font-weight:700}


@media(min-width:651px) and (max-height:850px){#educator{gap:9px;padding:12px 20px}.library{max-height:clamp(125px,19vh,170px)}.slot-wrap{flex-basis:88px}.slots{padding:8px 0 5px}}


@media(min-width:900px) and (max-height:850px){#educator{gap:8px;padding:10px 20px}.panel{padding:9px 15px}.proposal-panel{display:grid;grid-template-columns:minmax(190px,1fr) 3fr;align-items:center;column-gap:10px}.proposal-panel .panel-head{align-self:start}.proposal-panel .slots{padding:4px 0;gap:12px}.proposal-panel .hint{grid-column:1/-1}.proposal-panel .slot-wrap{flex-basis:82px}.library{grid-template-columns:repeat(auto-fill,86px);max-height:115px;gap:12px;padding:4px 5px 8px}.search-row{margin:5px 0}.search-row input{min-height:36px}.status:empty{display:none}}

/* V1.0.7 — invitation visuelle en un seul cycle, avant un choix.
   Le transform ne modifie ni la taille de référence ni la géométrie de la rangée. */
.choices.awaiting-choice .tile{animation:invite-choice 2.15s ease-in-out 1;transform-origin:center bottom;}
.choices.awaiting-choice .tile:nth-child(2){animation-delay:.09s}
.choices.awaiting-choice .tile:nth-child(3){animation-delay:.18s}
.choices.awaiting-choice .tile:nth-child(4){animation-delay:.27s}
.choices.awaiting-choice .tile:nth-child(5){animation-delay:.36s}
.choices.awaiting-choice .tile:nth-child(6){animation-delay:.45s}
@keyframes invite-choice{
  0%,100%{transform:translateY(0) scale(1)}
  19%{transform:translateY(calc(-19 * var(--unit))) scale(1.085)}
  36%{transform:translateY(0) scale(1.025,.97)}
  51%{transform:translateY(calc(-11 * var(--unit))) scale(1.055)}
  69%{transform:translateY(0) scale(1)}
}
.choices.awaiting-choice .tile:active{animation-play-state:paused}
body:has(#dialog[open]) .choices.awaiting-choice .tile{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.choices.awaiting-choice .tile{animation:none}}

/* V1.0.9 — case centrale vide en retrait ; selected restaure le rendu normal. */
#target:not(.selected){opacity:.28;filter:grayscale(1);box-shadow:none}
#target:not(.selected) .velcro{box-shadow:none}

/* La carte choisie quitte son emplacement, qui devient un petit Velcro vide. */
.tile.vacated-choice{opacity:.28;filter:grayscale(1);box-shadow:none;pointer-events:none;cursor:default}
.tile.vacated-choice .velcro{box-shadow:none}


/* V1.0.13 : Velcro dans toutes les propositions vides du mode aidant. */
.slot:not(.has) .velcro{--unit:1px;pointer-events:none;box-shadow:none}

/* Confirmation immédiate : pouce dans l’angle du grand pictogramme. */
.final-thumb.corner{left:calc(641 * var(--unit));top:calc(159 * var(--unit));bottom:auto;width:calc(84 * var(--unit));height:calc(84 * var(--unit));border-radius:50%;background:#fff;box-shadow:0 calc(2 * var(--unit)) calc(7 * var(--unit)) #263a5025;z-index:2;justify-content:center}
.final-thumb.corner svg{width:calc(68 * var(--unit));height:calc(68 * var(--unit))}

/* V1.0.16 : les Velcros du démarrage restent pleinement visibles, sans relief. */
#screen.startup-empty #target:not(.selected),#screen.startup-empty .tile.vacated-choice{opacity:1;filter:none;box-shadow:none}

/* V1.0.17 — contrôles aidant uniquement. Le repère de Julien est intact. */
:root{--action-blue:#0869db;--action-gradient:linear-gradient(180deg,#197ce9 0%,#0967d5 100%)}
.segments button[aria-pressed=true],.primary{background:var(--action-gradient);border-color:#0860c8;color:white;box-shadow:0 3px 7px #0967d526}
.segments button[aria-pressed=true]:active,.primary:active{background:#075cc4}
.voice-panel,.protection-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.voice-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1;flex-wrap:wrap;font-size:14px;font-weight:650}
.voice-controls input{accent-color:var(--action-blue);width:clamp(110px,16vw,230px);min-height:40px;cursor:pointer}
.voice-controls output{min-width:57px;text-align:center;background:#e5effd;color:#075ebf;border-radius:8px;padding:6px 8px;font-weight:800;font-variant-numeric:tabular-nums}
.protect-label{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:650;min-height:44px;cursor:pointer}
.protect-label input{accent-color:var(--action-blue);width:24px;height:24px;flex:none;cursor:pointer}
.actions-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:0}
.utility-actions,.main-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.main-actions{margin-left:auto;justify-content:flex-end}
.main-actions button{min-height:54px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:17px;padding:12px 20px;white-space:nowrap}
.main-actions svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.reset-action{border:2px solid var(--action-blue);color:#0860c8;background:#fff;box-shadow:0 3px 7px #0967d51a}
.present-action svg{fill:currentColor;stroke:none}
.edit-image-button{display:flex;flex-direction:column;align-items:center;gap:8px;border:0;border-radius:12px;padding:8px;background:#edf4ff;margin:0 auto 14px;color:#0960c4;font-weight:650;font-size:13px}
.edit-image-button .edit-preview{display:block;width:140px;height:140px;background:white;pointer-events:none}
@media(max-width:850px){.voice-controls{justify-content:flex-start}.main-actions{width:100%;margin-left:0}.main-actions button{flex:1;white-space:normal}.utility-actions{margin-left:auto}}
@media(max-width:500px){.main-actions{flex-direction:column;align-items:stretch}.main-actions button{width:100%}.voice-controls{flex-basis:100%}.protection-panel h2{font-size:16px}}
@media(min-width:900px) and (max-height:850px){.voice-panel,.protection-panel{padding-block:8px}.voice-controls .secondary{min-height:40px}.actions-panel{padding-block:9px}}


/* V1.0.18 — icône de vidage plus explicite et protection avec corrélation cadenas. */
.reset-action svg circle{fill:currentColor;stroke:none}.reset-action svg path{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.reset-action{padding-inline:18px}
.protection-panel{align-items:flex-start}.protection-top{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}.protect-badges{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.lock-pill{display:inline-flex;align-items:center;gap:8px;border:1.8px solid #b7c8dd;background:#f4f8fd;color:#5f738a;border-radius:999px;padding:7px 11px;font-size:13px;font-weight:750;line-height:1}.lock-pill svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}.lock-pill svg circle{fill:currentColor;stroke:none}.lock-pill.is-active{border-color:#0a66d4;background:#e7f0fd;color:#0b60c4;box-shadow:0 2px 8px #0a66d41a}.protect-state-text{margin:0 0 0 calc(46px + 0px);font-size:13px;font-weight:650;color:#57708a}.unlock{color:#59718c}.unlock.is-open{color:#0b60c4}.unlock svg{width:54%;height:54%;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.unlock svg circle{fill:currentColor;stroke:none}
@media(max-width:700px){.protection-top{flex-direction:column;align-items:flex-start}.protect-state-text{margin-left:0}}


/* V1.0.19 — retour à une interface plus simple. */
.proposal-actions{display:flex;justify-content:flex-end;margin-top:10px}.proposal-panel .hint{display:none!important}.reset-action{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;padding:12px 18px;border:2px solid #0b66d4;color:#0b66d4;background:#fff;box-shadow:0 3px 7px #0967d51a;font-weight:800}.reset-action svg{width:24px;height:24px}.reset-action svg circle{fill:currentColor;stroke:none}.reset-action svg path{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.actions-panel .main-actions{margin-left:auto}.actions-panel .utility-actions{margin-right:auto}.actions-panel .main-actions button{min-width:min(340px,42vw)}
.protection-panel{align-items:center}.protect-label{margin-top:4px}.protect-state-text{margin:2px 0 0 calc(46px + 0px);font-size:13px;font-weight:650;color:#57708a}.protection-top,.protect-badges,.lock-pill{display:none!important}
.unlock.edit-access{display:grid;place-items:center;top:calc(14 * var(--unit));right:calc(14 * var(--unit));width:calc(62 * var(--unit));height:calc(62 * var(--unit));border:1px solid #b6c4d4;border-radius:calc(14 * var(--unit));background:#dfe8f2;box-shadow:inset 0 1px 0 #ffffffc8,0 1px 2px #6e82971a;color:#58708a}.unlock.edit-access svg{width:56%;height:56%;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.unlock.edit-access.is-open,.unlock.edit-access.is-locked{color:#58708a}.unlock.edit-access:active{background:#d6e1ec}.unlock.edit-access svg rect{rx:4}.unlock.edit-access::before{content:'';position:absolute;inset:calc(-2 * var(--unit));border-radius:calc(16 * var(--unit));box-shadow:0 0 0 1px #c4cfdb;pointer-events:none}
@media(max-width:850px){.proposal-actions{justify-content:stretch}.proposal-actions .reset-action{width:100%}.actions-panel .main-actions button{min-width:0;width:100%}}

/* V1.0.21 — uniquement les icônes et le bouton validés dans la maquette. */
.reset-action img{width:30px;height:30px;object-fit:contain;flex:none;pointer-events:none}
.unlock.edit-access{right:10px;top:10px;width:40px;height:40px;border:1px solid #b7c9dd;border-radius:10px;background:#e9f1fa;color:#355876;padding:0;box-shadow:none;z-index:100}
.unlock.edit-access::before{content:none}
.unlock.edit-access img{width:26px;height:26px;object-fit:contain;pointer-events:none}
.unlock.edit-access:active{background:#dce6f0}

/* V1.0.22 — en-tête, écoute facultative, portrait adapté à l’iPad CAA. */
.editor-header{display:flex;gap:12px;align-items:center;justify-content:space-between}.gear-access{width:52px;height:52px;flex:none;display:grid;place-items:center;border:1px solid #b7c9dd;border-radius:12px;background:#e9f1fa;color:#355876;padding:0}.gear-access svg{width:29px;height:29px}.editor-header .present-action{min-height:52px;flex:1;display:flex;align-items:center;justify-content:center;gap:9px}.present-action svg{width:22px;height:22px;fill:currentColor;flex:none}
.proposal-actions{align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;grid-column:1/-1}.listen-option{display:flex;align-items:center;gap:8px;min-height:44px;font-size:14px;font-weight:650}.listen-option input{width:24px;height:24px;accent-color:var(--action-blue);flex:none}.proposal-actions .reset-action{width:auto;margin-left:auto}.slot-wrap{display:flex;flex-direction:column;align-items:center}.slot-wrap .slot{flex:none}.listen-button{display:grid;place-items:center;width:44px;height:44px;padding:5px;border:0;background:transparent;box-shadow:none;flex:none;margin:5px auto 0}.listen-button img{width:32px;height:32px;object-fit:contain;pointer-events:none}.listen-button:active:not(:disabled){opacity:.6}.listen-button:disabled{opacity:.35;cursor:default}
.choice-wrap{display:flex;flex-direction:column;align-items:center;flex:none;width:calc(var(--small) * var(--unit));}.choices.with-listen .choice-wrap{height:calc(var(--small) * var(--unit) + 52px)}.choices.with-listen{bottom:calc(10 * var(--unit))}.choices .listen-button{margin-top:8px}.choices.awaiting-choice .choice-wrap:nth-child(2) .tile{animation-delay:.09s}.choices.awaiting-choice .choice-wrap:nth-child(3) .tile{animation-delay:.18s}.choices.awaiting-choice .choice-wrap:nth-child(4) .tile{animation-delay:.27s}.choices.awaiting-choice .choice-wrap:nth-child(5) .tile{animation-delay:.36s}
.voice-settings{display:grid;gap:10px;background:#eff4fa;border:1px solid #d4e1ef;border-radius:12px;padding:13px;color:#294b6e}.voice-settings h3{margin:0;font-size:16px}.voice-label{font-size:14px}.voice-menu-toggle{text-align:left;font-size:14px;white-space:normal;position:relative;padding-right:28px}.voice-menu-toggle:after{content:'⌄';position:absolute;right:12px;top:10px}.voice-list{max-height:200px;overflow:auto;border:1px solid #b7c9dd;border-radius:8px;background:white}.voice-option{display:block;width:100%;text-align:left;border:0;background:white;min-height:44px;padding:8px 10px;font-size:14px}.voice-option[aria-pressed=true]{background:#dbeafe;color:#075ebf;font-weight:700}.voice-test{min-height:44px;font-size:14px}.voice-rate-label{display:flex;justify-content:space-between;border-top:1px solid #d4e1ef;padding-top:12px;font-size:14px}.voice-settings input[type=range]{width:100%;accent-color:var(--action-blue);min-height:36px}.voice-settings .dialog-note{margin:0;font-size:12px}
@media(max-width:650px){.proposal-actions .reset-action{width:100%}.editor-header .present-action{font-size:15px}.gear-access{width:48px;height:48px}}
@media(orientation:portrait){.preview{width:100vw;height:100vh;height:100dvh;aspect-ratio:auto}.screen{--unit:min(1px,calc(100vw / 768),calc(100dvh / 900));--main:325;--small:130}.title{top:7.4%;font-size:calc(64 * var(--unit))}.big{top:36%}.choices,.choices.with-listen{bottom:auto;top:69%;padding:0;gap:calc(14 * var(--unit));align-items:flex-start}.final-thumb.corner{left:calc(50% + 129 * var(--unit));top:calc(36% - 194 * var(--unit))}.unlock.edit-access{top:12px;right:12px}}
@media(orientation:landscape) and (max-height:500px){.choices.with-listen .choice-wrap{height:calc(var(--small) * var(--unit) + 36px)}.choices .listen-button{width:34px;height:34px;margin-top:2px}.choices .listen-button img{width:26px;height:26px}}


/* V1.0.23 — alignement exact des commandes, sans titre ni logo aidant. */
#educator{--count-inset:20px;--count-size:68px;--count-gap:8px;--step-size:38px;--gear-size:48px;--count-width:calc(4 * var(--count-size) + 3 * var(--count-gap))}
#educator .count-panel{padding-inline:var(--count-inset)}
#educator .segments{gap:var(--count-gap);width:var(--count-width);flex:none;margin-left:auto}
#educator .segments button{width:var(--count-size);min-width:0;flex:none;padding-inline:0}
#educator .editor-header{display:flex;justify-content:space-between;align-items:center;padding-left:calc(1px + var(--count-inset) + (var(--step-size) - var(--gear-size)) / 2);padding-right:calc(1px + var(--count-inset));gap:12px}
#educator .gear-access{width:var(--gear-size);height:var(--gear-size);flex:none}
#educator .editor-header .present-action{flex:0 0 var(--count-width);width:var(--count-width);min-width:0;min-height:52px;padding:8px;white-space:normal;line-height:1.2}
/* La rangée occupe toute la largeur du chapitre 2, comme dans la maquette. */
#educator .proposal-panel{display:block}
#educator .proposal-panel .slots{padding:12px 0 6px;gap:clamp(12px,3vw,32px)}
#educator .proposal-panel .slot-wrap{flex:0 1 112px}
/* Icône de lecture secondaire : contour discret, bleu doux, sans relief. */
.listen-button{border:1px solid #abc2de;border-radius:11px;background:#eaf2fa;color:#376da9;box-shadow:none;width:44px;height:44px;padding:7px}
.listen-button img{width:26px;height:26px}
.listen-button:active:not(:disabled){opacity:1;background:#d7e6f7}
@media(min-width:651px) and (max-height:850px){#educator{--count-inset:16px;--step-size:34px}}
@media(min-width:900px) and (max-height:850px){#educator{--count-inset:15px}#educator .proposal-panel .slot-wrap{flex-basis:100px}}
@media(max-width:650px){#educator{--count-inset:12px;--count-size:43px;--count-gap:5px;--step-size:30px;--gear-size:44px}#educator .editor-header .present-action{font-size:15px}#educator .proposal-panel .slots{gap:8px}#educator .proposal-panel .slot-wrap{flex-basis:95px}}
@media(orientation:landscape) and (max-height:500px){.choices .listen-button{padding:4px;border-radius:8px}.choices .listen-button img{width:22px;height:22px}}
/* Des cartes parfaitement carrées malgré les proportions intrinsèques des images. */
#educator .proposal-panel .slot-wrap .slot{contain:size;aspect-ratio:1;min-height:0;overflow:hidden}

/* V1.0.24 — écoute individuelle ; seule la position des haut-parleurs change en portrait. */
@media(orientation:portrait){
 .choices .listen-button{margin-top:35px}
 .choices.with-listen .choice-wrap{height:calc(var(--small) * var(--unit) + 79px)}
}
.choices .tile.listen-bounce{animation:listen-bounce .7s ease-in-out 1;transform-origin:center bottom}
@keyframes listen-bounce{
 0%,100%{transform:translateY(0) scale(1)}
 30%{transform:translateY(calc(-16 * var(--unit))) scale(1.06)}
 57%{transform:translateY(0) scale(1.015,.98)}
 75%{transform:translateY(calc(-6 * var(--unit))) scale(1.025)}
}
@media(prefers-reduced-motion:reduce){.choices .tile.listen-bounce{animation:none}}

/* V1.0.27 — verrou global, séparé du retour aidant. */
#globalGate[hidden],#globalDelay[hidden]{display:none!important}
#globalGate{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:auto;padding:24px;background:linear-gradient(135deg,#e8eff9,#dce8f6 52%,#e3eaf5);color:#25496d}
.global-card{width:min(100%,440px);display:flex;flex-direction:column;align-items:center;gap:14px;padding:30px 26px;border:1px solid #b7c9dd;background:#f5f8fc;border-radius:22px;text-align:center;box-shadow:0 8px 32px #28466b12}
.global-card h1{font-size:30px;margin:0;outline:none}.global-card p{margin:0;line-height:1.4}.global-card .math-question{font-size:40px;font-weight:800;color:#25496d}.global-card label{font-weight:650}.global-card input{width:140px;text-align:center;font-size:26px;padding:10px;border:1.5px solid #a6bad2;border-radius:10px;background:white}.global-card .primary{min-width:200px}.global-card .error:empty{display:none}.global-lock-icon{width:46px;height:46px}
.global-protection-settings{flex-basis:100%;display:grid;gap:6px;padding-bottom:10px;border-bottom:1px solid #d4e1ef}.global-delay{display:flex;gap:14px;align-items:center;flex-wrap:wrap;padding-left:46px;font-size:14px;color:#294b6e}.global-delay label{display:flex;gap:6px;align-items:center;cursor:pointer}.global-delay input{accent-color:#0869db;width:20px;height:20px}.edition-protection-title{margin:0;font-size:16px;flex-basis:100%;color:#294b6e}.global-protection-settings .protect-state-text{margin-left:46px}
@media(max-height:470px){.global-card{gap:6px;padding:12px 18px}.global-lock-icon{width:34px;height:34px}.global-card h1{font-size:24px}.global-card .math-question{font-size:30px}}
@media(max-width:650px){.global-delay,.global-protection-settings .protect-state-text{padding-left:0;margin-left:0}.global-delay{gap:9px}.global-card{padding:24px 18px}}
@media print{#globalGate{display:none!important}body:has(#globalGate:not([hidden])) #printArea{display:none!important}}

/* V1.0.28 — Bibliothèque exclusivement dans une fenêtre ouverte par une proposition. */
.slot-instruction{font-size:13px;color:#526477;margin:10px 0 0;text-align:center;line-height:1.35}
#educator .proposal-panel .slots{padding-top:10px}
#educator .slot{cursor:pointer}
#educator .slot:not(.has):active{background:#e0edfa}
#libraryDialog{width:min(96vw,1000px);height:min(91dvh,830px);max-height:91dvh;padding:18px 22px;border-radius:20px;overflow:hidden}
#libraryDialog[open]{display:flex;flex-direction:column;gap:10px}
#libraryDialog .library-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;padding-bottom:8px;border-bottom:1px solid #d4e1ef}
#libraryDialog .library-dialog-head h2{font-size:clamp(21px,3vw,27px);outline:none}
#libraryDialog .library-dialog-context{font-size:14px;color:#526477;margin-top:3px}
#libraryDialog .library-panel{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden;background:transparent;border:0;box-shadow:none;padding:2px 0 0;border-radius:0}
#libraryDialog .library-panel h3{font-size:17px;font-weight:750;margin:0}
#libraryDialog .library-panel .panel-head{flex:none}
#libraryDialog .search-row{flex:none;margin:10px 0}
#libraryDialog .library{flex:1;min-height:0;max-height:none;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));align-content:start;gap:14px;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:5px 6px 15px}
#libraryDialog #pickerStatus{flex:none;min-height:0;padding-top:2px;line-height:1.4}
#libraryDialog #pickerStatus:empty{display:none}
@media(max-width:650px){#libraryDialog{width:96vw;padding:12px;height:91dvh}#libraryDialog .library{grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:10px}#libraryDialog .library-dialog-head h2{font-size:20px}#libraryDialog .library-panel h3{font-size:15px}#libraryDialog .tools .secondary{min-height:40px}}
@media(max-height:530px){#libraryDialog{height:96dvh;max-height:96dvh;padding:10px 15px}#libraryDialog .library-dialog-head{padding-bottom:4px}#libraryDialog .search-row{margin:5px 0}#libraryDialog .library{gap:9px}}
@media print{#libraryDialog{display:none!important}}

/* V1.0.29 — Protection : distinguer lancement et utilisation. */
#educator .protection-panel{display:block}
#educator .protection-panel>h2{margin-bottom:13px}
.protection-group{border:1px solid #d4e1ef;background:#f1f6fc;border-radius:14px;padding:14px 16px;margin:10px 0}
.protection-group-title{display:flex;align-items:center;gap:9px;margin:0 0 12px;font-size:16px;font-weight:760;color:#294b6e}
.protection-icon{font-size:19px;width:24px;text-align:center;line-height:1.2}
.protection-group .global-protection-settings{border:0;padding:0;gap:10px}
.protection-group .protect-state-text{margin:6px 0 0 36px;font-size:12px;color:#657c95;line-height:1.4}
.protection-group .global-delay{padding-left:36px}
@media(max-width:650px){.protection-group{padding:13px 12px}.protection-group .protect-state-text{margin-left:0}.protection-group .global-delay{padding-left:0}}

/* V1.0.29 — Ergonomie de l’Agenda : galerie, aperçu, sélection explicite et barre d’actions. */
#libraryDialog{width:min(96vw,1080px);height:min(92dvh,860px);max-height:92dvh;padding:0;gap:0;background:#fff;border-radius:19px}
#libraryDialog[open]{display:flex;flex-direction:column;gap:0}
#libraryDialog .library-dialog-head{display:flex;align-items:center;padding:15px 21px 12px;background:#f2f6ff;border-bottom:2px solid #2b70c7;flex:none}
#libraryDialog .library-dialog-context{font-weight:650;color:#56728e}
#libraryDialog .picker-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,28%);gap:0;flex:1;min-height:0;overflow:hidden}
#libraryDialog .picker-gallery{display:flex;min-height:0;min-width:0;flex-direction:column;padding:14px 17px 0;overflow:hidden}
#libraryDialog .picker-gallery-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}
#libraryDialog .picker-gallery-head h3,#libraryDialog .picker-preview h3{font-size:17px;font-weight:750;margin:0;color:#24486d}
#libraryDialog #manage{padding:8px 13px;min-height:42px}
#libraryDialog #manage[aria-pressed=true]{color:#0a5eb5;background:#dceaff;border-color:#2570bf}
#libraryDialog .picker-tabs{display:flex;gap:5px;padding:4px;background:#f2f6fc;border:1px solid #cad9e9;border-radius:11px;margin-top:11px;flex:none}
#libraryDialog .picker-tab{min-height:41px;border:0;border-radius:8px;padding:7px 12px;background:transparent;color:#375779;font-size:14px;font-weight:750;flex:1}
#libraryDialog .picker-tab[aria-selected=true]{background:#1c6bd2;color:white;box-shadow:0 2px 5px #1c6bd22d}
#libraryDialog .search-row{margin:10px 0 7px;flex:none;align-items:center}
#libraryDialog #search{min-width:0;flex:1;font-size:16px}
#libraryDialog .library{grid-template-columns:repeat(auto-fill,minmax(93px,1fr));gap:11px;flex:1;min-height:0;max-height:none;padding:4px 6px 15px;overflow-y:auto;align-content:start;-webkit-overflow-scrolling:touch}
#libraryDialog .lib-item{min-width:0}
#libraryDialog .lib-name{font-size:11px;line-height:1.2;overflow-wrap:anywhere}
#libraryDialog .picker-tile{position:relative;touch-action:pan-y;border-radius:12px;min-height:88px;padding:4px;transition:background-color .12s ease,border-color .12s ease}
#libraryDialog .picker-tile img{pointer-events:none;-webkit-user-drag:none}
#libraryDialog .picker-tile.is-selected{background:#d5e7ff;border:3px solid #1768d3;box-shadow:0 2px 9px #1768d330}
#libraryDialog .picker-tile-check{position:absolute;right:-5px;top:-6px;width:25px;height:25px;border-radius:50%;color:white;background:#146bd3;font-size:17px;font-weight:900;display:grid;place-items:center;border:2px solid #fff}
#libraryDialog .picker-import{min-height:125px;align-self:start;background:#eef5ff;border:2px dashed #6c9bd1;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#205c9f;padding:6px;font-size:12px;font-weight:750;line-height:1.2}
#libraryDialog .picker-import-plus{font-size:34px;line-height:1;font-weight:500}
#libraryDialog .picker-import:active{background:#d7eaff}
#libraryDialog .empty{grid-column:2/-1;padding:12px;text-align:left}
#libraryDialog .picker-preview{min-height:0;display:flex;flex-direction:column;padding:14px 16px;border-left:1px solid #cbd9e7;background:#e8f0fa;gap:13px}
#libraryDialog .picker-preview-content{display:flex;flex-direction:column;align-items:center;min-height:0;gap:13px}
#libraryDialog .picker-preview-frame{display:grid;place-items:center;width:min(100%,202px);aspect-ratio:1;background:white;border:2px solid #aec8e7;border-radius:15px;padding:8px;overflow:hidden}
#libraryDialog .picker-preview-frame img{width:100%;height:100%;object-fit:contain}
#libraryDialog .picker-preview-frame .velcro{width:85%;height:85%}
#libraryDialog .picker-preview-details{text-align:center;max-width:100%}
#libraryDialog .picker-preview-name{font-size:15px;font-weight:750;overflow-wrap:anywhere;color:#18385a}
#libraryDialog .picker-preview-help{font-size:12px;line-height:1.4;color:#657a8f;margin-top:8px}
#libraryDialog .picker-listen{font-size:14px;min-height:45px;margin-top:2px}
#libraryDialog .picker-footer{flex:none;display:flex;justify-content:flex-end;gap:10px;padding:11px 19px;border-top:1px solid #d2e0ef;background:#f8fbff}
#libraryDialog .picker-footer button{min-height:47px;font-size:15px}
#libraryDialog #pickerConfirm{min-width:215px}
#libraryDialog #pickerStatus{font-size:12px;min-height:0;padding-bottom:3px}
#libraryDialog #pickerStatus:empty{display:none}
@media(max-width:820px) and (orientation:portrait){
 #libraryDialog .picker-workspace{display:flex;flex-direction:column}
 #libraryDialog .picker-preview{order:-1;flex:none;padding:8px 14px;border-left:0;border-bottom:1px solid #cbd9e7;gap:0}
 #libraryDialog .picker-preview h3{display:none}
 #libraryDialog .picker-preview-content{flex-direction:row;justify-content:center;gap:16px;align-items:center}
 #libraryDialog .picker-preview-frame{height:86px;width:86px;flex:none;padding:4px;border-radius:10px}
 #libraryDialog .picker-preview-details{text-align:left;flex:1}
 #libraryDialog .picker-listen{position:absolute;right:35px;top:156px;width:130px;min-height:36px;font-size:12px;max-width:32%}
 #libraryDialog .picker-preview-details{padding-right:0}
 #libraryDialog .picker-gallery{padding:12px 14px 0;flex:1}
 #libraryDialog .library{grid-template-columns:repeat(auto-fill,minmax(97px,1fr))}
}
@media(max-width:650px){
 #libraryDialog{height:95dvh;max-height:95dvh;width:97vw}
 #libraryDialog .library-dialog-head{padding:11px 12px 9px}
 #libraryDialog .library-dialog-head h2{font-size:19px}
 #libraryDialog .picker-gallery{padding:9px 10px 0}
 #libraryDialog .picker-gallery-head h3{font-size:14px}
 #libraryDialog .picker-tab{font-size:12px;padding:6px 4px}
 #libraryDialog .library{grid-template-columns:repeat(auto-fill,minmax(79px,1fr));gap:8px}
 #libraryDialog .picker-import{min-height:113px}
 #libraryDialog .picker-preview{padding:6px 11px}
 #libraryDialog .picker-preview-frame{width:71px;height:71px}
 #libraryDialog .picker-preview-help{display:none}
 #libraryDialog .picker-listen{display:none}
 #libraryDialog .picker-footer{padding:8px 11px}
 #libraryDialog #pickerConfirm{min-width:0;flex:1}
 #libraryDialog .picker-footer button{font-size:13px}
}
@media(orientation:landscape) and (max-height:540px){
 #libraryDialog{height:96dvh;max-height:96dvh}
 #libraryDialog .library-dialog-head{padding:7px 13px}
 #libraryDialog .picker-gallery{padding:6px 12px 0}
 #libraryDialog .picker-preview{padding:8px 12px;gap:7px}
 #libraryDialog .picker-preview-frame{max-width:140px}
 #libraryDialog .picker-tabs{margin-top:5px}
 #libraryDialog .search-row{margin:5px 0}
 #libraryDialog .picker-footer{padding:6px 13px}
}
@media print{#libraryDialog{display:none!important}}
/* V1.0.29 — aperçu portrait : l'écoute reste dans le flux, sans chevauchement. */
@media(max-width:820px) and (orientation:portrait) and (min-width:651px){
 #libraryDialog .picker-preview{flex-direction:row;align-items:center;gap:10px}
 #libraryDialog .picker-preview-content{flex:1;min-width:0;justify-content:flex-start}
 #libraryDialog .picker-preview-details{min-width:0}
 #libraryDialog .picker-listen{position:static;right:auto;top:auto;flex:0 0 126px;width:126px;max-width:none;min-height:39px;margin:0;align-self:center}
}


/* V1.0.30 preview and import refinements */
.proposal-audio-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.audio-legend{display:inline-flex;align-items:center;gap:8px;color:#355474;font-weight:700;font-size:14px}
.audio-legend img{width:26px;height:26px;display:block}
#libraryDialog .picker-preview-frame{display:grid;place-items:center;width:min(100%,202px);aspect-ratio:1;background:white;border:2px solid #aec8e7;border-radius:15px;padding:8px;overflow:hidden}
#libraryDialog .picker-preview-frame .velcro{width:62%;height:62%}
#libraryDialog .picker-preview-name-cell{margin:0;display:flex;align-items:center;justify-content:center;min-height:52px;padding:10px 14px;border:2px solid #3a7bd5;border-radius:12px;background:#dfeafb;color:#214a78;font-size:18px;font-weight:760;line-height:1.2;text-align:center;overflow-wrap:anywhere;box-shadow:inset 0 1px 0 #ffffff80}
#libraryDialog .picker-preview-details{width:100%}
#libraryDialog .picker-listen.icon-only{display:grid;place-items:center;width:56px;height:56px;min-height:56px;padding:0;border-radius:14px;align-self:center}
#libraryDialog .picker-listen.icon-only img{width:28px;height:28px;display:block}
#libraryDialog .picker-import{position:relative;display:grid;place-items:center;padding:0}
#libraryDialog .picker-import-plus{display:grid;place-items:center;width:100%;height:100%;font-size:58px;font-weight:300;color:#3a7bd5;line-height:1}
#libraryDialog .picker-import .lib-name{margin-top:6px}
#libraryDialog .picker-preview-content{display:flex;flex-direction:column;align-items:center;min-height:0;gap:13px;width:100%}
@media (max-width: 860px){#libraryDialog .picker-preview-name-cell{font-size:16px;min-height:48px}}
@media (max-width: 640px){#libraryDialog .picker-listen.icon-only{width:48px;height:48px;min-height:48px}#libraryDialog .picker-listen.icon-only img{width:24px;height:24px}}


/* V1.0.31 — sélection simple, édition du nom et gestion par appui long */
#libraryDialog .picker-gallery-head{justify-content:flex-start}
#libraryDialog .picker-preview-details{width:100%;min-width:0;max-width:100%}
#libraryDialog .picker-name-label{display:block;color:#345777;font-size:13px;font-weight:750;margin:0 0 6px}
#libraryDialog input.picker-preview-name-cell{
 display:block;width:100%;max-width:100%;box-sizing:border-box;height:auto;min-height:48px;
 border:2px solid #1267dd;border-radius:11px;background:#d4e5ff;
 padding:9px 12px;color:#183e6a;font-size:17px;font-weight:760;line-height:1.35;
 text-align:left;appearance:none;-webkit-appearance:none;
}
#libraryDialog input.picker-preview-name-cell:focus{outline:2px solid #0755bf;outline-offset:1px;background:#fff}
#libraryDialog input.picker-preview-name-cell:disabled{background:#edf2f9;border-color:#c0d1e5;color:#536b83;opacity:1;-webkit-text-fill-color:#536b83}
#libraryDialog .picker-preview-frame.is-empty{background:#eff4fa;border:2px dashed #a4b7ce;box-shadow:none}
#libraryDialog .picker-preview-frame .velcro{--unit:1px;width:35%;height:35%;box-shadow:none}
/* La case d'importation possède exactement la même surface carrée que les images. */
#libraryDialog .picker-import{
 display:grid;place-items:center;width:100%;height:auto;aspect-ratio:1;min-height:0;
 border:2px dashed #6c9bd1;padding:4px;background:#eef5ff;
 box-shadow:none;align-self:stretch;flex:none;
}
#libraryDialog .picker-import-plus{font-size:46px;line-height:1}
#libraryDialog .picker-import:focus-visible{outline:3px solid #125ed0;outline-offset:2px}
#libraryDialog .lib-item .lib-name{text-align:center}
#libraryDialog .picker-tile{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
#libraryDialog .picker-tile img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
@media(max-width:820px) and (orientation:portrait){
 #libraryDialog .picker-preview-details{flex:1}
 #libraryDialog .picker-name-label{font-size:12px;margin-bottom:4px}
 #libraryDialog input.picker-preview-name-cell{font-size:15px;min-height:43px}
}
@media(max-width:650px){
 #libraryDialog .picker-name-label{font-size:11px}
 #libraryDialog input.picker-preview-name-cell{font-size:14px;min-height:39px}
}
/* Aperçu réellement carré et boutons dans le flux sur les iPad en portrait. */
@media (max-width:820px) and (orientation:portrait){
 #libraryDialog .picker-preview{display:flex;flex-direction:row;align-items:center;gap:10px;padding:10px 14px}
 #libraryDialog .picker-preview-content{display:flex;flex-direction:row;flex:1;min-width:0;align-items:center;justify-content:flex-start;gap:12px}
 #libraryDialog .picker-preview-frame{display:grid;width:96px;height:96px;aspect-ratio:1;flex:0 0 96px;padding:5px}
 #libraryDialog .picker-preview-details{flex:1;min-width:0;width:auto}
 #libraryDialog .picker-listen.icon-only{position:static;top:auto;right:auto;display:grid;place-items:center;align-self:center;flex:0 0 52px;width:52px;height:52px;min-height:52px;max-width:none;margin:0}
}
@media (max-width:650px) and (orientation:portrait){
 #libraryDialog .picker-preview{gap:7px;padding:9px 10px}
 #libraryDialog .picker-preview-content{gap:8px}
 #libraryDialog .picker-preview-frame{width:75px;height:75px;flex-basis:75px;padding:4px}
 #libraryDialog .picker-listen.icon-only{display:grid;flex:0 0 43px;width:43px;height:43px;min-height:43px}
 #libraryDialog .picker-name-label{font-size:10px;margin-bottom:3px}
 #libraryDialog input.picker-preview-name-cell{min-height:42px;padding:7px;font-size:12px}
}


/* V1.0.32 slots harmonised */
#educator .slot:not(.has){border-color:#245e9e;background:#eff4fa;}
#educator .slot:not(.has):hover{background:#e8f1fb;}
#educator .slot.active{border-color:#245e9e;box-shadow:none;}


/* V1.0.33 — Vue Julien sur iPhone exclusivement.
   Les iPad conservent intégralement leur géométrie validée.
   Pour rendre 4 ou 5 propositions réellement plus grandes sur un téléphone,
   la rangée passe sur deux lignes (3 + 1 ou 3 + 2).
*/
@media screen and (max-width:600px) and (orientation:portrait){
  #julien .preview{width:100vw;height:100vh;height:100dvh;aspect-ratio:auto}
  #julien .screen{
    --unit:min(1px,calc(100vw / 390),calc(100dvh / 770));
    --main:265;
    --small:113;
  }
  #julien .title{top:7%;font-size:calc(52 * var(--unit));line-height:1.15}
  #julien .big{top:35%;border-width:calc(4 * var(--unit));border-radius:calc(20 * var(--unit))}
  #julien .big.selected{border-width:calc(5 * var(--unit))}
  #julien .choices,
  #julien .choices.with-listen{
    top:62%;bottom:auto;left:0;width:100%;
    padding-inline:calc(8 * var(--unit));
    gap:calc(10 * var(--unit));
    flex-wrap:wrap;justify-content:center;align-content:flex-start;align-items:flex-start;
  }
  #julien .choices[data-count="2"]{--small:144;top:69%}
  #julien .choices[data-count="3"]{--small:117;top:69%}
  #julien .choices[data-count="4"],
  #julien .choices[data-count="5"]{top:62%}
  #julien .choices.with-listen[data-count="2"],
  #julien .choices.with-listen[data-count="3"]{top:63%}
  #julien .choices.with-listen[data-count="4"],
  #julien .choices.with-listen[data-count="5"]{top:56%}
  #julien .choice-wrap{width:calc(var(--small) * var(--unit))}
  #julien .choices.with-listen .choice-wrap{height:calc(var(--small) * var(--unit) + 47 * var(--unit))}
  #julien .choices .listen-button{margin-top:calc(5 * var(--unit));width:calc(42 * var(--unit));height:calc(42 * var(--unit));padding:calc(6 * var(--unit))}
  #julien .choices .listen-button img{width:calc(26 * var(--unit));height:calc(26 * var(--unit))}
  #julien .final-thumb.corner{
    left:calc(50% + 98 * var(--unit));
    top:calc(35% - 168 * var(--unit));
    width:calc(65 * var(--unit));height:calc(65 * var(--unit));
  }
  #julien .final-thumb.corner svg{width:calc(54 * var(--unit));height:calc(54 * var(--unit))}
}
/* Téléphones compacts, y compris iPhone SE : libérer de la hauteur. */
@media screen and (max-width:600px) and (max-height:740px) and (orientation:portrait){
  #julien .big{top:33%}
  #julien .choices[data-count="2"],#julien .choices[data-count="3"]{top:64%}
  #julien .choices[data-count="4"],#julien .choices[data-count="5"]{top:57%}
  #julien .choices.with-listen[data-count="2"],#julien .choices.with-listen[data-count="3"]{top:60%}
  #julien .choices.with-listen[data-count="4"],#julien .choices.with-listen[data-count="5"]{top:55%}
  #julien .final-thumb.corner{top:calc(33% - 168 * var(--unit))}
}
/* Orientation paysage d'un téléphone : case principale à gauche, choix à droite. */
@media screen and (max-width:950px) and (max-height:500px) and (orientation:landscape){
  #julien .preview{width:100vw;height:100vh;height:100dvh;aspect-ratio:auto}
  #julien .screen{--unit:min(1px,calc(100vw / 780),calc(100dvh / 420));--main:246;--small:105}
  #julien .title{top:6%;left:2%;width:45%;font-size:calc(39 * var(--unit))}
  #julien .big{left:25%;top:54%;border-radius:calc(19 * var(--unit))}
  #julien .choices,#julien .choices.with-listen{
    left:48%;top:25%;bottom:auto;width:52%;padding-inline:calc(5 * var(--unit));
    display:flex;flex-wrap:wrap;align-items:flex-start;align-content:center;
    justify-content:center;gap:calc(9 * var(--unit));
  }
  #julien .choices[data-count="2"],#julien .choices[data-count="3"]{--small:112;top:36%}
  #julien .choices[data-count="4"],#julien .choices[data-count="5"]{--small:116;top:21%}
  #julien .choices.with-listen[data-count="2"],#julien .choices.with-listen[data-count="3"]{top:28%}
  #julien .choices.with-listen[data-count="4"],#julien .choices.with-listen[data-count="5"]{top:12%}
  #julien .choice-wrap{width:calc(var(--small) * var(--unit))}
  #julien .choices.with-listen .choice-wrap{height:calc(var(--small) * var(--unit) + 36 * var(--unit))}
  #julien .choices .listen-button{margin-top:calc(3 * var(--unit));width:calc(33 * var(--unit));height:calc(33 * var(--unit));padding:calc(4 * var(--unit))}
  #julien .choices .listen-button img{width:calc(23 * var(--unit));height:calc(23 * var(--unit))}
  #julien .final-thumb.corner{left:calc(25% + 90 * var(--unit));top:calc(54% - 151 * var(--unit));width:calc(62 * var(--unit));height:calc(62 * var(--unit))}
  #julien .final-thumb.corner svg{width:calc(52 * var(--unit));height:calc(52 * var(--unit))}
  #julien .unlock.edit-access{top:9px;right:9px}
}
