/* Institut Abou Sirine — le thème du site parent Dourous Abou Sirine (theme/dourous/assets/dourous.css,
 * charte ../DESIGN.md), recopié ici (rien n'est chargé depuis le site parent) avec les couleurs du logo de l'Institut :
 * bleu nuit #0F2536 du médaillon pour les surfaces sombres, cyan #49D5E2 de la barre (sur fond sombre seulement),
 * cyan foncé #0A6690 / #085A80 pour les boutons et les liens sur fond clair (contraste AA), crème pour le texte sur nuit.
 * Mêmes rôles que la charte du parent ; l'or reste rare (filets de section, certificat).
 * Sobre : bordures fines, peu d'ombres, motif khatam seulement là où le parent le met.
 * Thème clair par défaut, quel que soit le réglage de l'appareil (27/11, le propriétaire trouvait le site trop foncé
 * la nuit). Mode nuit au choix : le bouton lune de la barre du haut met la classe « nuit » sur <html> (mémorisée). */

:root {
  --ink: #263B4B;
  --accent: #0A6690;
  --accent-strong: #085A80;
  --accent-soft: #E1EFF6;
  --bg: #EDF3F6;
  --surface: #FFFFFF;
  --border: #D6E1E7;
  --border-strong: #BFCDD6;
  --field-border: #768690;
  --muted: #56656F;
  --gold: #B8893A;
  --gold-soft: #F6EEDF;
  --on-accent: #FFFFFF;
  --hero-bg: #0D4257;
  --hero-ink: #EAF4F7;
  --accent-hover: #074E70;
  --cyan: #49D5E2;
  --cyan-clair: #8BE6EF;
  --danger: #B3261E;
  --danger-soft: #FBE9E7;
  --t1: #0A6690; --t1s: #E1EFF6;
  --t2: #3D5A80; --t2s: #E7EDF5;
  --t3: #8E5A30; --t3s: #F5EADF;
  --t4: #7A4E7E; --t4s: #F1E8F1;
  --radius: 10px;
  --radius-card: 16px;
  --serif: "Fraunces", "Amiri", Georgia, serif;
  --sans: "Inter", "Amiri", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabe: "Amiri", "Noto Naskh Arabic", serif;
  color-scheme: light; /* clair par défaut, même si le téléphone est en mode sombre (demande du propriétaire, 27/11) */
}

/* Mode nuit, seulement si le visiteur l'a choisi (bouton de la barre du haut, html.nuit).
 * À l'écran seulement : à l'impression (fonds non imprimés), la page garde les couleurs claires. */
