/* 2.70 — Le Coran au centre de la salle (Arabic Quran, section C : 17, 18, 24). */
body.is-connected:has(.workspace-view[data-view=quran]:not([hidden])){--live-panel-width:clamp(380px,42vw,760px)}
@media(max-width:900px){body.is-connected:has(.workspace-view[data-view=quran]:not([hidden])){--live-panel-width:min(100vw - 24px,560px)}}
.quran-classroom{--quran-size:1.75rem;--quran-paper:#f8f2e2;--quran-ink:#1f1a12;--quran-gold:#9a6b14;--quran-gold-ink:#6b4706;--quran-line:#d9c9a3;--quran-cursor:#ffd65a;--quran-range:#fff0b3;display:flex;flex-direction:column;gap:10px;min-width:0}
.quran-classroom[hidden],.quran-classroom [hidden]{display:none!important}
.quran-nav{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.quran-pager,.quran-jump{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.quran-pager input{width:4.5em;text-align:center}.quran-page-number{display:inline-flex;align-items:center;gap:6px}.quran-page-total{color:var(--muted,#9aa4b1);font-size:.85rem}
.quran-step{min-width:44px;font-size:1.3rem;line-height:1}
.quran-jump select{max-width:13em}.quran-jump input{width:7.5em}
.quran-size{min-width:44px;font-weight:700}
.quran-lead,.quran-cursor-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.quran-check{display:inline-flex;align-items:center;gap:8px;min-height:44px}
.quran-presence,.quran-help{margin:0;font-size:.85rem;color:var(--muted,#9aa4b1);flex-basis:100%}
.quran-follow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-radius:10px;background:var(--accent-soft,rgba(47,211,181,.14));border:1px solid var(--accent,#2fd3b5)}
.quran-follow p{margin:0}
.quran-hifz{border:1px solid var(--line,#2a3140);border-radius:10px;padding:6px 12px}
.quran-hifz summary{cursor:pointer;min-height:36px;display:flex;align-items:center;font-weight:600}
.quran-hifz label{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.quran-hifz h4{margin:10px 0 4px;font-size:.9rem}
.quran-peeks{margin:0;padding-inline-start:1.4em;display:grid;gap:6px}
.quran-peeks li{line-height:1.6}.quran-peek-word{font-family:var(--quran-font,"Amiri Quran"),"Amiri",serif;font-size:1.25rem;color:var(--warn,#f5b748)}
.quran-notice{margin:0;color:var(--muted,#9aa4b1)}
.quran-page{background:var(--quran-paper);color:var(--quran-ink);border:3px double var(--quran-gold);border-radius:12px;padding:18px 20px;font-family:var(--quran-font,"Amiri Quran"),"Amiri Quran","Amiri","Scheherazade New",serif;font-size:var(--quran-size);line-height:2.35;max-height:min(70vh,calc(100dvh - 300px));overflow:auto;outline-offset:3px;box-shadow:inset 0 0 0 1px var(--quran-line)}
.quran-page:focus-visible{outline:3px solid var(--focus-ring,#8fe9d7)}
.quran-lines{margin:0;text-align:justify;text-align-last:center;word-spacing:.05em}
.quran-surah{display:flex;justify-content:center;align-items:center;margin:8px 0 2px;padding:0 12px;line-height:1.7;border:2px solid var(--quran-gold);border-radius:999px;background:linear-gradient(#fff8e6,#f0e2bd);color:#5b3f0a}
.quran-surah-name{font-size:1.05em}
.quran-basmala{margin:0;text-align:center;line-height:2}
.quran-classroom p{font-size:inherit}.quran-follow p,.quran-notice,.quran-presence,.quran-help{font-size:.9rem;line-height:1.45}
.quran-verse.quran-focus{background:rgba(255,214,90,.18);border-radius:6px}
.quran-word{border-radius:6px;padding:0 .04em;transition:background-color .15s}
.quran-word[role=button]{cursor:pointer}.quran-word[role=button]:hover{background:rgba(154,107,20,.14)}
mark.quran-word{color:inherit}.quran-word.quran-range{background:var(--quran-range)}
.quran-word.quran-cursor,.quran-hidden.quran-cursor{background:var(--quran-cursor);box-shadow:0 0 0 2px #e7b52c;color:#140f05}
.quran-word.quran-read{opacity:.55}
.quran-word[data-fault]{text-decoration:underline wavy #c0392b;text-decoration-thickness:2px;text-underline-offset:.45em}.quran-word[data-fault=harakat]{text-decoration-color:#c0392b}.quran-word[data-fault=madd]{text-decoration-color:#1d6fb8}.quran-word[data-fault=ghunna]{text-decoration-color:#7b3fb0}.quran-word[data-fault=lettre]{text-decoration-color:#b8661d}.quran-word[data-fault=waqf]{text-decoration-color:#2a7f4f}.quran-word[data-fault=oubli],.quran-word[data-fault=autre]{text-decoration-color:#5a5a5a}
.quran-word.quran-masked{text-decoration:underline dotted #8a6a2b;text-underline-offset:.35em}
.quran-word[data-peeks="1"]{background:rgba(245,140,40,.22)}.quran-word[data-peeks="2"]{background:rgba(245,120,30,.38)}.quran-word[data-peeks="3"]{background:rgba(235,90,20,.55);box-shadow:0 0 0 2px rgba(200,60,10,.6)}
.quran-ayah-mark{color:var(--quran-gold-ink);font-size:.9em;white-space:nowrap}
.quran-quarter,.quran-sajda{color:var(--quran-gold-ink)}
.quran-hidden{display:inline-block;min-width:calc(var(--len,4) * .42em);min-height:1.15em;margin:0 .08em;padding:0 .1em;vertical-align:middle;border:0;border-bottom:2px dotted var(--quran-gold);border-radius:4px;background:rgba(154,107,20,.1);color:var(--quran-ink);font:inherit;line-height:1.2;cursor:pointer}
.quran-hidden:focus-visible{outline:2px solid #1a6b5c;outline-offset:2px}
.quran-hidden.quran-initial{min-width:calc(var(--len,4) * .3em);text-align:start}
.quran-footer{margin:0;text-align:center;font-size:.85rem;color:var(--muted,#9aa4b1)}
.quran-attribution{margin:0;font-size:.72rem;color:var(--muted,#9aa4b1)}
.quran-teacher-tools{border-top:1px solid var(--line,#2a3140);padding-top:10px;display:grid;gap:10px}
.quran-teacher-tools>h3{margin:0;font-size:1rem}
@media(max-width:700px){.quran-page{padding:12px;max-height:none;line-height:2.2}.quran-jump select{max-width:100%;flex:1 1 9em}}
@media(prefers-reduced-motion:reduce){.quran-word{transition:none}}
@media(forced-colors:active){.quran-word.quran-cursor,.quran-word.quran-range{forced-color-adjust:none;outline:2px solid Highlight}}
/* 2.71 — Récitation en classe (Arabic Quran, section C : 20, 21, 22). */
.quran-fault-menu{position:fixed;z-index:80;display:grid;gap:4px;min-width:200px;max-width:min(280px,calc(100vw - 16px));padding:8px;border-radius:12px;background:var(--surface,#171b24);border:1px solid var(--line,#2a3140);box-shadow:0 12px 32px rgba(0,0,0,.45)}
.quran-fault-menu[hidden]{display:none}
.quran-fault-menu p{margin:0 0 4px;font-weight:700;font-size:.9rem}
.quran-fault-menu button{justify-content:flex-start;text-align:start;min-height:40px}
.quran-toast{margin:0;padding:8px 12px;border-radius:10px;background:#1f3b2f;color:#e7fff4;border:1px solid #2fd3b5;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.quran-toast[hidden]{display:none}
.teaching-turn-timer{margin:0;font-weight:700;font-variant-numeric:tabular-nums}
.teaching-turn-timer[data-over=true]{color:#ff9b8a}
.teaching-talqin-plan{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex-basis:100%;border-top:1px solid var(--line,#2a3140);padding-top:8px}
.teaching-talqin-plan h4{margin:0;flex-basis:100%;font-size:.9rem}
.teaching-talqin-plan p{margin:0;flex-basis:100%}
.teaching-talqin-words{font-family:"Amiri Quran","Amiri",serif;font-size:1.35rem;line-height:2}
body.is-connected .teaching-turn-banner:not([hidden]){position:fixed;top:calc(var(--header-h,60px) + 10px);left:50%;transform:translateX(-50%);z-index:36;width:max-content;max-width:min(560px,calc(100vw - 24px));box-sizing:border-box;margin:0;padding:10px 18px;border-radius:12px;background:#0f3d36;color:#e8fff9;border:1px solid #2fd3b5;font-weight:700;text-align:center}
body.is-connected .teaching-turn-banner[data-kind=mine]{background:#5b3d00;border-color:#fcd34d;color:#fff7e0}
.teaching-turn-banner[hidden]{display:none}
body.is-connected .teaching-banner:not([hidden])~.teaching-turn-banner:not([hidden]){top:calc(var(--header-h,60px) + 96px)}
/* Long options (méthode du Talqīn) must never widen the panel on a phone. */
.teaching-talqin-controls label,.quran-teacher-tools label{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px;max-width:100%;min-width:0}
.teaching-talqin-controls select,.quran-teacher-tools select{max-width:100%;min-width:0}
/* 2.72 — Récitateur de référence (Arabic Quran, section C : 23). */
.quran-word.quran-recite{background:#bfe9d9;box-shadow:0 0 0 2px #2a9d78;color:#08251c;border-radius:6px}
.quran-reciter-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 12px;border-radius:10px;background:#123a30;border:1px solid #2a9d78;color:#e8fff6}
.quran-reciter-bar[hidden]{display:none}
.quran-reciter-bar p{margin:0;flex:1 1 14em;font-size:.9rem}
.teaching-reciter{border:1px solid #333a4a;border-radius:10px;margin:10px 0;padding:8px 10px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0;max-width:100%;box-sizing:border-box}
.teaching-reciter p{flex-basis:100%;margin:0}.teaching-reciter-tip,.teaching-reciter-name{font-size:.85rem;color:var(--muted,#9aa4b1)}
.teaching-reciter label{display:inline-flex;gap:6px;align-items:center}
/* 2.73 — Tableau des lettres et des makhârij (Arabic Quran, section C : 25). */
.quran-word.quran-letter{background:rgba(120,90,220,.18);box-shadow:inset 0 -3px 0 #6b4fd8}
.quran-makharij{border:1px solid var(--line,#2a3140);border-radius:10px;padding:6px 12px}
.quran-makharij>summary{cursor:pointer;min-height:40px;display:flex;align-items:center;font-weight:700}
.quran-makharij-letters{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px;margin:8px 0}
.quran-makharij-letter{min-height:48px;font-family:"Amiri Quran","Amiri",serif;font-size:1.6rem;line-height:1;padding:0}
.quran-makharij-letter[aria-pressed=true]{outline:3px solid #8fe9d7;outline-offset:1px}
.quran-makharij-letter.quran-makharij-teacher{background:#3a2f7a;color:#fff}
.quran-makharij-diagram{position:relative;width:100%;max-width:520px;margin:8px auto;border-radius:10px;overflow:hidden;background:#f8f2e2}
.quran-makharij-diagram img{display:block;width:100%;height:100%;object-fit:contain}
.quran-makharij-point{position:absolute;width:26px;height:26px;min-height:0;margin:-13px 0 0 -13px;padding:0;border-radius:50%;border:2px solid #6b4706;background:rgba(255,214,90,.65)}
.quran-makharij-point.quran-makharij-on{background:#6b4fd8;border-color:#fff;box-shadow:0 0 0 4px rgba(107,79,216,.45)}
.quran-makharij-list{display:flex;flex-wrap:wrap;gap:6px;background:none}
.quran-makharij-list .quran-makharij-point{position:static;width:auto;height:auto;margin:0;padding:4px 10px;border-radius:999px;background:transparent;color:inherit;border-color:var(--line,#2a3140);min-height:36px}
.quran-makharij-list .quran-makharij-point.quran-makharij-on{background:#6b4fd8;color:#fff}
.quran-makharij-detail p{margin:4px 0}
.quran-makharij-big{font-family:"Amiri Quran","Amiri",serif;font-size:3rem;line-height:1.2;text-align:center}
.quran-makharij-sifat{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:6px 0;padding:0}
.quran-makharij-sifat li{padding:3px 10px;border-radius:999px;background:rgba(107,79,216,.2);border:1px solid #6b4fd8;font-size:.85rem}
.quran-makharij-tag,.quran-makharij-source,.quran-makharij-notice{font-size:.8rem;color:var(--muted,#9aa4b1)}
/* 2.73 (request 19): a suggestion of the voice analysis, for the teacher only. */
.quran-word.quran-suggest{text-decoration:underline dotted #d9822b 3px;text-underline-offset:10px}
.teaching-analysis{display:grid;gap:8px;min-width:0}
.teaching-analysis[hidden]{display:none}
.teaching-analysis ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.teaching-analysis li{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:8px;border-radius:10px;border:1px solid var(--line,#2a3140)}
.teaching-analysis li p{margin:0;flex:1 1 16em;min-width:0;overflow-wrap:anywhere}
.teaching-analysis .heard{font-family:var(--quran-font,serif)}
.analysis-consent{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px auto;max-width:960px;padding:10px 14px;border-radius:12px;background:#1d2a44;border:1px solid #5b7bd5;color:#eef3ff;box-sizing:border-box}
/* Above the room and its side panel, under the « your turn » banner, so the student always reaches it. */
body.is-connected .analysis-consent:not([hidden]){position:fixed;top:calc(var(--header-h,60px) + 10px);left:50%;transform:translateX(-50%);z-index:37;width:max-content;max-width:min(560px,calc(100vw - 24px));margin:0;box-shadow:0 12px 32px rgba(0,0,0,.35)}
body.is-connected .teaching-turn-banner:not([hidden])+.analysis-consent:not([hidden]){top:calc(var(--header-h,60px) + 66px)}
body.is-connected .teaching-banner:not([hidden])~.teaching-turn-banner:not([hidden])+.analysis-consent:not([hidden]){top:calc(var(--header-h,60px) + 152px)}
@media (max-width:700px){body.is-connected .analysis-consent:not([hidden]){left:12px;right:12px;transform:none;width:auto;max-width:none}body.is-connected .teaching-turn-banner:not([hidden])+.analysis-consent:not([hidden]){top:calc(var(--header-h,60px) + 92px)}}
.analysis-consent[hidden]{display:none}
.analysis-consent p{margin:0;flex:1 1 18em;min-width:0}
/* A checkbox and its words on one line in the teacher tools. */
.quran-teacher-tools label:has(>input[type=checkbox]){display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;gap:10px;text-align:start;justify-content:flex-start}
.quran-teacher-tools label:has(>input[type=checkbox])>input{flex:none;width:auto;min-width:0;margin:0}
