/*
 * Madrassat Moubarak — coque et composants (lot 1 des maquettes, 20 novembre 2026).
 * Vert nuit pour la barre latérale, fond presque blanc, or pour les repères seulement.
 * Figtree pour l'interface et les titres du tableau de bord, Literata pour la lecture des leçons,
 * Amiri pour l'arabe vocalisé. Motif : l'arche du mihrab (--mm-arch).
 * Toutes les valeurs viennent des jetons de la planche (var(--mm-…)).
 */

/* Affichage des polices (décision utilisateur, v0.61.0) : « block » et non « swap » — le texte
   n'apparaît jamais d'abord dans une police de remplacement pour basculer ensuite ; les polices
   principales sont préchargées dans l'en-tête (MM_UI::font_preloads) et arrivent avant le texte.
   Polices hébergées par l'extension (aucun appel à un serveur tiers). Fichiers attendus
   dans assets/fonts/ : voir assets/fonts/LISEZ-MOI.md. Literata et Figtree, pas encore
   livrées, sont déclarées par MM_Brand::fonts_css() seulement quand leur fichier est présent
   (C10-P2 : aucune requête vers un fichier manquant) ; d'ici là, Inter et Lora prennent le relais. */
@font-face { font-family: "Amiri"; src: url("../fonts/Amiri-Regular.woff2") format("woff2"), url("../fonts/Amiri-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Amiri"; src: url("../fonts/Amiri-Bold.woff2") format("woff2"), url("../fonts/Amiri-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: block; }
/* Écriture du mushaf (Amiri Quran, SIL OFL) pour la salutation et la date hégirienne. */
@font-face { font-family: "Amiri Quran"; src: url("../fonts/AmiriQuran.woff2") format("woff2"), url("../fonts/AmiriQuran.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: block; }
/* QPC Hafs (KFGQPC, fournie par Quran Foundation ; licence dans assets/fonts/LICENCE-QPC-Hafs.txt) : seulement pour le lecteur, avec le texte text_qpc_hafs. */
@font-face { font-family: "UthmanicHafs"; src: url("../fonts/UthmanicHafs1Ver18.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
/* Polices de relais livrées avec l'extension (SIL OFL, voir assets/fonts/OFL.txt) : Inter pour
   l'interface et Lora pour la lecture, tant que Figtree et Literata ne sont pas déposées. */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff") format("woff"); font-weight: 700 900; font-style: normal; font-display: block; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Variable.woff") format("woff"), url("../fonts/Lora-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: block; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic-Variable.woff") format("woff"), url("../fonts/Lora-Italic-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: italic; font-display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.mm {
  margin: 0;
  background: var(--mm-cream);
  color: var(--mm-ink);
  font: 400 var(--mm-text-md)/1.55 var(--mm-font-ui);
  -webkit-font-smoothing: antialiased;
}
/* Remise à zéro sans poids de sélecteur (:where) : toute classe de composant la remplace. */
:where(.mm) :where(h1, h2, h3, p, ul, ol, fieldset, blockquote) { margin: 0; padding: 0; }
:where(.mm) :where(ul, ol) { list-style: none; }
:where(.mm) fieldset { border: 0; min-width: 0; }
.mm a { color: var(--mm-green-text); text-underline-offset: .18em; }
.mm a:hover { color: var(--mm-green-title); }
.mm :focus-visible { outline: 2px solid var(--mm-green-700); outline-offset: 2px; border-radius: 6px; }
.mm [hidden] { display: none; }
.mm code { font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--mm-green-100); padding: .1em .4em; border-radius: 5px; }
.mm-icon { flex: none; }
/* Spécificité minimale : une règle de composant (écriture du mushaf, bloc de cours) l'emporte toujours. */
:where(.mm) [lang="ar"], .mm-ar { font-family: var(--mm-font-ar); }
.mm-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Texte réservé aux lecteurs d'écran. */
.mm-nowrap { white-space: nowrap; }
.mm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.mm-skip { position: absolute; left: var(--mm-4); top: -4rem; z-index: 50; background: var(--mm-surface); padding: var(--mm-2) var(--mm-4); border-radius: var(--mm-radius-sm); }
.mm-skip:focus { top: var(--mm-3); }

/* ---------- Coque ---------- */
.mm-shell { --shell-side: var(--mm-side-w); display: grid; grid-template-columns: var(--mm-side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.mm-side {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 1.75rem;
  --side-pad: 1.25rem;
  padding: var(--mm-6) var(--side-pad);
  background: var(--mm-green-900); color: var(--mm-on-green);
  /* Bord droit (retour utilisateur du 25 nov. : l'arrondi faisait pièce rapportée) : un bord net,
     marqué d'un filet d'or qui s'efface en haut et en bas, et une ombre douce portée sur la page. */
  box-shadow: 12px 0 30px -18px color-mix(in srgb, var(--mm-green-900) 60%, transparent);
  z-index: 5;
}
.mm-side::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; pointer-events: none;
  width: 2px; background: linear-gradient(to bottom, transparent 0%, var(--mm-gold) 14%, var(--mm-gold) 86%, transparent 100%); }
/* La rubrique ouverte se signale sur ce filet : le losange de la frise, posé au bord, à sa hauteur. */
.mm-nav > a { position: relative; }
.mm-nav > a[aria-current="page"]::after { content: ""; position: absolute; top: 50%; right: calc(-1 * var(--side-pad) - 4px); width: 9px; height: 9px; background: var(--mm-gold); transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-gold) 20%, transparent); }
.mm-side a { color: inherit; text-decoration: none; }
.mm-side__brand { display: flex; flex-direction: column; align-items: center; gap: 1.125rem; padding: 0 var(--mm-2); }
/* Filet fin et clair sous le logo, sur toute la largeur de la colonne. */
.mm-side__brand::after { content: ""; display: block; width: 100%; height: 1px; background: color-mix(in srgb, var(--mm-on-green) 14%, transparent); }
.mm-brand { display: flex; align-items: center; justify-content: center; }
.mm-brand__logo { flex: none; display: block; max-width: 100%; height: auto; }
/* Format horizontal : réservé au bandeau du téléphone. */
.mm-brand__wide { display: none; }
.mm-brand__emblem { display: block; flex: none; width: auto; height: 2.75rem; object-fit: contain; }
.mm-brand__name { font: 600 var(--mm-text-sm)/1.15 var(--mm-font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--mm-gold-light); }

.mm-nav { display: flex; flex-direction: column; gap: var(--mm-1); }
.mm-nav a {
  display: flex; align-items: center; gap: var(--mm-3);
  min-height: 3rem; padding: 0 var(--mm-4);
  border-radius: 14px; color: var(--mm-on-green-muted);
  font-size: var(--mm-text-sm); font-weight: 500;
  transition: background-color var(--mm-fast) ease, color var(--mm-fast) ease;
}
.mm-nav a:hover { color: var(--mm-on-green); background: color-mix(in srgb, var(--mm-on-green) 8%, transparent); }
.mm-nav a[aria-current="page"] { color: var(--mm-white); background: var(--mm-green-700); font-weight: 600; }
/* Ornement du bas : occupe la place restante et rétrécit en gardant ses proportions sur les
   écrans bas, sans jamais être recadré ni pousser la page. */
.mm-side__orn { position: relative; flex: 1 1 0; min-height: 0; display: flex; align-items: flex-end; justify-content: center; margin-inline: -1.25rem; margin-bottom: calc(-1 * var(--mm-6)); }
.mm-side__orn img { position: relative; display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; }
/* Fond du bas, derrière l'ornement (retour utilisateur du 25 nov.) : un vert un peu plus clair qui
   monte du bas, une lueur d'or au pied des arches, et un treillis de losanges d'or très discret
   (rappel des moucharabiehs), le tout effacé vers le haut. Couleurs de la planche, aucune image. */
.mm-side__orn::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: min(100%, 24rem); pointer-events: none;
  background:
    radial-gradient(ellipse 62% 30% at 50% 96%, color-mix(in srgb, var(--mm-gold) 26%, transparent), transparent 72%),
    repeating-linear-gradient(45deg, color-mix(in srgb, var(--mm-gold) 9%, transparent) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, color-mix(in srgb, var(--mm-gold) 9%, transparent) 0 1px, transparent 1px 22px),
    linear-gradient(to top, var(--mm-green-800), transparent);
  -webkit-mask-image: linear-gradient(to top, var(--mm-black) 35%, transparent); mask-image: linear-gradient(to top, var(--mm-black) 35%, transparent); }

.mm-main { min-width: 0; outline: 0; display: flex; flex-direction: column; overflow-x: clip; }
.mm-container { width: 100%; max-width: 100rem; margin: 0 auto; padding: var(--mm-5) var(--mm-7) 4.5rem; display: flex; flex-direction: column; gap: var(--mm-4); animation: mm-in var(--mm-med) var(--mm-ease) both; }
@keyframes mm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Barre supérieure ---------- */
/* Bande blanche pleine largeur : recherche à gauche, notifications et compte à droite.
   Ses marges suivent la colonne de contenu (100 rem max) : tout s'aligne sur la même verticale. */
.mm-topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: var(--mm-4); width: 100%; min-height: 4.5rem; padding: .75rem max(var(--mm-7), calc((100% - 100rem) / 2 + var(--mm-7))); background: var(--mm-surface); border-bottom: 1px solid var(--mm-line); }
.mm-topbar__date { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-topbar__end { display: flex; align-items: center; gap: var(--mm-3); margin-left: auto; }
.mm-bell { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--mm-green-title); transition: background-color var(--mm-fast) ease; }
.mm .mm-bell { color: var(--mm-green-title); }
.mm-bell:hover { background: var(--mm-cream); }
/* Mode nuit : soleil en mode jour, lune en mode nuit (bouton rond de la barre du haut). */
.mm-theme { padding: 0; border: 0; background: none; cursor: pointer; }
.mm-theme svg { display: block; }
.mm-theme .mm-theme__moon, :root[data-theme="nuit"] .mm-theme .mm-theme__sun { display: none; }
:root[data-theme="nuit"] .mm-theme .mm-theme__moon { display: block; }
:root.mm-theme-anim *, :root.mm-theme-anim *::before, :root.mm-theme-anim *::after { transition: background-color 320ms var(--mm-ease), color 320ms var(--mm-ease), border-color 320ms var(--mm-ease), fill 320ms var(--mm-ease); }
.mm-search { position: relative; display: flex; align-items: center; flex: 1 1 22rem; max-width: 30rem; }
/* Formulaire de la page Recherche : dans la colonne de la page, la base de 22rem devenait une hauteur
   (352 px de vide autour du champ au téléphone). */
.mm-page > .mm-search { flex: none; }
.mm-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mm-search .mm-icon { position: absolute; left: var(--mm-3); color: var(--mm-muted); pointer-events: none; }
.mm .mm-search input[type="search"] { padding-left: 2.7rem; border-radius: 12px; border-color: var(--mm-line); background: var(--mm-surface); }
.mm .mm-search input[type="search"]:focus { border-color: var(--mm-green-700); }
/* Séparateur vertical entre la cloche et le compte, comme sur la maquette. */
.mm-account { position: relative; padding-left: var(--mm-3); border-left: 1px solid var(--mm-line); }
.mm-account > summary { display: flex; align-items: center; gap: var(--mm-2); min-height: var(--mm-tap); padding: 0 var(--mm-2) 0 var(--mm-1); border-radius: 999px; cursor: pointer; list-style: none; color: var(--mm-ink); }
.mm-account > summary::-webkit-details-marker { display: none; }
.mm-account > summary:hover { background: var(--mm-cream); }
.mm-account__avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--mm-green-900); color: var(--mm-gold-light); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); }
.mm-account__name { font-weight: 600; font-size: var(--mm-text-sm); }
.mm-account__menu { position: absolute; right: 0; top: calc(100% + var(--mm-2)); z-index: 20; display: flex; flex-direction: column; gap: var(--mm-1); min-width: 14rem; padding: var(--mm-3); background: var(--mm-surface); border-radius: var(--mm-radius); box-shadow: 0 2px 6px color-mix(in srgb, var(--mm-shadow-ink) 6%, transparent), 0 16px 32px -12px color-mix(in srgb, var(--mm-shadow-ink) 22%, transparent); }
.mm-account__id { font: 600 var(--mm-text-xs)/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--mm-gold-ink); }
.mm-account__mail { font-size: var(--mm-text-xs); color: var(--mm-muted); overflow-wrap: anywhere; padding-bottom: var(--mm-2); border-bottom: 1px solid var(--mm-line); }
.mm-account__menu a { display: flex; align-items: center; gap: var(--mm-2); min-height: var(--mm-tap); padding: 0 var(--mm-2); border-radius: var(--mm-radius-sm); text-decoration: none; font-size: var(--mm-text-sm); font-weight: 500; }
.mm-account__menu a:hover { background: var(--mm-green-100); }

/* ---------- Titres ---------- */
.mm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--mm-4); flex-wrap: wrap; }
.mm-head__text { display: flex; flex-direction: column; gap: var(--mm-2); min-width: 0; }
.mm-head__actions { display: flex; align-items: center; gap: var(--mm-2); flex-wrap: wrap; }
:where(.mm) h1 { font: 700 var(--mm-text-2xl)/1.2 var(--mm-font-ui); letter-spacing: -.015em; color: var(--mm-ink); text-wrap: balance; }
.mm-lead { color: var(--mm-muted); font-size: var(--mm-text-md); max-width: 44rem; text-wrap: pretty; }
.mm-eyebrow { align-self: flex-start; padding: .3rem .7rem; border-radius: 999px; background: var(--mm-gold-wash); font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-back { display: inline-flex; align-items: center; gap: var(--mm-2); min-height: 2rem; font-size: var(--mm-text-sm); font-weight: 500; text-decoration: none; align-self: flex-start; }
.mm-section-title { display: flex; align-items: center; gap: var(--mm-3); font: 600 var(--mm-text-lg)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-stepno { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--mm-green-700); color: var(--mm-white); font-size: var(--mm-text-sm); font-variant-numeric: tabular-nums; flex: none; }
.mm-meta { color: var(--mm-muted); font-size: var(--mm-text-sm); font-weight: 400; }
/* Suite d'un contrôle non validé ou à corriger : seuil et palier encore fermé (C3-P2). */
.mm-result__rule { margin-top: var(--mm-2); font-size: var(--mm-text-sm); color: var(--mm-muted); max-width: 60ch; }
/* Adresse e-mail écrite en entier : coupée n'importe où plutôt que de déborder (recette C9-P2). */
.mm-address { overflow-wrap: anywhere; color: var(--mm-ink); }
.mm-hint { color: var(--mm-muted); font-size: var(--mm-text-sm); line-height: 1.45; }
.mm-empty-line { color: var(--mm-muted); padding: var(--mm-4) 0; }
/* Ligne vide illustrée (lot 4) : dessin à gauche, texte à droite ; empilés sur téléphone. */
.mm-empty-line--ill { display: flex; align-items: center; gap: var(--mm-5); }
.mm-empty-line__ill { width: 6rem; height: auto; flex: none; }
@media (max-width: 30rem) { .mm-empty-line--ill { flex-direction: column; text-align: center; gap: var(--mm-3); } }
.mm-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mm-4); padding: var(--mm-7) 0; }
/* Titre de la page introuvable : la police des titres, comme tous les titres de page. */
.mm-empty__title { font: 600 var(--mm-text-2xl)/1.15 var(--mm-font-display); color: var(--mm-green-title); }
.mm-empty__ill { width: 10rem; height: auto; }
.mm-bullets { list-style: disc; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--mm-1); }

/* ---------- Boutons ---------- */
.mm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--mm-2);
  min-height: var(--mm-tap); padding: .375rem var(--mm-5);
  border: 0; border-radius: 999px;
  /* Libellé sur deux lignes (colonne étroite) : lignes espacées et centrées (réception C9). */
  font: 600 var(--mm-text-sm)/1.25 var(--mm-font-ui); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color var(--mm-fast) ease, color var(--mm-fast) ease, box-shadow var(--mm-fast) ease, transform var(--mm-fast) ease;
}
.mm-btn:active { transform: translateY(1px); }
.mm-btn--primary { background: var(--mm-green-900); color: var(--mm-white); }
.mm a.mm-btn--primary { color: var(--mm-white); }
.mm-btn--primary:hover { background: var(--mm-green-700); }
.mm-btn--gold { background: var(--mm-gold-light); color: var(--mm-green-900); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--mm-gold-light) 80%, transparent); }
.mm a.mm-btn--gold { color: var(--mm-green-900); }
.mm-btn--gold:hover { background: var(--mm-gold-hover); }
.mm-btn--gold-ghost { background: transparent; color: var(--mm-gold-light); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 60%, transparent); }
.mm a.mm-btn--gold-ghost { color: var(--mm-gold-light); }
.mm-btn--gold-ghost:hover { background: color-mix(in srgb, var(--mm-gold-light) 12%, transparent); }
.mm-btn--ghost { background: var(--mm-surface); color: var(--mm-ink); box-shadow: inset 0 0 0 1px var(--mm-line-strong); }
.mm a.mm-btn--ghost { color: var(--mm-ink); }
.mm-btn--ghost:hover { background: var(--mm-green-100); box-shadow: inset 0 0 0 1px var(--mm-green-700); color: var(--mm-green-title); }
.mm-btn:disabled, .mm-iconbtn:disabled { opacity: .4; cursor: not-allowed; }
.mm-iconbtn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--mm-radius-sm); background: none; color: var(--mm-muted); cursor: pointer; transition: background-color var(--mm-fast) ease, color var(--mm-fast) ease; }
.mm-iconbtn:hover:not(:disabled) { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-iconbtn--danger:hover:not(:disabled) { background: var(--mm-danger-wash); color: var(--mm-danger); }
.mm-actions { display: flex; align-items: center; gap: var(--mm-3); flex-wrap: wrap; }
/* Bouton de lecture rond, repère d'action du tableau de bord */
.mm-play { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: var(--mm-green-900); color: var(--mm-white); transition: background-color var(--mm-fast) ease, transform var(--mm-fast) ease; }
.mm-play--square { border-radius: var(--mm-radius); }
a:hover > .mm-play, .mm-play:hover { background: var(--mm-green-700); transform: scale(1.04); }

/* ---------- Formulaires ---------- */
.mm-form { display: flex; flex-direction: column; gap: var(--mm-4); align-items: flex-start; }
.mm-form > .mm-field, .mm-form > .mm-form__grid { width: 100%; max-width: 40rem; }
.mm-form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.mm-form--row > .mm-field { flex: 1 1 12rem; width: auto; }
.mm-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--mm-4); }
.mm-field { display: flex; flex-direction: column; gap: var(--mm-2); min-width: 0; }
.mm-field label, .mm-field legend, .mm-edit__extra label { font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-ink); }
.mm input[type="text"], .mm input[type="email"], .mm input[type="password"], .mm input[type="number"], .mm input[type="search"], .mm input[type="file"], .mm select, .mm textarea {
  width: 100%; min-height: var(--mm-tap); padding: var(--mm-2) var(--mm-3);
  border: 1px solid var(--mm-line-strong); border-radius: var(--mm-radius-sm);
  background: var(--mm-surface); color: var(--mm-ink); font: 400 var(--mm-text-md)/1.45 var(--mm-font-ui);
  transition: border-color var(--mm-fast) ease, box-shadow var(--mm-fast) ease;
}
.mm textarea { resize: vertical; }
.mm textarea.mm-ar, .mm textarea[lang="ar"] { font: 400 1.25rem/2 var(--mm-font-ar); }
.mm input:focus, .mm select:focus, .mm textarea:focus { outline: 0; border-color: var(--mm-green-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-green-700) 16%, transparent); }
/* Cases et boutons radio : l'anneau d'ombre ne se voit pas sur un contrôle natif ; contour net au clavier. */
.mm input[type=radio]:focus-visible, .mm input[type=checkbox]:focus-visible { outline: 2px solid var(--mm-green-700); outline-offset: 2px; }
.mm-checkline { display: flex; align-items: flex-start; gap: var(--mm-3); min-height: var(--mm-tap); padding: var(--mm-2) 0; cursor: pointer; }
.mm-checkline input, .mm-choice input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--mm-green-700); flex: none; }

/* ---------- Pastilles, messages, jauges ---------- */
.mm-chip { display: inline-flex; align-items: center; gap: var(--mm-1); padding: .25rem .7rem; border-radius: 999px; font-size: var(--mm-text-xs); font-weight: 600; white-space: nowrap; background: var(--mm-line); color: var(--mm-muted); }
.mm-chip--done { background: var(--mm-green-100); color: var(--mm-green-text); }
.mm-chip--current, .mm-chip--warn { background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
.mm-chip--id { background: var(--mm-green-100); color: var(--mm-green-text); }
/* Mon Coran (C5-P1) : fonctions annoncées avec leur état, sans données simulées. */
.mm-soon__intro { margin-bottom: var(--mm-3); font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-soon-list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.mm-soon { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: var(--mm-1); padding: var(--mm-3) 0; }
.mm-soon + .mm-soon { border-top: 1px solid var(--mm-line); }
.mm-soon__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-soon__title { font: 600 var(--mm-text-md)/1.3 var(--mm-font-display); color: var(--mm-green-title); }
.mm-soon__text { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-soon .mm-chip { flex: none; }
.mm-notice { padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line); font-size: var(--mm-text-sm); overflow-wrap: anywhere; }
.mm-flash { position: fixed; z-index: 30; bottom: var(--mm-5); right: var(--mm-5); width: min(26rem, calc(100vw - 2 * var(--mm-4))); pointer-events: none; animation: mm-flash-in var(--mm-med) var(--mm-ease) both; }
.mm-flash .mm-notice { pointer-events: auto; padding: var(--mm-3) var(--mm-5); border-radius: var(--mm-radius); box-shadow: inset 3px 0 0 currentColor, var(--mm-elev-2); font-weight: 500; }
.mm-flash .mm-notice--success { background: var(--mm-surface); }
/* Une confirmation s'efface d'elle-même ; une erreur reste jusqu'à la page suivante. */
.mm-flash:has(.mm-notice--success) { animation: mm-flash-in var(--mm-med) var(--mm-ease) both, mm-flash-out 400ms ease-in 6s forwards; }
@keyframes mm-flash-out { to { opacity: 0; visibility: hidden; } }
@keyframes mm-flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mm-notice--success { background: var(--mm-green-100); box-shadow: none; color: var(--mm-green-title); }
.mm-notice--error { background: var(--mm-danger-wash); box-shadow: none; color: var(--mm-danger); }
.mm-notice--warn { background: var(--mm-gold-wash); box-shadow: none; color: var(--mm-gold-ink); }
/* Jauges épaisses et arrondies */
.mm-meter { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--mm-line); overflow: hidden; }
.mm-meter::-webkit-progress-bar { background: var(--mm-line); border-radius: 999px; }
.mm-meter::-webkit-progress-value { background: var(--mm-green-700); border-radius: 999px; transition: width var(--mm-med) var(--mm-ease); }
.mm-meter::-moz-progress-bar { background: var(--mm-green-700); border-radius: 999px; }

/* ---------- Surfaces ---------- */
.mm-panel { display: flex; flex-direction: column; gap: var(--mm-4); padding: var(--mm-5); background: var(--mm-surface); border-radius: var(--mm-radius-lg); box-shadow: var(--mm-shadow); }
.mm-panel--accent { background: var(--mm-gold-wash); }
.mm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: var(--mm-4); }
.mm-card { display: flex; flex-direction: column; gap: var(--mm-2); height: 100%; padding: var(--mm-5); background: var(--mm-surface); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow); text-decoration: none; color: var(--mm-ink); transition: box-shadow var(--mm-med) var(--mm-ease), transform var(--mm-med) var(--mm-ease); }
.mm a.mm-card { color: var(--mm-ink); }
.mm-card--link:hover { box-shadow: 0 2px 6px color-mix(in srgb, var(--mm-shadow-ink) 6%, transparent), 0 18px 34px -16px color-mix(in srgb, var(--mm-shadow-ink) 28%, transparent); transform: translateY(-2px); }
.mm-card__title { font: 600 var(--mm-text-lg)/1.25 var(--mm-font-ui); color: var(--mm-ink); }
.mm-card__meta { color: var(--mm-muted); font-size: var(--mm-text-sm); }

.mm-list { display: flex; flex-direction: column; }
.mm-list > li + li { border-top: 1px solid var(--mm-line); }
.mm-list__row { display: flex; align-items: center; gap: var(--mm-3); min-height: 3.5rem; padding: var(--mm-2); text-decoration: none; color: var(--mm-ink); flex-wrap: wrap; border-radius: var(--mm-radius-sm); }
.mm a.mm-list__row { color: var(--mm-ink); transition: background-color var(--mm-fast) ease; }
.mm a.mm-list__row:hover { background: var(--mm-green-100); }
.mm-list__title { flex: 1 1 10rem; font-weight: 500; min-width: 0; }

/* ---------- Tableau de bord élève ---------- */
/* En-tête sans cadre ni bulle : la salutation est posée sur le fond de page. Le visuel livré
   (MM-HEAD-*) est placé à droite à ses proportions d'origine : le fondu est dans l'image,
   le code ne le recadre pas, ne le masque pas et ne l'estompe pas. */
.mm-hello { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--mm-4); padding: var(--mm-1) 0 var(--mm-2); }
.mm-hello.has-bg { align-items: center; min-height: calc(var(--mm-head-h) - var(--mm-4)); }
/* Le visuel est dimensionné par sa hauteur ; sa largeur suit son format (4:1). Il touche la
   barre supérieure et déborde dans la marge droite ; sa partie gauche est transparente. */
.mm-hello__bg { position: absolute; top: calc(-1 * var(--mm-4)); right: calc(-1 * var(--mm-7)); z-index: 0; pointer-events: none; animation: mm-head-in 1.1s var(--mm-ease) both; }
.mm-hello__bg img { display: block; width: auto; height: var(--mm-head-h); max-width: none; }
@keyframes mm-head-in { from { opacity: 0; } }
.mm-hello__text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: var(--mm-1); max-width: 48rem; }
.mm-hello__title { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .875rem; font: 600 var(--mm-text-display)/1.1 var(--mm-font-display); letter-spacing: -.01em; color: var(--mm-ink); }
/* Le prénom porte la hiérarchie de l'en-tête ; la salutation devient son surtitre. */
.mm-hello__salut { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem var(--mm-3); font-size: var(--mm-text-sm); font-weight: 500; color: var(--mm-green-text); }
.mm-hello__ar { font: 400 clamp(1.625rem, 2.4vw, 2.125rem)/1.6 var(--mm-font-quran); color: var(--mm-gold-ink); }
.mm-hello__title--name { font-size: clamp(2rem, 3.2vw, 2.625rem); color: var(--mm-green-title); }
.mm-hello__title strong { font-weight: 700; color: var(--mm-green-title); }
.mm-hello__lead { color: var(--mm-muted); }
.mm-hello__row { display: flex; align-items: center; gap: var(--mm-4); }
.mm-hello__logo { flex: none; display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 20px; background: var(--mm-surface); border: 1px solid var(--mm-line); }
.mm-hello__logo img, .mm-hello__logo svg { display: block; width: auto; height: auto; max-width: 3.75rem; max-height: 3.75rem; }
/* Identifiant permanent de l'élève et niveau : deux pastilles de même gabarit. */
.mm-idchip, .mm-levelchip { display: inline-flex; align-items: center; align-self: center; padding: .3rem .7rem; border-radius: 999px; font: 600 var(--mm-text-xs)/1.2 var(--mm-font-ui); letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-idchip { background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
.mm-levelchip { background: var(--mm-green-900); color: var(--mm-gold-light); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 45%, transparent); }

/* ==========================================================================
   Accueil — direction de référence de l'application.
   Hiérarchie : 1. la bannière panoramique, entière, sur toute la largeur du contenu, qui
   porte la salutation, le prénom, l'action du jour et l'heure ;
   2. la galerie des matières, logos en grand dans des arches (motif du mihrab).
   Tout tient dans un écran d'ordinateur ou de tablette.
   ========================================================================== */
.mm-home { container: mm-home / inline-size; display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-container:has(> .mm-home) { padding-block: var(--mm-3) var(--mm-4); }

/* Bannière en fond : pas de cadre ni de bulle. Elle occupe toute la largeur de la zone
   principale (de la navigation au bord de l'écran) et touche la barre supérieure ; l'image
   donne la hauteur (version compacte dès sa livraison, sinon 4:1 ; 2:1 au téléphone) et n'est
   jamais recadrée. Le texte posé dessus
   reste aligné sur la colonne de contenu (--bleed = débord de chaque côté). */
.mm-board { --bleed: calc((100vw - var(--shell-side) - 100cqw) / 2); position: relative; isolation: isolate; width: calc(100cqw + 2 * var(--bleed)); margin: calc(-1 * var(--mm-3)) 0 0 calc(-1 * var(--bleed)); background: var(--mm-cream); }
/* Raccord avec la page : un filet d'or au pied de la bannière (comme une marche), puis un reflet
   chaud très court sur le fond de page, qui s'éteint avant la zone de lecture. L'image elle-même n'est ni
   estompée ni masquée : le dégradé est posé sur la page, sous la bannière. */
.mm-board::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 100%; height: var(--mm-6); background: linear-gradient(180deg, color-mix(in srgb, var(--mm-warm) 20%, transparent) 0%, color-mix(in srgb, var(--mm-cream) 0%, transparent) 100%); pointer-events: none; }
.mm-board::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--mm-gold) 15%, transparent), var(--mm-gold-light) 18%, var(--mm-gold) 50%, var(--mm-gold-light) 82%, color-mix(in srgb, var(--mm-gold) 15%, transparent)); box-shadow: 0 1px 0 color-mix(in srgb, var(--mm-white) 60%, transparent); pointer-events: none; }
.mm-home__cours { position: relative; z-index: 1; }
/* Texte posé sur le mur : un liseré clair très fin le détache de la pierre, sans voile sur l'image. */
.mm-board__over { text-shadow: 0 1px 0 color-mix(in srgb, var(--mm-glow) 55%, transparent), 0 0 18px color-mix(in srgb, var(--mm-glow) 55%, transparent); }
.mm-board .mm-hello__ar { color: var(--mm-gold-deep); }
.mm-board .mm-idchip { background: color-mix(in srgb, var(--mm-glow) 80%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 35%, transparent); text-shadow: none; }
.mm-board .mm-btn { text-shadow: none; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--mm-green-900) 80%, transparent); }
/* Accueil : bannière nette, soulignée de son filet d'or (décision utilisateur : pas de fondu ici,
   le fondu est réservé aux pages intérieures). */
.mm-board__banner { display: block; }
.mm-board__banner img { display: block; width: 100%; height: auto; }
.mm-board:not(.has-banner) { min-height: 14rem; background: linear-gradient(100deg, var(--mm-ivory) 0%, var(--mm-green-100) 100%); }
/* Zone calme de l'image (à gauche) : salutation en haut, action du jour en bas. */
.mm-board__over { position: absolute; top: 0; bottom: 0; left: var(--bleed); width: calc(100cqw * .42); display: flex; flex-direction: column; justify-content: center; gap: var(--mm-3); padding: clamp(var(--mm-4), 2.2cqw, var(--mm-6)) clamp(var(--mm-4), 2.6cqw, var(--mm-7)); }
.mm-board__greet { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .375rem; min-width: 0; padding-left: clamp(var(--mm-4), 1.4cqw, var(--mm-5)); }
/* Filet d'or vertical qui ancre le bloc (même geste que les titres des écrans). */
.mm-board__greet::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px; border-radius: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--mm-gold) 0%, transparent), var(--mm-gold) 20%, var(--mm-gold) 80%, color-mix(in srgb, var(--mm-gold) 0%, transparent)); }
.mm-board .mm-hello__salut { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 var(--mm-3); }
.mm-board .mm-hello__ar { font-size: clamp(1.75rem, 2.6cqw, 2.5rem); line-height: 1.55; }
.mm-board /* Petit filet or à losange entre la salutation et le prénom. */
.mm-board__rule { position: relative; display: block; width: 4rem; height: 1px; margin: .125rem 0 .25rem; background: linear-gradient(90deg, var(--mm-gold), color-mix(in srgb, var(--mm-gold) 15%, transparent)); }
.mm-board__rule::after { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; background: var(--mm-gold); transform: rotate(45deg); }
.mm-board .mm-hello__title--name { font-size: clamp(2.125rem, 3.4cqw, 3.5rem); line-height: 1.05; letter-spacing: -.015em; }
/* C12 : prénom long (plus de 10 caractères) sur grand écran — un cran plus petit, sur une ou deux lignes,
   pour que la salutation et la devise restent sur la bannière panoramique. */
.mm-board .mm-hello__title--long { font-size: clamp(1.75rem, 2.3cqw, 2.375rem); }
.mm-board__lead { font: italic 400 clamp(var(--mm-text-sm), 1.1cqw, var(--mm-text-md))/1.4 var(--mm-font-display); color: var(--mm-ink); }
/* Bannière basse (contenu de moins de 75 rem) : la salutation se resserre pour rester dans la
   zone calme ; aucune information n'est retirée. */
@container mm-home (max-width: 75rem) {
  .mm-board .mm-hello__ar { font-size: 1.5rem; line-height: 1.3; }
  .mm-board .mm-hello__title--name { font-size: clamp(1.75rem, 3cqw, 2.5rem); }
  .mm-board__greet { gap: .125rem; }
  .mm-board__rule, .mm-board__lead { display: none; }
  /* C0-P1-02 : salutation sur une ligne, prénom long un cran plus petit ; l'identité tient dans la bannière. */
  .mm-board .mm-hello__ar { font-size: clamp(1.1875rem, 1.9cqw, 1.5rem); line-height: 1.35; white-space: nowrap; }
  .mm-board .mm-hello__title--long { font-size: clamp(1.375rem, 2.3cqw, 1.875rem); }
}

/* Bannière haute (27 nov., grand écran haut, même requête que MM_View_Student::BANNIERE_HAUTE) : la
   version 4:1 remplit la hauteur que laissait la panoramique ; l'écriture prend l'air du mur : prénom et
   devise un cran plus grands, lignes plus espacées ; la salutation garde sa largeur (elle reste sur le mur). */
@media (min-width: 75rem) and (min-height: 62rem) and (min-aspect-ratio: 16/10) {
  .mm-board.has-haute .mm-board__greet { gap: .625rem; }
  .mm-board.has-haute .mm-hello__title--name { font-size: clamp(2.5rem, 3.8cqw, 4rem); }
  .mm-board.has-haute .mm-hello__title--long { font-size: clamp(1.875rem, 2.5cqw, 2.625rem); }
  .mm-board.has-haute .mm-board__rule { width: 5rem; margin: .25rem 0 .375rem; }
  .mm-board.has-haute .mm-board__lead { font-size: clamp(var(--mm-text-md), 1.25cqw, var(--mm-text-lg)); }
}

/* Heure et dates : dans le ciel, en haut à droite, loin du livre. */
.mm-board__time { position: absolute; top: clamp(var(--mm-3), 1.6cqw, var(--mm-5)); right: var(--bleed); display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding: var(--mm-2) var(--mm-4); border-radius: var(--mm-radius); background: color-mix(in srgb, var(--mm-ivory) 80%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 25%, transparent); text-align: right; }
.mm-clock { font: 600 clamp(1.375rem, 1.8cqw, 1.875rem)/1 var(--mm-font-display); color: var(--mm-green-title); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mm-board__date { font-size: var(--mm-text-xs); color: var(--mm-ink); }
.mm-board__hijri { font: 400 var(--mm-text-md)/1.5 var(--mm-font-quran); color: var(--mm-gold-ink); }
.mm-board__hijri:empty { display: none; }

@keyframes mm-fade { from { opacity: 0; transform: translateY(4px); } }

/* Matières : hauteur des arches tirée de la largeur (six colonnes), bornée entre une taille
   lisible (11,5 rem) et une taille confortable (14,5 rem) ; elle ne dépend pas de la bannière. */
.mm-home__cours { --arch-h: clamp(11.5rem, calc((100cqw - 5 * var(--mm-4)) / 6 * 1.25), 14.5rem); }

/* « À faire ensuite » / « Pour bien commencer » (C0-P1-01, iPad paysage) : une frise de trois
   repères posés sur le fond, séparés par des filets d'or — pas de cartes étirées. */
.mm-home__next { display: flex; flex-direction: column; gap: var(--mm-3); margin-top: clamp(var(--mm-2), 1.4vh, var(--mm-3)); }
.mm-next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.mm-next-step { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--mm-3); align-items: start; padding: 0 var(--mm-5); }
.mm-next-step:first-child { padding-left: 0; }
.mm-next-step + .mm-next-step { border-left: 1px solid color-mix(in srgb, var(--mm-gold) 28%, transparent); }
.mm-next-step__art { display: grid; place-items: center; width: 2.75rem; aspect-ratio: 1; color: var(--mm-green-text); }
.mm-next-step__img { display: block; width: 100%; height: auto; }
.mm-next-step__img.is-locked { filter: grayscale(1) opacity(.55); }
.mm-next-step__n { display: grid; place-items: center; width: 2.125rem; aspect-ratio: 4 / 5; border-radius: var(--mm-arch); background: var(--mm-green-900); color: var(--mm-gold-light); font: 600 1.125rem/1 var(--mm-font-display); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 55%, transparent); }
.mm-next-step__body { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.mm-next-step__kicker { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-next-step__title { font: 600 var(--mm-text-md)/1.3 var(--mm-font-display); color: var(--mm-green-title); text-wrap: balance; }
.mm-next-step__text { font-size: var(--mm-text-sm); line-height: 1.45; color: var(--mm-muted); }
.mm-next-step__link { display: inline-flex; align-items: center; gap: var(--mm-1); min-height: 2.25rem; font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); text-decoration: none; }
.mm-next-step__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.mm-next-step__link .mm-icon { transition: transform var(--mm-fast) var(--mm-ease); }
.mm-next-step__link:hover .mm-icon { transform: translateX(2px); }
/* Nouvelle version en préparation : l'abandon reste replié, il demande une confirmation. */
.mm-draftbar__drop > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--mm-tap); font-weight: 600; color: var(--mm-green-title); }
.mm-draftbar__drop[open] > summary { margin-bottom: var(--mm-3); }

/* Motifs de fond (lot 4 corrigé) : jamais sous un texte long — seulement dans les marges claires des
   écrans de l'équipe et en ton sur ton dans les cartes vertes. */
.mm[data-espace="equipe"] .mm-main, .mm[data-espace="admin"] .mm-main { background-image: linear-gradient(color-mix(in srgb, var(--mm-cream) 78%, transparent), color-mix(in srgb, var(--mm-cream) 78%, transparent)), url(../brand/img/MM-MOTIF-ENTRELACS-SABLE.webp); background-size: auto, 16rem; }
.mm-resume { background-image: radial-gradient(120% 140% at 88% 18%, color-mix(in srgb, var(--mm-gold-light) 20%, transparent), transparent 52%), url(../brand/img/MM-MOTIF-ETOILES-VERT.webp); background-size: auto, 12rem; }
@media print { .mm[data-espace] .mm-main, .mm-resume { background-image: none; } }

/* ---------- Mémorisation (C5-P3) ---------- */
.mm-memo__now { font: 600 var(--mm-text-md)/1.4 var(--mm-font-ui); color: var(--mm-ink); }
.mm-memo__facts { display: flex; flex-wrap: wrap; gap: var(--mm-2) var(--mm-5); color: var(--mm-muted); font-size: var(--mm-text-sm); }
.mm-memo__facts strong { color: var(--mm-green-title); }
.mm-memo__h3 { margin-top: var(--mm-4); font: 600 var(--mm-text-md)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-memo__ar { margin: 0; font: 400 clamp(1.5rem, 2.4vw, 1.875rem)/2.1 var(--mm-font-quran); color: var(--mm-green-title); text-align: right; overflow-wrap: anywhere; }
.mm-memo__ar--prompt { padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius); background: var(--mm-sand); }
.mm-memo__ar--piece { display: inline; font-size: 1.375rem; }
/* 4 déc. : les réponses en arabe d'un exercice de mémorisation s'affichaient dans la police de l'interface, en petit ; même
   police que le texte du Coran, lisible, alignée à droite. */
.mm-choice.mm-choice--ar { align-items: center; }
.mm-choice.mm-choice--ar input { margin-top: 0; }
.mm-choice--ar > span[lang="ar"] { flex: 1; min-width: 0; font: 400 1.375rem/2 var(--mm-font-quran); color: var(--mm-green-title); text-align: right; overflow-wrap: anywhere; }
.mm-memo-list { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-memo-item { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--mm-2) var(--mm-4); padding: var(--mm-4) 0; border-bottom: 1px solid var(--mm-line); }
.mm-memo-item:last-child { border-bottom: 0; }
.mm-memo-item__n { display: grid; place-items: center; width: 2.25rem; height: 2.75rem; border-radius: 999px 999px 8px 8px; background: var(--mm-green-100); color: var(--mm-green-title); font: 700 var(--mm-text-md)/1 var(--mm-font-ui); }
.mm-memo-item--validee .mm-memo-item__n, .mm-memo-item--a_reviser .mm-memo-item__n { background: var(--mm-green-900); color: var(--mm-gold-light); }
.mm-memo-item--verrouillee { color: var(--mm-muted); }
.mm-memo-item__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-memo-item__text strong { color: var(--mm-ink); }
.mm-memo-item__text span { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-memo-item__actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: var(--mm-2); }
.mm-memo-item__actions form { display: contents; }
.mm-memo-verses { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-memo-verse { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: var(--mm-3); padding-bottom: var(--mm-3); border-bottom: 1px solid var(--mm-line); }
.mm-memo-verse__n { padding-top: .6rem; font-size: var(--mm-text-xs); font-variant-numeric: tabular-nums; color: var(--mm-gold-ink); }
.mm-memo-verse__show { grid-column: 2; justify-self: end; }
.mm-memo-pieces { display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-memo-pieces li { display: flex; align-items: baseline; gap: var(--mm-3); }
/* Ordonner au toucher (3 déc.) : la ligne du verset qui se compose, puis la réserve des morceaux. */
.mm-order { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-order__hint { margin: 0; font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-order__line, .mm-order__pool { display: flex; flex-wrap: wrap; gap: var(--mm-2); }
.mm-order__line { min-height: 4.25rem; align-items: center; padding: var(--mm-3); border-radius: var(--mm-radius); background: var(--mm-sand); box-shadow: inset 0 0 0 1px var(--mm-line); transition: box-shadow var(--mm-fast) ease; }
.mm-order.is-complete .mm-order__line { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mm-gold) 70%, transparent); }
.mm-order.is-missing:not(.is-complete) .mm-order__line { box-shadow: inset 0 0 0 1.5px var(--mm-gold-ink); }
.mm .mm-order__piece { display: inline-flex; align-items: center; min-height: var(--mm-tap); padding: .125rem var(--mm-4); border: 0; border-radius: 999px; background: var(--mm-surface); color: var(--mm-green-title); box-shadow: inset 0 0 0 1px var(--mm-line-strong), var(--mm-elev-1); cursor: pointer; transition: transform var(--mm-fast) var(--mm-ease), box-shadow var(--mm-fast) ease; }
.mm .mm-order__piece:hover { box-shadow: inset 0 0 0 1px var(--mm-gold), var(--mm-elev-1); }
.mm .mm-order__piece:active { transform: scale(.97); }
.mm .mm-order__piece.is-placed { background: var(--mm-green-900); color: var(--mm-gold-light); box-shadow: none; }
.mm-order__piece .mm-memo__ar--piece { color: inherit; line-height: 1.9; }
@media (prefers-reduced-motion: reduce) { .mm .mm-order__piece { transition: none; } }
.mm-memo-corr { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-memo-corr__item { display: flex; flex-direction: column; gap: var(--mm-1); padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius); border-inline-start: 3px solid var(--mm-gold); background: var(--mm-surface); }
.mm-memo-corr__item--ok { border-inline-start-color: var(--mm-green-700); }
.mm-memo-hist { display: flex; flex-direction: column; gap: var(--mm-1); font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-table-wrap { overflow-x: auto; }
.mm-table { width: 100%; border-collapse: collapse; font-size: var(--mm-text-sm); }
.mm-table th, .mm-table td { padding: var(--mm-2) var(--mm-3); border-bottom: 1px solid var(--mm-line); text-align: left; }
.mm-table thead th { color: var(--mm-muted); font-weight: 600; }
.mm-table a { display: inline-flex; align-items: center; min-height: 2.75rem; }
/* 4 déc. : au téléphone, le tableau de mémorisation du suivi débordait et « À réviser » restait caché à droite.
   Chaque élève devient un bloc : nom, portion en cours, puis validées et à réviser côte à côte, chacun nommé. */
@media (max-width: 47.99rem) {
  .mm-table--cartes, .mm-table--cartes tbody { display: block; }
  .mm-table--cartes thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mm-table--cartes tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--mm-4); padding: var(--mm-2) 0 var(--mm-3); border-bottom: 1px solid var(--mm-line); }
  .mm-table--cartes th, .mm-table--cartes td { padding: 0; border: 0; }
  .mm-table--cartes th, .mm-table--cartes td[data-label="Portion en cours"] { grid-column: 1 / -1; }
  .mm-table--cartes td[data-label="Portion en cours"] { padding-bottom: var(--mm-2); }
  .mm-table--cartes td[data-label]:not([data-label="Portion en cours"])::before { content: attr(data-label) " "; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }
}
@media (max-width: 47.99rem) {
  .mm-memo-item { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .mm-memo-item .mm-chip { grid-column: 2; justify-self: start; }
  /* Boutons de même largeur : côte à côte s'ils tiennent, sinon l'un sous l'autre sur toute la ligne. */
  .mm-memo-item__actions .mm-btn { flex: 1 1 8rem; justify-content: center; }
}

/* ---------- Mon Coran : un seul écran (décision utilisateur du 25 nov.) ----------
   Deux espaces côte à côte, à la hauteur de l'écran : « Ma lecture » à gauche (reprise, marque-pages,
   mémorisation) et l'index des 114 sourates à droite, dans un panneau qui défile seul. La page
   elle-même ne défile pas sur ordinateur. Au-dessous de 64 rem, les deux espaces se suivent. */
.mm-page.mm-qlib { display: grid; grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: var(--mm-6); align-items: stretch; }
.mm-page.mm-qlib--vide { display: flex; height: auto; }
/* La zone principale prend exactement la hauteur de l'écran (barre du haut comprise, quelle que soit
   sa hauteur) ; le contenu remplit le reste. Écran trop bas (moins de 38 rem) : la page défile. */
@media (min-width: 64rem) and (min-height: 38rem) {
  .mm-main:has(> .mm-container > .mm-qlib:not(.mm-qlib--vide)) { display: flex; flex-direction: column; height: 100dvh; }
  .mm-container:has(> .mm-qlib:not(.mm-qlib--vide)) { flex: 1; min-height: 0; padding-bottom: var(--mm-6); }
  .mm-container > .mm-page.mm-qlib:not(.mm-qlib--vide) { flex: 1; min-height: 0; }
}
.mm-qlib__side { display: flex; flex-direction: column; gap: var(--mm-5); min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
.mm-qlib__side > * { flex-shrink: 0; }
.mm-qlib__head { display: flex; flex-direction: column; gap: var(--mm-1); }
.mm-qlib__head h1 { margin: 0; font: 600 var(--mm-text-2xl)/1.15 var(--mm-font-display); color: var(--mm-green-title); }
.mm-qlib__lead { margin: 0; color: var(--mm-muted); font-size: var(--mm-text-sm); }
.mm-memo-head { display: flex; flex-direction: column; gap: var(--mm-2); margin-bottom: var(--mm-5); }
.mm-memo-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mm-2) var(--mm-3); margin: 0; font: 600 var(--mm-text-2xl)/1.15 var(--mm-font-display); color: var(--mm-green-title); }
.mm-memo-head__lead { max-width: 42rem; margin: 0; color: var(--mm-muted); font-size: var(--mm-text-sm); }
/* Reprise : la carte maîtresse. Le nom arabe en grand, l'avancement dans la sourate en filet d'or. */
.mm-qlib__resume { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: var(--mm-5) var(--mm-5) var(--mm-4);
  border-radius: var(--mm-radius-lg); background: linear-gradient(160deg, var(--mm-green-800), var(--mm-green-900) 62%); color: var(--mm-on-green); text-decoration: none;
  box-shadow: 0 20px 40px -28px color-mix(in srgb, var(--mm-green-900) 80%, transparent); transition: transform 200ms var(--mm-ease), box-shadow 200ms var(--mm-ease); }
.mm a.mm-qlib__resume { color: var(--mm-on-green); }
.mm-qlib__resume:hover { transform: translateY(-2px); box-shadow: 0 26px 44px -26px color-mix(in srgb, var(--mm-green-900) 85%, transparent); }
.mm-qlib__resume-fond { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--fond) right center / cover no-repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(to left, var(--mm-black) 10%, transparent 75%); mask-image: linear-gradient(to left, var(--mm-black) 10%, transparent 75%); }
.mm-qlib__resume-k { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-light); }
.mm-qlib__resume-ar { align-self: flex-end; margin: var(--mm-1) 0 var(--mm-2); font: 400 clamp(2.5rem, 1.6rem + 1.6vw, 3.25rem)/1.35 var(--mm-font-quran); color: var(--mm-gold-pale); }
.mm-qlib__resume strong { font: 600 var(--mm-text-xl)/1.2 var(--mm-font-display); }
.mm-qlib__resume-v { color: var(--mm-on-green-muted); font-size: var(--mm-text-sm); }
.mm-qlib__resume-bar { display: block; height: 3px; margin-top: var(--mm-3); border-radius: 999px; background: color-mix(in srgb, var(--mm-on-green) 18%, transparent); overflow: hidden; }
.mm-qlib__resume-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--mm-gold); }
.mm-qlib__resume-go { display: inline-flex; align-items: center; gap: var(--mm-2); align-self: flex-start; margin-top: var(--mm-4); min-height: 2.5rem; padding: 0 var(--mm-4);
  border-radius: 999px; background: var(--mm-gold); color: var(--mm-green-900); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); }
.mm-qlib__resume:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 3px; }
/* Panneau « Mon suivi » (4 déc., refonte) : une carte, une ligne par sujet (mémorisation, marque-pages, par cœur),
   chacune avec son icône, son titre et son état en une ligne ; le détail se déplie dessous quand il existe. */
.mm-qsuivi { display: flex; flex-direction: column; border-radius: var(--mm-radius-lg); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line); overflow: hidden; }
.mm-qrow + .mm-qrow { border-top: 1px solid var(--mm-line); }
.mm-qrow > summary { list-style: none; cursor: pointer; }
.mm-qrow > summary::-webkit-details-marker { display: none; }
.mm-qrow:not(details), .mm-qrow > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--mm-3); min-height: 4rem; padding: var(--mm-3) var(--mm-4); color: var(--mm-ink); text-decoration: none; }
.mm a.mm-qrow { color: var(--mm-ink); }
a.mm-qrow:hover, .mm-qrow > summary:hover { background: var(--mm-green-100); }
a.mm-qrow:focus-visible, .mm-qrow > summary:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: -2px; }
.mm-qrow__ico { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-qrow__ico .mm-qlib__mark-ico { fill: var(--mm-gold); stroke: var(--mm-gold-ink); stroke-width: 1.4; }
.mm-qrow__t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-qrow__t strong { font: 600 var(--mm-text-sm)/1.3 var(--mm-font-ui); color: var(--mm-green-title); }
.mm-qrow__t > span { font-size: var(--mm-text-sm); line-height: 1.4; color: var(--mm-muted); }
.mm-qrow__go { display: grid; place-items: center; color: var(--mm-green-title); }
.mm-qrow[open] > summary .mm-qrow__go { transform: rotate(180deg); }
.mm-qrow__corps { display: grid; gap: var(--mm-3); padding: 0 var(--mm-4) var(--mm-4) calc(var(--mm-4) + 2.5rem + var(--mm-3)); }
.mm-qrow__corps ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.mm-qrow__corps li + li { border-top: 1px solid var(--mm-line); }
.mm-qrow__corps li a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--mm-3); min-height: 2.75rem; color: var(--mm-ink); text-decoration: none; }
.mm .mm-qrow__corps li a { color: var(--mm-ink); }
.mm-qrow__corps li a:hover .mm-qlib__mark-name { color: var(--mm-green-title); text-decoration: underline; }
.mm-qlib__mark-name { font-weight: 600; font-size: var(--mm-text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-qlib__mark-ref { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; }
.mm-qlib__mark-ar { font: 400 1.25rem/1.5 var(--mm-font-quran); color: var(--mm-green-title); }
.mm-qlib__hz-play { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mm-2); }
.mm-qlib__hz-play .mm-btn { max-width: 100%; text-align: left; }
.mm-qlib__side .mm-quran__credit { margin: auto 0 0; font-size: var(--mm-text-xs); }
/* Index des sourates : un panneau clair à la hauteur de l'écran, en-tête fixe, liste qui défile. */
.mm-qlib__all { container: mm-index / inline-size; display: flex; flex-direction: column; min-height: 0; border-radius: var(--mm-radius-lg); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line), 0 18px 40px -32px color-mix(in srgb, var(--mm-shadow-ink) 40%, transparent); overflow: hidden; }
/* En-tête de l'index : titre et nombre à gauche, filtre dessous ; la recherche à droite, centrée sur les deux lignes. */
.mm-qlib__bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem); grid-template-areas: "titre find" "tri find"; align-items: center; gap: var(--mm-3) var(--mm-5); padding: var(--mm-5) var(--mm-6) var(--mm-4); border-bottom: 1px solid var(--mm-line); }
.mm-qlib__bar:not(:has(.mm-qlib__filter)) { grid-template-areas: "titre find"; }
.mm-qlib__bar-t { grid-area: titre; white-space: nowrap; }
@container mm-index (max-width: 40rem) {
  .mm-qlib__bar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "find" "tri"; padding-inline: var(--mm-5); }
  .mm-qlib__bar:not(:has(.mm-qlib__filter)) { grid-template-areas: "titre" "find"; }
}
.mm-qlib__filter { grid-area: tri; justify-self: start; }
.mm-qlib__find { grid-area: find; }
.mm-qlib__bar-t { display: flex; align-items: baseline; gap: var(--mm-3); }
.mm-qlib__bar h2 { margin: 0; font: 600 var(--mm-text-xl)/1.2 var(--mm-font-display); color: var(--mm-green-title); }
.mm-qlib__n { margin: 0; font-size: var(--mm-text-sm); color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-qlib__filter { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--mm-cream); }
.mm-qlib__filter button { min-height: 2.25rem; padding: 0 var(--mm-3); border: 0; border-radius: 999px; background: none; color: var(--mm-muted); font: 600 var(--mm-text-xs)/1 var(--mm-font-ui); cursor: pointer; }
.mm-qlib__filter button[aria-pressed="true"] { background: var(--mm-surface); color: var(--mm-green-title); box-shadow: 0 1px 2px color-mix(in srgb, var(--mm-shadow-ink) 14%, transparent); }
.mm-qlib__filter button:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qlib__find { position: relative; display: flex; align-items: center; width: 100%; }
.mm-qlib__find .mm-icon { position: absolute; z-index: 1; left: var(--mm-3); color: var(--mm-muted); pointer-events: none; }
.mm .mm-qlib__find input { width: 100%; min-height: 2.75rem; padding: 0 var(--mm-3) 0 2.5rem; border: 1px solid var(--mm-line-strong); border-radius: 999px; background: var(--mm-surface); font: 500 var(--mm-text-sm)/1.2 var(--mm-font-ui); color: var(--mm-ink); }
.mm .mm-qlib__find input:focus { outline: 2px solid var(--mm-gold); outline-offset: 1px; border-color: var(--mm-gold); }
.mm-qlib__essai { padding: var(--mm-3) var(--mm-6) 0; }
.mm-qlib__scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: var(--mm-2) var(--mm-4) var(--mm-5); }
.mm-qlib__scroll:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: -2px; }
.mm-quran-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); column-gap: var(--mm-4); margin: 0; padding: 0; list-style: none; }
.mm-quran-list > li[hidden] { display: none; }
.mm-quran-item { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--mm-3); min-height: 4rem; padding: var(--mm-2) var(--mm-3); border-radius: var(--mm-radius); border-bottom: 1px solid var(--mm-line); color: inherit; text-decoration: none; transition: background-color 150ms var(--mm-ease); }
.mm-quran-item:hover { background: var(--mm-green-100); border-bottom-color: transparent; }
.mm-quran-item:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: -2px; }
.mm-quran-item__n { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 70%, transparent); font: 600 var(--mm-text-xs)/1 var(--mm-font-ui); font-variant-numeric: tabular-nums; color: var(--mm-green-title); }
.mm-quran-item__names { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mm-quran-item__names strong { font-size: var(--mm-text-sm); color: var(--mm-green-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-quran-item__names span { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-quran-item__ar { font: 400 1.5rem/1.5 var(--mm-font-quran); color: var(--mm-green-title); }
.mm-quran-item.is-here { background: var(--mm-gold-wash); border-bottom-color: transparent; }
.mm-quran-item.is-here .mm-quran-item__n { background: var(--mm-gold); box-shadow: none; color: var(--mm-green-900); }
.mm-qlib__none { margin: var(--mm-6) auto; text-align: center; color: var(--mm-muted); font-size: var(--mm-text-sm); }
@media (prefers-reduced-motion: reduce) { .mm-qlib__resume, .mm-quran-item { transition: none; } .mm-qlib__resume:hover { transform: none; } }
/* Écran peu haut (portable 13 pouces) : la carte de reprise se resserre pour que tout reste visible. */
@media (min-width: 64rem) and (max-height: 56rem) {
  .mm-qlib__side { gap: var(--mm-4); }
  .mm-qlib__resume { padding: var(--mm-4) var(--mm-5); }
  .mm-qlib__resume-ar { margin: 0 0 var(--mm-1); font-size: 2.25rem; }
  .mm-qlib__resume-go { margin-top: var(--mm-3); }
  .mm-qlib__lead { display: none; }
}
@media (max-width: 63.99rem) {
  .mm-page.mm-qlib { display: flex; flex-direction: column; height: auto; min-height: 0; gap: var(--mm-5); }
  .mm-qlib__side { overflow: visible; }
  .mm-qlib__side .mm-quran__credit { order: 9; }
  .mm-qlib__scroll { overflow: visible; }
}
@media (max-width: 47.99rem) {
  .mm-qlib__bar { padding: var(--mm-4); }
  .mm-qlib__scroll { padding: var(--mm-1) var(--mm-2) var(--mm-3); }
  .mm-qlib__essai { padding: var(--mm-3) var(--mm-4) 0; }
}

/* Lecteur : une seule surface claire et continue, un en-tête court, la colonne de lecture au centre.
   L'arabe d'abord (grand, à droite, interligne ample) ; la traduction dessous, en Literata, plus
   calme ; la référence et le marque-page dans une marge discrète, jamais au-dessus du texte. */
.mm-qr { --qr-ar: calc(clamp(1.875rem, 1.45rem + 1.2vw, 2.5rem) * var(--qr-ar-k, 1)); --qr-tr: calc(1.125rem * var(--qr-ar-k, 1));
  display: flex; flex-direction: column; color: var(--mm-ink); }
.mm-qr[data-ar="1"] { --qr-ar-k: .78; } .mm-qr[data-ar="2"] { --qr-ar-k: .89; } .mm-qr[data-ar="4"] { --qr-ar-k: 1.14; } .mm-qr[data-ar="5"] { --qr-ar-k: 1.3; }
/* Une seule taille pour l'arabe et la traduction (retour utilisateur du 25 nov. : deux réglages
   séparés déséquilibraient la page) : la traduction suit le même facteur que l'arabe. */
/* La place de lecture est tenue par le lecteur lui-même : pas de second recalage par le navigateur. */
html:has(.mm-qr) { overflow-anchor: none; }
.mm-main:has(.mm-qr) { background: var(--mm-surface); }
.mm-main:has(.mm-qr) > .mm-container { padding-top: 0; animation: none; } /* sans transformation résiduelle : le panneau des réglages reste fixé à l'écran */
/* En-tête : la sourate seule au centre (nom arabe, puis numéro et nom), le retour à gauche, des
   outils discrets à droite. Rien ne rivalise avec le titre (retour utilisateur du 24 nov.). */
/* En-tête du lecteur et barre de récitation de même hauteur (retour utilisateur du 25 nov.) :
   --qr-barre = marges de la barre (2 × 0,5 rem) + bouton principal (3,25 rem) + filet (1 px). */
.mm-qr { --qr-barre: calc(2 * var(--mm-2) + 3.25rem + 1px); }
/* Lot A (30 nov.) : valeurs de départ des hauteurs que le script mesure (en-tête et marges autour de la page ;
   barre d'écoute), relevées à 390, 768, 1280 et 1920 px : l'immersif est centré dès le premier affichage. */
.mm-qr { --qr-top: 13.3125rem; --qr-bottom: 4.3125rem; }
.mm-qr:not(:has(.mm-qa)) { --qr-bottom: 0px; }
@media (max-width: 47.99rem) { .mm-qr { --qr-top: 10.0625rem; --qr-bottom: 3.8125rem; } }
/* 30 nov., 17 h 07 (« la barre du haut et du bas doit être en vert comme le menu ») : les barres du lecteur
   reprennent la colonne de navigation et les cartes vertes de l'application — vert profond en dégradé, filet
   d'or, géométrie gravée de la planche (MM-BG-CARTE-GEOMETRIE) qui s'efface vers le texte. Les couleurs
   d'interface sont redéfinies dans les barres (texte ivoire, or clair) ; les fenêtres qui s'y ouvrent (liste des
   sourates, « Aller à ») retrouvent celles de la page. */
.mm-qr { --qr-ink: var(--mm-ink); --qr-green-title: var(--mm-green-title); --qr-muted: var(--mm-muted); --qr-green-100: var(--mm-green-100); --qr-gold-ink: var(--mm-gold-ink); --qr-line: var(--mm-line); --qr-line-strong: var(--mm-line-strong); --qr-surface: var(--mm-surface); --qr-gold-wash: var(--mm-gold-wash); }
.mm-qr__head, .mm-qa, .mm-qr__nav {
  --mm-ink: var(--mm-on-green); --mm-green-title: var(--mm-on-green); --mm-muted: var(--mm-on-green-muted); --mm-green-100: color-mix(in srgb, var(--mm-on-green) 12%, transparent);
  --mm-gold-ink: var(--mm-gold-light); --mm-line: color-mix(in srgb, var(--mm-gold-light) 30%, transparent); --mm-line-strong: color-mix(in srgb, var(--mm-on-green) 32%, transparent);
  --mm-gold-wash: color-mix(in srgb, var(--mm-gold-light) 16%, transparent); --mm-surface: var(--mm-green-900); }
.mm-qr__head :is(.mm-qr__surahs, .mm-qr__goform) { --mm-ink: var(--qr-ink); --mm-green-title: var(--qr-green-title); --mm-muted: var(--qr-muted); --mm-green-100: var(--qr-green-100); --mm-gold-ink: var(--qr-gold-ink); --mm-line: var(--qr-line); --mm-line-strong: var(--qr-line-strong); --mm-surface: var(--qr-surface); --mm-gold-wash: var(--qr-gold-wash); color: var(--mm-ink); }
.mm-qr__head { position: sticky; top: 4.5rem; z-index: 12; isolation: isolate; margin-inline: calc(-1 * var(--mm-7)); padding: var(--mm-2) var(--mm-7); color: var(--mm-on-green); border: 0; border-image: linear-gradient(to top, color-mix(in srgb, var(--mm-gold) 70%, transparent) 1px, var(--mm-green-900) 1px) fill 0 / 0 / 0 100vmax; box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--mm-green-900) 70%, transparent); }
.mm-qr__head::before, .mm-qa::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url(../brand/img/MM-BG-CARTE-GEOMETRIE.webp) right center / auto 320% no-repeat; opacity: .55;
  -webkit-mask-image: linear-gradient(to left, var(--mm-black) 6%, transparent 42%); mask-image: linear-gradient(to left, var(--mm-black) 6%, transparent 42%); }
/* L'en-tête est centré (son fond vert, lui, va de bord à bord) : la gravure s'efface aussi vers son bord droit. */
.mm-qr__head::before { -webkit-mask-image: linear-gradient(to left, transparent 0, var(--mm-black) 12%, transparent 46%); mask-image: linear-gradient(to left, transparent 0, var(--mm-black) 12%, transparent 46%); }
/* 30 nov. : la barre s'étend d'un bord à l'autre de la zone de lecture (fond et filet prolongés par border-image), même en plein écran. */
.mm-qr__head-in { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--mm-4); max-width: 72rem; margin: 0 auto; }
.mm-qr__back { justify-self: start; display: inline-flex; align-items: center; gap: var(--mm-1); min-height: 2.5rem; padding-inline: var(--mm-2) var(--mm-3); border-radius: 999px; color: var(--mm-muted); font-weight: 600; font-size: var(--mm-text-sm); text-decoration: none; }
.mm a.mm-qr__back { color: var(--mm-muted); }
/* 1er déc., 18 h 10 : début de l'en-tête = logo (en immersion, ≥ 48 rem) + retour. Le logo est masqué ailleurs : la
   colonne de l'application le porte déjà, et le téléphone garde une barre légère. */
.mm-qr__start { justify-self: start; display: flex; align-items: center; gap: var(--mm-3); min-width: 0; }
.mm-qr__logo, .mm-qr__logo img { display: none; }
@media (min-width: 48rem) {
  .mm-qr[data-immersive="1"] .mm-qr__logo { display: flex; align-items: center; gap: var(--mm-3); flex: none; }
  .mm-qr[data-immersive="1"] .mm-qr__logo::after { content: ""; width: 1px; height: 1.5rem; background: color-mix(in srgb, var(--mm-gold-light) 40%, transparent); }
  .mm-qr[data-immersive="1"] .mm-qr__logo .mm-qr__logo-embleme { display: block; width: auto; height: 3rem; }
}
@media (min-width: 80rem) {
  .mm-qr[data-immersive="1"] .mm-qr__logo .mm-qr__logo-embleme { display: none; }
  .mm-qr[data-immersive="1"] .mm-qr__logo .mm-qr__logo-large { display: block; width: auto; height: 3rem; }
}
.mm-qr__back:hover { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-qr__title { min-width: 0; text-align: center; }
.mm-qr__title h1 { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; }
.mm-qr__name { font: 600 var(--mm-text-md)/1.2 var(--mm-font-display); color: var(--mm-ink); }
.mm-qr__title p { margin: 2px 0 0; color: var(--mm-muted); font-size: var(--mm-text-xs); }
/* Grand écran : nom arabe, numéro et nom, nombre de versets sur une seule ligne ; l'en-tête prend
   exactement la hauteur de la barre de récitation. */
@media (min-width: 48rem) {
  .mm-qr__head { display: flex; align-items: center; height: var(--qr-barre); padding-block: 0; }
  .mm-qr__head-in { flex: 1; }
  .mm-qr__title { display: flex; align-items: baseline; justify-content: center; gap: var(--mm-3); }
  .mm-qr__title h1 { flex-direction: row; align-items: baseline; gap: var(--mm-3); }
  .mm-qr__name { padding-inline-start: var(--mm-3); border-inline-start: 1px solid var(--mm-line); }
  .mm-qr__title p { margin: 0; padding-inline-start: var(--mm-3); border-inline-start: 1px solid var(--mm-line); white-space: nowrap; }
}
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .mm-qr__title p { display: none; }
  .mm-qr__back span, .mm-qr__icon-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mm-qr__icon { min-width: var(--mm-tap); padding: 0; justify-content: center; }
}
.mm-qr__end-tools { justify-self: end; display: flex; align-items: center; gap: var(--mm-3); min-width: 0; }
.mm-qr__tools { display: flex; align-items: center; gap: var(--mm-1); }
.mm-qr__icon { display: inline-flex; align-items: center; gap: var(--mm-2); min-width: 2.5rem; height: 2.5rem; padding: 0 var(--mm-2); border: 0; border-radius: 999px; background: none; color: var(--mm-ink); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); cursor: pointer; justify-content: center; transition: background-color 150ms var(--mm-ease); }
.mm-qr__icon:has(.mm-qr__icon-txt) { padding-inline: var(--mm-3); }
.mm-qr__icon:hover, .mm-qr__icon[aria-expanded="true"] { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-qr__icon:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qr__ico-out { display: none; }
.mm-qr__icon[aria-pressed="true"] .mm-qr__ico-in { display: none; }
.mm-qr__icon[aria-pressed="true"] .mm-qr__ico-out { display: inline; }
.mm-qr__icon svg { display: block; }
/* Aller à un verset : petite fenêtre ancrée sous le bouton, alignée à droite. */
.mm-qr__go { position: relative; }
.mm-qr__goform { position: absolute; z-index: 20; top: calc(100% + var(--mm-2)); right: 0; width: 15rem; padding: var(--mm-4); border-radius: var(--mm-radius-lg); background: var(--mm-surface);
  box-shadow: inset 0 0 0 1px var(--mm-line), 0 16px 32px -18px color-mix(in srgb, var(--mm-shadow-ink) 45%, transparent); }
.mm-qr__goform[hidden] { display: none; }
.mm-qr__goform label { display: block; margin-bottom: var(--mm-2); font-weight: 600; font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-qr__goform label span { font-weight: 400; color: var(--mm-muted); }
.mm-qr__gorow { display: flex; gap: var(--mm-2); }
/* Lot C : « Verset » ou « Page » dans l'affichage « Page ». */
.mm-qr__gokind { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: var(--mm-3); padding: 2px; border-radius: 999px; background: var(--mm-green-100); }
.mm-qr__gokind[hidden] { display: none; }
.mm-qr__goform .mm-qr__gokind label { position: relative; margin: 0; }
.mm-qr__gokind input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.mm-qr__goform .mm-qr__gokind span { display: flex; align-items: center; justify-content: center; min-height: 2.25rem; border-radius: 999px; font-weight: 600; font-size: var(--mm-text-sm); color: var(--mm-green-title); }
.mm-qr__goform .mm-qr__gokind input:checked + span { background: var(--mm-surface); box-shadow: var(--mm-elev-1); }
.mm-qr__goform .mm-qr__gokind input:focus-visible + span { outline: 2px solid var(--mm-gold); outline-offset: 1px; }
.mm .mm-qr__gorow input { flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 var(--mm-3); border: 1px solid var(--mm-line-strong); border-radius: var(--mm-radius); font: 600 var(--mm-text-md)/1 var(--mm-font-ui); font-variant-numeric: tabular-nums; color: var(--mm-ink); background: var(--mm-surface); }
.mm .mm-qr__gorow input:focus { outline: 2px solid var(--mm-gold); outline-offset: 1px; border-color: var(--mm-gold); }
.mm-qr__gobtn { min-height: 2.75rem; padding: 0 var(--mm-4); border: 0; border-radius: var(--mm-radius); background: var(--mm-green-900); color: var(--mm-on-green); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); cursor: pointer; }
.mm-qr__gobtn:hover { background: var(--mm-green-800); }
.mm-qr__gobtn:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-quran-verse:focus { outline: none; }
.mm-quran-verse:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 4px; border-radius: var(--mm-radius); }
.mm-qr__act:focus-visible, .mm-qr__back:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
/* Page de lecture : colonne de 56 rem au plus, centrée. */
.mm-qr__page { width: 100%; max-width: 56rem; margin: 0 auto; padding: var(--mm-6) 0 var(--mm-8); display: flex; flex-direction: column; gap: var(--mm-4); }
/* Les avis gardent leurs propres couleurs. */
.mm-qr .mm-notice { color: var(--mm-ink); }
.mm-qr .mm-notice--warn { color: var(--mm-gold-ink); }
.mm-quran-text { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; list-style: none; }
/* Un verset : la marge (référence, marque-page) à gauche, le texte à droite de la marge. */
.mm-quran-verse { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: var(--mm-4); padding: var(--mm-6) var(--mm-3); border-bottom: 1px solid var(--mm-line); scroll-margin-top: 10rem; }
.mm-quran-verse:last-child { border-bottom: 0; }
.mm-quran-verse__side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mm-1); padding-top: .625rem; }
.mm-qr__ref { font: 600 var(--mm-text-sm)/1.2 var(--mm-font-ui); color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; padding-inline-start: 6px; }
.mm-qr__acts { display: flex; gap: 2px; }
.mm-qr__ref-tot { display: none; }
.mm-quran-verse__body { display: flex; flex-direction: column; gap: var(--mm-3); min-width: 0; }
/* Lot E3 (défilement) : la marge du verset devient un rail compact (3,5 rem au lieu de 5,5) — référence et
   marque-page centrés l'un sous l'autre, la référence à hauteur de la première ligne arabe ; plus de colonne vide entre
   eux et la traduction. La traduction garde 40 rem au plus (environ 70 caractères par ligne). */
@media (min-width: 48rem) {
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-verse { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-verse__side { align-items: center; padding-top: calc((var(--qr-ar) * 2.2 - 1.125rem) / 2 - var(--mm-1)); }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-qr__ref { padding-inline-start: 0; }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-qr__acts { flex-direction: column; align-items: center; }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-verse__tr { max-width: 40rem; }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-verse__notes { max-width: 40rem; }
}
.mm-quran-verse__ar { margin: 0; font: 400 var(--qr-ar)/2.2 var(--mm-font-quran); letter-spacing: 0; word-spacing: .04em; color: var(--mm-ink); text-align: right; }
.mm-qr--qpc .mm-quran-verse__ar { font-family: var(--mm-font-qpc); line-height: 2.1; }
.mm-quran-verse__fin { color: var(--mm-green-title); }
.mm-quran-verse__no { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; margin-inline-start: .3em; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--mm-green-title); font: 600 max(.75rem, calc(var(--qr-ar) * .3))/1 var(--mm-font-ui); color: var(--mm-green-title); vertical-align: .15em; font-variant-numeric: tabular-nums; }
.mm-quran-verse__tr { margin: 0; font: 400 var(--qr-tr)/1.75 var(--mm-font-read); color: color-mix(in srgb, var(--mm-ink) 86%, var(--mm-surface)); max-width: 44rem; }
.mm-quran-verse__tr sup { color: var(--mm-gold-ink); font-family: var(--mm-font-ui); }
.mm-quran-verse__notes { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-quran-verse__notes summary { cursor: pointer; padding-block: .375rem; }
.mm-quran-verse__mark { margin: 0; }
.mm-qr__act { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; min-width: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mm-muted); cursor: pointer; }
/* Cible tactile de 44 px sans élargir la marge : la zone cliquable déborde un peu autour de l'icône. */
.mm-qr__act { position: relative; }
.mm-qr__act::after { content: ""; position: absolute; inset: -4px; }
.mm-qr__mark-ico { fill: none; stroke: currentColor; stroke-width: 1.6; }
.mm-qr__act-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mm-qr__act:hover { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-qr__act[aria-pressed="true"] { color: var(--mm-gold-ink); }
.mm-qr__act[aria-pressed="true"] .mm-qr__mark-ico { fill: var(--mm-gold); stroke: var(--mm-gold-ink); }
/* Par cœur (3 déc.) : « Je le connais » (vert) et « À revoir » (rouge) sous la référence, à bascule. Le verset noté le
   montre aussi par son numéro : rond plein vert, ou cerclé de rouge. */
.mm-quran-verse__hifz { display: contents; }
.mm-qr__hz svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mm-qr__hz--ok:hover { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-qr__hz--ko:hover { background: var(--mm-danger-wash); color: var(--mm-danger); }
.mm-qr__hz--ok[aria-pressed="true"] { background: var(--mm-green-title); color: var(--mm-surface); }
.mm-qr__hz--ko[aria-pressed="true"] { background: var(--mm-danger); color: var(--mm-surface); }
.mm-qr__hz:disabled { cursor: progress; }
.mm-quran-verse[data-hifz="ok"] .mm-quran-verse__no { background: var(--mm-green-title); box-shadow: none; color: var(--mm-surface); }
.mm-quran-verse[data-hifz="ko"] .mm-quran-verse__no { box-shadow: inset 0 0 0 1.5px var(--mm-danger); color: var(--mm-danger); }
.mm-quran-verse[data-hifz="ok"] .mm-qr__ref { color: var(--mm-green-title); }
.mm-quran-verse[data-hifz="ko"] .mm-qr__ref { color: var(--mm-danger); }
.mm-mushaf .mm-mushaf__end[data-hifz="ok"] { color: var(--mm-green-title); border-radius: 999px; background: color-mix(in srgb, var(--mm-green-title) 16%, transparent); }
.mm-mushaf .mm-mushaf__end[data-hifz="ko"] { color: var(--mm-danger); border-radius: 999px; background: var(--mm-danger-wash); }
.mm-mushaf .mm-mushaf__end:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; border-radius: 999px; }
.mm-qr-hz { position: fixed; z-index: 30; display: grid; gap: var(--mm-2); padding: var(--mm-3); border-radius: var(--mm-radius); background: var(--mm-surface); box-shadow: 0 12px 32px -16px color-mix(in srgb, var(--mm-shadow-ink) 60%, transparent), inset 0 0 0 1px var(--mm-line); }
.mm-qr-hz[hidden] { display: none; }
.mm-qr-hz__ref { margin: 0; font: 600 var(--mm-text-sm)/1.2 var(--mm-font-ui); color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; }
.mm-qr-hz__acts { display: flex; gap: var(--mm-2); }
.mm-qr-hz__b { display: inline-flex; align-items: center; gap: var(--mm-2); min-height: var(--mm-tap); padding: 0 var(--mm-3); border: 0; border-radius: 999px; background: var(--mm-cream); box-shadow: inset 0 0 0 1px var(--mm-line); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); color: var(--mm-ink); cursor: pointer; }
.mm-qr-hz__b svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mm-qr-hz__b--ok { color: var(--mm-green-title); }
.mm-qr-hz__b--ko { color: var(--mm-danger); }
.mm-qr-hz__b--ok[aria-pressed="true"] { background: var(--mm-green-title); box-shadow: none; color: var(--mm-surface); }
.mm-qr-hz__b--ko[aria-pressed="true"] { background: var(--mm-danger); box-shadow: none; color: var(--mm-surface); }
.mm-qr-hz__b:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
/* Lecture continue : les mêmes versets, remis en ligne ; repères de versets exacts. */
.mm-qr[data-mode="flow"] .mm-quran-text { display: block; text-align: right; direction: rtl; }
.mm-qr[data-mode="flow"] .mm-quran-verse { display: inline; padding: 0; border: 0; }
.mm-qr[data-mode="flow"] .mm-quran-verse__body { display: inline; }
.mm-qr[data-mode="flow"] .mm-quran-verse__ar { display: inline; line-height: 2.4; }
.mm-qr[data-mode="flow"] .mm-quran-verse__tr, .mm-qr[data-mode="flow"] .mm-quran-verse__notes, .mm-qr[data-mode="flow"] .mm-quran-verse__side { display: none; }
/* Fin de sourate : précédente et suivante. */
.mm-qr__end { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mm-3); margin-top: var(--mm-6); }
.mm-qr__end a { display: inline-flex; align-items: center; gap: var(--mm-2); min-height: var(--mm-tap); padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius); box-shadow: inset 0 0 0 1px var(--mm-line); color: var(--mm-ink); text-decoration: none; }
.mm .mm-qr__end a { color: var(--mm-ink); }
.mm-qr__end a:hover { background: var(--mm-green-100); }
.mm-qr__end em { display: block; font-style: normal; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-qr__end-next { justify-content: flex-end; text-align: right; grid-column: 2; }
/* Plein écran de lecture : navigation générale masquée, retour et outils toujours visibles. */
.mm-shell:has(.mm-qr[data-immersive="1"]) { grid-template-columns: minmax(0, 1fr); }
.mm-shell:has(.mm-qr[data-immersive="1"]) > .mm-side, .mm-main:has(.mm-qr[data-immersive="1"]) > .mm-topbar { display: none; }
.mm-main:has(.mm-qr[data-immersive="1"]) .mm-qr__head { top: 0; }
@media (max-width: 47.99rem) {
  .mm-qr__head { top: 0; margin-inline: calc(-1 * var(--mm-4)); padding: var(--mm-1) var(--mm-2); }
  .mm-qr__end-tools { gap: var(--mm-1); }
  .mm-qr__head-in { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--mm-1); }
  .mm-qr__back { padding-inline: var(--mm-2); min-width: var(--mm-tap); min-height: var(--mm-tap); justify-content: center; }
  .mm-qr__back span, .mm-qr__icon-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mm-qr__title p { display: none; }
  .mm-qr__icon { min-width: var(--mm-tap); height: var(--mm-tap); padding: 0; }
  /* Téléphone : la marge passe sous le texte, en ligne. */
  .mm-quran-verse { grid-template-columns: minmax(0, 1fr); gap: var(--mm-2); padding: var(--mm-5) var(--mm-3); }
  .mm-quran-verse__side { order: 2; flex-direction: row; align-items: center; gap: var(--mm-2); padding-top: 0; }
  .mm-qr__ref { padding-inline-start: 0; }
  .mm-qr__end { grid-template-columns: 1fr; }
  .mm-qr__end-next { grid-column: 1; }
}
/* ---------- Récitation (C5-P1-UX-AUDIO, étape 2) ----------
   Une barre compacte collée en bas du lecteur : récitateur, précédent / écouter / suivant, verset
   et avancement. Le verset récité est légèrement mis en évidence ; aucun mouvement des lettres. */
.mm-quran-verse { transition: background-color 200ms var(--mm-ease); }
/* Verset en cours : une teinte douce seulement (27 nov. : le filet doré à gauche faisait « généré »). */
.mm-quran-verse.is-reciting { border-radius: var(--mm-radius); background: color-mix(in srgb, var(--mm-gold-wash) 70%, transparent); box-shadow: none; }
/* Suivi lisible (retour utilisateur du 25 nov. : en lecture continue, le fond pâle derrière des
   lignes très espacées se voyait à peine, en rayures). Pendant la récitation, les autres versets
   s'estompent et le verset récité garde toute son encre ; son numéro passe en or plein. Aucun fond
   en lecture continue ; en lecture avec traduction, le cadre d'or reste. */
.mm-quran-verse :is(.mm-quran-verse__ar, .mm-quran-verse__tr) { transition: color 280ms var(--mm-ease); }
/* Versets estompés autour du verset récité, en défilement seulement : en immersif, le verset affiché est seul et jamais estompé. */
.mm-qr:not([data-view="focus"]) .mm-quran-text:has(.is-reciting) .mm-quran-verse:not(.is-reciting) .mm-quran-verse__ar { color: color-mix(in srgb, var(--mm-ink) 38%, var(--mm-cream)); }
.mm-qr:not([data-view="focus"]) .mm-quran-text:has(.is-reciting) .mm-quran-verse:not(.is-reciting) .mm-quran-verse__tr { color: color-mix(in srgb, var(--mm-ink) 45%, var(--mm-cream)); }
.mm-qr[data-mode="flow"] .mm-quran-verse.is-reciting { background: none; box-shadow: none; }
.mm-quran-verse.is-reciting .mm-quran-verse__no { background: var(--mm-gold); box-shadow: none; color: var(--mm-green-900); }
/* Mot à mot en or (26 nov.) : avec le minutage de la source, le mot récité s'éclaire, les mots dits restent
   en or encre (lisible sur clair, valeur de nuit de la planche) ; sans minutage, rien ne change. */
.mm-quran-verse .mm-w { transition: color .28s ease, text-shadow .28s ease; }
.mm-quran-verse.has-words .mm-w.is-dit { color: var(--mm-gold-ink); }
/* Mot récité : il s'allume en or (halo doux), sans cadre (27 nov. : « le surlignage carré pas au niveau »). */
.mm-quran-verse.has-words .mm-w.is-dore { color: var(--mm-gold-ink); text-shadow: 0 0 .55em color-mix(in srgb, var(--mm-gold) 70%, transparent), 0 0 .15em color-mix(in srgb, var(--mm-gold-light) 60%, transparent); }
/* Couleurs du tajwid (27 nov.) : une couleur par famille de règles, jetons de la planche (--mm-tj-*). Le mot récité
   passe en or par-dessus ; autour du verset récité, les couleurs s'estompent avec le texte. */
.mm-tj--muet { color: var(--mm-tj-muet); }
.mm-tj--ghunna { color: var(--mm-tj-ghunna); }
.mm-tj--qalqala { color: var(--mm-tj-qalqala); }
.mm-tj--madd-2 { color: var(--mm-tj-madd-2); }
.mm-tj--madd-jaiz { color: var(--mm-tj-madd-jaiz); }
.mm-tj--madd-wajib { color: var(--mm-tj-madd-wajib); }
.mm-tj--madd-lazim { color: var(--mm-tj-madd-lazim); }
.mm-quran-verse.has-words .mm-w:is(.is-dore, .is-dit) .mm-tj { color: inherit; }
/* 30 nov. : mêmes couleurs peintes en surlignage sur un mot d'un seul tenant (quran.js, CSS Custom Highlight).
   --tj-or : le mot dit en or garde l'or ; --tj-a : versets non récités atténués pendant l'écoute. */
::highlight(mm-tj-muet) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-muet) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-ghunna) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-ghunna) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-qalqala) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-qalqala) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-madd-2) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-madd-2) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-madd-jaiz) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-madd-jaiz) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-madd-wajib) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-madd-wajib) var(--tj-a, 100%), transparent)); }
::highlight(mm-tj-madd-lazim) { color: var(--tj-or, color-mix(in srgb, var(--mm-tj-madd-lazim) var(--tj-a, 100%), transparent)); }
:is(.mm-quran-verse.has-words, .mm-mushaf) .mm-w:is(.is-dore, .is-dit) { --tj-or: var(--mm-gold-ink); }
.mm-qr:not([data-view="focus"]) .mm-quran-text:has(.is-reciting) .mm-quran-verse:not(.is-reciting), .mm-mushaf:has(.is-reciting) .mm-mushaf__line [data-ps]:not(.is-reciting) { --tj-a: 50%; }
.mm-qr:not([data-view="focus"]) .mm-quran-text:has(.is-reciting) .mm-quran-verse:not(.is-reciting) .mm-tj { opacity: .5; }
/* Pages du Mushaf en couleurs : écriture Uthmani balisée (police du texte arabe), repères de fin en QPC. */
/* 30 nov., 17 h 39 (« la police change quand on met les couleurs, ça crée un décalage ») : le texte en couleurs
   garde la police QPC Hafs du texte sans couleurs ; plus de saut de forme ni de largeur au changement. Cette
   police n'a pas de cercle pointillé : un signe isolé ne peut plus en faire apparaître un. */
.mm-qr--tajweed .mm-quran-verse__ar { font-family: var(--mm-font-qpc); line-height: 2.1; }
.mm-mushaf .mm-w:is(.is-dore, .is-dit) .mm-tj { color: inherit; }
.mm-mushaf:has(.is-reciting) .mm-mushaf__line [data-ps]:not(.is-reciting) .mm-tj { opacity: .5; }
.mm-tj-legend { display: grid; gap: var(--mm-2); margin: var(--mm-3) 0 var(--mm-2); padding: 0; list-style: none; font-size: var(--mm-text-sm); }
.mm-tj-legend li { display: flex; align-items: baseline; gap: var(--mm-2); }
.mm-tj-legend small { color: var(--mm-muted); font-size: var(--mm-text-xs); }
.mm-tj-legend__dot { flex: none; width: .75rem; height: .75rem; border-radius: 50%; transform: translateY(1px); }
.mm-tj-legend__dot--muet { background: var(--mm-tj-muet); }
.mm-tj-legend__dot--ghunna { background: var(--mm-tj-ghunna); }
.mm-tj-legend__dot--qalqala { background: var(--mm-tj-qalqala); }
.mm-tj-legend__dot--madd-2 { background: var(--mm-tj-madd-2); }
.mm-tj-legend__dot--madd-jaiz { background: var(--mm-tj-madd-jaiz); }
.mm-tj-legend__dot--madd-wajib { background: var(--mm-tj-madd-wajib); }
.mm-tj-legend__dot--madd-lazim { background: var(--mm-tj-madd-lazim); }
/* Affichage « Page » (27 nov.) : la sourate page par page, comme dans le Mushaf de Médine imprimé. Quinze
   lignes par page, chaque ligne justifiée d'un bord à l'autre (les deux premières pages et les lignes
   courtes sont centrées) ; la taille du texte suit la largeur de la page, puis le script la resserre si une
   ligne ne tient pas (--mushaf-k). Sans script, les versets restent en défilement.
   C5-EXPERIENCE-02 lot B (30 nov.) : plus de cartes à double filet or et ombre ; les pages se suivent sur le
   fond de lecture, séparées d'un filet fin, le numéro au pied. L'or ne marque que les repères (titre de
   sourate, fin de verset). La hauteur d'une ligne ne dépend que de la largeur de la page : l'ajustement de
   la taille après chargement de la police ne déplace plus rien. */
.mm-mushaf { display: none; }
.mm-qr.is-js[data-view="page"] :is(.mm-quran-text, .mm-qr__step, .mm-qr__manque) { display: none; }
.mm-qr.is-js[data-view="page"] .mm-qr__page { max-width: 64rem; }
.mm-qr.is-js[data-view="page"] .mm-mushaf { display: grid; justify-items: center; gap: var(--mm-5); padding-bottom: var(--mm-4); }
/* 30 nov. (« trop simple… un prolongement de notre app ») : la lecture en pages se pose sur le fond zellige
   ivoire de la planche (prévu pour les marges du lecteur) ; chaque page est une feuille ivoire, filet or fin,
   élévation douce ; titre de sourate en cartouche vert, pied orné du séparateur à médaillon. */
/* 30 nov., 16 h 55 (« j'aime pas le background ») : plus de motif ; fond crème uni de l'application, avec une
   lumière d'or très douce venue du haut. */
.mm-main:has(.mm-qr.is-js) { background: radial-gradient(120% 55% at 50% 0%, color-mix(in srgb, var(--mm-gold-light) 14%, transparent), transparent 70%) fixed, var(--mm-cream); }
/* 1er déc., 14 h 39 : motifs géométriques de la barre (MM-BG-CARTE-GEOMETRIE) repris en filets d'or sur le fond de
   tout l'espace Coran — pas partout : un angle en haut à droite, l'angle opposé en bas à gauche, chacun fondu vers le
   texte. 17 h 57 : les angles partent du bord de l'écran, sous l'en-tête et sous la barre d'écoute, qui en cachent
   l'entrée — le motif du haut prolonge la gravure de l'en-tête au lieu de flotter sous lui (quelle que soit sa hauteur,
   immersion comprise). Copies provisoires tirées de la planche (MM-QR-FOND-GEO-HAUT / -BAS),
   en attendant le motif demandé à ChatGPT (lot 8). Pas sur téléphone, où la page de lecture va de bord à bord. */
@media (min-width: 48rem) {
  .mm-main:has(.mm-qr.is-js, .mm-qlib) { background:
    url(../brand/img/MM-QR-FOND-GEO-HAUT.webp) right top / 34rem auto no-repeat fixed,
    url(../brand/img/MM-QR-FOND-GEO-BAS.webp) left var(--shell-side, 0px) bottom / 34rem auto no-repeat fixed,
    radial-gradient(120% 55% at 50% 0%, color-mix(in srgb, var(--mm-gold-light) 14%, transparent), transparent 70%) fixed, var(--mm-cream); }
}
/* Coins de la planche (MM-QR-COIN-PAGE, angle supérieur droit, retourné pour le gauche) sur les feuilles de lecture,
   à partir de 48 rem ; la feuille réserve leur place pour qu'aucune ligne ne les touche. */
@media (min-width: 48rem) {
  .mm-mushaf__page, .mm-qr.is-js[data-view="scroll"] .mm-quran-text { position: relative; }
  .mm-mushaf__page::before, .mm-mushaf__page::after, .mm-qr.is-js[data-view="scroll"] .mm-quran-text::before, .mm-qr.is-js[data-view="scroll"] .mm-quran-text::after { content: ""; position: absolute; top: var(--mm-2); width: 4rem; aspect-ratio: 1; background: url(../brand/img/MM-QR-COIN-PAGE.webp) center / contain no-repeat; pointer-events: none; }
  .mm-mushaf__page::before, .mm-qr.is-js[data-view="scroll"] .mm-quran-text::before { right: var(--mm-2); }
  .mm-mushaf__page::after, .mm-qr.is-js[data-view="scroll"] .mm-quran-text::after { left: var(--mm-2); transform: scaleX(-1); }
  /* 30 nov., 18 h 36 puis lot E2 : la première ligne commence toujours sous les coins (4 rem, posés à 0,5 rem du bord) —
     plus seulement quand la page s'ouvre sur un titre ; marges internes régulières (2,75 rem sur les côtés, 1,5 rem
     sous le médaillon). */
  .mm-qr.is-js[data-view="page"] .mm-mushaf__page { --sheet-pad: 2.75rem; padding: calc(var(--mm-2) + 4rem) var(--sheet-pad) var(--mm-5); }
  .mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-text { padding: var(--mm-7) 2.5rem var(--mm-2); }
  .mm-qr.is-js[data-view="scroll"][data-mode="flow"] .mm-quran-text { padding: var(--mm-8) 3rem var(--mm-6); }
}
.mm-mushaf__page { container: mm-mushaf / inline-size; width: min(100%, calc(44rem * var(--qr-ar-k, 1))); padding: var(--mm-5) var(--mm-6) var(--mm-4); border-radius: var(--mm-radius-sm); background: var(--qr-feuille, var(--mm-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 28%, transparent), 0 1px 2px color-mix(in srgb, var(--mm-green-900) 7%, transparent); scroll-margin-top: var(--qr-top, 6rem); }
/* Lot E2 : une feuille de Mushaf, pas une carte — ivoire chaud de la planche (--mm-glow) le jour, rayon réduit
   (10 px), filet d'or, ombre d'un pixel. La nuit garde la surface sombre du thème. */
:root:not([data-theme="nuit"]) .mm-qr { --qr-feuille: var(--mm-glow); }
.mm-mushaf__page:focus { outline: none; }
.mm-mushaf__page:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 4px; }
.mm-mushaf__lines { font: 400 calc(5.4cqi * var(--mushaf-k, 1))/1 var(--mm-font-qpc); color: var(--mm-ink); }
.mm-mushaf__line { display: flex; align-items: center; justify-content: space-between; gap: .16em; min-height: 10.6cqi; white-space: nowrap; }
.mm-mushaf__page.is-centre .mm-mushaf__line, .mm-mushaf__line.is-court, .mm-mushaf__line--bism { justify-content: center; gap: .4em; }
/* Titre de sourate : le nom reçu de la source entre deux filets or, à la taille du texte. */
/* Lot 7 (ChatGPT, 30 nov.) : le nom de la sourate, en texte, dans le cartouche de la planche (version nuit en mode nuit). */
.mm-mushaf__line--sura, .mm-mushaf__line--titre { justify-content: center; }
.mm-mushaf .mm-mushaf__cartouche { display: grid; place-items: center; width: min(100%, 14em); aspect-ratio: 8 / 1; padding: 0 2.2em .06em; border-radius: 0; background: url(../brand/img/MM-QR-CARTOUCHE-SOURATE.webp) center / contain no-repeat; box-shadow: none; font-size: .82em; line-height: 1; color: var(--mm-green-900); }
:root[data-theme="nuit"] .mm-mushaf .mm-mushaf__cartouche { background-image: url(../brand/img/MM-QR-CARTOUCHE-SOURATE-NUIT.webp); color: var(--mm-gold-light); }
/* Basmala dans le cartouche (texte de la source, police du Mushaf) ; un peu plus large pour ses quatre mots. */
.mm-mushaf .mm-mushaf__line--titre .mm-mushaf__cartouche { display: flex; gap: .3em; justify-content: center; align-items: center; width: min(100%, 17em); font-size: .74em; }
/* Nom de la sourate en signet (30 nov., 18 h 22 : « plus propre ») : un fanion à queue d'aronde accroché au
   bord gauche de la feuille, à la hauteur exacte de la bande du cartouche (70 % de l'image, filets compris) ; or plein sur le pourtour (couche ::before), vert
   profond à l'intérieur (couche ::after, retrait de 1,5 px), nom en or pâle à la taille du cartouche. Grille à trois
   colonnes : le cartouche reste centré, et se décale plutôt que de passer sous le signet quand la place manque. */
.mm-mushaf__line--titre { display: grid; grid-template-columns: 1fr minmax(0, 12.6em) 1fr; align-items: center; gap: .4em; }
.mm-mushaf .mm-mushaf__line--titre .mm-mushaf__cartouche { grid-area: 1 / 2; width: 100%; }
.mm-mushaf__signet { --q: .5em; grid-area: 1 / 3; justify-self: end; position: relative; isolation: isolate; display: flex; align-items: center; height: max(1.96em, 1.5rem); margin-inline-end: calc(-1 * var(--sheet-pad, var(--mm-6))); padding: .12em calc(var(--q) + .8em) 0 .9em;
  font: 400 .56em/1 var(--mm-font-qpc); color: var(--mm-gold-pale); white-space: nowrap; filter: drop-shadow(0 1px 1.5px color-mix(in srgb, var(--mm-green-900) 30%, transparent)); }
.mm-mushaf__signet::before, .mm-mushaf__signet::after { content: ""; position: absolute; z-index: -1; clip-path: polygon(0 0, 100% 0, calc(100% - var(--q)) 50%, 100% 100%, 0 100%); }
.mm-mushaf__signet::before { inset: 0; background: linear-gradient(to bottom, var(--mm-gold-light), var(--mm-gold) 55%, var(--mm-gold-light)); }
.mm-mushaf__signet > span { font-size: max(.6875rem, 1em); }
.mm-mushaf__signet::after { inset: 1.5px 2px 1.5px 0; background: linear-gradient(to bottom, var(--mm-green-700), var(--mm-green-900)); }
:root[data-theme="nuit"] .mm-mushaf__signet::after { background: linear-gradient(to bottom, var(--mm-green-900), color-mix(in srgb, var(--mm-green-900) 60%, var(--mm-surface))); }

.mm-mushaf__end { color: var(--mm-green-title); }
.mm-mushaf__no { display: grid; place-items: center; width: 3rem; aspect-ratio: 1; margin: var(--mm-3) auto 0; background: url(../brand/img/MM-QR-MEDAILLON-PAGE.webp) center / contain no-repeat; font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); color: var(--mm-green-900); font-variant-numeric: tabular-nums; }
.mm-mushaf [data-ps] { cursor: pointer; transition: color .28s ease, text-shadow .28s ease; }
.mm-mushaf .is-reciting { color: var(--mm-green-title); }
.mm-mushaf:has(.is-reciting) .mm-mushaf__line [data-ps]:not(.is-reciting) { color: color-mix(in srgb, var(--mm-ink) 55%, var(--mm-cream)); }
.mm-mushaf .mm-w.is-dit { color: var(--mm-gold-ink); }
.mm-mushaf .mm-w.is-dore { color: var(--mm-gold-ink); text-shadow: 0 0 .55em color-mix(in srgb, var(--mm-gold) 70%, transparent), 0 0 .15em color-mix(in srgb, var(--mm-gold-light) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { .mm-mushaf [data-ps] { transition: none; } }
@media (min-width: 100rem) { .mm-mushaf__page { width: min(100%, calc(48rem * var(--qr-ar-k, 1))); } }
@media (max-width: 47.99rem) { .mm-mushaf__page { padding: var(--mm-3) var(--mm-2) var(--mm-3); } .mm-qr.is-js[data-view="page"] .mm-mushaf { gap: var(--mm-3); } }
@media print { .mm-main:has(.mm-qr) { background-image: none; } }
/* 30 nov. (« si on met ce background, aligner les autres modes ») : défilement et immersif sur la même
   feuille ivoire à filet or que les pages. */
/* Lot E3 : la feuille du défilement prend le langage de la feuille du Mushaf (E2) — ivoire, 10 px, ombre d'un pixel. */
.mm-qr.is-js[data-view="scroll"] .mm-quran-text { border-radius: var(--mm-radius-sm); background: var(--qr-feuille, var(--mm-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 28%, transparent), 0 1px 2px color-mix(in srgb, var(--mm-green-900) 7%, transparent); }
.mm-qr.is-js[data-view="scroll"] .mm-quran-text { padding: var(--mm-2) var(--mm-5); }
.mm-qr.is-js[data-view="scroll"] .mm-quran-verse:last-child { border-bottom: 0; }
/* Lot 7 : filet or à losange (MM-QR-FILET-VERSET) à la place du trait gris entre deux versets. */
.mm-qr.is-js[data-view="scroll"]:not([data-mode="flow"]) .mm-quran-verse:not(:last-child) { border-bottom: 0; background-image: url(../brand/img/MM-QR-FILET-VERSET.webp); background-repeat: no-repeat; background-position: center bottom; background-size: min(28rem, 70%) auto; }
.mm-qr.is-js[data-view="scroll"][data-mode="flow"] .mm-quran-text { padding: var(--mm-6); }
@media (max-width: 47.99rem) { .mm-qr.is-js[data-view="scroll"] .mm-quran-text { padding: 0 var(--mm-1); } .mm-qr.is-js[data-view="scroll"][data-mode="flow"] .mm-quran-text { padding: var(--mm-4) var(--mm-3); } }
/* Veilleuses (MM-ORN-LANTERNE-FINE) suspendues sous l'en-tête, au milieu de chaque marge, quand la marge est large. */
.mm-qr__decor { display: none; }
/* 16 h 55 (« la lanterne doit être plus grande, à droite ») : une seule veilleuse, à droite, plus grande. */
/* 17 h 39 puis 17 h 52 (« pas comme accroché au menu du haut ») : 9 rem ; l'attache sort de sous la barre (glissée
   sous son filet d'or, au-dessus de son ombre), la lanterne pend de la barre elle-même. */
.mm-qr__veille { position: fixed; z-index: 11; top: calc(var(--qr-top-colle, 8.5rem) - 1.1rem); width: 9rem; aspect-ratio: 480 / 640; background: url(../brand/img/MM-QR-VEILLEUSE-COURTE.webp) center top / contain no-repeat; pointer-events: none; }
.mm-qr__veille--d { right: calc(var(--rail-axe) - 4.5rem); }
@media (min-width: 80rem) and (min-height: 44rem) { .mm-qr.is-js[data-view="page"] .mm-qr__decor { display: block; } }
@media (min-width: 92rem) and (min-height: 44rem) { .mm-qr.is-js[data-view="scroll"] .mm-qr__decor { display: block; } }
@media print { .mm-qr__decor { display: none; } }

/* C5-EXPERIENCE-02 lot C (30 nov.) : avancer d'une page (affichage « Page ») ou d'un verset (défilement).
   Grand écran : deux chevrons dans la marge droite, au-dessus de la barre d'écoute. Plus étroit : une bande
   au-dessus de la barre d'écoute, qui réserve sa place (rien de la lecture n'est recouvert). L'immersif garde
   ses boutons Précédent / Suivant, aux mêmes unités et au même endroit. */
.mm-qr__nav { display: none; }
.mm-qr { --nav-col: 56rem; }
/* Lot E1 (30 nov., mandat PR #47) : un seul ancrage du rail droit (veilleuse, cadre, chevrons). Son axe est au milieu
   de la marge droite de la colonne de lecture, sans jamais s'en éloigner de plus de 8 rem : sur très grand écran, les
   commandes restent près du texte au lieu de partir au bord de l'écran. */
.mm-qr { --rail-m: calc((100vw - var(--shell-side, 0px) - var(--nav-col)) / 2); --rail-axe: max(calc(var(--rail-m) / 2), calc(var(--rail-m) - 8rem)); }
/* En « Page », les messages posés au-dessus des feuilles (corpus d'essai, versets sans texte) prennent la largeur
   de la feuille : le rail, désormais près d'elle, ne les recouvre jamais. */
.mm-qr.is-js[data-view="page"] .mm-qr__page > :not(.mm-mushaf) { width: min(100%, var(--nav-col)); margin-inline: auto; }
.mm-qr[data-view="page"] { --nav-col: calc(44rem * var(--qr-ar-k, 1)); }
@media (min-width: 100rem) { .mm-qr[data-view="page"] { --nav-col: calc(48rem * var(--qr-ar-k, 1)); } }
.mm-qr.is-js:is([data-view="page"], [data-view="scroll"]) .mm-qr__nav { position: fixed; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: var(--mm-3); left: var(--shell-side, 0px); right: 0; bottom: var(--qr-bottom, 0px); padding: var(--mm-1) var(--mm-4); background: var(--mm-green-900); border-top: 1px solid color-mix(in srgb, var(--mm-gold) 45%, transparent); }
.mm-qr.is-js:is([data-view="page"], [data-view="scroll"]) .mm-qr__page { padding-bottom: calc(var(--qr-bottom, 0px) + 4.5rem); }
.mm-qr.is-js:not(:has(.mm-qa)) .mm-qr__nav { padding-bottom: calc(var(--mm-1) + env(safe-area-inset-bottom)); }
.mm-qr__nav-pos { margin: 0 auto 0 0; font: 600 var(--mm-text-sm)/1.2 var(--mm-font-ui); color: var(--mm-green-title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-qr__nav-pos span { font-weight: 500; color: var(--mm-muted); }
.mm-qr__nav-back { min-height: 2.25rem; padding: 0 var(--mm-3); border: 1px solid var(--mm-gold); border-radius: 999px; background: var(--mm-gold-wash); color: var(--mm-gold-ink); font: 600 var(--mm-text-xs)/1.2 var(--mm-font-ui); cursor: pointer; white-space: nowrap; }
.mm-qr__nav-back[hidden] { display: none; }
.mm-qr__nav-btns { display: flex; gap: var(--mm-1); }
.mm-qr__nav-btn { display: grid; place-items: center; width: var(--mm-tap); height: var(--mm-tap); padding: 0; border: 1px solid var(--mm-line); border-radius: 50%; background: var(--mm-surface); color: var(--mm-gold-ink); cursor: pointer; transition: background-color var(--mm-fast) var(--mm-ease), color var(--mm-fast) var(--mm-ease); }
.mm-qr__nav-btn:hover:not(:disabled) { background: var(--mm-green-100); }
.mm-qr__nav-btn:active:not(:disabled) { background: var(--mm-gold); border-color: var(--mm-gold); color: var(--mm-green-900); }
.mm-qr__nav-btn:focus-visible, .mm-qr__nav-back:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qr__nav-btn:disabled { color: var(--mm-line-strong); cursor: default; }
@media (prefers-reduced-motion: reduce) { .mm-qr__nav-btn { transition: none; } }
/* Lot E5 (mandat PR #47) : une seule capsule verte, chevrons posés dessus — plus de disques sombres permanents sous
   chaque chevron ; un filet d'or discret sépare les deux. Survol : disque clair ; appui : or ; désactivé : chevron
   éteint ; focus clavier : anneau d'or. Vaut pour le groupe compact comme pour le groupe dans le cadre. */
.mm-qr__nav-btns .mm-qr__nav-btn { position: relative; background: transparent; }
.mm-qr__nav-btns .mm-qr__nav-btn:hover:not(:disabled) { background: var(--mm-green-100); }
.mm-qr__nav-btns .mm-qr__nav-btn:active:not(:disabled) { background: var(--mm-gold); color: var(--mm-green-900); }
/* 1er déc., 14 h 06 : le filet est posé au centre exact de la capsule — à mi-distance des deux chevrons (il était sur
   le bord du second bouton, 7 px trop bas). */
.mm-qr__nav-btns { position: relative; }
.mm-qr__nav-btns::after { content: ""; position: absolute; top: 50%; left: 50%; width: 1px; height: 1.25rem; transform: translate(-50%, -50%); background: color-mix(in srgb, var(--mm-gold-light) 45%, transparent); pointer-events: none; }
@media (min-width: 68rem) { .mm-qr.is-js[data-view="page"] .mm-qr__nav-btns::after { width: 1.25rem; height: 1px; } }
@media (min-width: 80rem) { .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-btns::after { width: 1.25rem; height: 1px; } }
/* Marge droite assez large (page de 44 rem ; défilement de 56 rem) : groupe vertical flottant, sans bande. */
/* Groupe flottant sur la page (grand écran) : seuls les chevrons restent en vert ; repère et « Revenir au verset
   récité », posés sur le fond crème, gardent les couleurs de la page. */
@media (min-width: 68rem) { .mm-qr.is-js[data-view="page"] .mm-qr__nav > :not(.mm-qr__nav-btns) { --mm-green-title: var(--qr-green-title); --mm-muted: var(--qr-muted); --mm-gold-ink: var(--qr-gold-ink); --mm-gold-wash: var(--qr-gold-wash); } }
@media (min-width: 80rem) { .mm-qr.is-js[data-view="scroll"] .mm-qr__nav > :not(.mm-qr__nav-btns) { --mm-green-title: var(--qr-green-title); --mm-muted: var(--qr-muted); --mm-gold-ink: var(--qr-gold-ink); --mm-gold-wash: var(--qr-gold-wash); } }
@media (min-width: 68rem) {
  .mm-qr.is-js[data-view="page"] .mm-qr__nav { left: auto; right: max(var(--mm-4), calc(var(--rail-axe) - 1.75rem)); top: calc(50% + (var(--qr-top-colle, 8.5rem) - var(--qr-bottom, 0px)) / 2); bottom: auto; transform: translateY(-50%); flex-direction: column; align-items: center; gap: var(--mm-2); padding: 0; background: none; backdrop-filter: none; border: 0; }
  .mm-qr.is-js[data-view="page"] .mm-qr__page { padding-bottom: calc(var(--qr-bottom, 0px) + var(--mm-8)); }
  .mm-qr.is-js[data-view="page"] .mm-qr__nav-pos { margin: 0; font-size: var(--mm-text-xs); text-align: center; }
  .mm-qr.is-js[data-view="page"] .mm-qr__nav-btns { flex-direction: column; padding: 4px; border: 1px solid var(--mm-line); border-radius: 999px; background: var(--mm-surface); box-shadow: var(--mm-elev-1); }
  .mm-qr.is-js[data-view="page"] .mm-qr__nav-btn { border-color: transparent; }
}
@media (min-width: 80rem) {
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav { left: auto; right: max(var(--mm-4), calc(var(--rail-axe) - 1.75rem)); top: calc(50% + (var(--qr-top-colle, 8.5rem) - var(--qr-bottom, 0px)) / 2); bottom: auto; transform: translateY(-50%); flex-direction: column; align-items: center; gap: var(--mm-2); padding: 0; background: none; backdrop-filter: none; border: 0; }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__page { padding-bottom: calc(var(--qr-bottom, 0px) + var(--mm-8)); }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-pos { margin: 0; font-size: var(--mm-text-xs); text-align: center; }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-btns { flex-direction: column; padding: 4px; border: 1px solid var(--mm-line); border-radius: 999px; background: var(--mm-surface); box-shadow: var(--mm-elev-1); }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-btn { border-color: transparent; }
}
/* 30 nov., 19 h 08 — décision finale de l'utilisateur (ChatGPT, PR #44 99d71cd ; annule la suspension longue de
   18 h 43) : la veilleuse reste seule, à sa place ; le groupe vertical des chevrons est entouré d'un cadre ouvragé
   (MM-QR-NAV-FRAME, 384 × 576, non redessiné). Ouverture mesurée sur les pixels : x 129–254, y 141–412 ; décor visible
   y 44–502. Le groupe prend la taille de l'ouverture (4 rem de large) sur fond vert ; le cadre, en ::before, passe
   au-dessus de ses bords sans capter les clics ; le repère passe sous le cadre, hors de l'image. Le groupe reste sous
   la veilleuse (12 rem de haut). Marges trop étroites ou écran bas : groupe compact, sans cadre. */
@media (min-width: 80rem) and (min-height: 44rem) {
  .mm-qr.is-js[data-view="page"] .mm-qr__nav { top: max(calc(50% + (var(--qr-top-colle, 8.5rem) - var(--qr-bottom, 0px)) / 2), calc(var(--qr-top-colle, 8.5rem) + 10.9rem + var(--mm-3) + 8.1rem)); right: calc(var(--rail-axe) - 4rem); width: 8rem; }
  .mm-qr.is-js[data-view="page"] .mm-qr__nav-btns { --cadre: calc(4rem / 126); position: relative; order: -1; width: calc(var(--cadre) * 126); height: calc(var(--cadre) * 272); margin: calc(var(--cadre) * 97) 0 calc(var(--cadre) * 90); justify-content: space-evenly; align-items: center; gap: 0; padding: 0; border: 0; border-radius: 999px; background: radial-gradient(ellipse at 50% 30%, var(--mm-green-700), var(--mm-green-900) 72%); box-shadow: 0 0 0 4px var(--mm-green-900); }
  .mm-qr.is-js[data-view="page"] .mm-qr__nav-btns::before { content: ""; position: absolute; left: calc(var(--cadre) * -129); top: calc(var(--cadre) * -141); width: calc(var(--cadre) * 384); height: calc(var(--cadre) * 576); background: url(../brand/img/MM-QR-NAV-FRAME.webp) center / contain no-repeat; pointer-events: none; }
}
@media (min-width: 92rem) and (min-height: 44rem) {
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav { top: max(calc(50% + (var(--qr-top-colle, 8.5rem) - var(--qr-bottom, 0px)) / 2), calc(var(--qr-top-colle, 8.5rem) + 10.9rem + var(--mm-3) + 8.1rem)); right: calc(var(--rail-axe) - 4rem); width: 8rem; }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-btns { --cadre: calc(4rem / 126); position: relative; order: -1; width: calc(var(--cadre) * 126); height: calc(var(--cadre) * 272); margin: calc(var(--cadre) * 97) 0 calc(var(--cadre) * 90); justify-content: space-evenly; align-items: center; gap: 0; padding: 0; border: 0; border-radius: 999px; background: radial-gradient(ellipse at 50% 30%, var(--mm-green-700), var(--mm-green-900) 72%); box-shadow: 0 0 0 4px var(--mm-green-900); }
  .mm-qr.is-js[data-view="scroll"] .mm-qr__nav-btns::before { content: ""; position: absolute; left: calc(var(--cadre) * -129); top: calc(var(--cadre) * -141); width: calc(var(--cadre) * 384); height: calc(var(--cadre) * 576); background: url(../brand/img/MM-QR-NAV-FRAME.webp) center / contain no-repeat; pointer-events: none; }
}

/* 30 nov., 17 h 21 (« sur mobile la barre du haut est trop chargée et grande… la taille d'écran doit être optimale
   pour lire ») : au téléphone, le lecteur garde une seule barre en haut, la sienne (retour, sourate, aller à,
   réglages) ; la colonne de l'application, repliée en barre, s'efface comme en plein écran. En bas, plus de bande
   des chevrons : la barre d'écoute seule. Les feuilles de lecture vont d'un bord à l'autre (lignes plus longues,
   texte plus grand). */
@media (max-width: 47.99rem) {
  .mm-shell:has(.mm-qr.is-js) > .mm-side, .mm-main:has(.mm-qr.is-js) > .mm-topbar { display: none; }
  .mm-qr { --qr-top: 6.25rem; }
  .mm-qr.is-js:is([data-view="page"], [data-view="scroll"]) .mm-qr__nav { display: none; }
  .mm-qr.is-js:is([data-view="page"], [data-view="scroll"]) .mm-qr__page { padding-bottom: calc(var(--qr-bottom, 0px) + var(--mm-4)); }
  .mm-qr.is-js[data-view="page"] .mm-mushaf__page, .mm-qr.is-js[data-view="scroll"] .mm-quran-text { width: calc(100% + 2 * var(--mm-4)); max-width: none; margin-inline: calc(-1 * var(--mm-4)); border-radius: 0; box-shadow: 0 1px 0 color-mix(in srgb, var(--mm-gold) 28%, transparent), 0 -1px 0 color-mix(in srgb, var(--mm-gold) 28%, transparent); }
  .mm-qr.is-js[data-view="page"] .mm-mushaf__page { --sheet-pad: var(--mm-2); --signet-saillie: 0px; padding-inline: var(--sheet-pad); }
}
/* Barre de récitation pleine largeur, fixée en bas de la zone de lecture (à droite de la colonne
   verte), comme dans la version préférée par l'utilisateur (v0.90.0) : récitateur à gauche ;
   recommencer, verset précédent, écouter, verset suivant, sourate suivante au centre ; verset,
   avancement, durée et plein écran à droite. La page garde une marge de sa hauteur. */
.mm-qa { position: fixed; z-index: 13; isolation: isolate; left: var(--shell-side, var(--mm-side-w)); right: 0; bottom: 0; padding: var(--mm-2) var(--mm-7) calc(var(--mm-2) + env(safe-area-inset-bottom)); background: linear-gradient(160deg, var(--mm-green-800), var(--mm-green-900) 62%); color: var(--mm-on-green); border-top: 1px solid color-mix(in srgb, var(--mm-gold) 70%, transparent); box-shadow: 0 -10px 24px -18px color-mix(in srgb, var(--mm-green-900) 70%, transparent); }
.mm-qr:has(.mm-qa) .mm-qr__page { padding-bottom: 7rem; }
.mm-shell:has(.mm-qr[data-immersive="1"]) .mm-qa { left: 0; }
.mm-qa__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "who ctrl state" "msg msg msg"; align-items: center; gap: 0 var(--mm-4); max-width: 72rem; margin: 0 auto; }
.mm-qa__who { grid-area: who; justify-self: start; display: flex; flex-direction: column; align-items: flex-start; min-height: var(--mm-tap); min-width: 0; max-width: 100%; padding: 4px var(--mm-3); border: 0; border-radius: var(--mm-radius); background: none; color: var(--mm-ink); text-align: left; cursor: pointer; }
.mm-qa__who:hover { background: var(--mm-green-100); }
.mm-qa__who-k { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-qa__who strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 var(--mm-text-sm)/1.3 var(--mm-font-ui); color: var(--mm-green-title); }
/* Le bouton de lecture sur l'axe de la page (retour du 25 nov.) : à gauche, trois boutons (sourate
   précédente, recommencer, verset précédent) ; à droite, deux. Une place vide de la largeur d'un bouton
   équilibre la rangée, pour que le bouton de lecture tombe sur le même axe que le titre et le filet. */
.mm-qa__ctrl { grid-area: ctrl; display: flex; align-items: center; gap: var(--mm-1); padding-inline-end: calc(var(--mm-tap) + var(--mm-1)); }
.mm-qa__btn { display: grid; place-items: center; width: var(--mm-tap); height: var(--mm-tap); border: 0; border-radius: 50%; background: none; color: var(--mm-green-title); cursor: pointer; }
.mm-qa__btn svg { fill: currentColor; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.mm-qa__btn--line svg { fill: none; stroke-width: 1.7; }
.mm-qa__btn:hover { background: var(--mm-green-100); }
/* Lot E1 : hiérarchie de la barre d'écoute — lecture d'abord, puis verset précédent / suivant (ivoire) ; changer de
   sourate et recommencer passent en second plan (teinte atténuée, icône plus petite), sans perdre leur cible. */
.mm-qa__btn:is([data-qa-surah], [data-qa-restart]) { color: var(--mm-muted); }
.mm-qa__btn:is([data-qa-surah], [data-qa-restart]):hover:not(:disabled) { color: var(--mm-ink); }
.mm-qa__btn[data-qa-surah] svg { width: .875rem; height: .875rem; }
.mm-qa__btn:disabled { color: var(--mm-line-strong); cursor: default; background: none; }
.mm-qa__btn:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
/* 17 h 52 (« trop cheap… pas aligné à notre thème ») : le bouton d'écoute prend la silhouette du mihrab, motif de
   l'application (arches des matières, des niveaux, de « Reprendre ») — vert profond, double filet d'or, lueur
   d'or au cœur comme une lampe, icône or clair. Même hauteur : la barre ne bouge pas. */
.mm-qa__btn--main { width: 2.875rem; height: 3.25rem; margin-inline: var(--mm-2); border-radius: 999px 999px var(--mm-radius-sm) var(--mm-radius-sm);
  background: radial-gradient(closest-side at 50% 62%, color-mix(in srgb, var(--mm-gold-light) 42%, transparent), transparent), linear-gradient(to bottom, var(--mm-green-700), var(--mm-green-900)); color: var(--mm-gold-pale);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 80%, transparent), inset 0 0 0 3px var(--mm-green-900), inset 0 0 0 4px color-mix(in srgb, var(--mm-gold) 45%, transparent), 0 6px 16px -8px color-mix(in srgb, var(--mm-black) 60%, transparent);
  transition: box-shadow var(--mm-fast) var(--mm-ease), background-color var(--mm-fast) var(--mm-ease); }
.mm-qa__btn--main:hover, .mm-qa[data-state="playing"] .mm-qa__btn--main { box-shadow: inset 0 0 0 1px var(--mm-gold-light), inset 0 0 0 3px var(--mm-green-900), inset 0 0 0 4px color-mix(in srgb, var(--mm-gold) 60%, transparent), 0 0 18px -4px color-mix(in srgb, var(--mm-gold-light) 55%, transparent); }
.mm-qa__btn--main:active { background-color: var(--mm-green-800); }
.mm-qa__btn--main svg { transform: translateY(2px); }
.mm-qa__btn--main .mm-qa__i-play { transform: translate(1px, 2px); }
@media (prefers-reduced-motion: reduce) { .mm-qa__btn--main { transition: none; } }
.mm-qa__i-pause { display: none; }
.mm-qa[data-state="playing"] .mm-qa__i-play { display: none; }
.mm-qa[data-state="playing"] .mm-qa__i-pause { display: block; }
.mm-qa[data-state="loading"] .mm-qa__btn--main { opacity: .7; }
.mm-qa__state { grid-area: state; justify-self: end; display: flex; align-items: center; gap: var(--mm-3); min-width: 0; font-size: var(--mm-text-xs); color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-qa__ref { font-weight: 600; font-size: var(--mm-text-sm); color: var(--mm-gold-ink); }
.mm-qa__time { white-space: nowrap; }
.mm-qa__progress { width: clamp(3.5rem, 8vw, 9rem); height: 4px; appearance: none; border: 0; border-radius: 999px; background: var(--mm-line); overflow: hidden; }
.mm-qa__progress::-webkit-progress-bar { background: var(--mm-line); }
.mm-qa__progress::-webkit-progress-value { background: var(--mm-gold); }
.mm-qa__progress::-moz-progress-bar { background: var(--mm-gold); }
.mm-qa__mode { padding: 2px var(--mm-2); border-radius: 999px; background: var(--mm-gold-wash); color: var(--mm-gold-ink); font-weight: 600; white-space: nowrap; }
.mm-qa__mode[hidden] { display: none; }
.mm-qa__sep { width: 1px; height: 1.5rem; background: var(--mm-line); }
.mm-qa__msg { grid-area: msg; margin: 0; font-size: var(--mm-text-xs); color: var(--mm-muted); text-align: center; }
.mm-qa__msg:empty { display: none; }
/* 4 déc. (« les logos d'actions, et le play un peu plus grands », sans agrandir la barre) : icônes agrandies,
   bouton de lecture de 56 px ; la marge verticale de la barre perd 2 px pour que sa hauteur ne bouge pas. */
.mm-qa__btn svg { width: 1.25rem; height: 1.25rem; }
.mm-qa__btn--line svg { width: 1.5rem; height: 1.5rem; }
.mm-qa__btn[data-qa-surah] svg { width: 1.125rem; height: 1.125rem; }
.mm-qa__btn--main { width: 3.25rem; height: 3.5rem; }
.mm-qa__btn--main svg { width: 1.5rem; height: 1.5rem; }
.mm-qa { padding-top: calc(var(--mm-2) - 2px); padding-bottom: calc(var(--mm-2) - 2px + env(safe-area-inset-bottom)); }
/* Tablette (rail d'icônes de 5,75 rem) : la barre part du rail, pas de la colonne de l'ordinateur ;
   la durée laisse sa place, puis sous 62 rem le récitateur (dans les Réglages) et l'avancement :
   restent les commandes, le verset en cours et le plein écran, sans chevauchement. */
@media (min-width: 48rem) and (max-width: 74.99rem) {
  .mm-qa { padding-inline: var(--mm-4); }
  .mm-qa__who-k, .mm-qa__time, .mm-qa__sep { display: none; }
  .mm-qa__progress { width: 3.5rem; }
}
@media (min-width: 48rem) and (max-width: 61.99rem) {
  .mm-qa__who, .mm-qa__progress { display: none; }
}
/* Petit ordinateur (75 à 85 rem) : avancement resserré, le verset en cours garde son écart avec les commandes. */
@media (min-width: 75rem) and (max-width: 84.99rem) { .mm-qa__progress { width: 3.5rem; } }
@media (max-width: 47.99rem) {
  .mm-qa { left: 0; bottom: calc(3.9rem + env(safe-area-inset-bottom)); padding: var(--mm-1) var(--mm-3); }
  .mm-main:has(.mm-qr[data-immersive="1"]) .mm-qa { bottom: 0; padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom)); }
  .mm-qr:has(.mm-qa) .mm-qr__page { padding-bottom: 9rem; }
  /* Téléphone : les commandes sur toute la largeur, puis récitateur et verset en dessous. */
  .mm-qa__bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ctrl ctrl" "who state" "msg msg"; gap: 0 var(--mm-2); }
  .mm-qa__ctrl { justify-self: center; gap: 0; }
  .mm-qa__who { flex-direction: row; align-items: center; gap: var(--mm-2); min-height: 2.25rem; padding: 0 var(--mm-2); }
  .mm-qa__who-k { display: none; }
  .mm-qa__state { gap: var(--mm-2); }
  .mm-qa__progress { width: 3.5rem; }
  .mm-qa__time, .mm-qa__sep { display: none; }
  .mm-qa__state .mm-qr__icon { min-width: 2.25rem; height: 2.25rem; }
}
/* ---------- Mode immersif : un verset à la fois (retour utilisateur du 24 nov.) ----------
   Le verset est posé au centre de l'écran, plus grand ; on passe au suivant par une transition courte
   (fondu et léger glissement), sans défilement. Sans script, la sourate reste entière. */
.mm-qr__step { display: none; }
/* Hauteurs réelles de l'en-tête et de la barre du bas, mesurées par le script (--qr-top, --qr-bottom) :
   le verset et ses commandes tiennent dans l'écran, sans défilement. */
.mm-qr.is-js[data-view="focus"] .mm-qr__page { min-height: calc(100dvh - var(--qr-top, 6rem)); padding-top: var(--mm-4); padding-bottom: calc(var(--qr-bottom, 0px) + var(--mm-3)); }
/* « safe » : un verset plus haut que l'écran commence en haut (la page défile) au lieu d'être coupé. */
.mm-qr.is-js[data-view="focus"] .mm-quran-text { flex: 1; display: grid; align-items: safe center; justify-items: center; direction: ltr; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse { display: none; scroll-margin-top: var(--qr-top, 6rem); }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current { display: flex; flex-direction: column; align-items: center; gap: var(--mm-4); width: 100%; max-width: 48rem; padding: var(--mm-6) var(--mm-4); border: 0; text-align: center; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__ar { display: block; --qr-ar-f: 1.18; font-size: calc(var(--qr-ar) * var(--qr-ar-f)); line-height: 2.1; text-align: center; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__tr { text-align: center; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__side { order: 2; display: flex; flex-direction: row; align-items: center; gap: var(--mm-2); padding-top: 0; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-qr__ref { padding-inline-start: 0; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-reciting { background: none; box-shadow: none; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse:hover { background: none; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-reciting .mm-quran-verse__ar { color: var(--mm-green-title); }
.mm-qr.is-js[data-view="focus"] .mm-qr__end { display: none; }
/* Séparation d'or de l'immersion (retours utilisateur du 25 nov.) : un filet de 1 px qui s'efface aux
   deux bouts, marqué en son milieu du losange de la frise. Lecture avec traduction, grand écran : filet
   vertical, le français à gauche et l'arabe à droite, tous deux contre le filet. Lecture continue (ou
   écran étroit) : verset centré, filet horizontal dessous (entre l'arabe et le français s'il y en a).
   Le filet est tracé par ::before, le losange par ::after, dans la même case de la grille. */
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__body { display: grid; justify-items: center; row-gap: var(--mm-4); width: 100%; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__ar { grid-row: 1; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__tr { grid-row: 3; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__notes { grid-row: 4; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__body::before { content: ""; grid-row: 2; grid-column: 1; place-self: center; width: clamp(6rem, 32%, 15rem); height: 1px; background: linear-gradient(90deg, transparent 0%, var(--mm-gold) 22%, var(--mm-gold) 78%, transparent 100%); }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__body::after { content: ""; grid-row: 2; grid-column: 1; place-self: center; width: 7px; height: 7px; background: var(--mm-gold); transform: rotate(45deg); box-shadow: 0 0 0 4px var(--mm-cream); }
@media (min-width: 64rem) {
  /* Lot E4 : colonne de l'immersion ramenée de 78 à 64 rem — deux colonnes arabe | français équilibrées (vérifié), et
     les flèches de part et d'autre de cette colonne au lieu des coins de l'écran. */
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-qr__page:has(.mm-quran-verse.is-current .mm-quran-verse__tr) { max-width: 64rem; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current:has(.mm-quran-verse__tr) { --qr-col-gap: clamp(var(--mm-5), 3.5vw, var(--mm-8)); max-width: none; padding-block: var(--mm-3); }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr) { grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); align-items: center; justify-items: stretch; column-gap: var(--qr-col-gap); row-gap: var(--mm-3); direction: ltr; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr)::before { grid-column: 2; grid-row: 1 / span 2; place-self: stretch center; width: 1px; height: auto; min-height: 8rem; background: linear-gradient(180deg, transparent 0%, var(--mm-gold) 18%, var(--mm-gold) 82%, transparent 100%); }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr)::after { grid-column: 2; grid-row: 1 / span 2; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr) .mm-quran-verse__ar { grid-column: 3; grid-row: 1 / span 2; justify-self: start; --qr-ar-f: .94; line-height: 1.95; text-align: right; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr) .mm-quran-verse__tr { grid-column: 1; grid-row: 1; align-self: end; justify-self: end; max-width: 100%; text-align: left; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr) .mm-quran-verse__notes { grid-column: 1; grid-row: 2; align-self: start; justify-self: end; text-align: left; }
  .mm-qr.is-js[data-view="focus"][data-mode="both"] .mm-quran-verse.is-current .mm-quran-verse__body:has(> .mm-quran-verse__tr):not(:has(> .mm-quran-verse__notes)) .mm-quran-verse__tr { grid-row: 1 / span 2; align-self: center; }
}
/* Navigation de l'immersion (retour utilisateur du 25 nov. : la rangée « Précédent · n / total ·
   Suivant » sous le verset déséquilibrait la page). Deux flèches rondes et discrètes de part et
   d'autre de la zone de lecture, en bas, loin du texte (retour du 25 nov., 11 h 34) ; au centre, en bas, le repère
   « n / total » sur un filet d'or qui se remplit. Au premier et au dernier verset, la flèche cède sa
   place à la sourate voisine (même endroit, nom en légende). Au téléphone, flèches et repère sur une
   même ligne, au-dessus de la barre de récitation. */
.mm-shell:has(.mm-qr[data-immersive="1"]) { --shell-side: 0px; }
.mm-qr.is-js[data-view="focus"] .mm-qr__page { padding-inline: 4.5rem; padding-bottom: calc(var(--qr-bottom, 0px) + 4rem); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step { position: fixed; z-index: 12; top: var(--qr-top, 6rem); bottom: var(--qr-bottom, 0px); left: var(--shell-side, 0px); right: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--mm-3); padding: var(--mm-4) max(var(--mm-7), calc((100vw - var(--shell-side, 0px) - 64rem) / 2)) var(--mm-8); pointer-events: none; }
/* Lot E4 (mandat PR #47) : les flèches restent en bas et loin du texte (25 nov.), mais au bord de la colonne de lecture
   (64 rem) plutôt qu'aux coins de l'écran ; les deux cercles sur une même ligne — la légende de la sourate voisine passe
   sous son cercle, hors du rang. */
@media (min-width: 48rem) {
  .mm .mm-qr.is-js[data-view="focus"] .mm-qr__step .mm-qr__step-btn--surah { position: relative; width: 3rem; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step .mm-qr__step-btn--surah span { position: absolute; top: calc(100% + var(--mm-1)); left: 50%; width: 8rem; transform: translateX(-50%); }
}
.mm-qr.is-js[data-view="focus"] .mm-qr__step > * { pointer-events: auto; }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah) { width: 3rem; height: 3rem; min-height: 0; padding: 0; justify-content: center; background: color-mix(in srgb, var(--mm-surface) 82%, transparent); box-shadow: inset 0 0 0 1px var(--mm-line); transition: box-shadow 160ms var(--mm-ease), background-color 160ms var(--mm-ease), transform 160ms var(--mm-ease); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah):hover:not(:disabled) { background: var(--mm-green-100); box-shadow: inset 0 0 0 1px var(--mm-gold); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn[data-qr-go="-1"]:hover:not(:disabled) { transform: translateX(-2px); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn[data-qr-go="1"]:hover:not(:disabled) { transform: translateX(2px); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:disabled { opacity: .35; }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mm .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah { flex-direction: column; justify-content: center; gap: var(--mm-1); width: 7.5rem; min-height: 0; padding: 0; background: none; text-align: center; }
.mm .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah:hover { background: none; }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah svg { order: -1; width: 3rem; height: 3rem; padding: .85rem; border-radius: 50%; background: var(--mm-green-100); box-shadow: inset 0 0 0 1px var(--mm-gold); }
.mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah span, .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah[data-qr-step-surah="next"] span { align-items: center; font-size: var(--mm-text-xs); }
/* Repère unique (retour utilisateur du 25 nov.) : sous le verset, « 5:110 / 120 » et le marque-page,
   puis une petite barre d'or de la sourate qui se remplit, à chaque verset. Le compteur de la
   navigation n'est plus affiché (il reste lu par les lecteurs d'écran). */
.mm-qr.is-js[data-view="focus"] .mm-qr__step-n { position: absolute; width: 1px; min-width: 0; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mm-qr__step-glisse { display: none; }
/* 1er déc., 14 h 39 : en immersif, les flèches passent à droite et à gauche du verset, à mi-hauteur de la zone de
   lecture, et quittent le rond : un arc de mihrab étroit (même langage que le bouton de lecture), filet d'or, chevron
   doré ; au survol, il se remplit de vert. La sourate voisine garde son arc doublé d'or et sa légende dessous. */
@media (min-width: 48rem) {
  .mm-qr.is-js[data-view="focus"] .mm-qr__step { top: var(--qr-top-colle, var(--qr-top, 6rem)); align-items: center; padding-block: var(--mm-4); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah), .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah svg { width: 2.75rem; height: 6rem; border-radius: 999px 999px var(--mm-radius-sm) var(--mm-radius-sm); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah) { background: color-mix(in srgb, var(--qr-feuille, var(--mm-surface)) 85%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 60%, transparent); color: var(--mm-gold-ink); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah):hover:not(:disabled) { background: var(--mm-green-900); color: var(--mm-gold-pale); box-shadow: inset 0 0 0 1px var(--mm-gold), inset 0 0 0 3px var(--mm-green-900), inset 0 0 0 4px color-mix(in srgb, var(--mm-gold-light) 55%, transparent); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah svg { padding: 2.375rem .8rem; box-shadow: inset 0 0 0 1px var(--mm-gold), inset 0 0 0 3px var(--mm-green-100), inset 0 0 0 4px color-mix(in srgb, var(--mm-gold) 45%, transparent); }
}
/* 1er déc. : sur tablette (écran tactile, à partir de 48 rem), pas de flèches — on glisse vers la gauche ou la droite
   (quran.js) ; une indication discrète le dit au bas de la zone. Le clavier garde ses flèches. */
@media (min-width: 48rem) and (pointer: coarse) and (hover: none) {
  .mm-qr.is-js[data-view="focus"] .mm-qr__step > :is(a, button) { display: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step { align-items: flex-end; justify-content: center; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-glisse { display: block; font: 500 var(--mm-text-xs)/1.3 var(--mm-font-ui); color: var(--mm-muted); text-align: center; }
}
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-qr__ref-tot { display: inline; color: var(--mm-muted); font-weight: 500; }
/* Repère et barre sur un même axe (retour du 25 nov.) : le texte « 5:110 / 120 » et la barre sont
   centrés l'un sous l'autre ; le marque-page se pose à droite du repère sans déplacer ce centre. */
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__side { position: relative; flex-direction: column; row-gap: var(--mm-2); }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__side > .mm-qr__ref { line-height: 2.75rem; }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-qr__acts { position: absolute; top: 1.375rem; left: 100%; margin-left: var(--mm-1); transform: translateY(-50%); }
.mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current .mm-quran-verse__side::after { content: ""; width: 6rem; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--mm-gold) calc(var(--qr-prog, 0) * 100%), color-mix(in srgb, var(--mm-gold) 24%, transparent) 0); }
.mm-quran-verse.is-in-next .mm-quran-verse__side::after, .mm-quran-verse.is-in-prev .mm-quran-verse__side::after { animation: mm-qr-filet-x 360ms var(--mm-ease) both; }
/* Lecture côte à côte : colonnes égales (retour du 25 nov.), le filet d'or tombe sur l'axe de la page,
   celui du titre de la sourate et du bouton de lecture ; le repère et sa barre sont sur ce même axe. */
@media (max-width: 47.99rem) {
  .mm-qr.is-js[data-view="focus"] .mm-qr__page { padding-inline: var(--mm-2); padding-bottom: calc(var(--qr-bottom, 0px) + 4.5rem); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step { top: auto; height: 4rem; align-items: center; padding: 0 var(--mm-4); background: color-mix(in srgb, var(--mm-surface) 95%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--mm-line); pointer-events: auto; }
  .mm .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah { max-width: calc(50% - 1rem); }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step:has(.mm-qr__step-btn--surah:not([hidden])) .mm-qr__step-n { display: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn:not(.mm-qr__step-btn--surah) { width: 2.75rem; height: 2.75rem; }
  .mm .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah { flex-direction: row; width: auto; }
  .mm .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah[data-qr-step-surah="next"] { flex-direction: row-reverse; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah svg { width: 2.75rem; height: 2.75rem; padding: .75rem; flex: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah span, .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah[data-qr-step-surah="next"] span { align-items: flex-start; text-align: left; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-btn--surah[data-qr-step-surah="next"] span { align-items: flex-end; text-align: right; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-n { bottom: auto; top: 50%; transform: translate(-50%, -50%); }
}
.mm-qr__step-btn { display: inline-flex; align-items: center; gap: var(--mm-2); min-height: var(--mm-tap); padding: 0 var(--mm-4); border: 0; border-radius: 999px; background: none; color: var(--mm-green-title); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); cursor: pointer; box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-qr__step-btn:hover { background: var(--mm-green-100); }
.mm-qr__step-btn[hidden] { display: none; }
.mm .mm-qr__step-btn--surah { color: var(--mm-green-title); text-decoration: none; min-height: 3.25rem; padding-block: var(--mm-1); background: var(--mm-green-100); box-shadow: none; }
.mm-qr__step-btn--surah:hover { background: color-mix(in srgb, var(--mm-green-100) 70%, var(--mm-green-700) 12%); }
.mm-qr__step-btn--surah span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.15; }
.mm-qr__step-btn--surah[data-qr-step-surah="next"] span { align-items: flex-end; }
.mm-qr__step-btn--surah em { font-style: normal; font-weight: 500; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-qr__step-btn:disabled { color: var(--mm-line-strong); cursor: default; background: none; }
.mm-qr__step-btn:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qr__step-n { min-width: 4.5rem; text-align: center; font-size: var(--mm-text-sm); color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-qr__step-n strong { color: var(--mm-gold-ink); }
/* Entrée d'un verset (immersion) : rien n'attend, tout part au même instant. L'arabe sort d'un léger
   flou en glissant vers sa place, la traduction le rejoint, le filet d'or se trace depuis son centre et
   le losange tourne pour s'y poser. --qr-dy : sens du passage (suivant : par en bas ; précédent : par
   en haut). En lecture côte à côte, chaque texte glisse vers le filet. */
.mm-quran-verse.is-in-next { --qr-dy: 16px; }
.mm-quran-verse.is-in-prev { --qr-dy: -16px; }
/* Lot E4 : transitions douces et courtes (320 à 400 ms au lieu de 560 à 700) ; aucune à l'ouverture (quran.js) ; aucune
   avec « réduire les animations ». */
.mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__ar { animation: mm-qr-texte 340ms var(--mm-ease) both; }
.mm-quran-verse:is(.is-in-next, .is-in-prev) :is(.mm-quran-verse__tr, .mm-quran-verse__notes) { animation: mm-qr-texte 380ms var(--mm-ease) both; }
.mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__side { animation: mm-qr-fade 280ms var(--mm-ease) both; }
.mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::before { animation: mm-qr-filet-x 400ms var(--mm-ease) both; }
.mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::after { animation: mm-qr-losange 380ms var(--mm-ease) both; }
@media (prefers-reduced-motion: reduce) {
  .mm-quran-verse:is(.is-in-next, .is-in-prev) :is(.mm-quran-verse__ar, .mm-quran-verse__tr, .mm-quran-verse__notes, .mm-quran-verse__side),
  .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__side::after, .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::before, .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::after { animation: none; }
}
@keyframes mm-qr-texte { from { opacity: 0; transform: translate(var(--qr-dx, 0), var(--qr-dy, 0)) scale(.985); filter: blur(4px); } }
@keyframes mm-qr-fade { from { opacity: 0; } }
@keyframes mm-qr-filet-x { from { opacity: 0; transform: scaleX(0); } }
@keyframes mm-qr-filet-y { from { opacity: 0; transform: scaleY(0); } }
@keyframes mm-qr-losange { from { opacity: 0; transform: rotate(-135deg) scale(0); } }
@media (min-width: 64rem) {
  .mm-qr[data-mode="both"] .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body:has(> .mm-quran-verse__tr)::before { animation-name: mm-qr-filet-y; }
  .mm-qr[data-mode="both"] .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body:has(> .mm-quran-verse__tr) { --qr-dy: 0px; }
  .mm-qr[data-mode="both"] .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body:has(> .mm-quran-verse__tr) .mm-quran-verse__ar { --qr-dx: 18px; }
  .mm-qr[data-mode="both"] .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body:has(> .mm-quran-verse__tr) :is(.mm-quran-verse__tr, .mm-quran-verse__notes) { --qr-dx: -18px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-quran-verse:is(.is-in-next, .is-in-prev) :is(.mm-quran-verse__ar, .mm-quran-verse__tr, .mm-quran-verse__notes, .mm-quran-verse__side),
  .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::before,
  .mm-quran-verse:is(.is-in-next, .is-in-prev) .mm-quran-verse__body::after { animation: mm-qr-fade 160ms linear both; }
}
@media (max-width: 47.99rem) {
  .mm-qr.is-js[data-view="focus"] .mm-quran-verse.is-current { padding: var(--mm-5) var(--mm-2); }
  .mm-qr__step-btn:not(.mm-qr__step-btn--surah) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mm-qr__step-btn:not(.mm-qr__step-btn--surah) { width: var(--mm-tap); padding: 0; justify-content: center; }
}
/* ---------- Panneau latéral des réglages (retour utilisateur du 24 nov.) ----------
   Un seul endroit, rangé : Lecture (affichage, tailles, traduction) puis Récitation (récitateur,
   répétition, vitesse, suivi). S'ouvre à droite ; au téléphone, depuis le bas. */
.mm-qrd-scrim { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--mm-green-900) 28%, transparent); animation: mm-qrd-fade 160ms var(--mm-ease) both; }
.mm-qrd { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(24.5rem, 100vw); display: flex; flex-direction: column; background: var(--mm-surface); box-shadow: -24px 0 48px -28px color-mix(in srgb, var(--mm-shadow-ink) 55%, transparent), inset 1px 0 0 var(--mm-line); animation: mm-qrd-in 160ms var(--mm-ease) both; }
.mm-qrd[hidden], .mm-qrd-scrim[hidden] { display: none; }
@keyframes mm-qrd-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes mm-qrd-fade { from { opacity: 0; } }
html.mm-qrd-open { overflow: hidden; }
.mm-qrd__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--mm-2) var(--mm-3); padding: var(--mm-4) var(--mm-5) 0; border-bottom: 1px solid var(--mm-line); }
.mm-qrd__head:not(:has(.mm-qrd__tabs, .mm-qrd__toc)) { padding-bottom: var(--mm-4); }
/* 3 déc. : un seul panneau en trois parties ; sommaire de trois liens sous le titre (pas des onglets : rien n'est
   masqué), titre de partie en caractère de lecture, sections dessous. */
.mm-qrd__toc { grid-column: 1 / -1; display: flex; gap: var(--mm-2); padding-bottom: var(--mm-3); }
.mm-qrd__toc a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 var(--mm-3); border-radius: 999px; background: var(--mm-cream); box-shadow: inset 0 0 0 1px var(--mm-line); font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); color: var(--mm-green-title); text-decoration: none; }
.mm .mm-qrd__toc a { color: var(--mm-green-title); }
.mm-qrd__toc a:hover { background: var(--mm-gold-wash); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 45%, transparent); }
.mm-qrd__toc a:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qrd__toc a[aria-current="true"] { background: var(--mm-green-900); color: var(--mm-gold-pale); box-shadow: none; }
.mm .mm-qrd__toc a[aria-current="true"] { color: var(--mm-gold-pale); }
.mm-qrd__gtitle { display: flex; align-items: center; gap: var(--mm-3); margin: var(--mm-2) 0 0; font: 600 var(--mm-text-lg)/1.2 var(--mm-font-read, var(--mm-font-ui)); color: var(--mm-green-title); }
.mm-qrd__gtitle::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, color-mix(in srgb, var(--mm-gold) 55%, transparent), transparent); }
.mm-qrd__plan { margin: var(--mm-2) 0 var(--mm-3); padding: var(--mm-3); border-radius: var(--mm-radius-sm); background: var(--mm-gold-wash); font-size: var(--mm-text-sm); line-height: 1.45; color: var(--mm-ink); }
.mm-qrd__plan:empty { display: none; }
/* Lot D (30 nov.) : onglets Lecture / Écoute, toujours visibles ; l'onglet choisi souligné d'or. */
.mm-qrd__tabs { grid-column: 1 / -1; display: flex; gap: var(--mm-5); }
.mm-qrd__tabs [role="tab"] { position: relative; min-height: var(--mm-tap); padding: 0 var(--mm-1); border: 0; background: none; font: 600 var(--mm-text-sm)/1 var(--mm-font-ui); color: var(--mm-muted); cursor: pointer; }
.mm-qrd__tabs [role="tab"]:hover { color: var(--mm-green-title); }
.mm-qrd__tabs [role="tab"][aria-selected="true"] { color: var(--mm-green-title); }
.mm-qrd__tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--mm-gold); }
.mm-qrd__tabs [role="tab"]:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: -2px; border-radius: var(--mm-radius-sm); }
.mm-qrd__group[hidden] { display: none; }
.mm-qrd__group:focus { outline: none; }
.mm-qrd__group[role="tabpanel"] + .mm-qrd__group[role="tabpanel"] { margin-top: 0; padding-top: 0; border-top: 0; }
/* Explication du seul mode actif ; en « Page », les réglages sans effet laissent la place à une phrase. */
[data-qrd-mode], [data-qrd-page-note] { display: none; }
.mm-qr[data-view="scroll"] [data-qrd-mode="scroll"], .mm-qr[data-view="focus"] [data-qrd-mode="focus"], .mm-qr[data-view="page"] [data-qrd-mode="page"], .mm-qr[data-view="page"] [data-qrd-page-note] { display: block; }
.mm-qr[data-view="page"] .mm-qrd__sec[data-qrd-hors-page] { display: none; }
.mm-qrd__note { padding: var(--mm-2) var(--mm-3); border-radius: var(--mm-radius); background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
/* Détails à la demande : légende du tajwid, sources et informations. */
.mm-qrd__more, .mm-qrd__info { font-size: var(--mm-text-sm); }
/* Légende et note des couleurs : présentes dans la page, montrées seulement avec les couleurs (changement sans rechargement). */
.mm-qr:not([data-script="tajweed"]) [data-qrd-tj] { display: none; }
.mm-qrd__more summary, .mm-qrd__info summary { display: inline-flex; align-items: center; gap: var(--mm-1); min-height: var(--mm-tap); font-weight: 600; color: var(--mm-green-title); cursor: pointer; list-style: none; }
.mm-qrd__more summary::-webkit-details-marker, .mm-qrd__info summary::-webkit-details-marker { display: none; }
.mm-qrd__more summary::after, .mm-qrd__info summary::after { content: ""; width: .45em; height: .45em; margin-left: .2em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.1em) rotate(45deg); transition: transform var(--mm-fast) var(--mm-ease); }
.mm-qrd__more[open] summary::after, .mm-qrd__info[open] summary::after { transform: translateY(.1em) rotate(-135deg); }
.mm-qrd__more summary:focus-visible, .mm-qrd__info summary:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; border-radius: var(--mm-radius-sm); }
.mm-qrd__info { margin-top: var(--mm-3); padding-top: var(--mm-2); border-top: 1px solid var(--mm-line); }
.mm-qrd__info .mm-hint { margin: 0 0 var(--mm-2); }
.mm-qrd__head h2 { margin: 0; font: 600 var(--mm-text-lg)/1.2 var(--mm-font-display); color: var(--mm-green-title); }
.mm-qrd__close { display: grid; place-items: center; width: var(--mm-tap); height: var(--mm-tap); border: 0; border-radius: 50%; background: none; color: var(--mm-ink); cursor: pointer; }
.mm-qrd__close:hover { background: var(--mm-green-100); }
.mm-qrd__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--mm-2); padding: var(--mm-2) var(--mm-5) var(--mm-5); }
.mm-qrd__group { display: flex; flex-direction: column; scroll-margin-top: var(--mm-3); }
.mm-qrd__group + .mm-qrd__group { margin-top: var(--mm-4); padding-top: var(--mm-2); border-top: 0; }
.mm-qrd__k { margin: var(--mm-3) 0 0; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-qrd__sec { display: flex; flex-direction: column; gap: var(--mm-2); padding-block: var(--mm-3); }
.mm-qrd__sec :is(h3, h4) { margin: 0; font: 600 var(--mm-text-sm)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-qrd__row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; gap: var(--mm-3); }
.mm-qrd__lab { font-size: var(--mm-text-sm); color: var(--mm-muted); }
/* Sélecteur segmenté : une rangée, choix égaux, l'actif en blanc posé sur le fond. */
.mm-qrd__seg { display: flex; padding: 3px; border-radius: var(--mm-radius); background: var(--mm-cream); box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-qrd__seg label { position: relative; flex: 1 1 0; min-width: 0; }
.mm-qrd__seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.mm-qrd__seg input + span { display: grid; place-items: center; min-height: 2.5rem; padding: 0 var(--mm-2); border-radius: calc(var(--mm-radius) - 3px); font: 600 var(--mm-text-sm)/1.15 var(--mm-font-ui); color: var(--mm-muted); text-align: center; transition: background-color 150ms var(--mm-ease), color 150ms var(--mm-ease); }
.mm-qrd__seg input:checked + span { background: var(--mm-surface); color: var(--mm-green-title); box-shadow: 0 1px 2px color-mix(in srgb, var(--mm-shadow-ink) 16%, transparent), inset 0 0 0 1px var(--mm-line); }
.mm-qrd__seg input:focus-visible + span { outline: 2px solid var(--mm-gold); outline-offset: 1px; }
.mm-qrd__duo { display: inline-flex; align-items: baseline; gap: .2em; line-height: 1.4; }
.mm-qrd__duo-f { font-family: var(--mm-font-read); font-weight: 500; }
.mm-qrd__duo-a { font-family: var(--mm-font-quran); font-weight: 400; font-size: 1.3em; }
.mm-qrd__duo--1 { font-size: .78rem; } .mm-qrd__duo--2 { font-size: .89rem; } .mm-qrd__duo--3 { font-size: 1rem; } .mm-qrd__duo--4 { font-size: 1.14rem; } .mm-qrd__duo--5 { font-size: 1.3rem; }
.mm-qrd__a { font-family: var(--mm-font-quran); font-weight: 400; line-height: 1.4; color: inherit; }
.mm-qrd__a--1 { font-size: 1rem; } .mm-qrd__a--2 { font-size: 1.2rem; } .mm-qrd__a--3 { font-size: 1.4rem; } .mm-qrd__a--4 { font-size: 1.65rem; } .mm-qrd__a--5 { font-size: 1.9rem; }
.mm-qrd__f { font-family: var(--mm-font-read); font-weight: 500; }
.mm-qrd__f--1 { font-size: .8rem; } .mm-qrd__f--2 { font-size: .95rem; } .mm-qrd__f--3 { font-size: 1.1rem; } .mm-qrd__f--4 { font-size: 1.25rem; }
.mm-qrd__field { display: flex; flex-direction: column; gap: var(--mm-1); }
.mm-qrd__field select { width: 100%; min-height: var(--mm-tap); padding: 0 var(--mm-3); border-radius: var(--mm-radius); border: 1px solid var(--mm-line-strong); background: var(--mm-surface); font: 500 var(--mm-text-md)/1.2 var(--mm-font-ui); color: var(--mm-ink); }
.mm-qrd__field--inline { flex-direction: row; align-items: center; justify-content: space-between; font-size: var(--mm-text-sm); }
.mm-qrd__field--inline select { width: auto; }
.mm-qrd__field[hidden], .mm-qrd__range[hidden] { display: none; }
.mm-qrd__range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mm-3); font-size: var(--mm-text-sm); }
.mm-qrd__range label { display: flex; flex-direction: column; gap: var(--mm-1); color: var(--mm-muted); }
.mm-qrd__range select { min-height: var(--mm-tap); border-radius: var(--mm-radius); border: 1px solid var(--mm-line-strong); padding: 0 var(--mm-2); }
/* Interrupteur. */
.mm-qrd__switch { display: flex; align-items: center; justify-content: space-between; gap: var(--mm-3); min-height: var(--mm-tap); font-size: var(--mm-text-sm); font-weight: 600; cursor: pointer; }
.mm-qrd__switch input { appearance: none; position: relative; flex: none; width: 2.75rem; height: 1.6rem; margin: 0; border-radius: 999px; background: var(--mm-line-strong); cursor: pointer; transition: background-color 150ms var(--mm-ease); }
.mm-qrd__switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.6rem - 6px); height: calc(1.6rem - 6px); border-radius: 50%; background: var(--mm-surface); box-shadow: 0 1px 2px color-mix(in srgb, var(--mm-shadow-ink) 30%, transparent); transition: transform 150ms var(--mm-ease); }
.mm-qrd__switch input:checked { background: var(--mm-green-700); }
.mm-qrd__switch input:checked::after { transform: translateX(1.15rem); }
.mm-qrd__switch input:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-qrd__foot { margin-top: auto; padding-top: var(--mm-3); }
.mm-qrd__foot .mm-hint { margin: 0; }
.mm-qr.is-js [data-qr-nojs] { display: none; }
/* Sans script : voir MM_View_Quran::sans_script() (feuille dans <noscript>) ; « is-js » est posé par le serveur. */
.mm-qr__nojs { margin: var(--mm-3) auto 0; max-width: 40rem; font-size: var(--mm-text-sm); color: var(--mm-muted); }
@media (max-width: 47.99rem) {
  /* Lot D : feuille pleine hauteur et pleine largeur ; en-tête et fermeture restent en place, seul le corps défile. */
  .mm-qrd { top: 0; left: 0; width: 100%; max-height: none; border-radius: 0; box-shadow: 0 -20px 40px -24px color-mix(in srgb, var(--mm-shadow-ink) 55%, transparent); animation-name: mm-qrd-up; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes mm-qrd-up { from { transform: translateY(32px); opacity: 0; } }
  .mm-qrd__row { grid-template-columns: minmax(0, 1fr); gap: var(--mm-1); }
}
@media (prefers-reduced-motion: reduce) { .mm-qrd, .mm-qrd-scrim { animation: none; } .mm-qrd__more summary::after, .mm-qrd__info summary::after { transition: none; } .mm-qrd__seg input + span, .mm-qrd__switch input, .mm-qrd__switch input::after { transition: none; } }
/* Un clic sur le texte d'un verset lance la récitation à partir de lui (retour utilisateur) : au
   survol, le verset s'éclaire et son bouton d'écoute s'affirme. Le bouton reste le chemin clavier. */
.mm-qr.has-audio .mm-quran-verse__body { cursor: pointer; }
.mm-qr.has-audio .mm-quran-verse:hover:not(.is-reciting) { background: color-mix(in srgb, var(--mm-green-100) 55%, transparent); border-radius: var(--mm-radius); }
.mm-qr.has-audio[data-mode="flow"] .mm-quran-verse:hover:not(.is-reciting) { background: color-mix(in srgb, var(--mm-green-100) 70%, transparent); border-radius: 6px; }
.mm-qr.has-audio .mm-quran-verse__notes, .mm-qr.has-audio .mm-quran-verse__tr a { cursor: auto; }
@media (prefers-reduced-motion: reduce) { .mm-quran-verse { transition: none; } }
.mm-quran-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--mm-2) var(--mm-4); }
.mm-quran-dl dt { color: var(--mm-muted); }
/* Résultat du test de connexion Quran Foundation : une ligne par étape, réussite verte, échec ocre. */
.mm-zone__sub { margin: var(--mm-4) 0 var(--mm-2); font: 600 var(--mm-text-sm)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-qdiag { display: flex; flex-direction: column; gap: var(--mm-2); margin: 0 0 var(--mm-3); padding: 0; list-style: none; }
.mm-qdiag li { position: relative; padding: var(--mm-2) var(--mm-3) var(--mm-2) 2.25rem; border-radius: var(--mm-radius); background: var(--mm-green-100); font-size: var(--mm-text-sm); }
.mm-qdiag li::before { content: ""; position: absolute; left: var(--mm-3); top: .85em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--mm-green-700); }
.mm-qdiag li.is-ko { background: var(--mm-gold-wash); }
.mm-qdiag li.is-ko::before { background: var(--mm-gold-ink); }
.mm-quran-dl dd { margin: 0; overflow-wrap: anywhere; }
.mm-quran-ed { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--mm-2); padding-block: var(--mm-2); border-bottom: 1px solid var(--mm-line); }
/* « Par défaut » rattaché à son édition (réception C9) : en colonne étroite, juste sous le nom, aligné sur son texte. */
.mm-quran-ed { row-gap: 0; }
/* Récitateurs par sourate (27 nov.) : liste dépliable, défilante au-delà de 22 rem. */
.mm-quran-chap { margin-block: var(--mm-2); }
.mm-quran-chap > summary { display: flex; align-items: center; justify-content: space-between; min-height: 2rem; cursor: pointer; font-weight: 600; color: var(--mm-green-title); }
.mm-quran-chap__list { display: grid; gap: var(--mm-1); max-height: 22rem; overflow-y: auto; padding: var(--mm-1) var(--mm-1) var(--mm-1) 0; }
.mm-quran-chap__list small { color: var(--mm-muted); font-size: var(--mm-text-xs); }
.mm-quran-ed > .mm-checkline:first-child { padding-bottom: var(--mm-1); }
.mm-quran-ed .mm-checkline + .mm-checkline { min-height: 2rem; padding-block: 0 var(--mm-2); font-size: var(--mm-text-sm); }
.mm-quran-ed .mm-checkline + .mm-checkline { margin-left: calc(1.15rem + var(--mm-3)); }

@media (prefers-reduced-motion: reduce) { .mm-next-step__link:hover .mm-icon { transform: none; } }
/* Décision utilisateur (v0.48.0) : sur tablette et ordinateur, l'accueil garde exactement la vue
   d'ordinateur ; la zone « À faire ensuite » ne s'affiche que sur téléphone. */
@media (min-width: 48rem) {
  .mm-home__next { display: none; }
}
@container mm-home (max-width: 47.99rem) {
  .mm-next-steps { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .mm-next-step { padding: var(--mm-4) 0; }
  .mm-next-step + .mm-next-step { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--mm-gold) 28%, transparent); }
}

/* Barre d'avancement : se remplit à l'ouverture. */
.mm-bar { display: block; height: 6px; border-radius: 999px; background: var(--mm-line); overflow: hidden; }
.mm-bar__fill { display: block; width: var(--v, 0%); height: 100%; border-radius: inherit; background: var(--mm-green-700); transform-origin: left center; animation: mm-fill 1.1s var(--mm-ease) .45s both; }
.mm-bar--empty { background: repeating-linear-gradient(90deg, var(--mm-line) 0 6px, transparent 6px 10px); }
@keyframes mm-fill { from { transform: scaleX(0); } }

/* Reprendre / Ta prochaine leçon et Ma progression, côte à côte sur ordinateur. */
.mm-home__row { margin-top: clamp(var(--mm-3), 2.2vh, var(--mm-5)); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--mm-4) var(--mm-5); align-items: stretch; }
/* Ma progression : les deux cartes vertes côte à côte, puis le bilan à côté des étapes. Ces deux
   rangées suivent la largeur de la page, pas les réglages de l'accueil (tablette, portrait) :
   sous 70rem de page, chaque bloc prend toute la largeur. */
.mm-home__row.mm-home__row--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mm-home__row.mm-home__row--bilan { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@container mm-page (max-width: 69.99rem) {
  .mm-home__row.mm-home__row--pair, .mm-home__row.mm-home__row--bilan { grid-template-columns: minmax(0, 1fr); }
}
.mm-resume { position: relative; overflow: hidden; display: flex; align-items: center; gap: var(--mm-5); padding: var(--mm-4) var(--mm-6); border-radius: var(--mm-radius-xl); background: radial-gradient(120% 140% at 88% 18%, color-mix(in srgb, var(--mm-gold-light) 20%, transparent), transparent 52%), var(--mm-green-900); color: var(--mm-white); box-shadow: var(--mm-elev-3); }
.mm-resume__text { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-resume__kicker { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--mm-2); font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-gold-light); }
.mm-resume__course { font-weight: 400; color: var(--mm-on-green-muted); }
.mm-resume__course::before { content: "·"; margin-right: var(--mm-2); color: color-mix(in srgb, var(--mm-gold-light) 60%, transparent); }
.mm-resume__title { font: 600 clamp(1.625rem, 2.4vw, 2.25rem)/1.1 var(--mm-font-display); letter-spacing: -.01em; color: var(--mm-white); text-wrap: balance; }
/* Part de la leçon déjà lue : sur sa propre ligne, avec sa valeur en texte. */
.mm-resume__bar { display: flex; align-items: center; gap: var(--mm-3); max-width: 26rem; margin-top: var(--mm-1); }
.mm-resume__bar .mm-bar { flex: 1; min-width: 10rem; height: 8px; background: color-mix(in srgb, var(--mm-on-green) 16%, transparent); }
.mm-resume__bar .mm-bar__fill { background: var(--mm-gold-light); }
.mm-resume__bar em { flex: none; font-style: normal; font-weight: 600; font-size: var(--mm-text-sm); color: var(--mm-gold-light); font-variant-numeric: tabular-nums; }
.mm-resume__foot { display: flex; align-items: center; gap: var(--mm-3) var(--mm-5); flex-wrap: wrap; margin-top: var(--mm-2); }
.mm-resume__meta { display: inline-flex; gap: var(--mm-2) var(--mm-4); flex-wrap: wrap; font-size: var(--mm-text-xs); color: var(--mm-on-green-muted); }
/* État du contrôle sous l'action de reprise (C1-P2-01) : copie en correction, tentatives épuisées… */
.mm-resume__state { flex-basis: 100%; font-size: var(--mm-text-sm); color: var(--mm-gold-light); }
.mm-resume__meta span { display: inline-flex; align-items: center; gap: .35rem; }
/* Illustration de la matière, dans une arche cerclée d'or. Image affichée entière. */
/* Fond de carte (C0-P2-FONDS-CARTES, v0.84) : les ornements posés dans les cartes vertes sont retirés ;
   une surface large livrée par ChatGPT est posée en couche absolue sous le contenu, dans le même
   conteneur arrondi. Elle ne prend aucune place dans le rang et ne change jamais la taille de la carte.
   Le motif est fait pour être coupé par le bord (cover, ancré à droite) ; il est fondu vers la gauche
   par un masque (transparent jusqu'à 34 %, plein à 77 %, valeurs d'essai de la livraison) pour laisser
   le texte sur l'aplat. Le vert et le dégradé de la carte restent dessous. Carte étroite (téléphone,
   moins de 30rem de contenu) : décor plus léger et masque plus long. */
.mm-resume { container: mm-carte / inline-size; }
.mm-resume__fond { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--fond) right center / cover no-repeat; opacity: .62;
  -webkit-mask-image: linear-gradient(to right, transparent 34%, var(--mm-black) 77%); mask-image: linear-gradient(to right, transparent 34%, var(--mm-black) 77%); }
@container mm-carte (max-width: 30rem) { .mm-resume__fond { opacity: .42; -webkit-mask-image: linear-gradient(to right, transparent 45%, var(--mm-black) 92%); mask-image: linear-gradient(to right, transparent 45%, var(--mm-black) 92%); } }
@media print { .mm-resume__fond { display: none; } }
/* Retour utilisateur du 24 nov. : le fond reste en arrière, il ne se mêle pas à la voûte. Sur une carte
   à fond, l'arche reçoit dessous un aplat opaque du vert de la carte : le motif passe derrière elle et
   s'arrête à son contour ; le halo doré et le filet d'or de l'arche restent les mêmes. */
.mm-resume--fond .mm-resume__art { background: radial-gradient(closest-side at 50% 62%, color-mix(in srgb, var(--mm-gold-light) 28%, transparent), color-mix(in srgb, var(--mm-green-900) 0%, transparent) 100%), linear-gradient(color-mix(in srgb, var(--mm-on-green) 5%, transparent), color-mix(in srgb, var(--mm-on-green) 5%, transparent)), var(--mm-green-900); }
.mm-resume__art { position: relative; z-index: 1; flex: none; display: grid; place-items: end center; height: clamp(8rem, 18vh, 10.5rem); aspect-ratio: 4 / 5; padding-bottom: var(--mm-4); border-radius: var(--mm-arch); background: radial-gradient(closest-side at 50% 62%, color-mix(in srgb, var(--mm-gold-light) 28%, transparent), color-mix(in srgb, var(--mm-green-900) 0%, transparent) 100%), color-mix(in srgb, var(--mm-on-green) 5%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 55%, transparent); }
.mm-resume__logo { display: block; width: 76%; height: auto; max-height: 82%; object-fit: contain; filter: drop-shadow(0 12px 18px color-mix(in srgb, var(--mm-black) 35%, transparent)); }
.mm-resume--empty .mm-resume__title { font-size: var(--mm-text-xl); }
.mm-resume__note { max-width: 32rem; font-size: var(--mm-text-sm); color: var(--mm-on-green-muted); }

/* Ma progression : anneau lisible (environ 104 px) et trois compteurs. */
.mm-home__progress { justify-content: space-between; }
/* Le titre « Ma progression » ne se coupe jamais : la tête passe à la ligne si la place manque. */
.mm-home__progress .mm-zone__head { flex-wrap: wrap; row-gap: var(--mm-2); }
.mm-home__progress .mm-zone__label { overflow: visible; text-overflow: clip; white-space: nowrap; }
.mm-progress-duo { flex: 1; display: flex; align-items: center; gap: clamp(var(--mm-3), 2vw, var(--mm-5)); }
.mm-ring { position: relative; flex: none; display: grid; place-items: center; width: 6.5rem; aspect-ratio: 1; }
.mm-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.mm-ring__rail { fill: none; stroke: var(--mm-green-100); stroke-width: 11; }
.mm-ring__arc { fill: none; stroke: var(--mm-green-text); stroke-width: 11; stroke-linecap: round; stroke-dashoffset: var(--reste); animation: mm-draw 1.3s var(--mm-ease) .4s both; }
@keyframes mm-draw { from { stroke-dashoffset: var(--tour); } }
.mm-ring__value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mm-ring__value strong { font: 700 1.3125rem/1 var(--mm-font-ui); color: var(--mm-ink); font-variant-numeric: tabular-nums; }
.mm-ring__value span { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-stat-list { flex: 1 1 9rem; display: flex; flex-direction: column; min-width: 0; }
.mm-stat-list li { display: flex; align-items: center; gap: var(--mm-2); padding: .5rem 0; }
.mm-stat-list li + li { border-top: 1px solid var(--mm-line); }
.mm-stat-list .mm-icon { color: var(--mm-gold); }
.mm-stat-list em { flex: 1; min-width: 0; font-style: normal; font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-stat-list strong { font: 700 var(--mm-text-lg)/1 var(--mm-font-ui); color: var(--mm-green-title); font-variant-numeric: tabular-nums; }
.mm-progress-hint { font-size: var(--mm-text-xs); color: var(--mm-muted); }

/* 2. Les matières : la galerie des logos. */
.mm-home__cours { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-home__head { display: flex; align-items: baseline; gap: var(--mm-3); }
.mm-home__head h2 { font: 700 var(--mm-text-lg)/1.2 var(--mm-font-ui); color: var(--mm-ink); }
.mm-home__count { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-home__head .mm-zone__more-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
/* Colonnes à la largeur exacte des arches, réparties de bord à bord : la première et la dernière
   arche s'alignent sur la colonne de contenu. */
.mm-subjects { display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--arch-h, 14rem) * .8); justify-content: space-between; gap: var(--mm-4); overflow-x: auto; scrollbar-width: none; padding: 4px 4px 10px; margin: -4px -4px -10px; }
.mm-subjects > li { animation: mm-rise var(--mm-med) var(--mm-ease) both; animation-delay: calc(260ms + var(--i, 0) * 60ms); }
.mm-subject { position: relative; display: flex; flex-direction: column; align-items: center; justify-self: center; width: auto; height: var(--arch-h, 14rem); aspect-ratio: 4 / 5; max-width: 100%; padding: 0 var(--mm-2) var(--mm-3); border-radius: var(--mm-arch); background: radial-gradient(70% 55% at 50% 42%, var(--mm-halo) 0%, var(--mm-halo) 30%, var(--mm-green-100) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-green-700) 10%, transparent), var(--mm-elev-1); color: var(--mm-ink); text-align: center; text-decoration: none; transition: transform var(--mm-med) var(--mm-ease), box-shadow var(--mm-med) var(--mm-ease); }
.mm-subject::before { content: ""; position: absolute; inset: 7px; border-radius: 999px 999px 12px 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 20%, transparent); pointer-events: none; transition: box-shadow var(--mm-med) var(--mm-ease); }
.mm a.mm-subject:hover::before { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 50%, transparent); }
.mm-subject.is-active::before { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 50%, transparent); }
.mm a.mm-subject { color: var(--mm-ink); }
.mm a.mm-subject:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-green-700) 18%, transparent), var(--mm-elev-2); }
/* Le logo occupe l'arche : entier (object-fit: contain), jamais recadré. */
.mm-subject__niche { flex: 1 1 0; min-height: 0; width: 100%; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; padding: 20% 0 2%; }
/* 4 déc. (essai sur le vrai site, téléphone) : la carte d'une matière commencée (jauge en plus) rétrécit sa niche ;
   le logo y tient désormais au lieu de recouvrir le nom (14 px à 375, 40 px à 320). */
.mm-subject__niche > .mm-subject__logo { min-height: 0; max-height: 100%; }
.mm-subject__logo { display: block; width: 70%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--mm-green-900) 20%, transparent)); transition: transform var(--mm-slow) var(--mm-ease); }
.mm a.mm-subject:hover .mm-subject__logo { transform: translateY(-6px) scale(1.05); }
.mm-subject__name { font-size: var(--mm-text-md); font-weight: 700; line-height: 1.2; }
.mm-subject__state { max-width: 100%; margin-top: 2px; font-size: var(--mm-text-xs); color: var(--mm-muted); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.01em; }
/* La jauge d'une matière commencée se pose dans la marge du bas (4 déc.) : la niche du logo garde la même hauteur
   que celle des autres cartes, au lieu de rétrécir jusqu'à 9 px à 320 de large. */
.mm-subject .mm-bar { position: absolute; left: 50%; bottom: calc(var(--mm-3) / 2 - 1px); width: 60%; max-width: 6.5rem; height: 4px; margin: 0; transform: translateX(-50%); }
/* Matière en cours : arche vert profond, halo et filet d'or. */
.mm a.mm-subject.is-active { color: var(--mm-white); background: radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--mm-gold-light) 42%, transparent) 0%, var(--mm-green-900) 100%); box-shadow: inset 0 0 0 1.5px var(--mm-gold), var(--mm-elev-2); }
.mm-subject.is-active .mm-subject__state { color: var(--mm-gold-light); font-weight: 600; }
.mm-subject.is-active .mm-bar { background: color-mix(in srgb, var(--mm-on-green) 18%, transparent); }
.mm-subject.is-active .mm-bar__fill { background: var(--mm-gold-light); }

/* Dernières activités : des lignes, pas des cartes. */
.mm-activity > li + li { border-top: 1px solid var(--mm-line); }
.mm-activity__row { display: flex; align-items: center; gap: var(--mm-3); padding: .625rem var(--mm-1); border-radius: 12px; text-decoration: none; }
.mm a.mm-activity__row { color: var(--mm-ink); transition: background-color var(--mm-fast) ease; }
.mm a.mm-activity__row:hover { background: var(--mm-cream); }
.mm-activity__icon { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--mm-green-100); color: var(--mm-green-text); }
.mm-activity__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mm-activity__text strong { font-size: var(--mm-text-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-activity__text span { font-size: var(--mm-text-xs); color: var(--mm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Page d'une matière : ses cours en lignes. */
.mm-course-list { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-course-list > li { animation: mm-rise var(--mm-med) var(--mm-ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.mm-course-row { display: flex; align-items: center; gap: var(--mm-4); padding: var(--mm-3); border: 1px solid var(--mm-line); border-radius: 16px; text-decoration: none; transition: border-color var(--mm-fast) ease, box-shadow var(--mm-med) var(--mm-ease), transform var(--mm-med) var(--mm-ease); }
.mm a.mm-course-row { color: var(--mm-ink); }
.mm a.mm-course-row:hover { border-color: var(--mm-line-strong); box-shadow: var(--mm-shadow-lift); transform: translateY(-2px); }
.mm-course-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-course-row__text strong { font-size: var(--mm-text-lg); font-weight: 700; }
.mm-course-row__text span { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-course-row__text em { font-style: normal; font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); }
.mm-course-row__bar { flex: none; display: flex; align-items: center; gap: var(--mm-2); width: 10rem; }
.mm-course-row__bar .mm-bar { flex: 1; }
.mm-course-row__bar em { font-style: normal; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }
.mm-course-row > .mm-icon { color: var(--mm-muted); }

.mm-course-row.is-locked { background: var(--mm-cream); border-style: dashed; }
.mm-course-row.is-locked .mm-course-row__text em { color: var(--mm-muted); }
.mm-mini-arch { position: relative; flex: none; align-self: flex-start; display: grid; place-items: center; width: 4.75rem; aspect-ratio: 4 / 5; border-radius: var(--mm-arch); background: radial-gradient(70% 55% at 50% 42%, var(--mm-halo) 0%, var(--mm-green-100) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 30%, transparent); }
.mm-mini-arch img, .mm-mini-arch svg { display: block; width: 72%; height: auto; }
.mm-mini-arch b { position: absolute; right: -.375rem; bottom: -.375rem; display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .25rem; border-radius: 999px; background: var(--mm-green-900); color: var(--mm-gold-light); font: 700 var(--mm-text-xs)/1 var(--mm-font-ui); box-shadow: 0 0 0 2px var(--mm-surface); }
.mm-course-row.is-locked .mm-mini-arch { opacity: .55; }
.mm-course-row__lock { flex: none; display: inline-flex; align-items: center; gap: var(--mm-1); width: 10rem; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }

/* ---------- Écrans de cours (C1) : bandeau et échelle des niveaux ---------- */
.mm-page { container: mm-page / inline-size; display: flex; flex-direction: column; gap: var(--mm-5); }
/* Arches de « Mes cours » : six dans la largeur du panneau (marges intérieures déduites), comme à l'accueil. */
.mm-page { --arch-h: clamp(10rem, calc((100cqw - 2 * var(--mm-5) - 2px - 5 * var(--mm-4)) / 6 * 1.25), 14.5rem); }
/* Bandeau : même geste que la bannière de l'accueil (pleine largeur, collée à la barre, filet
   d'or au pied) avec un fond clair tiré des jetons ; le visuel détouré de l'écran est posé à
   droite, entier, réduit s'il le faut mais jamais recadré. */
.mm-band { --bleed: calc((100vw - var(--shell-side) - 100cqw) / 2); position: relative; isolation: isolate; display: flex; align-items: center; width: calc(100cqw + 2 * var(--bleed)); min-height: clamp(10rem, 13cqw, 13rem); margin: calc(-1 * var(--band-pull, var(--mm-5))) 0 0 calc(-1 * var(--bleed)); padding: var(--mm-5) var(--bleed); background: linear-gradient(100deg, var(--mm-ivory) 0%, var(--mm-sand) 58%, color-mix(in srgb, var(--mm-warm) 38%, var(--mm-sand)) 100%); }
.mm-band::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--mm-gold) 15%, transparent), var(--mm-gold-light) 18%, var(--mm-gold) 50%, var(--mm-gold-light) 82%, color-mix(in srgb, var(--mm-gold) 15%, transparent)); pointer-events: none; }
.mm-band__art { position: absolute; z-index: -1; inset: 0 0 2px; display: flex; justify-content: flex-end; align-items: flex-end; pointer-events: none; animation: mm-head-in 1.1s var(--mm-ease) both; }
.mm-band__art img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; }
.mm-band__text { position: relative; display: flex; flex-direction: column; gap: var(--mm-3); max-width: min(40rem, 62%); padding-left: var(--mm-5); }
.mm-band__text::before { content: ""; position: absolute; left: 0; top: .25rem; bottom: .25rem; width: 2px; border-radius: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--mm-gold) 0%, transparent), var(--mm-gold) 20%, var(--mm-gold) 80%, color-mix(in srgb, var(--mm-gold) 0%, transparent)); }
.mm-band__row { display: flex; align-items: center; gap: var(--mm-4); }
.mm-band__heading { display: flex; flex-direction: column; gap: var(--mm-2); min-width: 0; }
.mm-band__title { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .875rem; font: 600 clamp(2rem, 3cqw, 2.75rem)/1.08 var(--mm-font-display); letter-spacing: -.015em; color: var(--mm-green-title); }
.mm-band__lead { font: italic 400 var(--mm-text-md)/1.45 var(--mm-font-display); color: var(--mm-ink); }
.mm-band__logo { flex: none; display: grid; place-items: center; width: 5.5rem; aspect-ratio: 4 / 5; border-radius: var(--mm-arch); background: radial-gradient(70% 55% at 50% 42%, var(--mm-halo) 0%, var(--mm-green-100) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 35%, transparent), var(--mm-elev-1); }
.mm-band__logo img, .mm-band__logo svg { display: block; width: 72%; height: auto; }
.mm-band .mm-tags { margin: 0; }
.mm-band__title .mm-chip, .mm-memo-head h1 .mm-chip { font-family: var(--mm-font-ui); letter-spacing: 0; }
/* Pastille dans un titre de zone (« 3 · 3 points ») : police de l'interface, pas celle du titre (réception C7). */
.mm-zone__title .mm-chip, .mm-panel h2 .mm-chip, .mm-panel h3 .mm-chip { font-family: var(--mm-font-ui); font-style: normal; letter-spacing: 0; }
/* Bandeau photographique (lot 2), sur le modèle exact de l'accueil (v0.41.0) : l'image entière à
   son format donne la hauteur, et dès 64 rem le texte se pose sur la zone calme à gauche — fil
   d'Ariane, titre et pastilles, liseré à losange d'or, phrase en Lora italique — avec le même halo
   clair que la salutation. La scène tient lieu de médaillon et de frise. En dessous de 64 rem, la
   photo reste en tête et le texte passe dessous ; au téléphone, version 2:1 (« -M »). */
/* Photo et texte dans la même case (recette C1-P2) : le bandeau prend la hauteur du plus grand
   des deux ; un titre très long agrandit le bandeau au lieu d'en sortir. La photo reste entière,
   son bas se fond déjà dans le crème. */
.mm-band.has-photo { display: grid; grid-template: minmax(0, auto) / minmax(0, 1fr); min-height: 0; padding: 0; background: linear-gradient(100deg, var(--mm-ivory) 0%, var(--mm-sand) 100%); }
.mm-band.has-photo > .mm-band__photo, .mm-band.has-photo > .mm-band__text { grid-area: 1 / 1; }
.mm-band.has-photo > .mm-band__photo { align-self: start; }
.mm-band__photo, .mm-band__photo img { display: block; width: 100%; height: auto; }
/* Fondu (décision utilisateur, v0.42.0) : la photo s'efface doucement dans le fond de page au lieu
   d'une coupure nette ; l'image reste entière et non recadrée, seul son pied se fond. */
.mm-band.has-photo { background: var(--mm-cream); }
.mm-band.has-photo::before { display: none; }
.mm-band__photo { position: relative; }
/* Le fondu va vers le fond de page réel : --fond-page est résolu sur :root, donc en mode nuit il
   garde la couleur de nuit même dans le bandeau, qui conserve par ailleurs ses couleurs de jour. */
:root { --fond-page: var(--mm-cream); }
.mm-band__photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(180deg, color-mix(in srgb, var(--fond-page) 0%, transparent) 0%, color-mix(in srgb, var(--fond-page) 55%, transparent) 55%, var(--fond-page) 100%); pointer-events: none; }
/* Mode nuit, texte posé sur la photo : fondu plus court, pour que le texte reste sur la partie claire. */
@media (min-width: 64rem) { :root[data-theme="nuit"] .mm-band__photo::after { height: 30%; } }
.mm-band.has-photo .mm-band__text { position: relative; align-self: center; margin: 0 0 2px var(--bleed); padding-block: var(--mm-3); justify-content: center; gap: .375rem; width: calc(100cqw * .46); max-width: none; padding-left: clamp(var(--mm-4), 1.4cqw, var(--mm-5)); text-shadow: 0 1px 0 color-mix(in srgb, var(--mm-glow) 55%, transparent), 0 0 18px color-mix(in srgb, var(--mm-glow) 55%, transparent); }
.mm-band.has-photo .mm-band__text::before { top: .5rem; bottom: .5rem; }
.mm-band.has-photo .mm-band__medal, .mm-band.has-photo .mm-band__logo, .mm-band.has-photo .mm-band__frieze { display: none; }
.mm-band.has-photo .mm-band__heading { gap: .25rem; }
.mm-band.has-photo .mm-band__crumbs { font-size: var(--mm-text-xs); }
.mm-band.has-photo .mm-band__title { font-size: clamp(1.875rem, 3cqw, 3rem); line-height: 1.05; letter-spacing: -.015em; }
/* Petit filet d'or à losange sous le titre, comme entre la salutation et le prénom de l'accueil. */
.mm-band__rule { position: relative; display: block; width: 4rem; height: 1px; margin: .25rem 0 .125rem; background: linear-gradient(90deg, var(--mm-gold), color-mix(in srgb, var(--mm-gold) 15%, transparent)); }
.mm-band__rule::after { content: ""; position: absolute; left: 0; top: -3px; width: 7px; height: 7px; background: var(--mm-gold); transform: rotate(45deg); }
.mm-band.has-photo .mm-band__lead { max-width: 34rem; font: italic 400 clamp(var(--mm-text-sm), 1.1cqw, var(--mm-text-md))/1.4 var(--mm-font-display); }
.mm-band.has-photo .mm-levelchip, .mm-band.has-photo .mm-tag, .mm-band.has-photo .mm-chip, .mm-band.has-photo .mm-idchip { text-shadow: none; }
.mm-band.has-photo .mm-idchip { background: color-mix(in srgb, var(--mm-glow) 80%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 35%, transparent); }
@media (max-width: 63.99rem) {
  .mm-band.has-photo .mm-band__text { position: static; width: auto; max-width: 46rem; margin: 0 var(--bleed); padding-top: var(--mm-5); padding-bottom: var(--mm-5); gap: var(--mm-3); text-shadow: none; }
  .mm-band.has-photo > .mm-band__text { grid-area: 2 / 1; align-self: start; }
  .mm-band.has-photo .mm-band__medal, .mm-band.has-photo .mm-band__logo { display: grid; }
  .mm-band.has-photo .mm-band__medal { width: clamp(5.5rem, 8cqw, 7.5rem); }
  .mm-band__rule { display: none; }
  .mm-band.has-photo .mm-band__frieze { display: block; }
  .mm-band.has-photo .mm-band__lead { font-size: var(--mm-text-md); }
  /* Mode nuit : le texte passe sous la photo, sur le fond de page sombre (couleurs de nuit, cf. MM_Brand). */
  :root[data-theme="nuit"] .mm-band.has-photo { background: var(--fond-page); }
  :root[data-theme="nuit"] .mm-band.has-photo .mm-idchip { background: var(--mm-gold-wash); box-shadow: none; }
}
/* ---------- Bannière en fond (3 déc., décision utilisateur) ----------
   « Les bannières ne sont pas le plus important : chaque écran doit être bien exploité, mais magnifique ; les
   bannières en fond, non en pièce maîtresse qui prend un tiers de l'écran. » Le bandeau ne garde que la hauteur
   de son titre ; la photo, entière et non recadrée, passe derrière : à droite du titre, fondue vers la gauche et
   vers le bas, elle continue sous le début du contenu, qui commence aussitôt. */
*:has(> .mm-band.has-photo) { isolation: isolate; }
.mm-band.has-photo { z-index: -1; display: flex; align-items: center; min-height: clamp(8.5rem, 10cqw, 10.5rem); padding: var(--mm-5) 0 var(--mm-4); background: none; }
.mm-band.has-photo > .mm-band__photo { position: absolute; z-index: -1; top: 0; right: 0; width: min(70%, 76rem); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, var(--mm-ink) 38%), linear-gradient(180deg, var(--mm-ink) 30%, transparent 100%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, var(--mm-ink) 38%), linear-gradient(180deg, var(--mm-ink) 30%, transparent 100%); mask-composite: intersect; }
.mm-band.has-photo > .mm-band__photo::after { display: none; }
.mm-band.has-photo > .mm-band__text { position: relative; align-self: center; width: auto; max-width: min(40rem, 54%); margin: 0 0 0 var(--bleed); padding-block: var(--mm-2); text-shadow: none; }
.mm-page > .mm-band.has-photo + * { margin-top: var(--mm-3); }
@media (min-width: 48rem) and (max-width: 63.99rem) {
  .mm-band.has-photo > .mm-band__photo { width: 78%; }
  .mm-band.has-photo > .mm-band__text { max-width: 60%; padding-block: var(--mm-2); gap: .375rem; }
  .mm-band.has-photo .mm-band__medal, .mm-band.has-photo .mm-band__logo, .mm-band.has-photo .mm-band__frieze { display: none; }
  .mm-band.has-photo .mm-band__rule { display: block; }
}
/* Téléphone : la photo panoramique sur toute la largeur, fondue vers le bas ; le titre se pose sur sa partie fondue. */
@media (max-width: 47.99rem) {
  .mm-band.has-photo { min-height: 0; padding: calc((100cqw + 2 * var(--bleed)) * .1) 0 var(--mm-3); }
  .mm-band.has-photo > .mm-band__photo { width: 100%;
    -webkit-mask-image: linear-gradient(180deg, var(--mm-ink) 40%, transparent 100%); mask-image: linear-gradient(180deg, var(--mm-ink) 40%, transparent 100%); }
  .mm-band.has-photo > .mm-band__text { max-width: none; margin: 0 var(--bleed); padding-block: 0; text-shadow: 0 1px 0 color-mix(in srgb, var(--fond-page) 70%, transparent), 0 0 16px var(--fond-page); }
  .mm-band.has-photo .mm-band__medal, .mm-band.has-photo .mm-band__logo, .mm-band.has-photo .mm-band__frieze { display: none; }
  .mm-band.has-photo .mm-band__rule { display: block; }
}

/* ---------- Motifs de fond (3 déc., décision utilisateur) ----------
   « Le fond (de Mon Coran) est magnifique ; en dehors de l'accueil et de Mes cours, retire toutes les bannières et
   mets des motifs comme dans le Coran, si possible différents. » Titre sobre sur le fond de page ; un motif d'or par
   écran, en deux angles fondus (haut droit, bas gauche), tiré des visuels de la planche : arabesque, claustra et
   entrelacs (cartes vertes, MM-BG-CARTE-*), étoiles (MM-MOTIF-ETOILES-VERT), géométrie (celle du Coran). */
.mm-band.is-motif { min-height: 0; padding: var(--mm-6) var(--bleed) var(--mm-3); background: none; }
.mm-band.is-motif::before { display: none; }
.mm-band.is-motif .mm-band__text { max-width: min(46rem, 100%); gap: .375rem; }
.mm-band.is-motif .mm-band__heading { gap: .25rem; }
.mm-band.is-motif .mm-band__title { font-size: clamp(1.875rem, 2.6cqw, 2.625rem); line-height: 1.08; letter-spacing: -.015em; }
.mm-band.is-motif .mm-band__rule { display: block; }
.mm-band.is-motif .mm-band__lead { max-width: 40rem; font: italic 400 var(--mm-text-md)/1.45 var(--mm-font-display); color: var(--mm-muted); }
.mm-band.is-motif .mm-band__crumbs { font-size: var(--mm-text-xs); }
.mm-page > .mm-band.is-motif + * { margin-top: var(--mm-4); }
.mm-main:has(.mm-band.is-motif, .mm-memo-head) { --motif-haut: none; --motif-bas: none; background:
  var(--motif-haut) right top / 22rem auto no-repeat,
  radial-gradient(120% 55% at 50% 0%, color-mix(in srgb, var(--mm-gold-light) 12%, transparent), transparent 70%) fixed, var(--mm-cream); }
@media (min-width: 48rem) {
  .mm-main:has(.mm-band.is-motif, .mm-memo-head) { background:
    var(--motif-haut) right top / 34rem auto no-repeat fixed,
    var(--motif-bas) left var(--shell-side, 0px) bottom / 34rem auto no-repeat fixed,
    radial-gradient(120% 55% at 50% 0%, color-mix(in srgb, var(--mm-gold-light) 12%, transparent), transparent 70%) fixed, var(--mm-cream); }
}
.mm-main:has(.mm-band[data-motif="arabesque"]) { --motif-haut: url(../brand/img/MM-FOND-ARABESQUE-HAUT.webp); --motif-bas: url(../brand/img/MM-FOND-ARABESQUE-BAS.webp); }
.mm-main:has(.mm-band[data-motif="claustra"]) { --motif-haut: url(../brand/img/MM-FOND-CLAUSTRA-HAUT.webp); --motif-bas: url(../brand/img/MM-FOND-CLAUSTRA-BAS.webp); }
.mm-main:has(.mm-band[data-motif="entrelacs"]) { --motif-haut: url(../brand/img/MM-FOND-ENTRELACS-HAUT.webp); --motif-bas: url(../brand/img/MM-FOND-ENTRELACS-BAS.webp); }
.mm-main:has(.mm-band[data-motif="etoiles"]) { --motif-haut: url(../brand/img/MM-FOND-ETOILES-HAUT.webp); --motif-bas: url(../brand/img/MM-FOND-ETOILES-BAS.webp); }
/* Ma mémorisation (section Coran) : la géométrie de Mon Coran. */
.mm-main:has(.mm-band[data-motif="geo"], .mm-memo-head) { --motif-haut: url(../brand/img/MM-QR-FOND-GEO-HAUT.webp); --motif-bas: url(../brand/img/MM-QR-FOND-GEO-BAS.webp); }
@media (max-width: 47.99rem) {
  .mm-band.is-motif { padding-top: var(--mm-5); }
  .mm-band.is-motif .mm-band__medal, .mm-band.is-motif .mm-band__logo { display: none; }
}

/* Grand médaillon : le logo de la matière, entier, dans l'arche en filigrane d'or (même geste que
   les arches de l'accueil, en plus grand). */
.mm-band__medal { position: relative; flex: none; display: grid; place-items: center; width: clamp(7rem, 9cqw, 9.5rem); aspect-ratio: 4 / 5; }
.mm-band__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-band__medal-art { position: relative; display: grid; place-items: center; width: 74%; height: 74%; margin-top: 12%; border-radius: var(--mm-arch); background: radial-gradient(60% 50% at 50% 45%, var(--mm-halo) 0%, color-mix(in srgb, var(--mm-halo) 0%, transparent) 100%); }
.mm-band__medal-art img, .mm-band__medal-art svg { display: block; width: 86%; height: auto; filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--mm-green-900) 22%, transparent)); }
.mm-band__frieze { display: block; width: 15rem; max-width: 100%; height: auto; margin: -.125rem 0 .125rem -.5rem; }
/* Coin d'arabesque : angle supérieur droit d'un panneau clair, loin du texte. */
.has-corner { position: relative; }
.mm-orn--corner { position: absolute; top: var(--mm-2); right: var(--mm-2); width: clamp(4.5rem, 7cqw, 7rem); height: auto; pointer-events: none; }
.has-corner > :not(.mm-orn) { position: relative; }
.mm-orn { display: block; pointer-events: none; user-select: none; }
/* Coins du lot 4 : l'ornement occupe le quart supérieur droit d'un canevas carré, collé à l'angle. */
/* Lot 4 : le dessin touche le bord de son carré ; décalé pour ne pas être rogné par l'arrondi de la carte. */
.mm-orn--corner.mm-orn--coin { top: var(--mm-2); right: var(--mm-2); width: clamp(9rem, 15cqw, 13rem); }
/* Le titre d'un encart garde sa fin hors du coin (vu sur « Enregistrer un élève » à 1440 px). */
.has-corner > .mm-aside-card__title, .has-corner > .mm-zone__head { padding-right: 3.5rem; }

/* Échelle des niveaux : un médaillon par niveau, relié au suivant par un fil ; l'état est écrit
   en toutes lettres (jamais porté par la seule couleur). */
.mm-levels__rule { margin: 0 0 var(--mm-4); font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-levels { display: flex; flex-direction: column; }
.mm-level { position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--mm-4); padding-bottom: var(--mm-6); animation: mm-rise var(--mm-med) var(--mm-ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.mm-level:last-child { padding-bottom: 0; }
.mm-level:not(:last-child)::before { content: ""; position: absolute; left: 1.5rem; top: 3.25rem; bottom: .25rem; width: 0; border-left: 2px dotted var(--mm-line-strong); }
.mm-level--done:not(:last-child)::before { border-left-style: solid; border-color: var(--mm-gold-light); }
.mm-level__medal { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--mm-surface); color: var(--mm-muted); box-shadow: inset 0 0 0 2px var(--mm-line-strong); }
.mm-level__medal b { font: 700 var(--mm-text-lg)/1 var(--mm-font-display); }
.mm-level--current .mm-level__medal { background: var(--mm-green-900); color: var(--mm-gold-light); box-shadow: inset 0 0 0 2px var(--mm-gold), 0 0 0 6px color-mix(in srgb, var(--mm-gold) 16%, transparent); }
.mm-level--done .mm-level__medal { background: var(--mm-gold-light); color: var(--mm-green-900); box-shadow: none; }
.mm-level__body { display: flex; flex-direction: column; gap: var(--mm-3); min-width: 0; padding-top: .5rem; }
.mm-level__title { display: flex; align-items: baseline; gap: var(--mm-3); font: 600 var(--mm-text-lg)/1.3 var(--mm-font-display); color: var(--mm-green-title); }
.mm-level__state { font: 600 var(--mm-text-xs)/1.3 var(--mm-font-ui); color: var(--mm-muted); }
.mm-level--current .mm-level__state { color: var(--mm-gold-ink); }
.mm-level--done .mm-level__state { color: var(--mm-green-text); }
.mm-level__hint { margin: 0; font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-aside-card .mm-progress-duo .mm-aside-card__text { font-size: var(--mm-text-sm); }

/* ---------- Contrôles et Progression (C4, v0.30.0) ---------- */
/* Trois chiffres réels, grands, sur une bande blanche, séparés par des filets d'or. */
.mm-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--mm-5) var(--mm-4); background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: 20px; box-shadow: var(--mm-shadow); }
.mm-figures li { display: flex; flex-direction: column; align-items: center; gap: var(--mm-1); text-align: center; }
.mm-figures li + li { border-left: 1px solid color-mix(in srgb, var(--mm-gold) 35%, transparent); }
.mm-figures strong { font: 700 clamp(1.875rem, 2.6cqw, 2.5rem)/1 var(--mm-font-ui); color: var(--mm-green-title); font-variant-numeric: tabular-nums; }
.mm-figures span { font-size: var(--mm-text-sm); color: var(--mm-muted); }
/* Contrôles, leçon par leçon : l'arche de la matière, puis le chemin des tentatives. */
.mm-tries { display: flex; flex-direction: column; }
.mm-tries__item { display: flex; gap: var(--mm-5); padding: var(--mm-5) 0; }
.mm-tries__item + .mm-tries__item { border-top: 1px solid var(--mm-line); }
.mm-tries__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-tries__kicker { font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-gold-ink); }
.mm-tries__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--mm-1) var(--mm-3); font: 600 var(--mm-text-xl)/1.25 var(--mm-font-display); color: var(--mm-green-title); }
.mm-tries__state { font: 600 var(--mm-text-xs)/1.3 var(--mm-font-ui); color: var(--mm-muted); }
.mm-tries__state--ok { color: var(--mm-green-text); }
.mm-tries__state--ko { color: var(--mm-gold-ink); }
.mm-tries__steps { display: flex; align-items: center; flex-wrap: wrap; gap: var(--mm-2); margin-top: var(--mm-1); }
.mm-tries__arrow { color: var(--mm-line-strong); }
.mm-try { display: flex; flex-direction: column; gap: 1px; min-width: 8.5rem; padding: var(--mm-2) var(--mm-4); border-radius: var(--mm-radius); background: var(--mm-cream); box-shadow: inset 0 0 0 1px var(--mm-line); text-decoration: none; color: var(--mm-ink); transition: box-shadow var(--mm-fast) ease, transform var(--mm-med) var(--mm-ease); }
.mm a.mm-try { color: var(--mm-ink); }
.mm a.mm-try:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--mm-line-strong), var(--mm-elev-1); }
.mm-try span, .mm-try em { font-size: var(--mm-text-xs); font-style: normal; color: var(--mm-muted); }
.mm-try strong { font: 700 var(--mm-text-lg)/1.25 var(--mm-font-ui); font-variant-numeric: tabular-nums; }
.mm-try--ok { background: var(--mm-green-100); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-green-700) 25%, transparent); }
.mm-try--ok strong { color: var(--mm-green-text); }
.mm-try--ko strong { color: var(--mm-gold-ink); }
/* Progression : tableau des niveaux (une arche par matière) et bilan côte à côte. */
.mm-progress-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--mm-5); align-items: stretch; }
.mm-ranks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--mm-3); }
.mm-rank a { display: flex; flex-direction: column; align-items: center; gap: var(--mm-1); text-decoration: none; color: var(--mm-ink); text-align: center; }
.mm-rank__arch { display: grid; place-items: center; width: 100%; max-width: 6.5rem; aspect-ratio: 4 / 5; margin-bottom: var(--mm-1); border-radius: var(--mm-arch); background: radial-gradient(70% 55% at 50% 42%, var(--mm-halo) 0%, var(--mm-green-100) 100%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 30%, transparent), var(--mm-elev-1); transition: transform var(--mm-med) var(--mm-ease); }
.mm-rank__arch img, .mm-rank__arch svg { display: block; width: 74%; height: auto; }
.mm-rank a:hover .mm-rank__arch { transform: translateY(-3px); }
.mm-rank__name { font-weight: 600; }
.mm-rank__level { display: inline-flex; padding: .2rem .6rem; border-radius: 999px; background: var(--mm-green-900); color: var(--mm-gold-light); font: 700 var(--mm-text-xs)/1.3 var(--mm-font-ui); }
.mm-rank.is-muted .mm-rank__arch { opacity: .5; }
.mm-rank.is-muted .mm-rank__level { background: var(--mm-cream); color: var(--mm-muted); box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-progs { display: flex; flex-direction: column; }
.mm-prog { display: flex; gap: var(--mm-5); padding: var(--mm-5) 0; }
.mm-prog + .mm-prog { border-top: 1px solid var(--mm-line); }
.mm-prog__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-prog__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--mm-1) var(--mm-3); }
/* Titre d'au moins 10rem : au téléphone, « Ouvrir le parcours » passe dessous au lieu de l'écraser
   (titre mot à mot, lien sortant de la carte ; relevé des écrans, 24 nov.). */
.mm-prog__head h3 { flex: 1 1 10rem; min-width: 0; }
.mm-prog__head h3 { font: 600 var(--mm-text-xl)/1.25 var(--mm-font-display); color: var(--mm-green-title); }
.mm-prog__line { display: flex; justify-content: space-between; gap: var(--mm-3); font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-prog__line em { font-style: normal; font-weight: 700; color: var(--mm-green-text); }
.mm-prog.is-locked .mm-prog__head h3 { color: var(--mm-muted); }
.mm-prog__link { color: inherit; text-decoration: none; }
.mm-prog__link::after { content: ""; position: absolute; inset: 0; }
.mm-prog { position: relative; }
.mm-prog:hover .mm-zone__more { text-decoration: underline; }

/* ---------- Studio (C7, v0.32.0) ---------- */
.mm-stack { display: flex; flex-direction: column; gap: var(--mm-5); min-width: 0; }
/* Leçons d'un chapitre : numéro dans une arche, titre, contenu réel (séquences, questions), état. */
.mm-lrows { display: flex; flex-direction: column; }
.mm-lrows > li + li { border-top: 1px solid var(--mm-line); }
.mm-lrow { display: flex; align-items: center; gap: var(--mm-4); padding: var(--mm-3) var(--mm-2); border-radius: var(--mm-radius); color: var(--mm-ink); text-decoration: none; transition: background var(--mm-fast) ease; }
.mm a.mm-lrow { color: var(--mm-ink); }
.mm a.mm-lrow:hover { background: var(--mm-cream); }
.mm-lrow__n { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.75rem; border-radius: 999px 999px 8px 8px; background: var(--mm-green-900); color: var(--mm-gold-light); font: 700 var(--mm-text-md)/1 var(--mm-font-display); }
.mm-lrow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mm-lrow__text strong { font: 600 var(--mm-text-lg)/1.3 var(--mm-font-display); color: var(--mm-green-title); }
.mm-lrow__text em { font-style: normal; font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-lrow > .mm-icon { flex: none; color: var(--mm-muted); }
.mm-lrows__add { margin-top: var(--mm-4); padding-top: var(--mm-4); border-top: 1px dashed var(--mm-line-strong); }
/* Fil des étapes de l'éditeur : quatre repères reliés ; une étape faite porte une coche d'or. */
.mm-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: var(--mm-3); background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: 20px; box-shadow: var(--mm-shadow); }
.mm-stepper__item { position: relative; }
.mm-stepper__item + .mm-stepper__item::before { content: ""; position: absolute; left: calc(-1 * var(--mm-3)); top: 50%; width: var(--mm-5); border-top: 1px solid color-mix(in srgb, var(--mm-gold) 45%, transparent); }
.mm-stepper a { display: flex; align-items: center; gap: var(--mm-3); padding: var(--mm-2) var(--mm-4); border-radius: var(--mm-radius); color: var(--mm-ink); text-decoration: none; }
.mm a.mm-stepper__link, .mm-stepper a:hover { background: var(--mm-cream); }
.mm-stepper__n { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--mm-cream); color: var(--mm-green-title); font: 700 var(--mm-text-sm)/1 var(--mm-font-ui); box-shadow: inset 0 0 0 1.5px var(--mm-line-strong); }
.mm-stepper__item.is-done .mm-stepper__n { background: var(--mm-green-900); color: var(--mm-gold-light); box-shadow: none; }
.mm-stepper__text { display: flex; flex-direction: column; min-width: 0; }
.mm-stepper__text strong { font-weight: 700; color: var(--mm-green-title); }
.mm-stepper__text em { font-style: normal; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-panel[id^="etape-"] { scroll-margin-top: calc(var(--mm-head-h, 4.5rem) + var(--mm-4)); }

/* ---------- Suivi des élèves (C8, v0.33.0) ---------- */
/* Initiales dans une arche verte : l'élève est identifié sans photo. */
.mm-initials { flex: none; display: grid; place-items: center; width: 3rem; height: 3.75rem; border-radius: 999px 999px 10px 10px; background: var(--mm-green-900); color: var(--mm-gold-light); font: 600 var(--mm-text-lg)/1 var(--mm-font-display); letter-spacing: .02em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 40%, transparent); }
.mm-initials--lg { width: 72%; height: auto; aspect-ratio: 4 / 5; font-size: clamp(2rem, 3cqw, 2.75rem); }
.mm-band__medal--person { display: grid; place-items: center; }
.mm-zone--attention { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 45%, transparent), var(--mm-shadow); }
.mm-pupils { display: flex; flex-direction: column; margin-top: var(--mm-4); }
.mm-pupils > li + li { border-top: 1px solid var(--mm-line); }
.mm-pupil { display: grid; grid-template-columns: auto minmax(12rem, 1fr) minmax(0, 2fr) auto; align-items: center; gap: var(--mm-5); padding: var(--mm-4) var(--mm-2); border-radius: var(--mm-radius); color: var(--mm-ink); text-decoration: none; transition: background var(--mm-fast) ease; }
.mm a.mm-pupil { color: var(--mm-ink); }
.mm a.mm-pupil:hover { background: var(--mm-cream); }
.mm-pupil > .mm-icon { color: var(--mm-muted); }
.mm-pupil__who { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mm-2); min-width: 0; }
.mm-pupil__who strong { font: 600 var(--mm-text-xl)/1.2 var(--mm-font-display); color: var(--mm-green-title); }
.mm-pupil__chips { display: flex; flex-wrap: wrap; gap: var(--mm-2); }
.mm-pupil__tracks { display: flex; flex-direction: column; gap: var(--mm-3); min-width: 0; }
.mm-pupil__track { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--mm-1) var(--mm-3); align-items: baseline; }
.mm-pupil__track .mm-meter { grid-column: 1 / -1; }
.mm-pupil__name { font-weight: 600; }
.mm-pupil__val { font-size: var(--mm-text-sm); color: var(--mm-muted); font-variant-numeric: tabular-nums; }
.mm-pupil__fails { grid-column: 1 / -1; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-pupil__more { font-size: var(--mm-text-xs); color: var(--mm-muted); }
/* Suivi des élèves (3 déc., revue des écrans de l'équipe) : une ligne par programme (nom, jauge, compte) sur
   ordinateur, nom de l'élève plus sobre ; un élève tient en ~110 px au lieu de 150. Le 4 déc., la même sobriété
   au téléphone (près de 310 px par élève avec trois programmes) : nom et arche réduits, programmes resserrés. */
@media (max-width: 47.99rem) {
  .mm-pupil { gap: var(--mm-2) var(--mm-3); padding-block: var(--mm-3); }
  .mm-pupil__who { gap: var(--mm-1); }
  .mm-pupil__who strong { font-size: var(--mm-text-lg); }
  .mm-pupil > .mm-initials { width: 2.5rem; height: 3.125rem; font-size: var(--mm-text-md); }
  .mm-pupil__tracks { gap: var(--mm-2); }
  .mm-pupil__name { font-size: var(--mm-text-sm); }
}
@media (min-width: 48rem) {
  .mm-pupil { gap: var(--mm-4); padding-block: var(--mm-3); }
  .mm-pupil__who { gap: var(--mm-1); }
  .mm-pupil__who strong { font-size: var(--mm-text-lg); }
  .mm-pupil > .mm-initials { width: 2.5rem; height: 3.125rem; font-size: var(--mm-text-md); }
  .mm-pupil__tracks { gap: var(--mm-2); }
}
/* La rangée nom · jauge · compte seulement quand la colonne est assez large (iPad : le nom était tronqué). */
@media (min-width: 64rem) {
  .mm-pupil__track { grid-template-columns: minmax(0, 1fr) minmax(4rem, 10rem) 3rem; align-items: center; }
  .mm-pupil__name { grid-area: 1 / 1; }
  .mm-pupil__track .mm-meter { grid-area: 1 / 2; }
  .mm-pupil__val { grid-area: 1 / 3; text-align: right; }
}
/* Fiche : en-tête de programme avec sa petite arche ; paliers ; historique en frise verticale. */
.mm-zone__head--prog { display: flex; align-items: center; gap: var(--mm-4); }
.mm-records { display: flex; flex-direction: column; }
.mm-record .mm-tries__steps { margin-left: calc(2.25rem + var(--mm-3)); }
.mm-timeline { display: flex; flex-direction: column; gap: var(--mm-4); margin-top: var(--mm-2); }
.mm-timeline__item { position: relative; display: flex; flex-direction: column; gap: 2px; padding-left: var(--mm-5); font-size: var(--mm-text-sm); }
.mm-timeline__item::before { content: ""; position: absolute; left: 0; top: .35rem; width: .625rem; height: .625rem; border-radius: 50%; background: var(--mm-green-700); box-shadow: 0 0 0 3px var(--mm-green-100); }
.mm-timeline__item--teacher::before { background: var(--mm-gold); box-shadow: 0 0 0 3px var(--mm-gold-wash); }
.mm-timeline__item + .mm-timeline__item::after { content: ""; position: absolute; left: .28rem; top: calc(-1 * var(--mm-4) + .2rem); height: calc(var(--mm-4) + .1rem); border-left: 1px solid var(--mm-line-strong); }
.mm-timeline__item strong { color: var(--mm-green-title); }
.mm-timeline__item em { font-style: normal; font-size: var(--mm-text-xs); color: var(--mm-muted); }
/* Historique de la fiche (C8-P2) : surtitre du type d'événement ; décisions de l'enseignant en
   cercle vide, copies non validées en gris, validation exceptionnelle en or. */
.mm-timeline__kind { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-timeline__item--ok .mm-timeline__kind { color: var(--mm-green-text); }
.mm-timeline__item--note::before { background: var(--mm-surface); box-shadow: inset 0 0 0 2px var(--mm-green-700); }
.mm-timeline__item--ko::before { background: var(--mm-muted); box-shadow: 0 0 0 3px var(--mm-line); }
.mm-timeline__item--ko .mm-timeline__kind { color: var(--mm-muted); }

/* ---------- Notifications (C4, v0.34.0) ---------- */
.mm-bell { position: relative; }
.mm-bell__count { position: absolute; top: .2rem; right: .1rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--mm-gold); color: var(--mm-green-900); font: 700 .7rem/1.15rem var(--mm-font-ui); text-align: center; box-shadow: 0 0 0 2px var(--mm-surface); }
.mm-notes { display: flex; flex-direction: column; margin-top: var(--mm-2); }
.mm-note + .mm-note { border-top: 1px solid var(--mm-line); }
/* Pages du fil (C4-P2) : précédent · position · suivant, sur une ligne ; sur téléphone, la position passe dessous. */
.mm-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--mm-3); margin-top: var(--mm-4); padding-top: var(--mm-4); border-top: 1px solid var(--mm-line); }
.mm-pager__link { display: inline-flex; align-items: center; gap: var(--mm-1); min-height: 2.75rem; font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); text-decoration: none; }
.mm-pager__link[rel="next"] { justify-self: end; }
.mm-pager__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.mm-pager__where { font-size: var(--mm-text-xs); color: var(--mm-muted); text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 47.99rem) {
  .mm-pager { grid-template-columns: 1fr 1fr; }
  .mm-pager__where { grid-column: 1 / -1; grid-row: 2; }
}
.mm-note__link { display: flex; align-items: flex-start; gap: var(--mm-4); padding: var(--mm-4) var(--mm-2); border-radius: var(--mm-radius); color: var(--mm-ink); text-decoration: none; transition: background var(--mm-fast) ease; }
.mm a.mm-note__link { color: var(--mm-ink); }
.mm a.mm-note__link:hover { background: var(--mm-cream); }
.mm-note__link > .mm-icon { flex: none; align-self: center; color: var(--mm-muted); }
.mm-note__mark { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.mm-note__mark--green { background: var(--mm-green-100); color: var(--mm-green-title); }
.mm-note__mark--gold { background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
.mm-note__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--mm-1); }
.mm-note__title { font: 600 var(--mm-text-md)/1.35 var(--mm-font-display); color: var(--mm-green-title); overflow-wrap: anywhere; }
.mm-note__text { font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-note__when { display: flex; align-items: center; gap: var(--mm-2); font-style: normal; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-note.is-new .mm-note__mark { box-shadow: 0 0 0 3px var(--mm-surface), 0 0 0 4.5px var(--mm-gold); }

/* ---------- Administration (C9, v0.33.0) ---------- */
.mm-lrow__text em .mm-idchip { margin-right: var(--mm-2); }
.mm-checkline--prog { align-items: center; gap: var(--mm-3); }
.mm-checkline--prog .mm-mini-arch { width: 3rem; }
.mm-aside-card__title--sep { margin-top: var(--mm-5); padding-top: var(--mm-5); border-top: 1px solid var(--mm-line); }

@keyframes mm-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* Entrée orchestrée de l'accueil : en-tête, matières, puis les trois panneaux. */
.mm-home > * { animation: mm-rise var(--mm-slow) var(--mm-ease) both; animation-delay: calc(var(--i, 0) * 90ms); }

.mm-tags { display: flex; gap: var(--mm-2); flex-wrap: wrap; }
.mm-tag { padding: .3rem .7rem; border-radius: 999px; background: var(--mm-sand); color: var(--mm-green-title); font-size: var(--mm-text-xs); font-weight: 600; white-space: nowrap; }
.mm-tag--green { background: var(--mm-green-100); color: var(--mm-green-text); }
.mm-tag--plain { background: var(--mm-cream); color: var(--mm-muted); box-shadow: inset 0 0 0 1px var(--mm-line); font-weight: 500; }

/* Fil des séquences d'une leçon : un segment par séquence. */
.mm-thread { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 6px; max-width: 26rem; }
.mm-thread > li { height: 6px; border-radius: 999px; background: var(--mm-line); }
.mm-thread > .is-done { background: var(--mm-green-700); }
.mm-thread > .is-current { background: linear-gradient(90deg, var(--mm-gold) 50%, var(--mm-line) 50%); }

.mm-btn--lg { min-height: 3.25rem; padding: 0 1.625rem; font-size: var(--mm-text-md); }

/* Sections et panneaux */
.mm-section { display: flex; flex-direction: column; gap: 1.25rem; }
.mm-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--mm-4); flex-wrap: wrap; }
.mm-section__title { font: 700 var(--mm-text-xl)/1.25 var(--mm-font-ui); color: var(--mm-ink); }
.mm-section__title--sm { font-size: var(--mm-text-xl); }
.mm-section__more { font-size: var(--mm-text-sm); font-weight: 600; text-decoration: none; }

.mm-zone { display: flex; flex-direction: column; gap: var(--mm-3); padding: 1.125rem var(--mm-5); background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: 20px; box-shadow: var(--mm-shadow); }
.mm-zone__head { display: flex; align-items: center; gap: var(--mm-3); min-width: 0; }
/* Portion de Ma mémorisation : « Écouter » et « Réciter seul » groupés à droite du titre (3 déc.). */
.mm-memo-read__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--mm-2); margin-left: auto; }
/* Téléphone : les deux actions passent sous le titre, côte à côte, de même largeur. */
@media (max-width: 39.99rem) {
  .mm-memo-read > .mm-zone__head { flex-wrap: wrap; row-gap: var(--mm-3); }
  .mm-memo-read__actions { flex: 1 1 100%; flex-wrap: nowrap; margin-left: 0; }
  .mm-memo-read__actions > .mm-btn { flex: 1 1 0; min-width: 0; }
}
.mm-zone__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mm-2); min-width: 0; white-space: nowrap; font: 700 var(--mm-text-md)/1.25 var(--mm-font-ui); color: var(--mm-ink); }
.mm-zone__label { overflow: hidden; text-overflow: ellipsis; }
.mm-zone__title .mm-icon { color: var(--mm-green-text); }
/* 4 déc. : à 320 px, la pastille « 3 questions · 3 points » sortait de la carte (coupée) ; le titre passe à la ligne. */
.mm-zone__title .mm-levelchip { margin-left: var(--mm-1); }
.mm-zone__more { margin-left: auto; flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: var(--mm-1); min-height: 1.5rem; font-size: var(--mm-text-sm); font-weight: 600; text-decoration: none; }
/* Cibles tactiles (réception P1) : liens de section et titres de palier à 44 px de haut au téléphone. */
@media (max-width: 47.99rem) { .mm-zone__more, .mm-stop__title a { min-height: 2.75rem; } .mm-stop__title a { display: inline-flex; align-items: center; } }

.mm-feed__icon { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--mm-cream); color: var(--mm-ink); box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-feed__icon--done { background: var(--mm-green-100); color: var(--mm-green-text); box-shadow: none; }
.mm-feed__icon--open { background: var(--mm-sand); color: var(--mm-gold-ink); box-shadow: none; }
.mm-feed__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--mm-ink); }
.mm a.mm-feed__text { color: var(--mm-ink); }
.mm-feed__text strong { font-weight: 600; }
.mm-feed__text span { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-feed__when { font-size: var(--mm-text-sm); color: var(--mm-muted); white-space: nowrap; }

/* Lignes de leçon (révisions, contrôles, recherche) */
.mm-lesson-card { display: flex; align-items: center; gap: var(--mm-4); padding: var(--mm-3); background: var(--mm-surface); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow); text-decoration: none; color: var(--mm-ink); transition: box-shadow var(--mm-med) var(--mm-ease); }
.mm a.mm-lesson-card { color: var(--mm-ink); }
.mm-lesson-card:hover { box-shadow: var(--mm-shadow-lift); }
.mm-lesson-card__text { display: flex; flex-direction: column; gap: var(--mm-1); flex: 1 1 10rem; min-width: 0; }
/* Carte étroite (téléphone) : le texte garde au moins 10rem ; l'état passe à la ligne au lieu de
   l'écraser (titre et durée coupés mot à mot sur la page Recherche). */
.mm-lesson-card { flex-wrap: wrap; }
.mm-lesson-card__text strong { font: 600 var(--mm-text-lg)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-lesson-card__meta { display: flex; align-items: center; gap: var(--mm-2); flex-wrap: wrap; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-lesson-card__meta span { display: inline-flex; align-items: center; gap: var(--mm-1); }
.mm-lesson-card__meta i { font-style: normal; color: var(--mm-line-strong); }
.mm-tile__kicker { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-green-text); }

/* Blocs chiffrés (Ma progression) */
.mm-progress-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--mm-3); }
.mm-progress-card__head strong { font: 600 var(--mm-text-md)/1.2 var(--mm-font-ui); }
.mm-progress-card__head em { font: 700 var(--mm-text-md)/1 var(--mm-font-ui); font-style: normal; color: var(--mm-green-text); font-variant-numeric: tabular-nums; }

.mm-cards-list { display: flex; flex-direction: column; gap: var(--mm-2); }
/* Dans un panneau blanc, les lignes ne sont pas des cartes : un filet suffit. */
.mm-zone .mm-cards-list > li > a { box-shadow: none; border-radius: var(--mm-radius-sm); }
.mm-zone .mm-cards-list > li + li { border-top: 1px solid var(--mm-line); padding-top: var(--mm-1); }
.mm-zone .mm-cards-list > li > a:hover { background: var(--mm-cream); }

.mm-blank { display: flex; flex-direction: column; align-items: center; gap: var(--mm-2); padding: var(--mm-6) var(--mm-5); border-radius: var(--mm-radius-lg); box-shadow: inset 0 0 0 1.5px var(--mm-line); text-align: center; }
.mm-blank--plain { padding: var(--mm-5) var(--mm-4); }
.mm-blank__picto { width: 5.5rem; height: auto; margin-bottom: var(--mm-2); }
/* Illustration d'état vide du lot 4 (MM-VIDE-…), plus grande que le pictogramme qu'elle remplace. */
.mm-blank__ill { width: 10rem; height: auto; margin-inline: auto; }
.mm-blank__title { font: 600 var(--mm-text-lg)/1.3 var(--mm-font-ui); color: var(--mm-ink); }
.mm-blank__text { max-width: 32rem; color: var(--mm-muted); font-size: var(--mm-text-sm); }
.mm-blank .mm-btn { margin-top: var(--mm-2); }

/* ---------- Écrans intérieurs composés comme l'accueil (v0.43.0) ----------
   Une carte verte forte par écran (.mm-hero, même dessin que « Reprendre »), un titre de section
   posé sur la page et de grandes arches sur le fond (.mm-shelf), puis un seul panneau blanc. */
.mm-page .mm-home__row { margin-top: 0; }
.mm-page > .mm-band + * { margin-top: var(--mm-2); }
.mm-shelf { container: mm-shelf / inline-size; display: flex; flex-direction: column; gap: var(--mm-4); }
/* Six arches dans la largeur dès qu'elles y tiennent (réception C12 : à 1280 px, la sixième était coupée net). */
.mm-shelf { --arch-h: clamp(10rem, calc((100cqw - 5 * var(--mm-4)) / 6 * 1.25), 14.5rem); }
/* 4 déc. : sur tablette (768 à 900 px), six arches de 10 rem ne tenaient pas ; Arabe et Adab étaient coupées, sans
   signe qu'on pouvait faire défiler. Tant que l'étagère est trop étroite pour six, trois par rangée, comme au téléphone. */
@media (min-width: 48rem) {
  @container mm-shelf (max-width: 53rem) {
    .mm-subjects { grid-auto-flow: row; grid-template-columns: repeat(3, auto); justify-content: center; gap: var(--mm-4) var(--mm-6); overflow: visible; margin: 0; padding: 0; }
  }
}
.mm-pagehead h2 { font: 600 1.5rem/1.2 var(--mm-font-display); color: var(--mm-green-title); }
.mm-hero { min-height: 15rem; }
.mm-hero .mm-resume__title { font-size: clamp(1.75rem, 2.6vw, 2.5rem); }
.mm-hero__facts { display: flex; gap: var(--mm-5); margin-top: var(--mm-2); }
.mm-hero__facts span { display: flex; flex-direction: column; gap: 2px; }
.mm-hero__facts span + span { padding-left: var(--mm-5); border-left: 1px solid color-mix(in srgb, var(--mm-gold-light) 30%, transparent); }
.mm-hero__facts strong { font: 700 1.75rem/1 var(--mm-font-ui); color: var(--mm-gold-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-hero__facts em { font-style: normal; font-size: var(--mm-text-xs); color: var(--mm-on-green-muted); white-space: nowrap; }
/* Téléphone : « 60 % » se coupait en deux lignes à côté de l'illustration (réception du 25 nov.). */
@media (max-width: 47.99rem) { .mm-hero__facts { gap: var(--mm-3); } .mm-hero__facts span + span { padding-left: var(--mm-3); } .mm-hero__facts strong { font-size: 1.5rem; } }
/* Niveau global : le chiffre en grand dans l'arche d'or de la carte. */
.mm-hero__level { display: flex; flex-direction: column; align-items: center; align-self: center; margin-top: 18%; color: var(--mm-gold-light); }
.mm-hero__level em { font-style: normal; font-size: var(--mm-text-xs); font-weight: 600; letter-spacing: .02em; color: var(--mm-on-green-muted); }
.mm-hero__level strong { font: 600 clamp(3.5rem, 6vw, 5rem)/1 var(--mm-font-display); color: var(--mm-gold-light); text-shadow: 0 6px 18px color-mix(in srgb, var(--mm-black) 35%, transparent); }
/* Bilan empilé (contrôles) : trois chiffres l'un sous l'autre, séparés par un filet. */
.mm-page .mm-figures.mm-figures--stack { grid-template-columns: minmax(0, 1fr); padding: 0; background: none; border: 0; box-shadow: none; }
.mm-figures--stack li { flex-direction: row; justify-content: space-between; align-items: baseline; padding: var(--mm-3) 0; text-align: left; }
.mm-figures--stack li + li { border-left: 0; border-top: 1px solid var(--mm-line); }
.mm-figures--stack strong { order: 2; font-size: 1.75rem; }
.mm-figures--stack span { font-size: var(--mm-text-md); color: var(--mm-ink); }
/* Étagère des révisions : une grande arche par leçon validée. */
.mm-volumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr)); gap: var(--mm-5); }
.mm-volume { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--mm-2); height: 100%; padding: var(--mm-6) var(--mm-5) var(--mm-5); border-radius: 999px 999px var(--mm-radius-xl) var(--mm-radius-xl); background: radial-gradient(75% 45% at 50% 22%, var(--mm-halo) 0%, var(--mm-halo) 30%, var(--mm-green-100) 100%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mm-gold) 18%, transparent), 0 24px 44px -30px color-mix(in srgb, var(--mm-green-900) 55%, transparent); color: var(--mm-ink); text-align: center; text-decoration: none; transition: transform var(--mm-med) var(--mm-ease), box-shadow var(--mm-med) var(--mm-ease); animation: mm-rise var(--mm-slow) var(--mm-ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.mm a.mm-volume { color: var(--mm-ink); }
.mm-volume::before { content: ""; position: absolute; inset: 8px; border-radius: 999px 999px 18px 18px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 24%, transparent); pointer-events: none; }
.mm-volume:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mm-gold) 35%, transparent), var(--mm-elev-2); }
.mm-volume__niche { display: grid; place-items: center; width: 7.5rem; aspect-ratio: 1; margin: var(--mm-3) 0 var(--mm-2); }
.mm-volume__logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 12px 14px color-mix(in srgb, var(--mm-green-900) 22%, transparent)); transition: transform var(--mm-slow) var(--mm-ease); }
.mm-volume:hover .mm-volume__logo { transform: translateY(-4px) scale(1.04); }
.mm-volume__kicker { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-volume__title { font: 600 1.375rem/1.2 var(--mm-font-display); color: var(--mm-green-title); text-wrap: balance; }
.mm-volume__meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--mm-2) var(--mm-3); font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-volume__meta > span:not(.mm-chip) { display: inline-flex; align-items: center; gap: .3rem; }
.mm-volume__go { margin-top: auto; padding-top: var(--mm-3); display: inline-flex; align-items: center; gap: var(--mm-1); font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); }
@media (prefers-reduced-motion: reduce) { .mm-volume, .mm-volume:hover, .mm-volume:hover .mm-volume__logo { transform: none; } }
/* 4 déc., essai sur le vrai site : sur téléphone, une arche par écran obligeait à faire défiler pour chaque leçon.
   L'étagère devient une liste : petite niche en arche à gauche, titre et état à droite, toute la ligne mène à la leçon. */
@media (max-width: 47.99rem) {
  .mm-volumes { grid-template-columns: minmax(0, 1fr); gap: var(--mm-3); }
  .mm-volume { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); grid-template-areas: "niche kicker" "niche titre" "niche meta" "niche go"; column-gap: var(--mm-4); row-gap: var(--mm-1); align-items: center; padding: var(--mm-3) var(--mm-4) var(--mm-3) var(--mm-3); border-radius: var(--mm-radius-lg); background: var(--mm-green-100); text-align: start; }
  .mm-volume::before { inset: 5px; border-radius: calc(var(--mm-radius-lg) - 5px); }
  .mm-volume__niche { grid-area: niche; align-self: stretch; width: 100%; aspect-ratio: auto; min-height: 5.5rem; margin: 0; padding: var(--mm-2); border-radius: 999px 999px var(--mm-radius) var(--mm-radius); background: radial-gradient(80% 60% at 50% 35%, var(--mm-halo), transparent 85%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 28%, transparent); }
  .mm-volume__logo { width: 3.25rem; }
  .mm-volume__kicker { grid-area: kicker; }
  .mm-volume__title { grid-area: titre; font-size: var(--mm-text-lg); text-wrap: pretty; }
  .mm-volume__meta { grid-area: meta; justify-content: flex-start; }
  .mm-volume__go { grid-area: go; margin-top: 0; padding-top: var(--mm-1); }
  .mm-volume:hover { transform: none; }
}

/* ---------- Insignes académiques (C12, v0.45.0) ----------
   Un seul insigne dans la bannière de l'accueil, à côté du prénom ; en Progression, l'insigne en
   grand dans l'arche de la carte verte, les prochaines étapes, puis la collection des 24 rangs.
   Les images sont affichées entières, proportions conservées ; le nom et le rang sont en texte. */
/* Décision utilisateur (v0.45.1) : l'insigne n'empile pas le côté gauche ; il occupe la zone calme
   vide à droite de la salutation, en médaillon : image, nom, rang, centrés. */
.mm-board__over:has(.mm-insigne) { flex-direction: row; align-items: center; justify-content: flex-start; gap: clamp(var(--mm-5), 3cqw, var(--mm-8)); }
.mm-board__over:has(.mm-insigne) .mm-board__greet { flex: 0 1 auto; }
/* Grande bannière : la zone calme s'étend jusqu'au pied des arches ; la salutation garde sa ligne. */
@container mm-home (min-width: 75.01rem) {
  .mm-board__over:has(.mm-insigne) { width: calc(100cqw * .46); }
  .mm-board__over:has(.mm-insigne) .mm-hello__ar { white-space: nowrap; }
}
.mm-insigne { flex: none; display: flex; flex-direction: column; align-items: center; gap: var(--mm-2); max-width: 9.5rem; color: var(--mm-ink); text-align: center; text-decoration: none; text-shadow: none; }
.mm a.mm-insigne { color: var(--mm-ink); }
.mm-insigne__img { display: block; flex: none; width: clamp(4.5rem, 6.2cqw, 6rem); height: auto; filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--mm-green-900) 30%, transparent)); transition: transform var(--mm-med) var(--mm-ease); }
.mm-insigne:hover .mm-insigne__img { transform: translateY(-3px); }
.mm-insigne__text { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.mm-insigne__text strong { font: 600 var(--mm-text-md)/1.15 var(--mm-font-display); color: var(--mm-green-title); text-wrap: balance; }
.mm-insigne__text em { font-style: normal; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mm-insigne:hover .mm-insigne__text strong { text-decoration: underline; text-decoration-color: var(--mm-gold); text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .mm-insigne:hover .mm-insigne__img { transform: none; } }
/* Bannière de tablette (basse) : l'image seule à droite ; nom et rang lus par les lecteurs d'écran. */
@container mm-home (max-width: 60rem) {
  .mm-board__over:has(.mm-insigne) { width: calc(100cqw * .5); gap: var(--mm-2); }
  .mm-insigne__img { width: 2.5rem; }
  .mm-insigne__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Petite bannière de tablette (audit v0.55.0, C0-P1-02) : la bannière ne fait qu'une centaine de
   pixels de haut. La salutation tient sur une ligne et l'identité garde la place de ses deux
   lignes (prénom, puis identifiant si le prénom est long) : rien ne sort de la bannière ni ne
   touche le filet doré. Le prénom très long passe à la ligne plutôt que de déborder. */
@media (min-width: 48rem) {
  @container mm-home (max-width: 60rem) {
    .mm-board__over:has(.mm-insigne) { width: calc(100cqw * .56); padding-block: var(--mm-2); }
    .mm-board .mm-hello__title--name { font-size: 1.75rem; line-height: 1; row-gap: .25rem; overflow-wrap: anywhere; }
    .mm-board .mm-hello__title--long { font-size: 1.375rem; }
  }
}
/* Téléphone (3 déc., « bannière trop grande sur mobile ») : la bannière 4:1, entière, moitié moins haute que la
   2:1. La salutation et le prénom restent sur le mur clair, centrés dans la hauteur de l'image ; l'insigne passe
   dessous, en une ligne (image, nom, rang), puis l'heure. Rien n'est recadré. */
@media (max-width: 47.99rem) {
  .mm-board { --ban-h: calc((100cqw + 2 * var(--bleed)) / 4); }
  .mm-board__over, .mm-board__over:has(.mm-insigne), .mm-board__over:has(.mm-insigne):has(.mm-hello__title--long) { position: static; width: auto; height: auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--mm-2); padding: var(--mm-3) var(--bleed) 0; }
  .mm-board__greet, .mm-board__over:has(.mm-insigne) .mm-board__greet, .mm-board__over:has(.mm-insigne):has(.mm-hello__title--long) .mm-board__greet { position: absolute; top: 0; left: var(--bleed); width: 64%; height: var(--ban-h); justify-content: center; gap: 2px; padding: 0 0 0 var(--mm-3); }
  .mm-board .mm-hello__ar, .mm-board__over:has(.mm-insigne) .mm-hello__ar { font-size: clamp(.875rem, 3.9cqw, 1.0625rem); line-height: 1.35; white-space: nowrap; }
  .mm-board .mm-hello__title--name { font-size: clamp(1.25rem, 6cqw, 1.625rem); line-height: 1.05; column-gap: var(--mm-2); }
  .mm-board .mm-hello__title--long, .mm-board__over:has(.mm-hello__title--long) .mm-hello__title--long { font-size: clamp(.9375rem, 4.2cqw, 1.25rem); line-height: 1.05; row-gap: 2px; }
  .mm-board .mm-idchip { padding: .15rem .5rem; font-size: .6875rem; }
  /* Sous l'image, une seule rangée : l'insigne à gauche, l'heure et les deux dates à droite. */
  .mm-board.has-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--mm-3); padding-bottom: var(--mm-3); }
  .mm-board.has-banner > .mm-board__banner { grid-column: 1 / -1; }
  .mm-board.has-banner > .mm-board__over { grid-column: 1; min-width: 0; padding: var(--mm-3) 0 0 var(--bleed); }
  .mm-board.has-banner > .mm-board__time { grid-column: 2; display: grid; grid-template-columns: auto auto; align-items: center; column-gap: var(--mm-2); row-gap: 0; margin: var(--mm-3) var(--bleed) 0 0; text-align: right; }
  .mm-board.has-banner > .mm-board__time .mm-clock { grid-row: 1 / 3; font-size: 1.25rem; }
  .mm-board.has-banner > .mm-board__time .mm-board__date { font-size: var(--mm-text-xs); }
  .mm-board.has-banner > .mm-board__time .mm-board__hijri { font-size: var(--mm-text-xs); line-height: 1.4; }
  .mm-insigne, .mm-board__over:has(.mm-hello__title--long) .mm-insigne { flex-direction: row; align-items: center; max-width: none; gap: var(--mm-2); margin-left: 0; text-align: left; }
  .mm-insigne__img { width: 2.25rem; }
  .mm-insigne, .mm-insigne__text { min-width: 0; }
  .mm-insigne__text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; align-items: flex-start; white-space: normal; }
  .mm-insigne__text strong { font-size: var(--mm-text-sm); }
}
/* Petit téléphone : le rang de l'insigne cède la place à son nom (lu par les lecteurs d'écran). */
@media (max-width: 23.99rem) {
  .mm-board.has-banner .mm-insigne__text em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* Très petit téléphone : l'insigne garde son image ; son nom et son rang restent lus par les lecteurs d'écran. */
@media (max-width: 20.99rem) {
  .mm-board.has-banner .mm-insigne__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* C12-P2 : arrivée d'un nouvel insigne, montrée une seule fois (marque serveur). Mention écrite
   toujours présente ; l'effet — un halo d'or qui se pose puis s'efface, sans confetti ni rebond —
   n'existe que sans préférence de mouvement réduit. */
.mm-insigne__new { font-size: var(--mm-text-xs); font-weight: 700; color: var(--mm-gold-ink); white-space: nowrap; }
.mm-insigne-new { margin: 0 0 var(--mm-2); font-weight: 600; color: var(--mm-gold); }
@keyframes mm-insigne-arrive {
  0% { opacity: 0; transform: scale(.94); filter: drop-shadow(0 0 0 transparent); }
  45% { opacity: 1; transform: none; filter: drop-shadow(0 0 18px color-mix(in srgb, var(--mm-gold) 70%, transparent)); }
  100% { opacity: 1; transform: none; filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--mm-green-900) 30%, transparent)); }
}
/* Téléphone : l'insigne est en ligne (image, nom) ; la mention passe dessous, sans serrer le nom. */
@media (max-width: 47.99rem) {
  .mm-insigne:has(.mm-insigne__new) { flex-wrap: wrap; row-gap: 2px; }
  .mm-insigne__new { order: 2; flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .mm-insigne.is-new .mm-insigne__img, .mm-insigne-hero.is-new .mm-insigne-hero__img { animation: mm-insigne-arrive 1.6s var(--mm-ease) .35s both; }
}

/* Carte verte : l'insigne posé dans l'arche d'or. */
/* (v0.86.0) Une règle de hauteur de l'arche, ici depuis v0.46.0, n'a jamais été appliquée : une
   accolade orpheline la rendait invalide. Retirée avec l'accolade pour garder le rendu reçu. */
.mm-insigne-hero { display: grid; place-items: center; width: 100%; height: 100%; padding: 12% 8% 0; }
.mm-insigne-hero__img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 18px color-mix(in srgb, var(--mm-black) 35%, transparent)); }
/* Prochaines étapes : trois lignes, sans carte dans la carte. */
.mm-next__list { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.mm-next__item { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--mm-4); align-items: start; padding: var(--mm-4) 0; }
.mm-next__item + .mm-next__item { border-top: 1px solid var(--mm-line); }
.mm-next__item:first-child { padding-top: 0; }
.mm-next__art { display: grid; place-items: center; width: 4rem; aspect-ratio: 1; color: var(--mm-green-text); }
.mm-next__img, .mm-next__logo { display: block; width: 100%; height: auto; }
.mm-next__art.is-locked .mm-next__img { filter: grayscale(1) opacity(.55); }
.mm-next__level { display: grid; place-items: center; width: 3.25rem; aspect-ratio: 4 / 5; border-radius: var(--mm-arch); background: var(--mm-green-900); color: var(--mm-gold-light); font: 600 1.5rem/1 var(--mm-font-display); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 55%, transparent); }
.mm-next__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mm-1); min-width: 0; }
.mm-next__kicker { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); }
.mm-next__title { font: 600 1.25rem/1.25 var(--mm-font-display); color: var(--mm-green-title); text-wrap: balance; }
.mm-next__text { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-next__body .mm-meter { width: 100%; margin-top: var(--mm-1); }
.mm-next__body .mm-btn { margin-top: var(--mm-2); }
/* Prochaines étapes à côté du bilan : trois colonnes dès que le panneau a la place (Ma progression). */
.mm-next { container: mm-next / inline-size; }
@container mm-next (min-width: 40rem) {
  .mm-next__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mm-next__item { grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--mm-3); padding: 0 var(--mm-5); }
  .mm-next__item:first-child { padding-left: 0; }
  .mm-next__item:last-child { padding-right: 0; }
  .mm-next__item + .mm-next__item { border-top: 0; border-left: 1px solid var(--mm-line); }
  .mm-next__art { width: 3.25rem; height: 3.5rem; aspect-ratio: auto; place-items: end start; }
  .mm-next__level { width: 2.75rem; }
}
/* Collection : 24 rangs en grille, obtenus en couleur, à venir estompés. */
.mm-collection__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--mm-4); list-style: none; margin: 0; padding: 0; }
.mm-medal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--mm-4) var(--mm-3); border-radius: 999px 999px var(--mm-radius-lg) var(--mm-radius-lg); text-align: center; }
.mm-medal__art { display: grid; place-items: center; width: 5.5rem; aspect-ratio: 1; margin-bottom: var(--mm-2); }
.mm-medal__img { display: block; width: 100%; height: auto; }
.mm-medal__rank { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; }
.mm-medal__name { max-width: 100%; font: 600 var(--mm-text-md)/1.25 var(--mm-font-display); color: var(--mm-green-title); text-wrap: balance; }
.mm-medal__rule { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-medal.is-earned, .mm-medal.is-current { background: radial-gradient(75% 45% at 50% 22%, var(--mm-halo) 0%, var(--mm-halo) 30%, var(--mm-green-100) 100%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mm-gold) 18%, transparent), 0 18px 34px -28px color-mix(in srgb, var(--mm-green-900) 55%, transparent); }
.mm-medal.is-current { box-shadow: 0 0 0 2px var(--mm-gold), 0 22px 40px -28px color-mix(in srgb, var(--mm-green-900) 65%, transparent); }
.mm-medal.is-current .mm-medal__img { filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--mm-green-900) 25%, transparent)); }
.mm-medal.is-locked .mm-medal__img { filter: grayscale(1) opacity(.4); }
.mm-medal.is-locked .mm-medal__name { color: var(--mm-muted); }
/* 4 déc., essai sur le vrai site : en deux colonnes, les 24 rangs faisaient près de 1 900 px sur téléphone.
   Trois colonnes, image plus petite ; le seul nom d'un mot trop long pour la colonne porte une césure prévue (vue). */
@media (max-width: 47.99rem) {
  .mm-collection__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mm-2); }
  .mm-medal { padding: var(--mm-3) var(--mm-1) var(--mm-2); }
  .mm-medal__art { width: 3.25rem; margin-bottom: var(--mm-1); }
  .mm-medal__rule { display: none; }
  .mm-medal__name { font-size: min(var(--mm-text-sm), 3.4vw); }
}

/* Écran « Insignes » de l'administration : 24 lignes, image, nom, seuil saisi. */
.mm-badge-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0 var(--mm-6); list-style: none; margin: 0; padding: 0; }
.mm-badge-row { display: grid; grid-template-columns: 1.75rem 3rem minmax(0, 1fr) auto; align-items: center; gap: var(--mm-3); padding: var(--mm-2) 0; border-bottom: 1px solid var(--mm-line); }
.mm-badge-row__n { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; }
.mm-badge-row__img { display: block; width: 3rem; height: auto; }
.mm-badge-row__name { font: 600 var(--mm-text-md)/1.25 var(--mm-font-display); color: var(--mm-green-title); }
.mm-badge-row__field { display: inline-flex; align-items: center; gap: var(--mm-2); }
.mm-badge-row__input { width: 4.5rem; min-height: 2.5rem; padding: 0 var(--mm-2); border: 1px solid var(--mm-line-strong); border-radius: var(--mm-radius-sm); background: var(--mm-surface); font: 600 var(--mm-text-md)/1 var(--mm-font-ui); color: var(--mm-ink); text-align: right; font-variant-numeric: tabular-nums; }
.mm-badge-row__input:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; }
.mm-badge-row__unit, .mm-badge-row__fixed { font-size: var(--mm-text-xs); color: var(--mm-muted); }
/* Téléphone : le seuil passe sous le nom de l'insigne, qui était coupé à deux lettres (réception du 25 nov.). */
@media (max-width: 47.99rem) { .mm-badge-row { grid-template-columns: 1.75rem 3rem minmax(0, 1fr); row-gap: var(--mm-1); } .mm-badge-row__img { grid-row: span 2; } .mm-badge-row__n { grid-row: span 2; } .mm-badge-row__field { grid-column: 3; } }
.mm-aside-card__list { display: flex; flex-direction: column; gap: var(--mm-2); margin: var(--mm-3) 0 var(--mm-4); padding-left: 1.1em; list-style: disc; font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-aside-card__list li::marker { color: var(--mm-gold); }
.mm-aside-card .mm-checkline { margin-bottom: var(--mm-4); }

/* ---------- Profondeur des écrans intérieurs (v0.42.0) ----------
   Retour utilisateur : « trop de bulles, peu de profondeur ». Une seule surface par zone, sans
   cadre dans le cadre : la zone est une feuille posée (ombre longue et douce, liseré d'or très
   léger, dégradé blanc → ivoire) ; son titre en Lora, l'icône dans un petit médaillon, un filet
   d'or qui s'efface sous l'en-tête. Les états vides et les lignes n'ont plus de bordure propre. */
.mm-page .mm-zone, .mm-page .mm-aside-card, .mm-page .mm-panel { position: relative; gap: var(--mm-4); padding: var(--mm-5) var(--mm-6) var(--mm-6); border: 0; border-radius: var(--mm-radius-xl); background: linear-gradient(180deg, var(--mm-surface) 0%, var(--mm-surface) 55%, color-mix(in srgb, var(--mm-ivory) 70%, var(--mm-surface)) 100%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mm-gold) 16%, transparent), 0 1px 2px color-mix(in srgb, var(--mm-green-900) 6%, transparent), 0 24px 48px -32px color-mix(in srgb, var(--mm-green-900) 45%, transparent); }
.mm-page .mm-zone__head { position: relative; padding-bottom: var(--mm-4); }
.mm-page .mm-zone__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--mm-gold) 60%, transparent), color-mix(in srgb, var(--mm-gold) 0%, transparent) 75%); }
.mm-page .mm-zone__title { gap: var(--mm-3); font: 600 1.3125rem/1.25 var(--mm-font-display); color: var(--mm-green-title); }
/* Écrans intérieurs : un titre de zone revient à la ligne plutôt que d'être tronqué (audit C12-P2-01). */
.mm-page .mm-zone__title { white-space: normal; }
.mm-page .mm-zone__label { overflow: visible; text-overflow: clip; text-wrap: balance; }
.mm-page .mm-zone__title > .mm-icon { box-sizing: content-box; flex: none; padding: .5rem; border-radius: 50%; background: radial-gradient(70% 70% at 50% 35%, var(--mm-halo), var(--mm-green-100)); color: var(--mm-green-700); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 45%, transparent); }
.mm-page .mm-aside-card__title { font: 600 1.3125rem/1.25 var(--mm-font-display); color: var(--mm-green-title); }
/* État vide : pas de cadre, une lumière dorée diffuse derrière le pictogramme. */
.mm-blank { box-shadow: none; background: radial-gradient(55% 65% at 50% 32%, color-mix(in srgb, var(--mm-gold-light) 16%, transparent), transparent 72%); }
.mm-page .mm-blank { padding: var(--mm-6) var(--mm-5) var(--mm-5); }
.mm-blank__picto { width: 7.5rem; filter: drop-shadow(0 14px 18px color-mix(in srgb, var(--mm-green-900) 22%, transparent)); }
.mm-blank__title { font: 600 1.375rem/1.25 var(--mm-font-display); color: var(--mm-green-title); }
.mm-blank__text { font-size: var(--mm-text-md); line-height: 1.55; }
.mm-blank--plain { background: none; }
/* Lignes dans une zone : séparées par un filet, sans cadre ; le survol éclaire la ligne. */
.mm-page .mm-zone .mm-course-row { border-color: transparent; border-radius: var(--mm-radius); }
.mm-page .mm-zone .mm-course-row:hover { border-color: transparent; background: var(--mm-cream); box-shadow: none; transform: none; }
.mm-page .mm-zone .mm-course-row.is-locked { background: none; border-color: transparent; }
.mm-page .mm-zone li + li > .mm-course-row { box-shadow: 0 -1px 0 var(--mm-line); border-top-left-radius: 0; border-top-right-radius: 0; }
.mm-page .mm-figures { border: 0; border-radius: var(--mm-radius-xl); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mm-gold) 16%, transparent), 0 24px 48px -32px color-mix(in srgb, var(--mm-green-900) 45%, transparent); }
/* Bilan dans une zone étroite : l'anneau et la liste passent l'un sous l'autre plutôt que de couper les libellés. */
.mm-page .mm-progress-duo { flex-wrap: wrap; justify-content: center; }
.mm-page .mm-stat-list { flex-basis: 12rem; }
.mm-page .mm-stat-list em { white-space: nowrap; }
.mm-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mm-5); align-items: stretch; }

/* Emplacement de contenu en attente : la structure est là, le texte viendra de l'enseignant. */
.mm-placeholder { display: flex; flex-direction: column; gap: .625rem; padding: 1.125rem; border: 1.5px dashed var(--mm-line-strong); border-radius: var(--mm-radius); }
.mm-placeholder > span { display: block; height: 10px; border-radius: 999px; background: var(--mm-placeholder); }
.mm-placeholder > span:nth-child(1) { width: 92%; }
.mm-placeholder > span:nth-child(2) { width: 78%; }
.mm-placeholder > span:nth-child(3) { width: 85%; }
.mm-placeholder > p { margin-top: var(--mm-1); font-size: var(--mm-text-xs); color: var(--mm-gold-ink); }

.mm-dots { display: flex; flex-wrap: wrap; gap: var(--mm-2); }
.mm-dots__item { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 3rem; padding: var(--mm-2) 0; border-radius: var(--mm-radius-sm); background: var(--mm-cream); }
.mm-dots__item--locked { opacity: .5; }
.mm-dots__label { font: 600 var(--mm-text-xs)/1 var(--mm-font-ui); font-variant-numeric: tabular-nums; color: var(--mm-muted); }

/* ---------- Parcours en arches ---------- */
.mm-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: var(--mm-1) var(--mm-2); font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-crumbs > a, .mm-crumbs > span[aria-current] { min-width: 0; }
.mm-crumbs a { display: inline-flex; align-items: center; min-height: 1.5rem; font-weight: 600; text-decoration: none; }

.mm-stop__title a { color: inherit; text-decoration: none; }
.mm-stop__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.mm-course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18.75rem; gap: var(--mm-7); align-items: start; }
/* Une colonne dès que le contenu de la page passe sous 56rem (iPad portrait avec la colonne de
   navigation : 42rem), au lieu de sous 768 px de fenêtre : les deux colonnes y faisaient 280 et 300 px,
   noms d'élèves cachés sous leur pastille, boutons sur trois lignes (relevé des écrans, 24 nov.). */
@container mm-page (max-width: 55.99rem) { .mm-course-layout { grid-template-columns: minmax(0, 1fr); gap: var(--mm-6); } }
/* Le chemin : une station en arche par palier, reliées par un trait en pointillés dorés. */
.mm-route { position: relative; display: flex; flex-direction: column; gap: 2.25rem; }
.mm-route::before { content: ""; position: absolute; left: calc(4rem - 1px); top: 2.5rem; bottom: 3.75rem; border-left: 2px dashed var(--mm-line-strong); }
.mm-stop { position: relative; display: flex; align-items: center; gap: 1.75rem; }
.mm-stop__arch { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 8rem; height: 9.75rem; border-radius: var(--mm-arch); font: 600 var(--mm-text-sm)/1.2 var(--mm-font-ui); }
.mm-stop__arch img { width: 3.6rem; height: 3.6rem; object-fit: contain; }
/* Stations harmonisées avec l'échelle des niveaux et les arches de l'accueil (C1-P2, v0.62.0) :
   arche claire à filet fin pour tous les états ; pastille d'or cochée pour un palier réussi au
   contrôle, pastille cerclée pour une validation de l'enseignant ; filet pointillé et cadenas
   pour un palier verrouillé ; trait d'or plein entre les paliers terminés. */
.mm-stop__arch { --stop-h: 9.75rem; background: linear-gradient(180deg, var(--mm-surface) 0%, var(--mm-ivory) 100%); color: var(--mm-green-title); box-shadow: inset 0 0 0 1px var(--mm-line-strong); }
.mm-stop__mark { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.mm-stop--done .mm-stop__arch { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 55%, transparent); }
.mm-stop--done .mm-stop__mark { background: var(--mm-gold-light); color: var(--mm-green-900); }
.mm-stop--teacher .mm-stop__mark { background: var(--mm-surface); color: var(--mm-gold-ink); box-shadow: inset 0 0 0 2px var(--mm-gold); }
.mm-stop--done:not(:last-child)::after { content: ""; position: absolute; z-index: 0; left: calc(4rem - 1px); top: calc(50% + var(--stop-h, 9.75rem) / 2); height: 2.25rem; border-left: 2px solid var(--mm-gold-light); }
.mm-stop--current .mm-stop__arch { background: var(--mm-surface); color: var(--mm-green-title); box-shadow: inset 0 0 0 3px var(--mm-gold), 0 0 0 8px color-mix(in srgb, var(--mm-gold) 16%, transparent), 0 20px 34px -18px color-mix(in srgb, var(--mm-green-900) 55%, transparent); }
.mm-stop--locked .mm-stop__arch { background: var(--mm-sand); color: var(--mm-muted); box-shadow: none; outline: 1px dashed var(--mm-line-strong); outline-offset: -1px; }
.mm-stop--locked .mm-stop__mark { background: var(--mm-surface); color: var(--mm-muted); box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-stop__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-stop--current .mm-stop__body { gap: .75rem; padding: 1.375rem 1.5rem; background: var(--mm-surface); border-radius: var(--mm-radius-lg); box-shadow: var(--mm-shadow-lift); }
.mm-stop__state { font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); }
.mm-stop--current .mm-stop__state { color: var(--mm-gold-ink); }
.mm-stop--locked .mm-stop__state { color: var(--mm-muted); }
.mm-stop__title { font: 600 var(--mm-text-xl)/1.25 var(--mm-font-ui); color: var(--mm-ink); }
.mm-stop--current .mm-stop__title { font-size: 1.625rem; }
.mm-stop--locked .mm-stop__title { color: var(--mm-muted); }
.mm-stop__links { display: flex; gap: 1.125rem; flex-wrap: wrap; font-size: var(--mm-text-sm); font-weight: 600; }
.mm-stop__links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.mm-stop__actions { display: flex; align-items: center; gap: var(--mm-4); flex-wrap: wrap; margin-top: var(--mm-1); }
.mm-stop__note { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-aside-card { display: flex; flex-direction: column; gap: var(--mm-4); padding: var(--mm-5); background: var(--mm-surface); border-radius: var(--mm-radius-lg); box-shadow: var(--mm-shadow); }
.mm-aside-card__title { font: 600 var(--mm-text-lg)/1.3 var(--mm-font-ui); }
.mm-aside-card__text { font: 400 var(--mm-text-md)/1.6 var(--mm-font-ui); color: var(--mm-ink); }

/* ---------- Studio : éditeur de séquences ---------- */
.mm-editor { display: flex; flex-direction: column; gap: var(--mm-4); }
/* Carte de séquence (C7, v0.37.0) : numéro dans une arche à la couleur du type, type en tête,
   réglages discrets à côté, outils groupés à droite ; le texte se relit comme l'élève le lira. */
.mm-edit { --tone: var(--mm-sand); --tone-ink: var(--mm-green-title); display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--mm-4); padding: var(--mm-4) var(--mm-5) var(--mm-5) var(--mm-4); border-radius: var(--mm-radius-lg); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line), var(--mm-elev-1); scroll-margin-top: var(--mm-5); transition: box-shadow var(--mm-fast) ease; }
.mm-edit:focus-within { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--mm-gold) 70%, transparent), var(--mm-elev-2); }
.mm-edit--heading { --tone: var(--mm-green-900); --tone-ink: var(--mm-gold-light); }
.mm-edit--concept, .mm-edit--takeaway { --tone: var(--mm-gold-light); --tone-ink: var(--mm-green-900); }
.mm-edit--arabic { --tone: var(--mm-green-700); --tone-ink: var(--mm-white); }
.mm-edit--check { --tone: var(--mm-gold-wash); --tone-ink: var(--mm-gold-deep); }
.mm-edit--example, .mm-edit--quote { --tone: var(--mm-gold-wash); --tone-ink: var(--mm-gold-deep); }
.mm-edit__n { display: grid; place-items: center; width: 2.5rem; height: 3rem; border-radius: 999px 999px 8px 8px; background: var(--tone); color: var(--tone-ink); font: 700 var(--mm-text-md)/1 var(--mm-font-display); font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 35%, transparent); }
.mm-edit__main { display: flex; flex-direction: column; gap: var(--mm-3); min-width: 0; }
.mm-edit__bar { display: flex; align-items: center; gap: var(--mm-2) var(--mm-4); flex-wrap: wrap; min-height: 3rem; }
.mm .mm-edit__type select { width: auto; min-height: 2.5rem; padding-left: var(--mm-3); border: 0; border-radius: var(--mm-radius-sm); background-color: var(--mm-cream); font: 600 var(--mm-text-md)/1.2 var(--mm-font-display); color: var(--mm-green-title); }
.mm-edit__settings { display: flex; align-items: center; gap: var(--mm-2) var(--mm-5); flex-wrap: wrap; }
.mm-edit__settings label { display: flex; align-items: center; gap: var(--mm-2); font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm .mm-edit__settings select { width: auto; min-height: 2.25rem; padding-top: 0; padding-bottom: 0; border-color: transparent; background-color: var(--mm-cream); font-size: var(--mm-text-sm); }
.mm-edit__tools { margin-left: auto; display: flex; gap: 2px; padding: 2px; border-radius: var(--mm-radius); background: var(--mm-cream); }
/* Le texte dans la police de lecture de l'élève : on relit ce qu'il lira. */
.mm .mm-edit__text { min-height: 3.5rem; padding: var(--mm-3) var(--mm-4); border: 1px solid var(--mm-line); border-radius: var(--mm-radius); background: var(--mm-ivory); font: 400 1.0625rem/1.65 var(--mm-font-read); color: var(--mm-ink); }
.mm .mm-edit--heading .mm-edit__text { font: 600 1.375rem/1.3 var(--mm-font-display); color: var(--mm-green-title); }
.mm .mm-edit--intro .mm-edit__text { font-style: italic; }
.mm .mm-edit--concept .mm-edit__text, .mm .mm-edit--takeaway .mm-edit__text { font-weight: 600; color: var(--mm-green-title); background: var(--mm-surface); border-color: color-mix(in srgb, var(--mm-gold) 55%, transparent); }
.mm .mm-edit--example .mm-edit__text { background: var(--mm-sand); border-left: 3px solid var(--mm-gold); }
.mm .mm-edit__text[lang="ar"] { font: 400 1.625rem/2.1 var(--mm-font-ar); text-align: right; }
.mm-edit__extra { display: grid; gap: var(--mm-3); padding-top: var(--mm-2); border-top: 1px dashed var(--mm-line-strong); }
.mm-edit__extra label { display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-editor__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--mm-4); flex-wrap: wrap; padding: var(--mm-3) 0; position: sticky; bottom: 0; background: var(--mm-surface); box-shadow: 0 -1px 0 var(--mm-line), 0 -10px 18px -14px color-mix(in srgb, var(--mm-green-900) 35%, transparent); z-index: 2; }
.mm-editor__add { display: flex; gap: var(--mm-2); align-items: center; }
.mm-editor__add select { width: 13rem; }
/* Téléphone (réception C7) : le type, les outils et l'ajout d'une séquence ne dépassent plus de leur carte. */
.mm-edit__type, .mm-edit__settings label { min-width: 0; max-width: 100%; }
.mm .mm-edit__type select, .mm .mm-edit__settings select { max-width: 100%; min-width: 0; }
.mm-edit__settings label { flex-wrap: wrap; }
.mm-edit__tools { flex-wrap: wrap; max-width: 100%; }
.mm-editor__add { flex-wrap: wrap; max-width: 100%; }
.mm-editor__add select { flex: 1 1 10rem; max-width: 13rem; min-width: 0; }
/* Téléphone : la barre d'enregistrement collée en bas tenait sur quatre rangées (un quart de l'écran) ;
   deux rangées — ajout d'une séquence, puis les deux enregistrements côte à côte. */
@media (max-width: 47.99rem) {
  .mm-editor__foot { gap: var(--mm-2); padding: var(--mm-2) 0; }
  .mm-editor__add { flex-wrap: nowrap; width: 100%; }
  .mm-editor__add select { flex: 1 1 auto; max-width: none; }
  .mm-editor__add .mm-btn { flex: none; }
  .mm-editor__foot .mm-actions { flex-wrap: nowrap; width: 100%; gap: var(--mm-2); }
  .mm-editor__foot .mm-actions .mm-btn { flex: 1 1 0; min-width: 0; padding-inline: var(--mm-3); white-space: normal; line-height: 1.2; }
  .mm-editor__foot .mm-actions .mm-btn--primary { flex: none; }
  .mm-editor__long { display: none; }
}
.mm-editor__short { display: none; }
@media (max-width: 47.99rem) { .mm-editor__short { display: inline; } }
@media (max-width: 22.49rem) { .mm-editor__add, .mm-editor__foot .mm-actions { flex-wrap: wrap; } .mm-editor__add select, .mm-editor__foot .mm-actions .mm-btn { flex-basis: 100%; } }
.mm-import__status { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-report { display: flex; flex-direction: column; gap: var(--mm-2); }
.mm-report__line { font-size: var(--mm-text-sm); color: var(--mm-muted); }

/* ---------- Studio : contrôle ---------- */
/* Questions du contrôle (studio, C7, v0.37.0) : même geste que le contrôle de l'élève. */
.mm-qlist { display: flex; flex-direction: column; gap: var(--mm-3); }
.mm-qlist > li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: var(--mm-4); padding: var(--mm-4) var(--mm-5) var(--mm-4) var(--mm-4); border-radius: var(--mm-radius-lg); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-qlist__n { display: grid; place-items: center; width: 2.25rem; height: 2.75rem; border-radius: 999px 999px 8px 8px; background: var(--mm-green-900); color: var(--mm-gold-light); font: 700 var(--mm-text-md)/1 var(--mm-font-display); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold-light) 40%, transparent); }
.mm-qlist__body { display: flex; flex-direction: column; gap: var(--mm-2); min-width: 0; }
.mm-qlist__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mm-1) var(--mm-3); min-height: 2.5rem; }
.mm-qlist__head .mm-meta { white-space: nowrap; }
.mm-qlist__head form { margin-left: auto; }
.mm-qlist__prompt { font: 600 var(--mm-text-md)/1.45 var(--mm-font-ui); color: var(--mm-ink); }
.mm-qlist__answer { align-self: flex-start; padding: var(--mm-1) var(--mm-3); border-radius: var(--mm-radius-sm); background: var(--mm-green-100); color: var(--mm-green-title); font-weight: 500; }
.mm-qlist__explain { padding: var(--mm-3) var(--mm-4); background: var(--mm-gold-wash); border-radius: var(--mm-radius-sm); font-size: var(--mm-text-sm); color: var(--mm-gold-darkest); }
.mm-qform__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--mm-4); }
.mm-prep__titleline { display: flex; align-items: center; justify-content: space-between; gap: var(--mm-2); }
.mm-prep__move { display: inline-flex; flex: none; }
.mm-chapter-rename { padding-bottom: var(--mm-3); border-bottom: 1px solid var(--mm-line); }
.mm-rename { margin: calc(-1 * var(--mm-4)) 0 var(--mm-5); }
.mm-rename > summary { display: inline-flex; align-items: center; min-height: var(--mm-tap); font-weight: 600; color: var(--mm-green-title); cursor: pointer; list-style: none; }
.mm-rename > summary::-webkit-details-marker { display: none; }
.mm-rename > summary::after { content: ""; width: .45em; height: .45em; margin-left: .4em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.1em) rotate(45deg); transition: transform var(--mm-fast) var(--mm-ease); }
.mm-rename[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
.mm-rename > summary:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; border-radius: var(--mm-radius-sm); }
.mm-rename__form { max-width: 36rem; margin-top: var(--mm-2); }
@media (prefers-reduced-motion: reduce) { .mm-rename > summary::after { transition: none; } }
.mm-zone__head--action { flex-wrap: wrap; row-gap: var(--mm-3); }
.mm-zone__head--action > .mm-btn { margin-left: auto; }
.mm-qlist__tools { display: inline-flex; align-items: center; gap: var(--mm-1); margin-left: auto; }
.mm-qlist__head .mm-qlist__tools form { margin-left: 0; }
.mm-qedit > summary, .mm-qbatch__help > summary { display: inline-flex; align-items: center; gap: var(--mm-1); min-height: var(--mm-tap); font-weight: 600; color: var(--mm-green-title); cursor: pointer; list-style: none; }
.mm-qedit > summary::-webkit-details-marker, .mm-qbatch__help > summary::-webkit-details-marker { display: none; }
.mm-qedit > summary::after, .mm-qbatch__help > summary::after { content: ""; width: .45em; height: .45em; margin-left: .3em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.1em) rotate(45deg); transition: transform var(--mm-fast) var(--mm-ease); }
.mm-qedit[open] > summary::after, .mm-qbatch__help[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
.mm-qedit > summary:focus-visible, .mm-qbatch__help > summary:focus-visible { outline: 2px solid var(--mm-gold); outline-offset: 2px; border-radius: var(--mm-radius-sm); }
.mm-qedit__form { margin-top: var(--mm-2); padding-top: var(--mm-4); border-top: 1px solid var(--mm-line); }
.mm-qbatch__model { margin: var(--mm-2) 0; padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius-sm); background: var(--mm-cream); color: var(--mm-ink); font-size: var(--mm-text-sm); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 47.99rem) { .mm-qedit__form .mm-qform__row { grid-template-columns: minmax(0, 1fr); } .mm-qlist__tools { gap: 0; } }
/* 4 déc. : au téléphone, la pastille du numéro gardait sa colonne et décalait tout le texte de 70 px. Le numéro reste
   à côté du type et des outils ; énoncé, réponse et correction prennent toute la largeur de la carte. */
@media (max-width: 47.99rem) {
  .mm-qlist > li { gap: var(--mm-2) var(--mm-3); padding: var(--mm-3) var(--mm-3) var(--mm-4); }
  .mm-qlist__body { display: contents; }
  .mm-qlist__body > :not(.mm-qlist__head) { grid-column: 1 / -1; }
  .mm-qlist__answer { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .mm-qedit > summary::after, .mm-qbatch__help > summary::after { transition: none; } }
.mm-qlist__answer span, .mm-correction__given span, .mm-correction__right span { font-size: var(--mm-text-xs); font-weight: 600; letter-spacing: 0; color: var(--mm-muted); margin-right: var(--mm-2); }
.mm-choice { display: flex; align-items: flex-start; gap: var(--mm-3); min-height: var(--mm-tap); padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius-sm); background: var(--mm-surface); box-shadow: inset 0 0 0 1px var(--mm-line-strong); cursor: pointer; transition: box-shadow var(--mm-fast) ease, background-color var(--mm-fast) ease; }
.mm-choice:hover { box-shadow: inset 0 0 0 1px var(--mm-green-700); }
.mm-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--mm-green-700); background: var(--mm-green-100); }
.mm-choice-row { display: flex; gap: var(--mm-3); flex-wrap: wrap; }
.mm-choice-row .mm-choice { flex: 1 1 8rem; }

/* ---------- Suivi ---------- */
.mm-filters { display: flex; gap: var(--mm-3); flex-wrap: wrap; }
.mm-filters__count { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-pupil__last { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-filters input[type="search"] { flex: 1 1 14rem; width: auto; }
.mm-filters select { flex: 0 1 14rem; width: auto; }
.mm a.mm-student { color: var(--mm-ink); }
.mm-record { display: flex; flex-direction: column; gap: var(--mm-3); padding: var(--mm-4) 0; border-top: 1px solid var(--mm-line); }
.mm-record__head { display: flex; align-items: center; gap: var(--mm-3); }
.mm-record__title { display: flex; flex-direction: column; flex: 1; min-width: 0; font-weight: 600; }
/* Fiche élève au téléphone : l'état passe sous le titre au lieu de l'écraser sur trois lignes (réception du 25 nov.). */
/* 4 déc. : au téléphone, l'état (« Verrouillé », « Terminé ») passait seul sur une ligne ; il se range à droite du titre
   de la leçon, la note et la décision dessous sur toute la largeur. Une leçon verrouillée : ~70 px au lieu de 120. */
@media (max-width: 47.99rem) {
  .mm-record__head { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: start; gap: var(--mm-1) var(--mm-3); }
  .mm-record__head > .mm-lrow__n { grid-row: 1 / span 2; }
  .mm-record__title { display: contents; }
  .mm-record__name { grid-column: 2; align-self: center; }
  .mm-record__title > .mm-meta { grid-column: 2 / -1; font-weight: 400; }
  .mm-record__head > .mm-chip { grid-column: 3; grid-row: 1; align-self: center; }
}
.mm-teacher-actions { margin-left: calc(2.25rem + var(--mm-3)); padding: var(--mm-2) 0 0; border-top: 1px dashed color-mix(in srgb, var(--mm-gold) 45%, transparent); }
.mm-teacher-actions summary { cursor: pointer; font-weight: 600; font-size: var(--mm-text-sm); color: var(--mm-gold-ink); min-height: var(--mm-tap); display: flex; align-items: center; }
.mm-teacher-actions[open] { display: flex; flex-direction: column; gap: var(--mm-4); }
.mm-reviewq { display: flex; flex-direction: column; gap: var(--mm-3); width: 100%; padding-bottom: var(--mm-4); border-bottom: 1px solid var(--mm-line); }
.mm-reviewq__answer { padding: var(--mm-4); background: var(--mm-cream); border-left: 3px solid var(--mm-gold); border-radius: 0 var(--mm-radius-sm) var(--mm-radius-sm) 0; }

/* ---------- Connexion, activation ---------- */
.mm--auth { background: var(--mm-cream); }
.mm-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr); }
.mm-auth__brand { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--mm-4); padding: var(--mm-7) var(--mm-6); background: var(--mm-green-900); color: var(--mm-on-green-muted); text-align: center; }
.mm-auth__brand { background: radial-gradient(70% 55% at 50% 38%, color-mix(in srgb, var(--mm-gold-light) 16%, transparent), transparent 70%), var(--mm-green-900); }
/* Le logo dans l'arche en filigrane d'or, la salutation en écriture du mushaf, la frise, la devise ;
   lanterne et rameau d'or dans les angles, loin du texte. */
.mm-auth__arch { position: relative; display: grid; place-items: center; width: clamp(12rem, 18vw, 16.25rem); aspect-ratio: 4 / 5; }
.mm-auth__frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-auth__logo { position: relative; display: grid; place-items: center; width: 66%; margin-top: 14%; }
.mm-auth__brand .mm-brand__logo { width: 100%; height: auto; }
.mm-auth__frieze { width: 15rem; max-width: 80%; height: auto; }
.mm-auth__motto { max-width: 22rem; text-wrap: balance; font: italic 400 var(--mm-text-md)/1.45 var(--mm-font-display); color: var(--mm-on-green); }
.mm-auth__lantern { position: absolute; top: 0; left: clamp(var(--mm-5), 4vw, var(--mm-7)); width: clamp(2.75rem, 3.4vw, 4rem); height: auto; z-index: -1; }
.mm-auth__olive { position: absolute; right: var(--mm-4); bottom: var(--mm-4); width: clamp(7rem, 9vw, 11rem); height: auto; z-index: -1; opacity: .85; }
.mm-auth__wide { display: none; }
/* Lot 4 : scène d'arche entière (3:4), sans recadrage ; la colonne prend la largeur de la photo.
   Le contenu est posé sur le mur calme de l'arche, repéré en pourcentage de l'image. */
.mm-auth--scene { grid-template-columns: auto minmax(0, 1fr); }
.mm-auth__brand--scene { display: grid; place-items: center; padding: 0; background: var(--mm-sand); }
.mm-auth__scene { position: relative; margin: 0; width: min(75vh, 75dvh, 46vw); }
.mm-auth__photo { display: block; width: 100%; height: auto; }
.mm-auth__wall { position: absolute; inset: 27% 24% 17%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--mm-3); text-align: center; }
.mm-auth__mark { width: 52%; height: auto; }
.mm-auth__wall .mm-auth__frieze { width: 80%; }
.mm-auth__wall .mm-auth__motto { color: var(--mm-green-title); font-size: var(--mm-text-sm); }
/* Connexion, retour utilisateur du 24 nov. (« l'image ne doit pas être juste à gauche comme ça ») :
   la scène et le formulaire forment un seul bloc arrondi, centré dans la page, au lieu d'une image
   collée au bord gauche et d'un formulaire flottant dans le vide. L'image reste entière (3:4), sa
   hauteur suit celle de l'écran. Téléphone et tablette en portrait : image au-dessus, comme avant. */
@media (min-width: 48rem) {
  .mm-auth.mm-auth--scene { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: clamp(var(--mm-5), 6vh, 4rem) var(--mm-6); }
  .mm-auth__unit { display: grid; grid-template-columns: auto minmax(0, 28rem); align-items: stretch; max-width: 100%; border-radius: var(--mm-radius-xl); overflow: hidden; background: var(--mm-surface); box-shadow: var(--mm-elev-3); }
  .mm-auth__unit .mm-auth__scene { width: min(calc((100dvh - 2 * clamp(var(--mm-5), 6vh, 4rem)) * .75), 34rem, 44vw); }
  .mm-auth__unit .mm-auth__side { place-items: center; padding: var(--mm-7) clamp(var(--mm-6), 4vw, var(--mm-7)); }
  .mm-auth__unit .mm-auth__card { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  /* Pages légales (3 déc.) : texte long ; colonne de lecture plus large, l'arche reste à l'écran pendant la lecture. */
  .mm-auth__unit:has(.mm-legal) { grid-template-columns: auto minmax(0, 40rem); align-items: start; overflow: visible; }
  .mm-auth__unit:has(.mm-legal) > :first-child { position: sticky; top: clamp(var(--mm-5), 6vh, 4rem); overflow: hidden; border-radius: var(--mm-radius-xl) 0 0 var(--mm-radius-xl); }
}
/* Tablette en portrait : la photo 3:4 laissait deux grands vides ; la version 3:2 passe au-dessus du formulaire. */
@media (min-width: 48rem) and (max-width: 63.99rem) and (orientation: portrait) {
  .mm-auth--scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mm-auth.mm-auth--scene { display: block; padding: 0; }
  .mm-auth__unit { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 0; box-shadow: none; background: none; }
  .mm-auth__unit .mm-auth__scene { width: 100%; }
  .mm-auth__unit .mm-auth__side { padding: var(--mm-6) var(--mm-5); }
  .mm-auth__unit .mm-auth__card { padding: var(--mm-6); border: 1px solid var(--mm-line); border-radius: 20px; background: var(--mm-surface); box-shadow: var(--mm-shadow); }
  .mm-auth__scene { width: 100%; }
  .mm-auth__wall { inset: 28% 24% 10%; gap: var(--mm-2); }
  .mm-auth__mark { width: auto; height: 55%; max-width: 60%; }
  .mm-auth--scene .mm-auth__side { place-items: start center; }
}
.mm-auth__kicker { font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-gold-ink); margin-bottom: calc(-1 * var(--mm-2)); }
.mm-auth__card h1 { font: 600 clamp(2rem, 2.6vw, 2.5rem)/1.1 var(--mm-font-display); letter-spacing: -.015em; color: var(--mm-green-title); }
.mm-auth__side { display: grid; place-items: center; padding: var(--mm-6) var(--mm-5); }
.mm-auth__card { width: 100%; max-width: 26rem; display: flex; flex-direction: column; gap: var(--mm-4); padding: var(--mm-6); background: var(--mm-surface); border: 1px solid var(--mm-line); border-radius: 20px; box-shadow: var(--mm-shadow); }
.mm-auth__card .mm-brand { align-self: center; padding-bottom: var(--mm-2); }
.mm-auth__card .mm-lead { font-size: var(--mm-text-sm); }
.mm-auth__card .mm-form { align-items: stretch; }
.mm-auth__card .mm-btn { width: 100%; }
.mm-auth__alt, .mm-auth__note { font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-auth__alt a { display: inline-flex; align-items: center; min-height: 1.5rem; }
/* Pages légales (3 déc.) : liens sous la carte des écrans d'accès, dans le menu du compte, et la page elle-même. */
.mm-auth__legal { margin: var(--mm-3) 0 0; font-size: var(--mm-text-xs); color: var(--mm-muted); text-align: center; }
.mm-auth__legal a { display: inline-flex; align-items: center; min-height: 1.5rem; color: var(--mm-muted); }
.mm-account__legal { display: flex; flex-direction: column; padding-bottom: var(--mm-1); border-bottom: 1px solid var(--mm-line); }
.mm-account__legal a { min-height: 2.25rem; font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-legal { gap: var(--mm-5); max-width: 52rem; }
.mm-legal__toc ol { display: flex; flex-wrap: wrap; gap: var(--mm-1) var(--mm-4); margin: 0; padding: 0; list-style: none; font-size: var(--mm-text-sm); }
.mm-legal__toc a { display: inline-flex; align-items: center; min-height: 1.75rem; color: var(--mm-green-text); }
.mm-legal__sec { display: flex; flex-direction: column; gap: var(--mm-2); padding-top: var(--mm-4); border-top: 1px solid var(--mm-line); scroll-margin-top: 6rem; }
.mm-legal__sec h2 { margin: 0; font: 600 var(--mm-text-lg)/1.3 var(--mm-font-display); color: var(--mm-green-title); }
.mm-legal__sec p, .mm-legal__sec li { max-width: 46rem; line-height: 1.65; color: var(--mm-ink); }
.mm-legal__sec ul { margin: 0; padding-left: 1.25rem; }
.mm-legal__manque { padding: 0 .25rem; border-radius: 4px; background: var(--mm-gold-wash); color: var(--mm-gold-ink); font-weight: 600; }
.mm-legal__autre { margin: 0; padding-top: var(--mm-4); border-top: 1px solid var(--mm-line); font-size: var(--mm-text-sm); }
.mm-legal--auth { display: flex; flex-direction: column; gap: var(--mm-4); margin-top: var(--mm-4); }
.mm-legal--auth .mm-legal__toc { display: none; }
/* Prêt pour l'ouverture (3 déc.) : en tête de l'écran des comptes. */
.mm-ready { margin-bottom: var(--mm-5); }
.mm-ready__head { display: grid; grid-template-columns: auto auto minmax(6rem, 1fr) auto; align-items: center; gap: var(--mm-2) var(--mm-4); min-height: var(--mm-tap); cursor: pointer; list-style: none; }
.mm-ready__head::-webkit-details-marker { display: none; }
.mm-ready__title { font: 600 1.3125rem/1.25 var(--mm-font-display); color: var(--mm-green-title); }
.mm-ready__count { font: 700 var(--mm-text-md)/1 var(--mm-font-ui); font-variant-numeric: tabular-nums; color: var(--mm-ink); }
.mm-ready__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--mm-2) var(--mm-5); margin: var(--mm-3) 0 0; padding: 0; list-style: none; }
.mm-ready__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--mm-3); padding: var(--mm-3) 0; border-top: 1px solid var(--mm-line); }
.mm-ready__ico { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--mm-cream); color: var(--mm-muted); }
.mm-ready__row.is-ok .mm-ready__ico { background: var(--mm-green-100); color: var(--mm-green-text); }
.mm-ready__row.is-a-faire .mm-ready__ico { background: var(--mm-gold-wash); color: var(--mm-gold-ink); }
.mm-ready__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm-ready__text strong { font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-ready__text span { font-size: var(--mm-text-xs); line-height: 1.5; color: var(--mm-muted); }
.mm-ready__row.is-ok .mm-ready__text strong { color: var(--mm-muted); font-weight: 600; }
.mm .mm-ready__go { display: inline-flex; align-items: center; min-height: var(--mm-tap); font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-green-text); }
@media (max-width: 47.99rem) { .mm-ready__head { grid-template-columns: minmax(0, 1fr) auto; } .mm-ready__head .mm-meter { grid-column: 1 / -1; } .mm-ready__head .mm-chip { grid-column: 1 / -1; justify-self: start; } }
.mm-idcard { display: flex; flex-direction: column; gap: var(--mm-1); padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius-sm); background: var(--mm-green-100); color: var(--mm-green-text); font-size: var(--mm-text-sm); }
.mm-idcard strong { font: 700 var(--mm-text-lg)/1.3 var(--mm-font-ui); color: var(--mm-green-title); overflow-wrap: anywhere; }

/* ---------- Tablette : colonne de navigation réduite en rail d'icônes ---------- */
@media (min-width: 48rem) and (max-width: 74.99rem) {
  .mm-shell { --shell-side: 5.75rem; grid-template-columns: 5.75rem minmax(0, 1fr); }
  .mm-side { --side-pad: var(--mm-2); gap: var(--mm-5); padding: var(--mm-5) var(--side-pad); }
  .mm-side__brand { padding: 0; gap: var(--mm-4); }
  .mm-brand__logo { width: 3.75rem; height: auto; }
  .mm-nav a { flex-direction: column; justify-content: center; gap: 4px; min-height: 3.75rem; padding: var(--mm-2) 2px; font-size: .6875rem; line-height: 1.2; text-align: center; border-radius: 12px; }
  .mm-side__orn { display: none; }
  .mm-topbar { padding-inline: var(--mm-5); }
  .mm-flash { right: var(--mm-4); bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .mm-container { padding-inline: var(--mm-5); }
  .mm-hello__bg { right: calc(-1 * var(--mm-5)); }
}
/* Tablette en portrait : reprise et progression l'une sous l'autre. */
@media (max-width: 63.99rem) {
  .mm-progress-grid { grid-template-columns: 1fr; }
  .mm-home__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Tablette et téléphone ---------- */
@media (max-width: 47.99rem) {
  /* Téléphone : un bandeau sans photo garde son médaillon, pas le visuel détouré (il laissait un grand vide). */
  .mm-band.has-art .mm-band__art { display: none; }
  .mm-band.has-art { padding-top: var(--mm-4); }
  .mm-tries__arrow { display: none; }
  .mm-filters select { flex: 1 1 auto; }
  .mm-pupil { grid-template-columns: auto minmax(0, 1fr); }
  .mm-pupil__tracks { grid-column: 1 / -1; }
  .mm-pupil > .mm-icon { display: none; }
  .mm-record .mm-tries__steps { margin-left: 0; }
  .mm-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-stepper__item + .mm-stepper__item::before { display: none; }
  .mm-lrow .mm-chip { display: none; }
  .mm-progress-grid { grid-template-columns: 1fr; }
  .mm-ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mm-tries__item, .mm-prog { gap: var(--mm-3); }
  /* 3 déc. (revue écran par écran) : au téléphone, les cadres rendent leur marge au contenu ; parcours d'une matière
     et « Leçon par leçon » gardent une colonne de texte lisible, tentatives côte à côte. */
  .mm-page .mm-zone, .mm-page .mm-aside-card, .mm-page .mm-panel { padding: var(--mm-5) var(--mm-4); }
  .mm-zone .mm-course-row, .mm-tries__item { gap: var(--mm-3); }
  .mm-zone .mm-course-row { padding-inline: var(--mm-2); }
  .mm-zone .mm-course-row .mm-mini-arch, .mm-tries__item > .mm-mini-arch { width: 3.25rem; }
  .mm-tries__steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); }
  .mm-try { min-width: 0; padding-inline: var(--mm-3); }
  .mm-figures strong { font-size: 1.75rem; }
  .mm-orn--corner { display: none; }
  /* Rangée du haut à sa hauteur : sur une page courte (introuvable), la grille étirait la bande verte
     sur 200 px pour remplir l'écran (relevé de la réception du 25 nov.). */
  .mm-shell { --shell-side: 0px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mm-shell:has(.mm-qr[data-immersive="1"]) { grid-template-rows: 1fr; }
  .mm-side { box-shadow: none; }
  .mm-side::after, .mm-nav > a[aria-current="page"]::after { display: none; }
  /* La colonne porte un nom de transition de page (bas du fichier) : elle forme sa propre couche, où
     le z-index 20 de la barre du bas ne valait que dans la colonne ; le contenu, peint ensuite, passait
     par-dessus la barre (relevé de l'accueil, C0-P2-RECEPTION-074). La colonne est donc placée
     elle-même au-dessus du contenu. */
  .mm-side { position: relative; z-index: 20; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: var(--mm-3); padding: var(--mm-2) var(--mm-4); }
  .mm-side__brand { padding: 0; }
  .mm-brand__logo { display: none; }
  /* Identité v2 (C0-LOGO-P2-02) : emblème compact or à 44 px, au lieu de la signature horizontale
     réduite dont le latin devenait illisible ; sans nom écrit à côté (décision utilisateur du 25 nov.). */
  .mm-brand__wide { display: flex; flex: none; align-items: center; gap: var(--mm-2); }
  .mm-nav {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    flex-direction: row; justify-content: space-around; gap: 0;
    padding: var(--mm-1) var(--mm-2) calc(var(--mm-1) + env(safe-area-inset-bottom));
    background: var(--mm-green-900);
  }
  .mm-nav a { flex: 1 0 auto; min-width: 3.5rem; flex-direction: column; justify-content: center; gap: 2px; min-height: 3.25rem; padding: var(--mm-1) var(--mm-2); font-size: .68rem; text-align: center; white-space: nowrap; }
  /* Équipe : sept onglets. Les libellés restent sur une ligne (la barre gardait 88 px et coupait une
     icône) ; la barre défile de côté si elle ne tient pas, l'onglet de la page est amené à l'écran. */
  .mm-nav { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .mm-nav::-webkit-scrollbar { display: none; }
  /* La barre fixe du bas ne doit jamais couvrir la fin d'une page (vu sur l'accueil, C0-P1-01). */
  .mm-main { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  /* Message de confirmation au-dessus de la barre du bas (60 px), jamais sur ses onglets. */
  .mm-flash { right: var(--mm-4); bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  .mm-nav a[aria-current="page"] { background: none; color: var(--mm-gold); }
  /* Un seul en-tête vert : logo à gauche, cloche et compte posés à droite dans la même bande. */
  .mm-shell { position: relative; }
  .mm-side { min-height: 3.75rem; }
  .mm-side__brand::after { display: none; }
  .mm-topbar { position: absolute; top: 0; right: 0; z-index: 21; width: auto; min-height: 3.75rem; padding: 0 var(--mm-4); gap: var(--mm-2); background: none; border: 0; }
  .mm-topbar__date { display: none; }
  .mm-topbar__end { gap: var(--mm-2); }
  .mm-bell { width: 2.5rem; height: 2.5rem; background: color-mix(in srgb, var(--mm-on-green) 10%, transparent); }
  .mm .mm-bell { color: var(--mm-on-green); }
  .mm-bell:hover { background: color-mix(in srgb, var(--mm-on-green) 16%, transparent); }
  .mm-account { padding-left: 0; border-left: 0; }
  .mm-account > summary { background: color-mix(in srgb, var(--mm-on-green) 10%, transparent); color: var(--mm-on-green); padding: 0 var(--mm-2) 0 var(--mm-1); }
  .mm-account > summary:hover { background: color-mix(in srgb, var(--mm-on-green) 16%, transparent); }
  .mm-account__avatar { width: 2rem; height: 2rem; background: var(--mm-gold-light); color: var(--mm-green-900); }
  .mm-account__name { display: none; }
  .mm-side__orn { display: none; }
  .mm-container { padding: var(--mm-4) var(--mm-4) 6.5rem; gap: var(--mm-4); }
  .mm-section__title { font-size: var(--mm-text-xl); }
  .mm-hello__bg { top: calc(-1 * var(--mm-4)); right: calc(-1 * var(--mm-4)); width: calc(100% + 2 * var(--mm-4)); }
  .mm-hello__bg img { width: 100%; height: auto; }
  .mm-hello.has-bg { align-items: flex-end; min-height: 46vw; }
  .mm-zone { padding: var(--mm-4); gap: var(--mm-4); }
  .mm-duo { grid-template-columns: minmax(0, 1fr); gap: var(--mm-4); }
  .mm-home { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; min-height: 0; }
  .mm-course-row { flex-wrap: wrap; }
  .mm-course-row__bar, .mm-course-row__lock { width: 100%; }
  /* Bandeau au téléphone : le visuel (version 2:1) en tête, entier, puis le texte dessous. */
  .mm-container { --band-pull: var(--mm-4); }
  .mm-band { flex-direction: column; align-items: stretch; min-height: 0; padding-top: 0; }
  .mm-band__art { position: static; display: block; margin: 0 calc(-1 * var(--bleed)); }
  .mm-band__art img { width: 100%; max-height: none; }
  .mm-band__text { max-width: none; padding-top: var(--mm-2); }
  .mm-band.has-photo .mm-band__text { max-width: none; padding-top: var(--mm-4); padding-bottom: var(--mm-4); }
  .mm-band.has-photo .mm-band__medal { display: none; }
  .mm-band__logo { width: 4rem; }
  .mm-band__title { font-size: 1.875rem; }
  .mm-level { grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--mm-3); }
  .mm-level__medal { width: 2.5rem; height: 2.5rem; }
  .mm-level:not(:last-child)::before { left: 1.25rem; top: 2.75rem; }
  .mm-course-row > .mm-icon { display: none; }
  .mm-subjects { grid-auto-columns: 8rem; margin-inline: calc(-1 * var(--mm-4)); padding-inline: var(--mm-4); }

  .mm-activity__row { flex-wrap: wrap; gap: var(--mm-2) var(--mm-3); }
  .mm-activity__date { min-width: 0; width: 100%; padding-left: 3.5rem; text-align: left; }
  .mm-course-layout { grid-template-columns: minmax(0, 1fr); gap: var(--mm-6); }
  .mm-route::before { left: calc(2.75rem - 1px); }
  .mm-stop { gap: var(--mm-4); align-items: flex-start; }
  .mm-stop__arch { width: 5.5rem; height: 6.75rem; font-size: var(--mm-text-xs); }
  .mm-stop__mark { width: 2.125rem; height: 2.125rem; }
  .mm-stop--done:not(:last-child)::after { left: calc(2.75rem - 1px); top: 6.75rem; height: calc(100% - 6.75rem + 2.25rem); }
  .mm-stop__arch img { width: 2.5rem; height: 2.5rem; }
  .mm-stop--current .mm-stop__body { padding: var(--mm-4); }
  .mm-stop__title, .mm-stop--current .mm-stop__title { font-size: var(--mm-text-lg); }
  :where(.mm) h1 { font-size: 1.5rem; }
  .mm-hello__title { font-size: 1.75rem; }
  .mm-hello__title--name { font-size: 2.125rem; }
  /* Téléphone : la bannière entière en tête, la salutation sur sa zone calme, l'heure en dessous ;
     puis les six matières sur deux rangées, la reprise et la progression. */
  /* Place et tailles de la salutation : bloc « Téléphone (3 déc.) » plus haut, près de l'insigne. */
  .mm-board__rule, .mm-board__lead { display: none; }
  .mm-board__time { position: static; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: var(--mm-1) var(--mm-3); margin: 0 var(--bleed) var(--mm-4); padding: 0; background: none; box-shadow: none; text-align: left; }
  .mm-clock { font-size: 1.5rem; }
  .mm-subjects { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--mm-3); overflow: visible; margin: 0; padding: 0; }
  .mm-subject { width: 100%; height: auto; }
  .mm-resume { align-items: flex-start; padding: var(--mm-5) var(--mm-4); border-radius: var(--mm-radius-lg); }
  .mm-resume__art { position: absolute; top: var(--mm-4); right: var(--mm-4); height: 5.75rem; padding-bottom: var(--mm-2); }
  .mm-resume__text { padding-right: 5rem; }
  .mm-resume__foot { margin-right: -5rem; }
  .mm-resume__foot .mm-btn { width: 100%; }
  .mm-home__head { flex-wrap: wrap; }
  .mm-home__count { display: none; }
  .mm-panel { padding: var(--mm-4); }
  .mm-edit { grid-template-columns: minmax(0, 1fr); padding: var(--mm-4); }
  .mm-edit__n { width: 2rem; height: 2.375rem; font-size: var(--mm-text-sm); position: absolute; }
  .mm-edit { position: relative; }
  .mm-edit__bar { padding-left: 2.75rem; }
  .mm-edit__tools { margin-left: auto; }
  .mm-auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .mm-auth__brand { flex-direction: row; justify-content: center; padding: var(--mm-4); }
  .mm-auth__arch, .mm-auth__frieze, .mm-auth__motto, .mm-auth__lantern, .mm-auth__olive { display: none; }
  .mm-auth__brand { flex-direction: column; gap: var(--mm-2); }
  .mm-auth__wide { display: flex; align-items: center; gap: var(--mm-2); }
  .mm-auth__side { place-items: start center; padding: var(--mm-5) var(--mm-4); }
  .mm-auth__card { padding: var(--mm-5); }
  /* Téléphone : la version 3:2 entière ; le mur de l'arche reçoit le logo et la salutation. */
  .mm-auth--scene { grid-template-columns: minmax(0, 1fr); }
  .mm-auth__unit { display: grid; grid-template-columns: minmax(0, 1fr); }
  .mm-auth__brand--scene { padding: 0; }
  .mm-auth__scene { width: 100%; }
  .mm-auth__wall { inset: 30% 22% 12%; gap: var(--mm-1); }
  .mm-auth__mark { width: auto; height: 62%; max-width: 60%; }
  /* Plus de salutation ici : la devise tient sous le logo, la frise reste masquée. */
  .mm-auth__wall .mm-auth__frieze { display: none; }
  .mm-auth__wall .mm-auth__motto { display: block; font-size: var(--mm-text-xs); line-height: 1.3; }
}
/* C12 (réception à 200 %) : dans une fenêtre étroite et basse (640 × 430, écran portable zoomé), la
   scène 3:2 pleine largeur occupait tout le premier écran et le titre « Connexion » était hors de vue.
   La scène, toujours entière, est limitée à 45 % de la hauteur et centrée ; la devise s'efface. */
@media (max-width: 47.99rem) and (max-height: 32rem) {
  .mm-auth__scene, .mm-auth__unit .mm-auth__scene { width: min(100%, 67.5dvh); }
  .mm-auth__wall .mm-auth__motto { display: none; }
}

/* ---------- Transitions entre les pages ---------- */
/* La navigation et la barre supérieure restent en place ; seul le contenu se renouvelle. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .mm-side { view-transition-name: mm-side; }
  .mm-topbar { view-transition-name: mm-topbar; }
  ::view-transition-old(root) { animation: 140ms ease both mm-vt-out; }
  ::view-transition-new(root) { animation: 360ms var(--mm-ease) both mm-vt-in; }
}
@keyframes mm-vt-out { to { opacity: 0; } }
@keyframes mm-vt-in { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  /* « :not(#mm-sans-id) » donne à la règle le poids d'un identifiant (sans marque d'importance) : elle passe
     devant les animations déclarées par classe (.mm-home > *, .js .mm-player .mm-seq…), qui
     échappaient au mouvement réduit (P2-ACCESS). */
  .mm:not(#mm-sans-id) *, .mm:not(#mm-sans-id) *::before, .mm:not(#mm-sans-id) *::after { animation-duration: 1ms; animation-delay: 0s; transition-duration: 1ms; scroll-behavior: auto; }
  .mm .mm-flash { animation: none; }
}

/* ---------- Accueil sur tablette : la vue d'ordinateur, agrandie pour remplir l'écran ----------
   Décision utilisateur (21 novembre 2026) : « sur tablette, exactement cette vue, bien grossie et
   équilibrée ». Mêmes blocs que sur ordinateur (bannière, six matières, reprise, progression),
   sans zone ajoutée ; leurs tailles suivent la hauteur de l'écran et l'accueil occupe toute la
   hauteur sous la barre. Ciblé sur les écrans au format de tablette (rapport largeur/hauteur
   d'au plus 3:2, paysage ou portrait, au moins 768 px de large) : les écrans d'ordinateur
   (16:10, 16:9) ne changent pas. */
/* Ordinateur (3 déc.) : sans la citation du jour, l'accueil laissait une bande vide en bas de l'écran. Il occupe
   toute la hauteur sous la barre, comme sur tablette ; les arches suivent un peu la hauteur de l'écran et la place
   restante se répartit entre les blocs. */
@media (min-width: 64rem) and (min-aspect-ratio: 3/2) {
  .mm-home { min-height: calc(100dvh - 4.5rem - var(--mm-3) - var(--mm-4)); justify-content: space-between; }
  .mm-home__cours { --arch-h: clamp(11.5rem, max(calc((100cqw - 5 * var(--mm-4)) / 6 * 1.25), 23vh), 16rem); }
  .mm-home__cours .mm-subjects { grid-auto-columns: min(calc(var(--arch-h) * .8), calc((100cqw - 5 * var(--mm-4)) / 6)); overflow: visible; }
  .mm-home__cours .mm-subject { width: 100%; aspect-ratio: auto; }
}
@media (min-width: 48rem) and (max-aspect-ratio: 3/2) {
  .mm-home { min-height: calc(100dvh - 4.5rem - var(--mm-3) - var(--mm-4)); justify-content: space-between; gap: clamp(var(--mm-3), 1.4vh, var(--mm-5)); }
  .mm-home .mm-home__row { margin-top: 0; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(var(--mm-4), 2vh, var(--mm-6)); }
  .mm-home__cours { gap: clamp(var(--mm-3), 1.6vh, var(--mm-5)); }
  .mm-home__head h2 { font-size: clamp(var(--mm-text-lg), 2.3vh, 1.625rem); }
  .mm-home__head .mm-zone__more, .mm-home__count { font-size: clamp(var(--mm-text-sm), 1.6vh, var(--mm-text-md)); }
  /* Arches : plus hautes avec l'écran ; leur largeur reste celle d'une sixième de la colonne. */
  .mm-home__cours { --arch-h: clamp(11.5rem, 29vh, 22rem); }
  .mm-home__cours .mm-subjects { grid-auto-columns: min(calc(var(--arch-h) * .8), calc((100cqw - 5 * var(--mm-4)) / 6)); overflow: visible; }
  .mm-home__cours .mm-subject { width: 100%; aspect-ratio: auto; }
  .mm-home__cours .mm-subject__name { font-size: clamp(var(--mm-text-md), 1.9vh, 1.25rem); }
  .mm-home__cours .mm-subject__state { font-size: clamp(var(--mm-text-xs), 1.4vh, var(--mm-text-sm)); }
  /* Reprise : plus d'air, titre et arche plus grands, texte sur une colonne lisible. */
  .mm-home .mm-resume { gap: clamp(var(--mm-4), 2.4vw, var(--mm-7)); padding: clamp(var(--mm-4), 3vh, var(--mm-7)) clamp(var(--mm-5), 3vw, var(--mm-7)); }
  .mm-home .mm-resume__text { gap: clamp(var(--mm-2), 1vh, var(--mm-3)); }
  .mm-home .mm-resume--empty .mm-resume__note { line-height: 1.45; }
  .mm-home .mm-resume__kicker { font-size: clamp(var(--mm-text-sm), 1.6vh, var(--mm-text-md)); }
  .mm-home .mm-resume__title, .mm-home .mm-resume--empty .mm-resume__title { font-size: clamp(1.625rem, 4vh, 2.75rem); }
  .mm-home .mm-resume__note { max-width: 34rem; font-size: clamp(var(--mm-text-sm), 1.8vh, var(--mm-text-lg)); line-height: 1.5; }
  .mm-home .mm-resume__meta { font-size: clamp(var(--mm-text-xs), 1.4vh, var(--mm-text-sm)); }
  .mm-home .mm-resume__art { height: clamp(10rem, 22vh, 16rem); }
  .mm-home .mm-resume .mm-btn { min-height: clamp(2.75rem, 5vh, 3.25rem); padding-inline: clamp(var(--mm-5), 2vw, var(--mm-6)); font-size: clamp(var(--mm-text-sm), 1.6vh, var(--mm-text-md)); }
  /* Progression : anneau et compteurs à la même échelle. */
  .mm-home .mm-home__progress { padding: clamp(var(--mm-4), 2.8vh, var(--mm-6)) clamp(var(--mm-5), 2.2vw, var(--mm-6)); }
  .mm-home .mm-home__progress .mm-zone__title { font-size: clamp(var(--mm-text-md), 2vh, 1.375rem); }
  .mm-home .mm-ring { width: clamp(6.5rem, 15vh, 10.5rem); }
  .mm-home .mm-ring__value strong { font-size: clamp(1.3125rem, 2.8vh, 1.875rem); }
  .mm-home .mm-ring__value span { font-size: clamp(var(--mm-text-xs), 1.4vh, var(--mm-text-sm)); }
  .mm-home .mm-stat-list li { gap: var(--mm-3); padding-block: clamp(.5rem, 1.6vh, 1.125rem); }
  .mm-home .mm-stat-list em { font-size: clamp(var(--mm-text-sm), 1.6vh, var(--mm-text-md)); }
  .mm-home .mm-stat-list strong { font-size: clamp(var(--mm-text-lg), 2.3vh, 1.625rem); }
  .mm-home .mm-progress-hint { font-size: clamp(var(--mm-text-xs), 1.4vh, var(--mm-text-sm)); }
}
/* Tablette basse (iPad 10″ en paysage, 1024 × 768) : mêmes proportions, un cran plus serrées. */
@media (min-width: 48rem) and (max-aspect-ratio: 3/2) and (max-height: 53.99rem) {
  .mm-home__cours { --arch-h: clamp(11rem, 26vh, 22rem); }
  .mm-home .mm-resume__art { height: clamp(9rem, 19.5vh, 16rem); }
  .mm-home .mm-resume { padding-block: clamp(var(--mm-4), 2.6vh, var(--mm-7)); }
  .mm-home .mm-home__progress { padding-block: clamp(var(--mm-4), 2.4vh, var(--mm-6)); }
  .mm-home .mm-stat-list li { padding-block: clamp(.4rem, 1.2vh, 1.125rem); }
}
/* Tablette en portrait : la même vue que l'ordinateur — six arches sur deux rangées de trois,
   puis reprise et progression côte à côte — à l'échelle de la colonne. */
@media (min-width: 48rem) and (orientation: portrait) {
  .mm-home__cours { --arch-h: clamp(10rem, 16vh, 19rem); }
  .mm-home__cours .mm-subjects { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; justify-content: stretch; justify-items: center; row-gap: clamp(var(--mm-3), 1.6vh, var(--mm-5)); }
  .mm-home__cours .mm-subject { width: calc(var(--arch-h) * .8); max-width: 100%; }
  .mm-home .mm-home__row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  /* En portrait, les textes suivent la largeur (l'écran est haut mais étroit) ; l'arche
     décorative de la reprise s'efface pour laisser la colonne au texte. */
  .mm-home .mm-resume { padding: clamp(var(--mm-5), 2.4vh, var(--mm-7)) clamp(var(--mm-5), 3vw, var(--mm-7)); }
  .mm-home .mm-resume__art { display: none; }
  .mm-home .mm-resume { align-items: center; }
  .mm-home .mm-resume__title, .mm-home .mm-resume--empty .mm-resume__title { font-size: clamp(1.5rem, 3.4vw, 2.25rem); }
  .mm-home .mm-resume__note { font-size: clamp(var(--mm-text-sm), 2vw, var(--mm-text-lg)); }
  .mm-home .mm-resume .mm-btn { font-size: clamp(var(--mm-text-sm), 1.9vw, var(--mm-text-md)); }
  .mm-home .mm-home__progress .mm-zone__title { font-size: clamp(var(--mm-text-md), 2.2vw, 1.375rem); }
  .mm-home .mm-home__progress .mm-zone__title { flex-wrap: wrap; row-gap: var(--mm-1); white-space: normal; }
  .mm-home .mm-progress-duo { flex-direction: column; align-items: stretch; gap: var(--mm-3); }
  .mm-home .mm-ring { align-self: center; width: clamp(6.5rem, 14vw, 10rem); }
  .mm-home .mm-ring__value strong { font-size: clamp(1.3125rem, 3vw, 2rem); }
  .mm-home .mm-stat-list li { padding-block: clamp(.4rem, 1vh, 1rem); }
  .mm-home .mm-stat-list em { font-size: clamp(var(--mm-text-sm), 2vw, var(--mm-text-md)); }
  .mm-home .mm-stat-list strong { font-size: clamp(var(--mm-text-lg), 2.8vw, 1.625rem); }
}
/* Petit iPad en portrait (768 × 1024, 810 × 1080 ; audit v0.53.0) : la colonne de progression,
   anneau au-dessus des compteurs, dépassait l'écran de 50 à 105 px. Mêmes blocs, mêmes tailles :
   les deux colonnes prennent des largeurs égales et l'anneau revient à côté des compteurs,
   comme sur ordinateur. */
@media (min-width: 48rem) and (orientation: portrait) and (max-height: 70rem) {
  .mm-home .mm-ring { width: 6.5rem; }
  .mm-home .mm-ring__value strong { font-size: 1.375rem; }
  .mm-home .mm-resume, .mm-home .mm-home__progress { padding-block: var(--mm-4); }
  .mm-home .mm-home__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mm-home .mm-progress-duo { flex-direction: row; align-items: center; gap: var(--mm-3); }
  .mm-home .mm-progress-duo .mm-stat-list { flex: 1; min-width: 0; }
  .mm-home .mm-stat-list li { padding-block: .3rem; }
}

/* ---------- Studio : « Créer un cours à partir d'un PDF » et contrôle imposé ou non ----------
   Un seul formulaire, du document aux leçons à relire. Les trois étapes sont rappelées en tête ;
   les choix (programme, contrôle) sont des groupes nommés, lisibles au clavier. */
.mm-importer { display: grid; gap: var(--mm-4); }
.mm-importer__how { display: flex; flex-wrap: wrap; gap: var(--mm-2) var(--mm-5); padding: 0; margin: 0; list-style: none; counter-reset: mm-how; font-size: var(--mm-text-sm); color: var(--mm-muted); }
.mm-importer__how li { counter-increment: mm-how; display: flex; align-items: baseline; gap: var(--mm-2); }
.mm-importer__how li::before { content: counter(mm-how); display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--mm-green-100); color: var(--mm-green-title); font-weight: 700; font-size: var(--mm-text-xs); }
.mm-importer__new, .mm-importer__quiz, .mm-quizswitch fieldset { display: flex; flex-direction: column; gap: var(--mm-2); width: 100%; max-width: 40rem; }
.mm-importer__new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--mm-3); max-width: none; }
.mm-importer__new[hidden] { display: none; }
.mm-importer__new legend, .mm-importer__quiz legend, .mm-quizswitch legend { margin-bottom: var(--mm-2); font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-ink); }
.mm-importer__new > .mm-field { margin: 0; }
.mm-quizswitch { margin-bottom: var(--mm-3); }
@container mm-page (max-width: 47.99rem) { .mm-importer__new { grid-template-columns: minmax(0, 1fr); } }
.mm-aside-card__sep { margin-top: var(--mm-4); padding-top: var(--mm-4); border-top: 1px solid var(--mm-line); }
.mm-importer__essai { display: flex; align-items: flex-start; gap: var(--mm-2); padding: var(--mm-3) var(--mm-4); border-radius: var(--mm-radius); background: var(--mm-sand); font-size: var(--mm-text-sm); color: var(--mm-ink); }
.mm-importer__essai .mm-icon { flex: none; margin-top: .15rem; color: var(--mm-green-text); }
.mm-importer__essai a { font-weight: 600; color: var(--mm-green-text); }
.mm-plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--mm-2); }
/* Suppression définitive (programme, leçon) : repliée, en rouge sobre, toujours confirmée deux fois. */
.mm-danger { margin-top: var(--mm-4); padding-top: var(--mm-3); border-top: 1px solid var(--mm-line); }
.mm-danger > summary { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--mm-tap); font-weight: 600; color: var(--mm-danger); }
.mm-danger[open] > summary { margin-bottom: var(--mm-3); }
/* Repère d'ouverture (réception C7) : avec « display: inline-flex », le triangle du navigateur disparaît ;
   un chevron dit que la ligne s'ouvre, et tourne quand elle est ouverte. */
.mm-danger > summary, .mm-draftbar__drop > summary, .mm-teacher-actions > summary, .mm-quran-chap > summary { gap: var(--mm-2); list-style: none; }
.mm-danger > summary::-webkit-details-marker, .mm-draftbar__drop > summary::-webkit-details-marker, .mm-teacher-actions > summary::-webkit-details-marker, .mm-quran-chap > summary::-webkit-details-marker { display: none; }
.mm-danger > summary::after, .mm-draftbar__drop > summary::after, .mm-teacher-actions > summary::after, .mm-quran-chap > summary::after { content: ""; flex: none; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--mm-fast) ease; }
.mm-danger[open] > summary::after, .mm-draftbar__drop[open] > summary::after, .mm-teacher-actions[open] > summary::after, .mm-quran-chap[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .mm-danger > summary::after, .mm-draftbar__drop > summary::after, .mm-teacher-actions > summary::after, .mm-quran-chap > summary::after { transition: none; } }
.mm-panel--quiet { padding-block: var(--mm-2); }
.mm-panel--quiet > .mm-danger { margin-top: 0; padding-top: 0; border-top: 0; }

/* ---------- Studio : tableau de préparation d'un cours (C13-P2-01) ----------
   Un tableau réel (en-têtes de colonnes et de lignes) sur grand écran ; au téléphone et au zoom
   200 %, chaque leçon devient une fiche lisible de haut en bas, étiquetée par colonne. */
.mm-prep__wrap { overflow-x: auto; }
.mm-prep { width: 100%; border-collapse: collapse; font-size: var(--mm-text-sm); }
.mm-prep th, .mm-prep td { padding: var(--mm-3) var(--mm-2); border-bottom: 1px solid var(--mm-line); text-align: left; vertical-align: top; }
.mm-prep thead th { font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }
.mm-prep__n { width: 2.5rem; font-weight: 700; color: var(--mm-muted); }
.mm-prep__title { font-weight: 600; min-width: 12rem; }
.mm-prep__title a { color: var(--mm-ink); text-decoration-color: var(--mm-line); }
.mm-prep td a, .mm-prep th a { display: inline-flex; align-items: center; min-height: 1.5rem; }
@media (max-width: 47.99rem) { .mm-prep td a, .mm-prep th a { min-height: var(--mm-tap); } }
.mm-prep td .mm-meta { display: block; }
.mm-prep__quiz { display: flex; flex-wrap: wrap; gap: 0 var(--mm-3); border: 0; margin: 0; padding: 0; }
.mm-prep__quiz .mm-checkline { min-height: var(--mm-tap); align-items: center; }
.mm-prep__quiz .mm-checkline span { white-space: nowrap; }
.mm-prep__state { display: inline-flex; align-items: center; gap: var(--mm-1); font-weight: 600; }
.mm-prep__state::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--mm-muted); }
.mm-prep__state--done::before { background: var(--mm-green-700); }
.mm-prep__state--warn { color: var(--mm-gold-ink); }
.mm-prep__state--warn::before { background: var(--mm-gold); }
.mm-prep td[data-label="État"] { min-width: 11rem; }
.mm-import-summary { border-left: 3px solid var(--mm-gold); }
.mm-plan { display: grid; gap: var(--mm-2); margin-bottom: var(--mm-4); }
.mm-edit__split { min-height: var(--mm-tap); padding: 0 var(--mm-3); border: 1px dashed var(--mm-line); border-radius: var(--mm-radius); background: transparent; color: var(--mm-green-text); font: inherit; font-size: var(--mm-text-sm); font-weight: 600; cursor: pointer; }
.mm-edit__split:hover { border-color: var(--mm-green-700); }
.mm-danger--neutral > summary { color: var(--mm-ink); }
/* Le tableau suit la largeur de sa carte, pas celle de la page : à côté du panneau « Sans PDF », il
   débordait de 100 px et la colonne « Aperçu » passait sous le panneau (réception du 25 nov.). Dans une
   carte étroite, chaque leçon devient un bloc : titre en haut, puis contenu et contrôle, état et aperçu. */
.mm-prep__wrap { container: mm-prep / inline-size; width: 100%; }
@container mm-prep (max-width: 44rem) {
  .mm-prep, .mm-prep tbody { display: block; width: 100%; }
  .mm-prep thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mm-prep tr { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--mm-3) var(--mm-5); padding: var(--mm-3) 0 var(--mm-3) 2.5rem; border-bottom: 1px solid var(--mm-line); }
  .mm-prep th, .mm-prep td { display: block; padding: 0; border: 0; }
  .mm-prep__title { grid-column: 1 / -1; min-width: 0; }
  .mm-prep__n { position: absolute; left: 0; top: var(--mm-3); width: auto; }
  .mm-prep td[data-label="État"] { min-width: 0; }
  .mm-prep td[data-label]::before { content: attr(data-label); display: block; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }
}
/* 3 déc. (revue des écrans de l'équipe) : dans la carte de l'ordinateur (~40 rem), contenu, contrôle, état
   et aperçu tiennent sur une rangée sous le titre ; une leçon passe de ~200 px à ~110 px. */
@container mm-prep (min-width: 36rem) and (max-width: 44rem) {
  .mm-prep tr { grid-template-columns: minmax(6.5rem, .8fr) minmax(13rem, 1.4fr) minmax(0, 1fr) auto; gap: var(--mm-2) var(--mm-4); }
}
@container mm-page (max-width: 47.99rem) {
  .mm-prep__wrap { overflow: visible; }
  .mm-prep, .mm-prep tbody, .mm-prep th, .mm-prep td { display: block; width: 100%; }
  .mm-prep thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  /* 4 déc. : une leçon faisait près de 400 px au téléphone (cinq rubriques l'une sous l'autre). Contenu et état
     côte à côte, le contrôle sur toute la largeur, l'aperçu sans étiquette (le lien se nomme lui-même). */
  .mm-prep tr { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "titre titre" "contenu etat" "controle controle" "apercu apercu"; column-gap: var(--mm-4); padding: var(--mm-3) 0 var(--mm-3) 2.5rem; border-bottom: 1px solid var(--mm-line); }
  .mm-prep th, .mm-prep td { padding: var(--mm-1) 0; border: 0; }
  .mm-prep__title { grid-area: titre; }
  .mm-prep td[data-label="Contenu"] { grid-area: contenu; }
  .mm-prep td[data-label="État"] { grid-area: etat; }
  .mm-prep td[data-label="Contrôle"] { grid-area: controle; }
  .mm-prep td[data-label="Aperçu"] { grid-area: apercu; }
  .mm-prep__n { position: absolute; left: 0; top: var(--mm-3); width: auto; }
  .mm-prep td[data-label]::before { content: attr(data-label); display: block; font-size: var(--mm-text-xs); font-weight: 600; color: var(--mm-muted); }
  .mm-prep td[data-label="Aperçu"]::before { content: none; }
  /* Relevé des écrans (C9-P2-RECETTE-01) : au doigt, chaque lien de la carte (titre, questions, aperçu)
     a la hauteur tactile commune, sans changer sa taille de texte. */
  .mm-prep a { display: inline-flex; align-items: center; min-height: var(--mm-tap); }
}

/* ---------- Téléphone : menu dans la barre du haut (décision du 25 nov., 16 h 38) ----------
   Plus de barre d'onglets en bas : un bouton ouvre le menu sous la barre verte (à droite depuis le 3 déc.). */
.mm-menu-btn { display: none; }
.mm-nav__profil { display: none; }
@media (max-width: 47.99rem) {
  /* 3 déc. (« inverse : logo tout à gauche, menu tout à droite ») : le logo ouvre la barre, le bouton du menu la
     ferme, au bord droit ; thème et cloche (barre posée par-dessus, à droite) se rangent juste avant lui. */
  .mm-side { justify-content: flex-start; gap: var(--mm-2); }
  .mm-menu-btn { margin-left: auto; }
  .mm-main > .mm-topbar { right: calc(2.75rem + var(--mm-2)); }
  .mm-menu-btn { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--mm-radius-sm); background: color-mix(in srgb, var(--mm-on-green) 10%, transparent); color: var(--mm-on-green); cursor: pointer; }
  .mm-menu-btn:hover { background: color-mix(in srgb, var(--mm-on-green) 16%, transparent); }
  .mm-menu-btn__bars, .mm-menu-btn__bars::before, .mm-menu-btn__bars::after { display: block; width: 1.25rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--mm-med) var(--mm-ease), opacity var(--mm-fast) ease; }
  .mm-menu-btn__bars { position: relative; }
  .mm-menu-btn__bars::before, .mm-menu-btn__bars::after { content: ""; position: absolute; left: 0; }
  .mm-menu-btn__bars::before { top: -6px; }
  .mm-menu-btn__bars::after { top: 6px; }
  .is-menu-open .mm-menu-btn__bars { background: transparent; }
  .is-menu-open .mm-menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
  .is-menu-open .mm-menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }
  .mm-nav {
    position: fixed; z-index: 30; top: 3.75rem; left: 0; right: 0; bottom: auto;
    flex-direction: column; justify-content: flex-start; gap: 2px;
    max-height: calc(100dvh - 3.75rem); overflow-x: hidden; overflow-y: auto;
    padding: var(--mm-3) var(--mm-4) calc(var(--mm-5) + env(safe-area-inset-bottom));
    background: var(--mm-green-900); border-top: 1px solid color-mix(in srgb, var(--mm-gold-light) 30%, transparent);
    box-shadow: 0 24px 40px color-mix(in srgb, var(--mm-shadow-ink) 40%, transparent), 0 0 0 100vmax color-mix(in srgb, var(--mm-shadow-ink) 40%, transparent);
    clip-path: inset(0 0 -100vh 0); /* l'ombre ne voile que la page, jamais la barre verte */
    opacity: 0; visibility: hidden; transform: translateY(-.5rem);
    transition: opacity var(--mm-fast) ease, transform var(--mm-med) var(--mm-ease), visibility 0s linear var(--mm-med);
  }
  .is-menu-open .mm-nav { opacity: 1; visibility: visible; transform: none; transition: opacity var(--mm-fast) ease, transform var(--mm-med) var(--mm-ease); }
  .mm-nav a { flex: none; min-width: 0; flex-direction: row; justify-content: flex-start; gap: var(--mm-3); min-height: 3rem; padding: var(--mm-2) var(--mm-3); border-radius: var(--mm-radius-sm); font-size: var(--mm-text-md); text-align: left; }
  .mm-nav a[aria-current="page"] { background: color-mix(in srgb, var(--mm-on-green) 10%, transparent); color: var(--mm-gold-light); }
  /* 25 nov., 16 h 47 : le profil entre dans le menu du téléphone, le compte quitte la barre. */
  .mm-topbar .mm-account { display: none; }
  .mm-nav__profil { display: flex; flex-direction: column; gap: 2px; margin-top: var(--mm-3); padding-top: var(--mm-3); border-top: 1px solid color-mix(in srgb, var(--mm-on-green) 14%, transparent); }
  .mm-nav__who { display: flex; align-items: center; gap: var(--mm-3); padding: var(--mm-2) var(--mm-3); color: var(--mm-on-green); }
  .mm-nav__who .mm-account__avatar { flex: none; width: 2.5rem; height: 2.5rem; font-size: var(--mm-text-md); }
  .mm-nav__who > span:last-child { display: flex; flex-direction: column; min-width: 0; }
  .mm-nav__who strong { font-weight: 600; }
  .mm-nav__id { font-size: var(--mm-text-sm); font-weight: 600; color: var(--mm-gold-light); }
  .mm-nav__mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--mm-text-xs); color: color-mix(in srgb, var(--mm-on-green) 72%, transparent); }
  .mm-main { padding-bottom: env(safe-area-inset-bottom); }
  .mm-flash { bottom: calc(var(--mm-4) + env(safe-area-inset-bottom)); }
  .mm-container { padding-bottom: var(--mm-7); }
  /* Coran (25 nov., 18 h 11) : le maximum de place pour les versets. Une seule ligne de commandes ;
     ni repère ni avancement ; récitateur dans les réglages, plein écran en haut ; en plein écran,
     pas de rangée de flèches (on glisse d'un verset à l'autre). */
  .mm-qa { bottom: 0; padding: var(--mm-1) var(--mm-3) calc(var(--mm-1) + env(safe-area-inset-bottom)); }
  .mm-qr:has(.mm-qa) .mm-qr__page { padding-bottom: 4.5rem; }
  .mm-qa__bar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ctrl" "msg"; gap: 0; }
  /* 18 h 22 : la rangée complète de l'ordinateur, dans son ordre (sourate précédente, recommencer,
     verset précédent, lecture, verset suivant, sourate suivante), sans ligne en dessous. */
  .mm-qa__who, .mm-qa__state { display: none; }
  /* 1er déc., 18 h 10 : le bouton de lecture sur l'axe du titre — « recommencer » ajoute un bouton à gauche ; une marge
     de la même largeur à droite recentre le groupe sur la lecture (comme sur ordinateur). */
  .mm-qa__ctrl { --qa-b: var(--mm-tap); --qa-g: var(--mm-1); justify-self: center; display: flex; align-items: center; gap: var(--qa-g); padding: 0 calc(var(--qa-b) + var(--qa-g)) 0 0; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step { display: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__page { padding-bottom: calc(var(--qr-bottom, 0px) + var(--mm-4)); }
}
/* 3 déc. : au téléphone tactile aussi, l'immersif se parcourt en glissant ; l'indication s'y affiche, au-dessus de la
   barre d'écoute, jusqu'au premier geste (retenu sur l'appareil). */
@media (max-width: 47.99rem) and (pointer: coarse) {
  /* Une ligne de texte posée sur la lecture, sans bande ni filet (la bande blanche pesait, 3 déc.). */
  .mm-qr.is-js[data-view="focus"]:not([data-glisse="vu"]) .mm-qr__step { display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--mm-3); background: none; backdrop-filter: none; border-top: 0; pointer-events: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step > :is(a, button) { display: none; }
  .mm-qr.is-js[data-view="focus"] .mm-qr__step-glisse { display: block; font: 500 var(--mm-text-xs)/1.3 var(--mm-font-ui); color: var(--mm-muted); text-align: center; }
}
.mm-qr[data-glisse="vu"] .mm-qr__step-glisse { display: none; }
@media (max-width: 47.99rem) and (prefers-reduced-motion: reduce) {
  .mm-nav, .is-menu-open .mm-nav, .mm-menu-btn__bars, .mm-menu-btn__bars::before, .mm-menu-btn__bars::after { transition: none; }
}

/* Mot à mot en or, mouvement réduit : la couleur change sans transition. */
@media (prefers-reduced-motion: reduce) { .mm-quran-verse .mm-w { transition: none; } }

/* Sélecteur de sourate (27 nov.) : le nom de la sourate dans l'en-tête ouvre la liste des 114 sourates. */
.mm-qr__title { position: relative; }
.mm-qr__pickbtn { display: inherit; flex-direction: inherit; align-items: inherit; gap: inherit; margin: 0; padding: var(--mm-1) var(--mm-3); border: 0; border-radius: var(--mm-radius); background: none; color: inherit; font: inherit; cursor: pointer; }
.mm-qr__pickbtn:hover { background: color-mix(in srgb, var(--mm-gold-wash) 60%, transparent); }
.mm-qr__pickbtn[aria-expanded="true"] { background: var(--mm-gold-wash); }
.mm-qr__pickico { align-self: center; color: var(--mm-gold-ink); transition: transform .2s ease; }
.mm-qr__pickbtn[aria-expanded="true"] .mm-qr__pickico { transform: rotate(180deg); }
.mm-qr__surahs { position: absolute; z-index: 30; top: calc(100% + var(--mm-2)); left: 50%; width: min(26rem, calc(100vw - 2rem)); transform: translateX(-50%); display: flex; flex-direction: column; padding: var(--mm-3); border-radius: var(--mm-radius-lg); background: var(--mm-surface); text-align: start;
  box-shadow: inset 0 0 0 1px var(--mm-line), 0 22px 44px -20px color-mix(in srgb, var(--mm-shadow-ink) 50%, transparent); }
.mm-qr__surahs[hidden] { display: none; }
.mm-qr__surahs input { width: 100%; margin-bottom: var(--mm-2); }
.mm-qr__surahs ol { max-height: min(60vh, 28rem); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0; list-style: none; }
.mm-qr__surahs li[hidden] { display: none; }
.mm-qr__surahs a { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: center; gap: var(--mm-3); padding: var(--mm-2) var(--mm-3); border-radius: var(--mm-radius); color: var(--mm-ink); text-decoration: none; }
.mm-qr__surahs a:hover, .mm-qr__surahs a:focus-visible { background: color-mix(in srgb, var(--mm-gold-wash) 60%, transparent); }
.mm-qr__surahs a[aria-current="page"] { background: var(--mm-green-100); }
.mm-qr__pk-num { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mm-gold) 55%, transparent); font: 600 var(--mm-text-xs)/1 var(--mm-font-ui); color: var(--mm-gold-ink); font-variant-numeric: tabular-nums; }
.mm-qr__surahs a[aria-current="page"] .mm-qr__pk-num { background: var(--mm-gold); box-shadow: none; color: var(--mm-green-900); }
.mm-qr__pk-names { display: flex; flex-direction: column; min-width: 0; }
.mm-qr__pk-names strong { font-weight: 600; color: var(--mm-green-title); }
.mm-qr__pk-names span { font-size: var(--mm-text-xs); color: var(--mm-muted); }
.mm-qr__pk-ar { font: 400 1.375rem/1.4 var(--mm-font-ar); color: var(--mm-green-title); }
.mm-qr__pk-none { margin: var(--mm-3); color: var(--mm-muted); font-size: var(--mm-text-sm); }
@media (prefers-reduced-motion: reduce) { .mm-qr__pickico { transition: none; } }
@media (max-width: 47.99rem) {
  .mm-qr__head-in { position: relative; }
  .mm-qr__title { position: static; }
  .mm-qr__surahs { left: var(--mm-3); right: var(--mm-3); width: auto; transform: none; }
}
/* Le bouton du sélecteur élargit le titre : plus serré, et la ligne d'informations (lieu, versets) n'apparaît
   qu'à partir de 1 200 px, pour que le titre ne touche jamais « Verset » et « Réglages ». */
.mm-qr__pickbtn { padding: 2px var(--mm-2); }
@media (min-width: 48rem) { .mm-qr__pickbtn { gap: var(--mm-2); } }
@media (min-width: 48rem) and (max-width: 74.99rem) { .mm-qr__title p { display: none; } }

/* En-tête du lecteur (27 nov., 10 h 51) : le nom de la sourate devient une pastille qui se lit comme un menu
   (bordure, chevron), centrée seule ; la ligne d'informations est retirée (elle décalait le centrage). */
.mm-qr__title > p { display: none; }
.mm-qr__title h1 { display: flex; justify-content: center; }
.mm-qr__pickbtn { display: inline-flex; flex-direction: row; align-items: center; gap: var(--mm-1); max-width: 100%; padding: var(--mm-1) var(--mm-2) var(--mm-1) var(--mm-3); border: 0; border-radius: 999px; background: color-mix(in srgb, var(--mm-gold-wash) 45%, transparent); box-shadow: none; white-space: nowrap; }
.mm-qr__pickbtn:hover { background: color-mix(in srgb, var(--mm-gold-wash) 80%, transparent); }
.mm-qr__pickbtn[aria-expanded="true"] { background: var(--mm-gold-wash); }
/* 27 nov., 11 h 03 : encore trop chargé → le nom seul et le chevron, sans bordure ni ombre. */
/* Le nom est centré sur la largeur de l'en-tête, aussi au téléphone (il était décalé de 24 px vers la
   gauche parce que les outils de droite sont plus larges que la flèche de retour). */
@media (max-width: 47.99rem) {
  .mm-qr__head-in { grid-template-columns: minmax(0, 1fr) minmax(0, max-content) minmax(0, 1fr); }
  .mm-qr__head-in > .mm-qr__start { justify-self: start; }
  .mm-qr__head-in > .mm-qr__end-tools { justify-self: end; }
}
.mm-qr__pickbtn .mm-qr__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-inline-start: 0; border-inline-start: 0; font-size: var(--mm-text-md); }
.mm-qr__pickbtn .mm-qr__pickico { flex: none; width: 1rem; height: 1rem; }
/* Lot E1 : le nom de la sourate prend la présence d'un titre (corps 19 px, pastille de 40 px) ; un nom long
   s'arrête sur des points de suspension, sans pousser « Verset » ni « Réglages ». Toujours le nom seul et le
   chevron, sans bordure (27 nov.). */
@media (min-width: 48rem) {
  .mm-qr__pickbtn { min-height: 2.5rem; padding: var(--mm-1) var(--mm-3) var(--mm-1) var(--mm-4); gap: var(--mm-2); }
  .mm-qr__pickbtn .mm-qr__name { max-width: min(22rem, 30vw); font-size: var(--mm-text-lg); }
}
@media (max-width: 47.99rem) {
  /* Téléphone : seules les commandes, centrées (le plein écran a été retiré le 4 déc.). */
  .mm-qa__state { display: none; }
  /* 4 déc. (« le replay seul à gauche, le reste bien centré et symétrique ») : « recommencer » sort de la rangée
     et se pose au bord gauche ; sourate et verset précédents, lecture, verset et sourate suivants restent centrés,
     deux de chaque côté. La place réservée à droite pour l'équilibre n'a plus lieu d'être. */
  .mm-qa__ctrl { position: relative; justify-self: stretch; justify-content: center; padding-inline-end: 0; }
  .mm-qa__ctrl .mm-qa__btn[data-qa-restart] { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
}
@media (max-width: 24.99rem) { .mm-qa__ctrl { --qa-g: 0px; --qa-b: 2.375rem; gap: 0; } .mm-qa__ctrl .mm-qa__btn:not(.mm-qa__btn--main) { width: 2.375rem; min-width: 2.375rem; } }
/* Audit A9940-02 : à 320 px, les commandes centrées (250 px) mordaient de 5 px sur le plein écran. Sous
   22,5 rem, boutons de 36 px et bouton principal de 48 px sans marge : 228 px, toujours centrés, à 6 px
   du plein écran. */
@media (max-width: 22.49rem) { .mm-qa__ctrl { --qa-b: 2.25rem; } .mm-qa__ctrl .mm-qa__btn:not(.mm-qa__btn--main) { width: 2.25rem; min-width: 2.25rem; } .mm-qa__ctrl .mm-qa__btn--main { width: 3rem; height: 3rem; margin-inline: 0; } }

/* Niveau d'un cours (C1-P3, 27 nov.) : la règle, puis le formulaire, séparés d'un pas. */
.mm-levelbox > p { margin: 0 0 var(--mm-4); max-width: 38rem; }
/* Fil d'Ariane au téléphone (réception C1 du 27 nov.) : liens de 20 px de haut, trop bas pour le doigt ;
   la zone touchable passe à 32 px sans changer la ligne visible. */
@media (max-width: 47.99rem) {
  .mm-crumbs a { display: inline-flex; align-items: center; min-height: 2rem; }
  .mm-crumbs { row-gap: 0; }
}
/* Carte « Ta prochaine leçon » au téléphone (réception C1 du 27 nov.) : le nom du cours passe à la ligne
   avec son point en tête ; sur une ligne à part, le point n'a plus lieu d'être. Même chose sur tablette
   (C12, 768 px : la carte de l'accueil tient sur une demi-largeur et le point ouvrait la deuxième ligne). */
@media (max-width: 63.99rem) {
  .mm-resume__course { flex-basis: 100%; }
  .mm-resume__course::before { content: none; }
}
/* Réception C4 (27 nov.) : au téléphone, « 100 % » se coupait avant le signe dans « Programme par programme ». */
.mm-prog__line em { flex: none; white-space: nowrap; }
/* 4 déc. : au téléphone, « Ouvrir » passait seul sous un titre de trois lignes ; il reste à droite du titre, plus court. */
@media (max-width: 47.99rem) {
  .mm-prog__head { flex-wrap: nowrap; }
  .mm-prog__head h3 { flex: 1 1 0; font-size: var(--mm-text-lg); }
  .mm-prog__head .mm-zone__more { flex: none; }
}