@media screen {
  html.nuit {
    --ink: #E6ECEF;
    --accent: #49D5E2;
    --accent-strong: #8BE6EF;
    --accent-soft: #12343E;
    --bg: #0E1820;
    --surface: #16232D;
    --border: #283946;
    --border-strong: #3A4D5A;
    --field-border: #6F8592;
    --muted: #9EACB4;
    --gold: #D9AE62;
    --gold-soft: #3A2F1C;
    --on-accent: #0B1A20;
    --hero-bg: #091520;
    --hero-ink: #E6EFF2;
    --accent-hover: #8BE6EF;
    --danger: #F2B8B5;
    --danger-soft: #3B1E1C;
    --t1s: #12343E; --t2s: #1C2A3D; --t3s: #33251A; --t4s: #2E2231;
    --t1: #49D5E2; --t2: #8FB0DA; --t3: #D9A06F; --t4: #C79BCB;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html.tiroir-ouvert { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
@media (min-width: 900px) { body { font-size: 18px; } }
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); z-index: 100; }
.icone { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.arabe { font-family: var(--arabe); direction: rtl; line-height: 1.9; }
::selection { background: var(--accent-soft); color: var(--ink); }
::placeholder { color: var(--muted); opacity: 1; }

/* Barre du haut */
.topbar { font-size: 14px; border-bottom: 1px solid var(--border); background: var(--accent-soft); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 12px; }
.socials { display: flex; gap: 0; }
.socials a { color: var(--muted); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; text-decoration: none; }
.socials a:hover { color: var(--accent-strong); background: var(--accent-soft); }
.socials .icone { width: 20px; height: 20px; }
.topbar-contact { align-items: center; gap: 6px; text-decoration: none; }
.topbar-contact .icone { width: 18px; height: 18px; vertical-align: 0; }
.topbar-droite { display: flex; align-items: center; gap: 8px; }
/* Bouton du mode nuit : comme les icônes des réseaux ; lune en clair, soleil en nuit (avant même le script) */
.bouton-nuit { color: var(--muted); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; border: 0; background: none; padding: 0; }
@media (hover: hover) { .bouton-nuit:hover { color: var(--accent-strong); background: var(--accent-soft); } } /* pas de fond resté après un toucher */
.bouton-nuit .icone { width: 20px; height: 20px; }
.bouton-nuit .icone-soleil, html.nuit .bouton-nuit .icone-lune { display: none; }
html.nuit .bouton-nuit .icone-soleil { display: block; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--border); }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.site-header > .wrap { position: static; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; border-radius: 12px; }
.mainnav { display: none; }
.site-header .brand { margin-right: auto; }
.mainnav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.mainnav > ul > li > a, .mainnav > ul > li > button {
  display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 10px 12px; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: none; border: 0; font-size: 16px; font-weight: 500; white-space: nowrap;
}
.mainnav > ul > li > button .icone { width: 18px; height: 18px; }
.mainnav > ul > li > *:hover, .mainnav li.open > button { background: var(--accent-soft); color: var(--accent-strong); }
.mainnav > ul > li > [aria-current], .mainnav > ul > li > .est-actif { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px 0 currentColor; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 0; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.icon-btn .icone { width: 22px; height: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 500; text-decoration: none; font-size: 16px; line-height: 1.25; white-space: nowrap; font-family: var(--sans); cursor: pointer; }
.btn .icone { width: 20px; height: 20px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn-gold { background: var(--gold); color: #1D160A; }
.btn-large { width: 100%; }
.hide-sm { display: none; }
@media (min-width: 1180px) {
  .mainnav { display: block; }
  .burger, .show-sm { display: none; }
  .hide-sm { display: inline-flex; }
}

/* Méga-menu */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 24px 40px -24px rgb(0 0 0 / .25); display: none; }
.mainnav li.open .mega { display: block; }
/* Pont invisible au-dessus du panneau : couvre l'espace entre le bouton et le bas de l'en-tête. */
.mega::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 14px; }
.mega .wrap { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 28px; padding: 28px 0 32px; }
.mega-intro { background: var(--accent-soft); border-radius: var(--radius-card); padding: 20px; position: relative; overflow: hidden; color: var(--accent); }
.mega-intro > :not(.pattern) { position: relative; }
.mega-intro .mega-titre { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
.mega-intro p { margin: 8px 0 14px; color: var(--muted); font-size: 15px; }
.mega .mega-groupe { line-height: 1.2; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.mega ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mega li a { display: block; padding: 6px 0; text-decoration: none; color: var(--ink); font-size: 16px; }
.mega li a:hover { color: var(--accent-strong); }

/* Tiroir mobile */
.drawer { position: fixed; inset: 0; z-index: 100000; background: var(--bg); display: none; overflow-y: auto; padding: 16px 16px 48px; border-top: 4px solid var(--cyan); }
.drawer.open { display: block; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer details { border-bottom: 1px solid var(--border); }
.drawer summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; font-family: var(--serif); font-size: 1.35rem; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary .icone { width: 22px; height: 22px; transition: transform .2s; }
.drawer details[open] summary .icone { transform: rotate(180deg); }
.drawer details ul { list-style: none; padding: 0 0 12px 8px; margin: 0; }
.drawer details a, .drawer > a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-size: 17px; }
.drawer > a { font-family: var(--serif); font-size: 1.35rem; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.drawer > a[aria-current] { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 12px; }
.drawer-actions .btn { flex: 1 1 200px; }

/* Motif géométrique (khatam) */
.pattern { position: absolute; inset: 0; pointer-events: none; color: currentColor; opacity: .06; }

/* Héros A : épuré */
.hero-a { padding: 48px 0 40px; position: relative; overflow: hidden; }
.hero-a .wrap { display: grid; gap: 32px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-a .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; } .hero-a { padding: 72px 0 64px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--accent-strong); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.eyebrow .icone { width: 18px; height: 18px; vertical-align: 0; }
.hero-phrase { margin: 16px 0 6px; max-width: 22em; font-family: var(--serif); font-weight: 500; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.25; letter-spacing: -0.01em; }
.hero-phrase em { font-style: italic; color: var(--accent-strong); }
.hero-src { margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.lead { font-size: 1.1em; color: var(--muted); max-width: 34em; margin: 0 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) { .hero-actions .btn { flex: 1 1 100%; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 15px; }
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Carte « à la une » (sombre, motif) */
.feature { background: var(--hero-bg); color: var(--hero-ink); border-radius: 22px; padding: 28px; position: relative; overflow: hidden; }
.feature .pattern { opacity: .12; color: var(--cyan); }
.feature > :not(.pattern) { position: relative; }
.feature-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan-clair); font-weight: 600; }
.feature-label .icone { width: 18px; height: 18px; vertical-align: 0; }
.feature h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 12px 0 8px; color: #fff; }
.feature .meta { color: #B9C5CC; font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.wave { display: flex; align-items: center; gap: 3px; height: 54px; margin: 22px 0; }
.wave span { flex: 1; background: var(--cyan); border-radius: 2px; opacity: .55; }
.wave span.on { opacity: 1; background: #fff; }
.feature-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.play-xl { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--cyan); color: #0B1A20; display: grid; place-items: center; text-decoration: none; }
.play-xl .icone { width: 28px; height: 28px; }
.play-xl:hover { background: var(--cyan-clair); color: #0B1A20; }
.feature .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .25); }
.feature .btn-ghost:hover { border-color: rgb(255 255 255 / .6); }
.feature :focus-visible, .site-footer :focus-visible, .compte-cote :focus-visible { outline-color: var(--cyan); }

/* Sections */
section.block, .block { padding: 48px 0; }
.block.block-suite { padding-top: 8px; }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.block-head p { margin: 6px 0 0; color: var(--muted); max-width: 40em; }
.block-head .rule-sm { display: block; width: 40px; height: 3px; background: var(--accent); border-radius: 2px; margin-top: 10px; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; text-decoration: none; color: var(--accent-strong); }
.see-all .icone { width: 20px; height: 20px; transition: transform .15s; }
a:hover > .see-all .icone, a.see-all:hover .icone { transform: translateX(2px); }
a.see-all { padding-block: 8px; margin-block: -8px; } /* zone de toucher de 44 px, même mise en page */

/* Liste façon podcast (ajouts récents) */
.episodes { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.ep { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; position: relative; cursor: pointer; }
.ep + .ep { border-top: 1px solid var(--border); }
.ep:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.ep-play { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.ep-play .icone { width: 22px; height: 22px; }
.ep:hover .ep-play { background: var(--accent); color: var(--on-accent); }
.ep-title { font-weight: 500; color: var(--ink); text-decoration: none; display: block; line-height: 1.35; }
.ep-title:hover { color: var(--accent-strong); }
.ep-title::after { content: ""; position: absolute; inset: 0; }
.ep-actions { position: relative; z-index: 1; }
.ep-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 14px; color: var(--muted); margin-top: 4px; align-items: center; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--t1s); color: var(--t1); }
.tag.t2 { background: var(--t2s); color: var(--t2); } .tag.t3 { background: var(--t3s); color: var(--t3); } .tag.t4 { background: var(--t4s); color: var(--t4); }
.ep-actions { display: flex; gap: 2px; }
.ep-actions a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); text-decoration: none; }
.ep-actions a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.ep-actions .icone { width: 22px; height: 22px; }
@media (max-width: 640px) { .ep { padding: 12px; gap: 12px; } }

/* Cartes de série : modules et enseignants */
.series, .profs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.series > li, .profs > li { display: flex; min-width: 0; }
.serie { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; width: 100%; }
.serie:hover { border-color: var(--accent); }
.serie:hover h3 { color: var(--accent-strong); }
.serie-art, .banniere { aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; overflow: hidden; background: var(--t1s); color: var(--t1); }
.serie-art .pattern { opacity: .22; }
.serie-art > span { position: relative; font-family: var(--serif); font-size: 1.4rem; font-style: italic; text-align: center; padding: 0 16px; line-height: 1.25; text-wrap: balance; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.teinte-eau { background: var(--t1s); color: var(--t1); }
.teinte-ardoise { background: var(--t2s); color: var(--t2); }
.teinte-terre { background: var(--t3s); color: var(--t3); }
.teinte-prune { background: var(--t4s); color: var(--t4); }
.banniere.a-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.serie-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.serie-body h3 { margin-bottom: 0; }
.serie-body p { margin: 0; font-size: 14px; color: var(--muted); }
.serie-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.serie-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; font-size: 15px; }
.serie-pied strong { font-weight: 600; }
.serie-pied .see-all { font-size: 15px; }
.prof { padding-top: 20px; }
.prof .portrait { margin: 0 16px 4px; }
.prof-bio { font-size: 15px !important; }
.prof .see-all { margin-top: auto; padding-top: 10px; font-size: 15px; }
.portrait {
  display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 50%;
  width: 64px; height: 64px; font: 600 1.2rem/1 var(--sans); letter-spacing: .02em;
  color: var(--accent-strong); background: var(--accent-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-sm { width: 40px; height: 40px; font-size: .9rem; }
.portrait-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.portrait-xl { width: 112px; height: 112px; font-size: 2.1rem; }

/* Déroulé d'un module : quatre cartes numérotées (bouton rond du parent) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.step-num { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent-strong); display: grid; place-items: center; font-weight: 600; font-size: 18px; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.step-num .icone { width: 22px; height: 22px; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* Parole (hadith) : l'arabe et sa traduction, sans motif derrière */
.parole { margin: 0; display: grid; gap: 12px 40px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px 24px; }
@media (min-width: 900px) { .parole { grid-template-columns: 1fr 1fr; padding: 36px 44px; } }
.parole .arabe { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 0; text-align: right; color: var(--ink); }
.parole figcaption p { font: 500 clamp(1.2rem, 2.2vw, 1.45rem)/1.4 var(--serif); margin: 0 0 8px; letter-spacing: -0.01em; }
.parole figcaption em { font-style: italic; color: var(--accent-strong); }
.parole cite { font-style: normal; font-size: 14px; color: var(--muted); }

/* Encart d'appel (alerte du parent) */
.notify { background: var(--accent-soft); border-radius: 22px; padding: 32px 24px; position: relative; overflow: hidden; display: grid; gap: 20px; align-items: center; }
@media (min-width: 900px) { .notify { grid-template-columns: 1.2fr 1fr; padding: 40px 44px; } }
.notify .pattern { color: var(--accent); opacity: .08; }
.notify > * { position: relative; }
.notify p { margin: 8px 0 0; color: var(--muted); }
.notify-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Pied de page */
.site-footer { background: var(--hero-bg); color: #C9D3D8; padding: 48px 0 24px; margin-top: 48px; font-size: 15px; }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font: 500 1.1rem/1.2 var(--serif); letter-spacing: normal; color: #fff; margin: 0 0 10px; }
.site-footer p { margin: 0; }
.site-footer .footer-parent { margin-top: 12px; color: #B9C5CC; }
.site-footer .footer-parent a { text-decoration: underline; text-decoration-color: rgb(73 213 226 / .6); white-space: nowrap; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #C9D3D8; text-decoration: none; line-height: 2; }
.site-footer li a, .site-footer .legal a { display: inline-block; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgb(255 255 255 / .1); padding-top: 18px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }

/* Pages intérieures : fil d'Ariane et carte de titre (pages de rubrique du parent) */
.crumbs { font-size: 14px; color: var(--muted); padding: 20px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-strong); }
.crumbs .icone { width: 16px; height: 16px; vertical-align: 0; }
.rub-hero { padding: 16px 0 8px; }
.rub-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px 22px; color: var(--t1); }
.rub-card > div { position: relative; color: var(--ink); max-width: 680px; }
.rub-card h1 { margin: 14px 0 8px; font-size: clamp(1.9rem, 4.6vw, 2.9rem); }
.rub-card .lead { margin: 0 0 6px; }
.rub-stats { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
@media (min-width: 900px) { .rub-card { padding: 40px 44px; } }
.page-texte { padding: 32px 0 8px; }
.prose { max-width: 40em; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.35rem; margin: 28px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose a { text-decoration: underline; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.page-404 { padding-bottom: 32px; }
.profil-entete > div { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; max-width: none; }
.profil-entete h1 { margin-top: 10px; }
.retour-liste { padding: 8px 0 0; }
.aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px; }
.aside-card h3 { margin: 10px 0 4px; }
.aside-card p { margin: 0; color: var(--muted); font-size: 16px; }
.carte-icone { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.carte-icone .icone { width: 22px; height: 22px; }

/* Questions et réponses */
.faq { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; max-width: 52em; margin-top: 20px; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; padding: 16px 20px; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-strong); }
.faq-item summary:focus-visible { outline-offset: -3px; border-radius: 0; }
.faq-item summary .icone { width: 22px; height: 22px; color: var(--accent-strong); transition: transform .2s; }
.faq-item[open] summary .icone { transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 20px 18px; color: var(--muted); max-width: 46em; }
.faq-suite { margin-top: 18px; color: var(--muted); }

/* Puces de filtre (sous-rubriques du parent) : ici les publics du catalogue */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 18px 6px 6px; margin-inline: -6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; text-decoration: none; }
.filter .num { font-size: 13px; color: var(--muted); }
.filter:hover { border-color: var(--accent); }
.filter[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter[aria-current="page"] .num { color: inherit; opacity: .75; }
.block.block-filtres { padding-top: 28px; }

/* Contact */
.contact-grille { display: grid; gap: 16px; padding-top: 24px; }
@media (min-width: 900px) { .contact-grille { grid-template-columns: 320px minmax(0, 1fr); align-items: start; gap: 24px; } }
.contact-infos { display: grid; gap: 16px; }
.carte-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.carte-form h2 { font-size: 1.4rem; margin: 0 0 14px; }
.contact-form p { margin: 0 0 14px; }
.contact-form label { display: block; font-weight: 500; margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--field-border); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.cf-row { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cf-row { grid-template-columns: 1fr 1fr; } }
.cf-piege, .champ-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.facultatif { font-weight: 400; color: var(--muted); }
.contact-msg { padding: 12px 14px; border-radius: var(--radius); margin: 0 0 16px; border: 1px solid var(--border); }
.contact-msg.ok { background: var(--accent-soft); border-color: var(--accent); }
.contact-msg.err { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ------------------------------------------------------------------ Pages de compte (connexion, inscription, mot de passe)
 * À gauche, une grande carte sombre comme la carte « à la une » (bleu nuit, motif) ; à droite, le formulaire. */
.page-compte { min-height: 100vh; background: var(--bg); }
.compte { min-height: calc(100vh - 4px); display: grid; }
@media (min-width: 900px) { .compte { grid-template-columns: minmax(340px, 5fr) 7fr; } }
.compte-cote { display: none; }
@media (min-width: 900px) {
  .compte-cote {
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden;
    padding: clamp(32px, 4vw, 48px); background: var(--hero-bg); color: #C9D3D8;
  }
}
.compte-cote .pattern { opacity: .09; color: #fff; }
.compte-cote > :not(.pattern) { position: relative; }
.compte-cote-logo { display: inline-block; align-self: flex-start; border-radius: 22px; position: relative; }
.compte-cote-logo .logo-grand { width: 128px; height: 128px; }
.compte-cote-titre { font-family: var(--serif); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 12px 0 20px; }
.compte-cote-titre em { font-style: italic; color: var(--cyan-clair); }
.compte-cote ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.compte-cote li { display: flex; gap: 12px; align-items: flex-start; }
.compte-cote li .icone { color: var(--cyan); margin-top: .1em; }
.compte-cote-bas { margin: 0; font-size: 14px; color: #B9C5CC; }
.compte-principal { display: flex; flex-direction: column; padding: 16px clamp(16px, 4vw, 40px) 48px; }
.compte-haut { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: clamp(24px, 7vh, 72px); }
.compte-haut .brand .logo { width: 48px; height: 48px; }
@media (min-width: 900px) { .compte-haut .brand { visibility: hidden; } }
.compte-haut-droite { display: flex; align-items: center; gap: 8px; }
.compte-carte { width: min(100%, 440px); margin-inline: auto; }
.compte h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 8px; }
.compte-chapo { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.compte-form { display: grid; gap: 2px; }
.compte-form .btn { margin-top: 6px; }
.compte-bas { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.compte-mention { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* Champs de formulaire (pages de compte, LMS) : ceux du formulaire de contact du parent */
.champ { margin: 0 0 14px; display: grid; gap: 6px; }
.champ label { font-weight: 500; }
.champ small { color: var(--muted); font-size: 14px; }
.champ input, .champ textarea, .champ select {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--field-border);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 17px;
}
.champ input:focus, .champ textarea:focus, .champ select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.champ-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.champ-ligne a { font-size: 15px; }
/* Zone de toucher de 44 px sans changer la mise en page (marges négatives). */
.champ-ligne a, .compte-bas a { display: inline-block; padding-block: 10px; margin-block: -10px; }
.case { margin: 2px 0 14px; }
.case label { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; cursor: pointer; min-height: 44px; }
.case input { width: 20px; height: 20px; accent-color: var(--accent); }
.avis { padding: 12px 14px; border-radius: var(--radius); margin: 0 0 16px; background: var(--accent-soft); border: 1px solid var(--accent); font-size: 16px; }
.avis-ok { font-weight: 500; }
.avis-err { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ------------------------------------------------------------------ Classes du LMS (gabarits du plugin) sur le même dessin */
.conteneur { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 48px 0; }
.section-etroite { padding: 32px 0; }
.note { color: var(--muted); font-size: 15px; }
.centre { text-align: center; }
.vide { padding: 32px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-card); margin: 0; }
.surtitre { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; font-weight: 600; line-height: 1.4; }
.surtitre:empty { display: none; }
.etiquette { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--t1s); color: var(--t1); }
.etiquette-douce { background: var(--t2s); color: var(--t2); }
.carte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.page-chapo { color: var(--muted); font-size: 1.1em; max-width: 34em; margin: 0; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid transparent; font: 500 16px/1.25 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.bouton-plein { background: var(--accent); color: var(--on-accent); }
.bouton-plein:hover { background: var(--accent-hover); color: var(--on-accent); }
.bouton-clair { background: var(--surface); color: var(--ink); border-color: var(--border); }
.bouton-clair:hover { border-color: var(--accent); }
.bouton-large { width: 100%; min-height: 48px; }
.lien-fleche { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; text-decoration: none; color: var(--accent-strong); }
.lien-fleche .icone { width: 20px; height: 20px; }
.lien-discret { color: var(--muted); text-decoration: none; font-size: 15px; }
.lien-discret:hover { color: var(--accent-strong); }
.lien-retour { white-space: nowrap; min-height: 44px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Logo carré de l'Institut : même dessin que celui de Dourous Abou Sirine, mais en négatif sur bleu-pétrole,
 * avec la barre cyan du logo, pour qu'on distingue les deux sites au premier coup d'œil (27/11). */
.logo { display: block; height: 64px; width: 64px; border-radius: 0; box-shadow: none; }
.logo .frame { fill: #0D4257; stroke: #0D4257; stroke-width: 4; }
.logo .ink { fill: #D3E3EA; }
.logo .acc { fill: var(--cyan); }
.logo .glyph { fill: #0D4257; }
.logo .t1 { fill: #FFFFFF; }
.logo .t2 { fill: var(--cyan); }
.logo text { font-family: "Inter", system-ui, sans-serif; }
.logo .t1 { font-size: 17px; font-weight: 700; }
.logo .t2 { font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.compte-cote .logo .frame, .site-footer .logo .frame, .feature .logo .frame { stroke: rgb(255 255 255 / .3); }
html.nuit .logo .frame { stroke: #3A6478; }
html.nuit .logo .acc { fill: var(--cyan); }

/* Signature de l'Institut : un fin filet cyan tout en haut de chaque page (27/11) */
body { border-top: 4px solid var(--cyan); }

/* Premier bloc de l'accueil : même fond et même motif que l'encart « Essayer avant de choisir » (demande du 27/11),
 * pour qu'il se détache du reste de la page. Le motif s'estompe vers le texte pour garder la lecture nette. */
.hero-a { background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.hero-a > .pattern { color: var(--accent); opacity: .08;
  -webkit-mask-image: linear-gradient(to left, #000 35%, rgb(0 0 0 / .45) 100%); mask-image: linear-gradient(to left, #000 35%, rgb(0 0 0 / .45) 100%); }
.hero-a > .wrap { position: relative; }
.hero-a .eyebrow { background: var(--surface); }

/* Logo bien visible en bas de page : grand, en version claire sur le bleu-pétrole du pied de page (demande du 27/11). */
.footer-logo { display: inline-block; margin-bottom: 16px; border-radius: 14px; }
.site-footer .logo-pied { width: 96px; height: 96px; }
.site-footer .logo-pied .frame { fill: #FFFFFF; stroke: #FFFFFF; }
.site-footer .logo-pied .ink { fill: #0D4257; }
.site-footer .logo-pied .acc { fill: #1A93AE; }
.site-footer .logo-pied .glyph { fill: #FFFFFF; }
.site-footer .logo-pied .t1 { fill: #0D4257; }
.site-footer .logo-pied .t2 { fill: #0A6690; }
.site-footer .footer-logo:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* Présentation des enseignants : surligné et souligné (éditeur du profil) */
.prose mark, .module-enseignant-carte mark { background: #FFE58A; color: inherit; padding: 0 .12em; border-radius: 2px; }
html.nuit .prose mark, html.nuit .module-enseignant-carte mark { background: #6B5A1E; color: #FFF6D6; }
.prose u { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }

/* Fiche module : l'encadré de droite (image, prix, inscription) mis en valeur (28/11) —
 * plus large, image entière en 16:9 au lieu d'un bandeau 16:7, cadre et ombre marqués, fin liseré cyan en haut. */
main .encart { border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: 0 18px 40px -22px rgb(13 66 87 / .45), 0 2px 6px rgb(13 66 87 / .06); }
main .encart::before { content: ""; display: block; height: 4px; background: var(--cyan); }
main .encart .banniere { aspect-ratio: 16 / 9; }
main .encart .encart-corps { padding: 20px 22px 22px; }
@media (min-width: 980px) {
  main .module-grille { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 44px; }
}
@media (min-width: 1180px) {
  main .module-grille { grid-template-columns: minmax(0, 1fr) 440px; }
}
html.nuit main .encart { box-shadow: 0 18px 40px -22px rgb(0 0 0 / .7); }
