/*
  Thème de l'école Saint-Martin (themes/saint-martin) : toute l'apparence du site, à partir du HTML des blocs.
  Tiré du design system de l'école : crème, bleu Saint-Martin, brique ; vagues, bulles, manuscrit, petits dessins.
  Les réglages de l'école arrivent en variables CSS (couleurs, polices) et en attributs sur <html>
  (data-radius, data-btn, data-btn-case, data-shape, data-cards, data-eyebrow, data-sep, data-deco).
  Responsive par container queries sur .mp-page : l'aperçu de l'éditeur et le site partagent ce CSS.
*/

/* ---------- Valeurs par défaut (écrasées par les réglages du thème) ---------- */
:root {
    /* Couleurs */
    --surface: #fbf9f5;
    --surface-card: #ffffff;
    --surface-alt: #e8f0f5;
    --sky-top: #9dbbd9;
    --sky-bottom: #e4ebf3;
    --ink: #1f2b36;
    --ink-muted: #4e5b66;
    --line: #dfe6ea;
    --line-strong: #7d8b96;
    --primary: #4f8cb4;
    --primary-strong: #2f6c96;
    --on-primary: #ffffff;
    --primary-soft: #dbe8f1;
    --secondary: #a85442;
    --on-secondary: #ffffff;
    --secondary-soft: #f3e1db;
    --accent: #f2c94d;
    --on-accent: #1f2b36;
    --accent-soft: #fbf0cc;
    --rose: #c690a8;
    --rose-soft: #f3e3ea;
    --vert: #6cae84;
    --vert-soft: #e0f0e5;
    --deep: #28506b;
    --on-deep: #ffffff;
    --on-deep-muted: #c9d7e1;
    --veil: rgba(20, 40, 60, 0.45);
    --focus-ring: #1f2b36;
    --danger: #b3261e;
    --danger-soft: #fbe4e2;

    /* Ombres */
    --shadow-card: 0 2px 4px rgba(31, 43, 54, 0.05), 0 12px 32px rgba(31, 43, 54, 0.08);
    --shadow-lift: 0 8px 24px rgba(31, 43, 54, 0.18);

    /* Polices */
    --font-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
    --font-body: Montserrat, "Segoe UI", system-ui, sans-serif;
    --font-script: Caveat, "Segoe Print", cursive;

    /* spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 72px;
    --space-9: 112px;

    /* radius */
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 999px;

    /* layout */
    --container-max: 1120px;
    /* Largeur maximale du site, hors en-tête (qui garde toute la largeur) */
    --site-max: 1440px;
    --measure: 42rem;
    --tap-min: 48px;
    --header-h: 72px;
}

/* ---------- Cartes : relief selon le réglage ---------- */
html[data-cards="contour"] { --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06); --shadow-lift: 4px 4px 0 var(--ink); }

.mp-page {
  container-type: inline-size;
  container-name: page;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 27px;
  -webkit-font-smoothing: antialiased;
  --ring: var(--focus-ring);
}
.mp-page *, .mp-page *::before, .mp-page *::after { box-sizing: border-box; }
.mp-page img { max-width: 100%; display: block; }
.mp-page :focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
:where(.mp-page) a { color: inherit; }

/* ---------- Section : fonds, espacements, conteneur ---------- */
.mp-section { position: relative; padding-block: var(--space-7); padding-inline: var(--space-4); background: var(--surface); color: var(--ink); }
.mp-section[data-bg="alterne"] { background: var(--surface-alt); }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) { background: var(--primary-strong); color: var(--on-primary); --ring: var(--accent); }
/* Sections côte à côte (moitiés, tiers, deux tiers) : l'une sous l'autre sur téléphone, côte à côte sur un écran large,
   chacune selon sa part (une rangée incomplète s'étire). Chacune devient le conteneur « page » de ses blocs : leurs
   règles @container s'appliquent à sa largeur. */
.mp-row :is(.mp-section, .mp-illustration) { container: page / inline-size; }
/* L'une sous l'autre (téléphone, tablette), une image flottante ou d'illustration passe en premier */
.mp-row { display: flex; flex-direction: column; }
.mp-row :is([data-block="image"], [data-block="illustration"]), .mp-row > :has(> :is([data-block="image"], [data-block="illustration"])) { order: -1; }
@container page (min-width: 1024px) {
  .mp-row { display: flex; flex-direction: row; }
  .mp-row :is([data-block="image"], [data-block="illustration"]), .mp-row > :has(> :is([data-block="image"], [data-block="illustration"])) { order: 0; }
  .mp-row [data-width] { flex: 3 1 0; min-width: 0; }
  .mp-row [data-width="tiers"] { flex-grow: 2; }
  .mp-row [data-width="deux-tiers"] { flex-grow: 4; }
}
/* Une image d'illustration côte à côte avec d'autres sections prend toute la hauteur de la rangée, recadrée autour de
   son point focal (hors requête : son conteneur « page » est elle-même ; l'une sous l'autre, la hauteur reste libre) */
.mp-row .mp-illustration__photo { height: 100%; object-fit: cover; }
.mp-inner { position: relative; max-width: var(--container-max); margin-inline: auto; display: grid; gap: var(--space-6); }
/* Colonne de lecture : les blocs au contenu étroit (texte, questions, documents, cantine, réseaux) sont centrés,
   titre compris, au lieu de laisser un vide à droite sur un grand écran */
.mp-section:is([data-block="text"], [data-block="faq"], [data-block="documents"], [data-block="canteen"], [data-block="social"]) > .mp-inner { max-width: 48rem; }

@container page (min-width: 1024px) {
  .mp-section { padding-block: var(--space-8); padding-inline: var(--space-6); }
}

/* Vague de transition entre deux sections : elle prend la couleur de la section suivante */
.mp-divider { display: block; height: 28px; margin-top: -27px; position: relative; z-index: 1;
  background: var(--surface);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 28' preserveAspectRatio='none'%3E%3Cpath d='M0 18C40 4 80 2 120 12s80 18 124 6 84-16 116-6v16H0z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 28' preserveAspectRatio='none'%3E%3Cpath d='M0 18C40 4 80 2 120 12s80 18 124 6 84-16 116-6v16H0z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.mp-divider--deep { background: var(--deep); }
@container page (min-width: 1024px) { .mp-divider { height: 56px; margin-top: -55px; } }

/* ---------- Titres ---------- */
/* Tous les en-têtes de section sont centrés, comme le bandeau, l'appel à l'action et les boutons */
.mp-head { display: grid; gap: var(--space-3); max-width: var(--measure); margin-inline: auto; text-align: center; justify-items: center; }
.mp-h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 38px; letter-spacing: 0.01em; color: var(--primary); text-wrap: balance; }
:is([data-bg="accent"], .mp-illustration__content) .mp-h2 { color: inherit; }
.mp-h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 23px; line-height: 28px; letter-spacing: 0.01em; text-wrap: balance; }
.mp-lead { margin: 0; font-size: 19px; line-height: 29px; font-weight: 500; }
.mp-muted { color: var(--ink-muted); }
:is([data-bg="accent"], .mp-illustration__content) .mp-muted { color: var(--on-primary); }
.mp-small { font-size: 15px; line-height: 22px; }
.mp-label { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

/* Surtitre manuscrit encadré d'éclats : la signature de Mon Préau */
.mp-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-script); font-weight: 700; font-size: calc(30px * var(--script-scale, 1)); line-height: 1.07; color: var(--secondary); width: fit-content; }
:is([data-bg="accent"], .mp-illustration__content) .mp-eyebrow, .mp-cta .mp-eyebrow { color: inherit; }
.mp-eyebrow::before, .mp-eyebrow::after {
  content: ""; width: 22px; height: 22px; flex: none; background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M3 4l7 5M2 12h9M4 20l7-4'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M3 4l7 5M2 12h9M4 20l7-4'/%3E%3C/svg%3E") no-repeat center / contain;
}
.mp-eyebrow::after { transform: scaleX(-1); }
:is([data-bg="accent"], .mp-illustration__content) .mp-eyebrow::before, :is([data-bg="accent"], .mp-illustration__content) .mp-eyebrow::after,
.mp-cta .mp-eyebrow::before, .mp-cta .mp-eyebrow::after { background: var(--accent); }
.mp-script { font-family: var(--font-script); font-weight: 700; color: var(--secondary); font-size: 1.35em; line-height: 1; }

@container page (min-width: 1024px) {
  .mp-h2 { font-size: 46px; line-height: 50px; }
  .mp-eyebrow { font-size: calc(34px * var(--script-scale, 1)); }
}

/* ---------- Petits dessins (soleil, nuages, trajet pointillé) ---------- */
/* Sur mobile, 3 dessins au plus : les autres n'apparaissent qu'à partir de 1024px */

/* ---------- Icônes (Lucide) ---------- */
.mp-ico { width: 20px; height: 20px; flex: none; stroke-width: 2.25; }
.mp-ico-lg { width: 28px; height: 28px; stroke-width: 2; }
/* L'épaisseur du trait se règle sur l'icône : le trait de chaque dessin la suit (Lucide l'écrit sur ses tracés) */
:is(.mp-ico, .mp-ico-lg) [stroke-width] { stroke-width: inherit; }
/* pastilles pleines, comme les pictogrammes des publications (icônes décoratives : le libellé porte le sens) */
.mp-disc { width: 64px; height: 64px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--primary); color: var(--on-primary); flex: none; }
/* Les pastilles alternent quatre couleurs dans une liste (cartes, chiffres clés) ; les coordonnées ont chacune la sienne */
:is(.mp-card, .mp-figure):nth-child(4n+1) .mp-disc, .mp-coords [data-coord="telephone"] .mp-disc { background: var(--rose); }
:is(.mp-card, .mp-figure):nth-child(4n+3) .mp-disc, .mp-coords [data-coord="email"] .mp-disc { background: var(--vert); }
:is(.mp-card, .mp-figure):nth-child(4n+4) .mp-disc, .mp-coords [data-coord="horaires"] .mp-disc { background: var(--secondary); }
.mp-disc--soft { background: var(--primary-soft); color: var(--primary-strong); }

/* ---------- Boutons ---------- */
.mp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
/* Tous les boutons ont la même largeur, jamais toute la largeur : un libellé trop long passe sur deux lignes */
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: min(300px, 100%); text-align: center;
  min-height: var(--tap-min); padding: 12px var(--space-5); border: 0; border-radius: var(--btn-radius, var(--radius-pill)); text-transform: var(--btn-case, none); letter-spacing: var(--btn-track, 0);
  font: 700 16px/20px var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--primary-strong); color: var(--on-primary);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.mp-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); filter: brightness(.94); }
.mp-btn:active { transform: translateY(0); box-shadow: none; }
.mp-btn--accent { background: var(--accent); color: var(--on-accent); }
.mp-btn--secondary { background: var(--secondary); color: var(--on-secondary); }
.mp-btn--ghost { background: transparent; color: var(--primary-strong); box-shadow: inset 0 0 0 2px currentColor; }
.mp-btn--ghost:hover { box-shadow: inset 0 0 0 2px currentColor; filter: none; background: var(--primary-soft); }
:is([data-bg="accent"], .mp-illustration__content) .mp-btn { background: var(--surface-card); color: var(--primary-strong); }
:is([data-bg="accent"], .mp-illustration__content) .mp-btn--accent { background: var(--accent); color: var(--on-accent); }
:is([data-bg="accent"], .mp-illustration__content) .mp-btn--ghost, .mp-cta .mp-btn--ghost { background: transparent; color: inherit; }
:is([data-bg="accent"], .mp-illustration__content) .mp-btn--ghost:hover, .mp-cta .mp-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.mp-link { color: var(--primary-strong); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
.mp-link:hover { text-decoration-color: currentColor; }
:is([data-bg="accent"], .mp-illustration__content) .mp-link { color: inherit; }

/* ---------- Badges et pastille horaire ---------- */
.mp-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px var(--space-3); width: fit-content;
  border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--primary-soft); color: var(--ink);
}
.mp-badge--vacances { background: var(--vert-soft); }
.mp-badge--reunion { background: var(--secondary-soft); }
.mp-badge--fete { background: var(--accent-soft); }
.mp-time { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 12px; border-radius: var(--radius-sm); background: var(--primary-strong); color: var(--on-primary); font-size: 14px; line-height: 16px; font-weight: 700; width: fit-content; white-space: nowrap; }
.mp-time .mp-ico { width: 16px; height: 16px; }

/* ---------- Photos ---------- */
.mp-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); background: var(--surface-alt); }
.mp-photo--square { aspect-ratio: 1; }
/* Photos et plan : rectangles aux coins légèrement arrondis, jamais découpés */
.mp-map, .mp-image__photo { border-radius: var(--radius-md); }
/* bulle organique : encarts, slogan manuscrit */

/* Photo d'exemple quand l'école n'a pas encore fourni de photo */
.mp-ph { position: relative; overflow: hidden; aspect-ratio: 4 / 3; width: 100%; background: var(--primary-soft); border-radius: var(--radius-md); }
.mp-ph::before, .mp-ph::after { content: ""; position: absolute; border-radius: var(--radius-pill); }
.mp-ph::before { width: 40%; aspect-ratio: 1; right: -6%; top: -10%; background: var(--accent); }
.mp-ph::after { width: 70%; aspect-ratio: 2 / 1; left: -10%; bottom: -18%; border-radius: 999px 999px 0 0; background: var(--primary); opacity: .75; }
/* D'une classe à l'autre, l'image de remplacement change de couleurs (rose, vert, bleu, terracotta) */
.mp-class:nth-child(4n+2) .mp-ph { background: var(--vert-soft); }
.mp-class:nth-child(4n+2) .mp-ph::after { background: var(--vert); }
.mp-class:nth-child(4n+1) .mp-ph { background: var(--rose-soft); }
.mp-class:nth-child(4n+1) .mp-ph::before { background: var(--primary); opacity: .6; }
.mp-class:nth-child(4n+1) .mp-ph::after { background: var(--rose); }
.mp-class:nth-child(4n+4) .mp-ph { background: var(--secondary-soft); }
.mp-class:nth-child(4n+4) .mp-ph::after { background: var(--secondary); opacity: .7; }

/* ==========================================================================
   1. Bandeau d'accueil
   ========================================================================== */
.mp-hero { position: relative; overflow: hidden; background: var(--surface); }
.mp-hero__body { position: relative; z-index: 1; display: grid; gap: var(--space-4); max-width: 40rem; }
/* Titre du bandeau : comme ceux des autres blocs (bleu, mise en avant terracotta), en plus grand */
.mp-hero__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 48px; letter-spacing: 0.01em; text-wrap: balance; }
.mp-hero__heading { margin: 0; display: grid; gap: var(--space-3); justify-items: center; }
.mp-hero__heading > span { display: block; }
/* d'un seul tenant tant qu'elle tient sur une ligne (« Saint-Martin » ne se coupe pas au trait d'union) */
.mp-hero__title em { display: inline-block; max-width: 100%; font-style: normal; color: var(--secondary); }

/* Un seul bandeau : le ciel (dégradé, logo, mot manuscrit, petits dessins). Avec une photo, elle passe sous le texte,
   comme une image d'illustration : toute la largeur, entière et nette. */
.mp-hero { display: grid; gap: var(--space-7); background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 62%, var(--surface) 100%); padding: var(--space-6) var(--space-4) var(--space-8); text-align: center; }
.mp-hero .mp-hero__body { margin-inline: auto; justify-items: center; width: 100%; grid-template-columns: minmax(0, 1fr); }
.mp-hero__logo { width: 132px; height: auto; }
/* Le mot d'accueil : en manuscrit terracotta, légèrement penché, au-dessus du titre */
.mp-hero__script { margin: 0; font-family: var(--font-script); font-weight: 700; font-size: calc(64px * var(--script-scale, 1)); line-height: .9; color: var(--hero-accent, var(--secondary)); transform: rotate(calc(-4deg * var(--script-tilt, 1))); }
/* Sur le ciel, le bouton secondaire a un fond blanc : lisible quelle que soit la teinte du dégradé derrière lui */
.mp-hero .mp-btn--ghost { background: var(--surface-card); }
/* Sur le ciel, les textes prennent les versions foncées : la couleur principale n'y est pas assez lisible */
/* Sur le haut du ciel (le plus foncé), titre et mot d'accueil prennent une version plus foncée de leur couleur :
   3:1 au moins, même quand le texte remonte haut sur un petit écran */
.mp-hero { --hero-ink: color-mix(in srgb, var(--primary-strong) 82%, #000); --hero-accent: color-mix(in srgb, var(--secondary) 80%, #000); }
.mp-hero .mp-hero__title { color: var(--hero-ink); }
.mp-hero .mp-hero__title em { color: var(--hero-accent); }
/* Avec une photo, le ciel descend jusqu'à la couleur du ciel de la photo (--photo-top, relevée par le serveur) :
   la jonction se fait dans le ciel, jamais sur la photo */
.mp-hero:has(.mp-hero__media) { gap: 0; padding: 0; background: var(--surface); }
/* z-index: auto : le texte ne passe pas devant les petits dessins du ciel (ses enfants restent devant eux) */
.mp-hero:has(.mp-hero__media) .mp-hero__body { z-index: auto; max-width: none; padding: var(--space-6) max(var(--space-4), calc((100% - 40rem) / 2)) var(--space-7);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 55%, var(--photo-top) 100%); }
.mp-hero__media { position: relative; z-index: 1; width: 100%; }
.mp-hero__photo { display: block; height: auto; aspect-ratio: auto; border-radius: 0; }

@container page (min-width: 1024px) {
  .mp-hero__title { font-size: 68px; line-height: 70px; }
  /* sans photo, juste ce qu'il faut sous le texte : la section suivante a déjà sa propre marge */
  .mp-hero { padding: var(--space-7) var(--space-6) var(--space-6); }
  .mp-hero__script { font-size: calc(104px * var(--script-scale, 1)); }
  .mp-hero__logo { width: 180px; }
  .mp-hero:has(.mp-hero__media) { padding: 0; }
  .mp-hero:has(.mp-hero__media) .mp-hero__body { padding-block: var(--space-7); }
}

/* ==========================================================================
   2. Texte
   ========================================================================== */
/* Tout est centré dans ce thème, le texte aussi ; les listes restent alignées à gauche (puces), en un bloc centré */
.mp-prose { max-width: var(--measure); margin-inline: auto; display: grid; gap: var(--space-4); text-align: center; }
.mp-prose :is(ul, ol) { justify-self: center; text-align: left; }
.mp-prose > * { margin: 0; }
.mp-prose h3 { font-family: var(--font-display); font-weight: 400; font-size: 23px; line-height: 28px; margin-top: var(--space-3); color: var(--ink); }
.mp-prose a { color: var(--primary-strong); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
:is([data-bg="accent"], .mp-illustration__content) .mp-prose a { color: inherit; }
.mp-prose ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.mp-prose ul li { position: relative; padding-left: 28px; }
.mp-prose ul li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 14px; height: 12px; background: var(--rose);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M7 12 1.3 6.4A3.3 3.3 0 0 1 7 2.2a3.3 3.3 0 0 1 5.7 4.2z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M7 12 1.3 6.4A3.3 3.3 0 0 1 7 2.2a3.3 3.3 0 0 1 5.7 4.2z'/%3E%3C/svg%3E") no-repeat center / contain; }
.mp-prose ol { padding-left: 1.4em; display: grid; gap: var(--space-2); }
.mp-prose ol li::marker { color: var(--secondary); font-family: var(--font-display); }
/* Citation dans le texte : une phrase en grand manuscrit, centrée */
.mp-prose blockquote { margin: var(--space-3) 0; text-align: center; font-family: var(--font-script); font-weight: 700; font-size: calc(40px * var(--script-scale, 1)); line-height: 1.05; color: var(--primary-strong); text-wrap: balance; }
.mp-prose blockquote p { margin: 0; }
@container page (min-width: 1024px) { .mp-prose blockquote { font-size: calc(52px * var(--script-scale, 1)); } }
:is([data-bg="accent"], .mp-illustration__content) .mp-prose blockquote { color: inherit; }

/* ==========================================================================
   3. Image
   ========================================================================== */
/* Image : la photo dans son format, coins arrondis, légende manuscrite */
.mp-image { margin: 0; display: grid; gap: var(--space-3); }
.mp-image__photo { aspect-ratio: auto; }
.mp-image__link { display: block; border-radius: var(--radius-md); }
.mp-image__caption { text-align: center; font-family: var(--font-script); font-weight: 700; font-size: calc(24px * var(--script-scale, 1)); line-height: 1.1; color: var(--secondary); }
:is([data-bg="accent"], .mp-illustration__content) .mp-image__caption { color: inherit; }

/* ==========================================================================
   4. Cartes
   ========================================================================== */
.mp-cards { display: grid; gap: var(--space-4); grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
.mp-card { position: relative; display: grid; gap: var(--space-3); align-content: start; padding: var(--space-5); background: var(--surface-card); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.mp-card .mp-photo, .mp-card .mp-ph { border-radius: var(--radius-md); aspect-ratio: 16 / 10; }
.mp-card--image { padding: var(--space-3) var(--space-3) var(--space-5); }
.mp-card--image > :not(.mp-photo):not(.mp-ph) { margin-inline: var(--space-3); }
.mp-card p { margin: 0; }
.mp-card__more { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--primary-strong); font-weight: 700; font-size: 15px; }
.mp-card--link { transition: transform .18s ease, box-shadow .18s ease; }
.mp-card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.mp-card--link a { text-decoration: none; }
.mp-card--link a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.mp-card--link a:focus-visible { outline: none; }
.mp-card--link:has(a:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.mp-cards:has(> li:nth-child(5)) { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--space-4) var(--space-5); margin-inline: calc(var(--space-4) * -1); scroll-padding-inline: var(--space-4); }
.mp-cards:has(> li:nth-child(5)) > * { scroll-snap-align: start; }
@container page (min-width: 640px) {
  .mp-cards, .mp-cards:has(> li:nth-child(5)) { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin-inline: 0; padding: 0; gap: var(--space-5); }
}
@container page (min-width: 1024px) {
  .mp-cards:has(> li:nth-child(3)) { grid-template-columns: repeat(3, 1fr); }
  .mp-cards:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   5. Chiffres clés
   ========================================================================== */
.mp-figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-4); list-style: none; margin: 0; padding: 0; }
.mp-figure { display: grid; gap: var(--space-1); align-content: start; justify-items: center; text-align: center; }
.mp-figure__value { font-family: var(--font-display); font-weight: 400; font-size: 56px; line-height: 56px; color: var(--secondary); font-variant-numeric: tabular-nums; }
:is([data-bg="accent"], .mp-illustration__content) .mp-figure__value { color: var(--accent); }
.mp-figure__label { font-weight: 600; }
.mp-figure .mp-disc { width: 52px; height: 52px; margin-bottom: var(--space-2); }
@container page (min-width: 768px) {
  .mp-figures { grid-template-columns: repeat(var(--n, 4), 1fr); }
  .mp-figure__value { font-size: 76px; line-height: 76px; }
}

/* ==========================================================================
   6. Galerie
   ========================================================================== */
.mp-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.mp-gallery button { all: unset; display: block; cursor: zoom-in; border-radius: var(--radius-md); overflow: hidden; }
.mp-gallery button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.mp-gallery .mp-photo, .mp-gallery .mp-ph { border-radius: var(--radius-md); aspect-ratio: 1; transition: transform .3s ease; }
.mp-gallery button:hover .mp-photo { transform: scale(1.05); }
.mp-gallery-more { justify-self: center; }
@container page (min-width: 640px) { .mp-gallery { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); } }
@container page (min-width: 1024px) { .mp-gallery { grid-template-columns: repeat(4, 1fr); } }
.mp-lightbox { position: relative; background: var(--deep); color: var(--on-deep); border-radius: var(--radius-lg); padding: var(--space-4); display: grid; gap: var(--space-3); --ring: var(--accent); }
.mp-lightbox__bar, .mp-lightbox__nav { display: flex; justify-content: space-between; align-items: center; }
.mp-lightbox .mp-photo { border-radius: var(--radius-md); }
.mp-icon-btn { display: inline-grid; place-items: center; width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-pill); border: 0; background: rgba(255, 255, 255, 0.14); color: inherit; cursor: pointer; }

/* ==========================================================================
   7. Appel à l'action
   ========================================================================== */
/* Toujours la bulle de Saint-Martin : couleur principale, forme organique, petites bulles au-dessus */
.mp-cta { position: relative; display: grid; gap: var(--space-4); max-width: 40rem; margin-inline: auto; text-align: center; justify-items: center; padding: var(--space-8) var(--space-6); background: var(--primary-strong); color: var(--on-primary); border-radius: 58% 42% 54% 46% / 52% 44% 56% 48%; --ring: var(--accent); }
.mp-cta__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 36px; text-wrap: balance; }
.mp-cta > * { position: relative; z-index: 1; }
/* Sur un fond mis en avant, la section porte déjà la couleur : la bulle s'efface */
:is([data-bg="accent"], .mp-illustration__content) .mp-cta { background: none; padding: var(--space-4) 0; border-radius: 0; }
:is([data-bg="accent"], .mp-illustration__content) .mp-cta::before { content: none; }
@container page (min-width: 1024px) {
  .mp-cta__title { font-size: 44px; line-height: 48px; }
  .mp-cta { padding: var(--space-9) var(--space-8); }
}

/* ==========================================================================
   8. Intégration (iframe)
   ========================================================================== */
.mp-embed { display: grid; gap: var(--space-3); }
.mp-embed__frame { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-card); box-shadow: var(--shadow-card); }
.mp-embed__consent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--space-3); padding: var(--space-5); text-align: center; background: var(--surface-alt); }
.mp-embed__consent p { margin: 0; max-width: 28rem; }
.mp-embed__fake { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; }
.mp-embed__fake-bar { padding: var(--space-3) var(--space-4); border-bottom: 2px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; gap: var(--space-3); }
.mp-embed__fake-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2); padding: var(--space-3); }
.mp-embed__fake-grid span { background: var(--surface-alt); border-radius: var(--radius-sm); }
.mp-embed__out { display: inline-flex; align-items: center; gap: var(--space-2); justify-self: start; }

/* ==========================================================================
   9. Documents
   ========================================================================== */
.mp-docs { list-style: none; margin: 0; padding: var(--space-2); display: grid; gap: 2px; background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.mp-doc a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; overflow-wrap: anywhere; gap: var(--space-4); align-items: center; min-height: 72px; padding: var(--space-3); text-decoration: none; color: inherit; border-radius: var(--radius-md); }
.mp-doc + .mp-doc a { box-shadow: 0 -2px 0 var(--line); }
.mp-doc a:hover { background: var(--surface-alt); box-shadow: none; }
.mp-doc a:hover .mp-doc__dl { background: var(--primary-strong); color: var(--on-primary); }
.mp-doc__ico { width: 48px; height: 48px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); }
.mp-doc__name { font-weight: 700; display: block; }
.mp-doc__meta { font-size: 15px; line-height: 22px; color: var(--ink-muted); display: block; }
.mp-doc__dl { width: 40px; height: 40px; border-radius: var(--radius-pill); display: grid; place-items: center; color: var(--primary-strong); box-shadow: inset 0 0 0 2px currentColor; transition: background-color .15s ease; }

/* ==========================================================================
   10. FAQ
   ========================================================================== */
.mp-faq { display: grid; gap: var(--space-3); }
.mp-faq details { border-radius: var(--radius-md); background: var(--surface-card); color: var(--ink); box-shadow: var(--shadow-card); }
.mp-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); min-height: var(--tap-min); padding: var(--space-4) var(--space-5); font-weight: 700; font-size: 17px; line-height: 24px; border-radius: var(--radius-md); }
.mp-faq summary::-webkit-details-marker { display: none; }
.mp-faq summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.mp-faq__plus { flex: none; width: 34px; height: 34px; border-radius: var(--radius-pill); background: var(--primary-strong); color: var(--on-primary); display: grid; place-items: center; transition: transform .2s ease, background-color .2s ease; }
.mp-faq details[open] .mp-faq__plus { transform: rotate(45deg); background: var(--secondary); }
.mp-faq__a { padding: 0 var(--space-5) var(--space-5); }

/* ==========================================================================
   11. Réseaux sociaux
   ========================================================================== */
.mp-social { display: grid; gap: var(--space-3); }
.mp-social__btn { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-4); min-height: 76px; padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease; }
.mp-social__btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.mp-social__btn strong { display: block; font-size: 17px; }
.mp-social__btn span span { display: block; color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.mp-social__btn .mp-disc { width: 52px; height: 52px; }
.mp-social__btn > .mp-ico { color: var(--primary-strong); }
.mp-social__btn[data-network="instagram"] .mp-disc { background: var(--rose); }
@container page (min-width: 768px) { .mp-social { grid-template-columns: 1fr 1fr; max-width: none; } }

/* ==========================================================================
   12. Contact + plan
   ========================================================================== */
.mp-contact { display: grid; gap: var(--space-7); }
.mp-coords { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.mp-coords li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: center; }
.mp-coords .mp-disc { width: 48px; height: 48px; }
.mp-coords a { font-weight: 700; color: var(--primary-strong); text-underline-offset: 4px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.mp-coords__k { display: block; font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.mp-map { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background-color: var(--surface-alt);
  background-image: linear-gradient(var(--surface-card) 3px, transparent 3px), linear-gradient(90deg, var(--surface-card) 3px, transparent 3px); background-size: 46px 46px; }
.mp-map__frame { position: relative; }
/* Le marqueur de l'école, au centre du plan : une goutte dans la couleur secondaire, la pointe sur l'adresse */
.mp-map__frame::after { content: ""; position: absolute; left: calc(50% - 20px); top: calc(50% - 48px); width: 40px; height: 40px; rotate: -45deg;
  border: 4px solid var(--surface-card); border-radius: 999px 999px 999px 0; background: radial-gradient(circle, var(--surface-card) 0 5px, var(--secondary) 6px); box-shadow: var(--shadow-card); pointer-events: none; }
.mp-map-wrap { display: grid; gap: var(--space-3); }
@container page (min-width: 1024px) {
  .mp-contact { grid-template-columns: 5fr 7fr; column-gap: var(--space-8); }
  .mp-contact__map { grid-column: 1; }
  .mp-contact__form { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Formulaires ---------- */
.mp-form { display: grid; gap: var(--space-4); }
.mp-form--card { background: var(--surface-card); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-card); }
.mp-field { display: grid; gap: 6px; }
.mp-field > label, .mp-field__label { font-weight: 700; font-size: 15px; line-height: 22px; }
.mp-field__opt { font-weight: 500; color: var(--ink-muted); }
.mp-input { width: 100%; min-height: var(--tap-min); padding: 11px 14px; font: 500 17px/24px var(--font-body); color: var(--ink); background: var(--surface-card); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); }
.mp-input:hover { border-color: var(--primary-strong); }
.mp-input:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-color: var(--primary-strong); }
textarea.mp-input { min-height: 140px; resize: vertical; }
/* Flèche de la liste déroulante : deux traits dans la couleur principale (elle suit la palette de l'école) */
select.mp-input { appearance: none; padding-right: 44px; background-repeat: no-repeat;
  background-image: linear-gradient(45deg, transparent 50%, var(--primary-strong) 50%, var(--primary-strong) calc(50% + 2.5px), transparent calc(50% + 2.5px)), linear-gradient(-45deg, transparent 50%, var(--primary-strong) 50%, var(--primary-strong) calc(50% + 2.5px), transparent calc(50% + 2.5px));
  background-size: 8px 8px; background-position: right 24px center, right 17px center; }
.mp-field__help { font-size: 15px; line-height: 22px; color: var(--ink-muted); display: flex; justify-content: space-between; gap: var(--space-3); }
.mp-field--error .mp-input { border-color: var(--danger); }
.mp-field__error { display: flex; gap: var(--space-2); align-items: start; margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--danger); }
.mp-contact__form { scroll-margin-top: var(--space-6); }
.mp-alert { display: flex; gap: var(--space-3); align-items: start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.mp-alert--ok { background: var(--vert-soft); color: var(--ink); }

/* ==========================================================================
   13. Liste des classes
   ========================================================================== */
/* Pas d'écart vertical dans la grille (les cartes y partagent leurs lignes) : une marge sépare les cartes empilées */
.mp-classes { display: grid; column-gap: var(--space-5); row-gap: 0; list-style: none; margin: 0 0 calc(var(--space-5) * -1); padding: 0; }
/* Carte de classe : la photo, les niveaux en titre, le nom en manuscrit s'il y en a un, l'équipe une personne par ligne,
   la présentation. Les cartes d'une même rangée partagent leurs lignes (subgrid) : titres, équipes et présentations
   commencent à la même hauteur d'une carte à l'autre. */
.mp-class { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; margin-bottom: var(--space-5); background: var(--surface-card); color: var(--ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.mp-class .mp-ph, .mp-class .mp-photo { grid-row: 1; border-radius: 0; aspect-ratio: 16 / 10; }
.mp-class__body { display: contents; }
.mp-class .mp-h3 { grid-row: 2; padding: var(--space-4) var(--space-5) 0; }
.mp-class__name { grid-row: 3; margin: 0; padding: 2px var(--space-5) 0; font-family: var(--font-script); font-weight: 700; font-size: calc(22px * var(--script-scale, 1)); line-height: 1.1; color: var(--secondary); }
.mp-class__team { grid-row: 4; list-style: none; margin: 0; padding: var(--space-3) var(--space-5) 0; display: grid; align-content: start; gap: 4px; color: var(--ink); font-size: 15px; line-height: 22px; }
.mp-class__team li { display: flex; align-items: center; gap: var(--space-2); }
.mp-class__team .mp-ico { width: 16px; height: 16px; flex: none; color: var(--primary-strong); }
.mp-class__presentation { grid-row: 5; margin: 0; padding: var(--space-3) var(--space-5) var(--space-5); color: var(--ink-muted); font-size: 15px; line-height: 23px; }
@container page (min-width: 640px) { .mp-classes { grid-template-columns: repeat(2, 1fr); } }
@container page (min-width: 1024px) { .mp-classes--4 { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   14. Équipe
   ========================================================================== */
.mp-team { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-4); list-style: none; margin: 0; padding: 0; }
.mp-person { display: grid; justify-items: center; text-align: center; gap: var(--space-1); }
.mp-avatar { width: 112px; height: 112px; margin-bottom: var(--space-2); border-radius: 56% 44% 52% 48% / 48% 54% 46% 52%; overflow: hidden; display: grid; place-items: center; background: var(--primary-soft); font-family: var(--font-display); font-size: 38px; color: var(--primary-strong); }
.mp-avatar--2 { background: var(--rose-soft); color: var(--secondary); }
.mp-avatar--3 { background: var(--vert-soft); color: var(--ink); }
.mp-avatar--4 { background: var(--accent-soft); color: var(--secondary); }
.mp-person__name { font-weight: 700; font-size: 17px; line-height: 24px; }
.mp-person__role { font-size: 15px; line-height: 22px; color: var(--ink-muted); }
@container page (min-width: 640px) { .mp-team { grid-template-columns: repeat(3, 1fr); } }
@container page (min-width: 1024px) { .mp-team { grid-template-columns: repeat(5, 1fr); } }

/* ==========================================================================
   15. Prochains événements
   ========================================================================== */
.mp-events { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
/* align-content: start : dans des cartes de même hauteur, la date et le texte restent en haut, au même endroit d'une carte à l'autre */
.mp-event { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; align-content: start; padding: var(--space-4); background: var(--surface-card); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.mp-date { width: 68px; padding: 10px 0 8px; border-radius: var(--radius-md); display: grid; justify-items: center; text-align: center; background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary-soft); }
.mp-date__d { font-family: var(--font-display); font-size: 34px; line-height: 34px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.mp-date__m { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-strong); }
.mp-event__body { display: grid; gap: var(--space-2); }
.mp-event__title { margin: 0; font-weight: 700; font-size: 17px; line-height: 24px; }
.mp-event__meta { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 15px; line-height: 22px; color: var(--ink-muted); align-items: center; }
.mp-event__meta > span:not(.mp-time) { display: inline-flex; align-items: center; gap: 6px; }
.mp-event__meta .mp-ico { width: 16px; height: 16px; }
/* Prochains rendez-vous : des cartes au même gabarit. En haut, la date (pastille de taille fixe) et la catégorie ;
   puis le titre ; puis les détails, l'horaire jamais coupé en deux. */
.mp-events:not(.mp-events--list) .mp-event { grid-template-columns: 68px minmax(0, 1fr); column-gap: var(--space-4); row-gap: var(--space-3); }
.mp-events:not(.mp-events--list) .mp-event__body { display: contents; }
.mp-events:not(.mp-events--list) .mp-date { grid-column: 1; grid-row: 1; height: 68px; padding: 0; align-content: center; }
.mp-events:not(.mp-events--list) .mp-event__body > .mp-badge { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
.mp-events:not(.mp-events--list) .mp-event__title { grid-column: 1 / -1; grid-row: 2; }
.mp-events:not(.mp-events--list) .mp-event__meta { grid-column: 1 / -1; grid-row: 3; flex-direction: column; align-items: flex-start; }
.mp-events:not(.mp-events--list) .mp-time { white-space: nowrap; }
.mp-empty { display: flex; gap: var(--space-3); align-items: center; margin: 0; padding: var(--space-5); border: 2px dashed var(--rose); border-radius: var(--radius-lg); color: var(--ink-muted); }
@container page (min-width: 768px) {
  .mp-events { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
  .mp-event { padding: var(--space-5); }
  /* côte à côte, le titre garde deux lignes : les détails s'alignent d'une carte à l'autre */
  .mp-events:not(.mp-events--list) .mp-event__title { min-height: 48px; }
}

/* ==========================================================================
   16. Menu de la cantine : une carte, le jour à la main, les plats séparés de pointillés
   ========================================================================== */
.mp-canteen { display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface-card); color: var(--ink); box-shadow: var(--shadow-card); }
.mp-canteen__day { margin: 0; font-family: var(--font-script); font-weight: 700; font-size: calc(32px * var(--script-scale, 1)); line-height: 1.1; color: var(--secondary); }
.mp-canteen__group { display: grid; gap: var(--space-2); }
.mp-canteen__title { margin: 0; font-size: 20px; color: var(--primary-strong); }
.mp-canteen__dishes { list-style: none; margin: 0; padding: 0; }
.mp-canteen__dish { padding: var(--space-3) 0; font-weight: 700; font-size: 17px; line-height: 24px; }
.mp-canteen__dish + .mp-canteen__dish { border-top: 2px dashed var(--rose); }
.mp-canteen__dish + .mp-canteen__dish--alt { border-top: 0; padding-top: 0; }
.mp-canteen__connector { font-family: var(--font-script); font-size: calc(22px * var(--script-scale, 1)); color: var(--secondary); }
.mp-canteen__extra { display: block; font-weight: 400; font-size: 15px; line-height: 22px; color: var(--ink-muted); }
.mp-canteen__labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mp-canteen__label { padding: 2px 10px; border-radius: var(--radius-pill); background: var(--vert-soft); color: var(--ink); font-size: 12px; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; }
.mp-canteen__note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.mp-canteen .mp-actions { margin: 0; }

/* ==========================================================================
   En-tête et pied de page
   ========================================================================== */
/* Une ancre (#horaires…) ou un élément atteint au clavier s'arrête sous l'en-tête fixe, pas derrière */
html { scroll-padding-top: 88px; }
.mp-page [id] { scroll-margin-top: 88px; }
/* L'en-tête reste en haut de l'écran pendant le défilement */
.mp-header { position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(20, 45, 65, 0.08); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); padding: var(--space-2) var(--space-4); background: var(--surface); }
.mp-brand { display: flex; align-items: center; min-height: 44px; margin-right: auto; text-decoration: none; }
.mp-brand img { height: 56px; width: auto; }
.mp-nav { display: none; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.mp-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-pill); text-decoration: none; font-weight: 700; font-size: 15px; color: var(--ink); }
.mp-nav a:hover { background: var(--surface-alt); }
/* La page en cours : pas seulement une couleur, un soulignement aussi */
.mp-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-strong); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* Sous-menus (ordinateur) : au survol de l'entrée, ou ouverts par leur bouton ; Échap les referme (data-dismissed) */
.mp-nav-wrap { display: contents; }
.mp-nav > li { position: relative; display: flex; align-items: center; }
.mp-nav a[data-in-section] { color: var(--primary-strong); }
.mp-nav__toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -14px; padding: 0; border: 0; border-radius: var(--radius-pill); background: none; color: inherit; cursor: pointer; }
.mp-nav__toggle .mp-ico { width: 16px; height: 16px; transition: transform .15s ease; }
.mp-nav__toggle[aria-expanded="true"] .mp-ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .mp-nav__toggle .mp-ico { transition: none; } }
.mp-nav__sub { position: absolute; top: 100%; left: 0; z-index: 40; display: none; min-width: 220px; margin: 0; padding: var(--space-2); list-style: none;
  background: var(--surface-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lift, 0 12px 28px rgba(20, 45, 65, 0.18)); }
.mp-nav__sub a { display: flex; width: 100%; border-radius: var(--radius-sm); }
.mp-nav__parent:is(:hover, :has(.mp-nav__toggle[aria-expanded="true"])):not([data-dismissed]) .mp-nav__sub { display: block; }
/* le survol ne se perd pas dans l'espace entre l'entrée et le sous-menu */
.mp-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }

.mp-header__social { display: flex; gap: var(--space-2); }
.mp-header__social a { width: 44px; height: 44px; border-radius: var(--radius-pill); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); transition: background-color .15s ease, color .15s ease; }
.mp-header__social a:hover { background: var(--primary-strong); color: var(--on-primary); }
.mp-burger { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary-strong); font: 700 15px/20px var(--font-body); cursor: pointer; }
.mp-header .mp-btn { display: none; }
/* Le menu mobile s'ouvre juste sous l'en-tête fixe, quel que soit le défilement, et défile seul s'il est long */
.mp-drawer { position: fixed; top: var(--header-h); inset-inline: 0; bottom: 0; z-index: 29; overflow-y: auto; overscroll-behavior: contain; background: var(--deep); color: var(--on-deep); padding: var(--space-5) var(--space-4) var(--space-7); display: grid; gap: var(--space-5); --ring: var(--accent); }
.mp-drawer ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mp-drawer li a { display: flex; justify-content: space-between; align-items: center; min-height: 58px; border-bottom: 2px dashed rgba(255, 255, 255, 0.22); font-family: var(--font-display); font-size: 26px; letter-spacing: .01em; text-decoration: none; color: inherit; }
.mp-drawer li a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.mp-drawer .mp-btn { background: var(--accent); color: var(--on-accent); }
@container page (min-width: 1024px) {
  .mp-header { padding: var(--space-3) var(--space-6); min-height: 96px; }
  .mp-page [id] { scroll-margin-top: 112px; }
  .mp-brand img { height: 72px; }
  .mp-nav { display: flex; }
  .mp-burger { display: none; }
  .mp-header .mp-btn { display: inline-flex; }
}
.mp-footer { position: relative; background: var(--deep); color: var(--on-deep); padding: var(--space-7) var(--space-4) var(--space-5); --ring: var(--accent); }
.mp-footer__grid { max-width: var(--container-max); margin-inline: auto; display: grid; gap: var(--space-6); }
.mp-footer h2 { margin: 0 0 var(--space-3); font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .01em; }
.mp-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.mp-footer a { color: var(--on-deep); text-underline-offset: 4px; }
.mp-footer p { margin: 0; color: var(--on-deep-muted); }
.mp-footer__script { font-family: var(--font-script); font-weight: 700; font-size: calc(30px * var(--script-scale, 1)); line-height: 1.07; color: var(--on-deep); }
.mp-footer__social { display: flex; gap: var(--space-3); }
.mp-footer__social a { width: 48px; height: 48px; border-radius: var(--radius-pill); display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); }
.mp-footer__legal { max-width: var(--container-max); margin: var(--space-6) auto 0; padding-top: var(--space-4); border-top: 2px dashed rgba(255, 255, 255, 0.22); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); font-size: 14px; color: var(--on-deep-muted); }
@container page (min-width: 768px) { .mp-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ==========================================================================
   Axes de thème : posés en attributs sur <html> par le thème actif
   data-radius · data-btn · data-shape · data-cards · data-eyebrow · data-sep · data-deco
   ========================================================================== */

/* ---------- Polices (catalogue d'associations) ---------- */
.mp-h2, .mp-h3, .mp-hero__title, .mp-cta__title, .mp-figure__value, .mp-date__d, .mp-drawer li a, .mp-footer h2, .mp-avatar, .mp-prose h3, .bo-top__title { font-weight: var(--display-weight, 400); letter-spacing: var(--display-track, 0.01em); }
.mp-hero__script, .mp-prose blockquote, .mp-footer__script, .mp-eyebrow, .mp-script { font-style: var(--script-style, normal); font-weight: var(--script-weight, 700); }

/* ---------- Arrondis ---------- */
html[data-radius="moyen"] { --radius-sm: 8px; --radius-md: 14px; --radius-lg: 22px; }
html[data-radius="net"] { --radius-sm: 4px; --radius-md: 6px; --radius-lg: 10px; }

/* ---------- Boutons ---------- */
html[data-btn="arrondi"] { --btn-radius: var(--radius-sm); }
html[data-btn="carre"] { --btn-radius: 2px; }
html[data-btn-case="caps"] { --btn-case: uppercase; --btn-track: 0.08em; }
html[data-btn-case="caps"] .mp-btn { font-size: 14px; }

/* ---------- Bulles (slogan du bandeau, appel à l'action) ---------- */
html[data-shape="arche"] .mp-cta { border-radius: 999px 999px var(--radius-md) var(--radius-md) / 50% 50% var(--radius-md) var(--radius-md); }
html[data-shape="arrondi"] .mp-cta { border-radius: var(--radius-lg); }
html[data-shape="droit"] .mp-cta { border-radius: 0; }
html[data-shape="arche"] .mp-avatar, html[data-shape="arrondi"] .mp-avatar { border-radius: var(--radius-pill); }
html[data-shape="droit"] .mp-avatar { border-radius: var(--radius-sm); }

/* ---------- Cartes ---------- */
html[data-cards="contour"] :is(.mp-card, .mp-class, .mp-event, .mp-faq details, .mp-docs, .mp-form--card, .mp-social__btn, .mp-embed__frame) { box-shadow: none; border: 2px solid var(--ink); }
html[data-cards="contour"] .mp-card--link:hover, html[data-cards="contour"] .mp-social__btn:hover { box-shadow: var(--shadow-lift); }
html[data-cards="contour"] .mp-date { box-shadow: none; border: 2px solid var(--ink); background: var(--accent-soft); }
html[data-cards="plat"] :is(.mp-card, .mp-class, .mp-event, .mp-faq details, .mp-docs, .mp-form--card, .mp-social__btn, .mp-embed__frame) { box-shadow: none; background: var(--primary-soft); }
html[data-cards="plat"] [data-bg="alterne"] :is(.mp-card, .mp-class, .mp-event, .mp-faq details, .mp-docs, .mp-form--card) { background: var(--surface-card); }
html[data-cards="plat"] .mp-date { box-shadow: none; background: var(--surface-card); }
html[data-cards="plat"] .mp-card--link:hover { box-shadow: none; transform: translateY(-3px); background: var(--vert-soft); }

/* ---------- Surtitre ---------- */
html[data-eyebrow="caps"] .mp-eyebrow, html[data-script="aucune"] .mp-eyebrow { font-family: var(--font-body); font-style: normal; font-weight: 700; font-size: 13px; line-height: 16px; letter-spacing: 0.14em; text-transform: uppercase; gap: 12px; }
html[data-eyebrow="caps"] .mp-eyebrow::before, html[data-script="aucune"] .mp-eyebrow::before { width: 28px; height: 3px; border-radius: 3px; -webkit-mask: none; mask: none; background: var(--accent); }
html[data-eyebrow="caps"] .mp-eyebrow::after, html[data-script="aucune"] .mp-eyebrow::after { display: none; }

/* ---------- Séparation des sections ---------- */
html[data-sep="aucune"] .mp-divider { display: none; }

/* ---------- Jeux de petits dessins ---------- */

/* ==========================================================================
   Petits dessins du bandeau « Illustré » (data-deco) et bulles
   Du CSS seul : les dessins sont des images du thème (images/), posées par les pseudo-éléments
   du bandeau, un par couleur. 3 dessins au plus sur téléphone, les autres dès 1024 px ;
   toujours dans les marges, sous le texte.
   ========================================================================== */
.mp-hero .mp-hero__body { position: static; }
.mp-hero .mp-hero__body > * { position: relative; z-index: 1; }
.mp-hero::before, .mp-hero::after, .mp-hero .mp-hero__body::before, .mp-hero .mp-hero__body::after {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--d-color, transparent);
  -webkit-mask-image: var(--d-img); mask-image: var(--d-img);
  -webkit-mask-position: var(--d-pos); mask-position: var(--d-pos);
  -webkit-mask-size: var(--d-size); mask-size: var(--d-size);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* Ciel : soleil, nuages ; trajet et avion en papier sur ordinateur */
html[data-deco="ciel"] .mp-hero::before { content: ""; --d-color: var(--accent); --d-img: url("images/soleil.svg"); --d-pos: left 10px top 18px; --d-size: 64px 64px; }
html[data-deco="ciel"] .mp-hero::after { content: ""; --d-color: var(--surface-card); --d-img: url("images/nuage.svg"); --d-pos: right -18px top 22px; --d-size: 96px 56px; }
html[data-deco="ciel"] .mp-hero .mp-hero__body::before { content: ""; --d-color: var(--surface-card); --d-img: url("images/nuage.svg"); --d-pos: left 6px top 150px; --d-size: 62px 36px; }
@container page (min-width: 1024px) {
  html[data-deco="ciel"] .mp-hero::after { --d-img: url("images/nuage.svg"), url("images/nuage.svg"); --d-pos: right -18px top 22px, right 40px top 178px; --d-size: 96px 56px, 70px 40px; }
  html[data-deco="ciel"] .mp-hero .mp-hero__body::after { content: ""; --d-color: var(--primary-strong); --d-img: url("images/trajet.svg"), url("images/avion.svg"); --d-pos: right 8px top 300px, right 6px top 288px; --d-size: 90px 45px, 30px 24px; }
}

/* Nature : brin, feuille, fleur ; un second brin sur ordinateur */
html[data-deco="nature"] .mp-hero::before { content: ""; --d-color: var(--primary); --d-img: url("images/brin.svg"); --d-pos: left 14px top 14px; --d-size: 50px 76px; }
html[data-deco="nature"] .mp-hero::after { content: ""; --d-color: var(--vert); --d-img: url("images/feuille.svg"); --d-pos: right 14px top 24px; --d-size: 44px 44px; }
html[data-deco="nature"] .mp-hero .mp-hero__body::before { content: ""; --d-color: var(--rose); --d-img: url("images/fleur.svg"); --d-pos: left 40px top 112px; --d-size: 34px 34px; }
html[data-deco="nature"] .mp-hero .mp-hero__body::after { content: ""; --d-color: var(--accent); --d-img: url("images/fleur-coeur.svg"); --d-pos: left 40px top 112px; --d-size: 34px 34px; }
@container page (min-width: 1024px) {
  html[data-deco="nature"] .mp-hero::before { --d-img: url("images/brin.svg"), url("images/brin.svg"); --d-pos: left 14px top 14px, right 5% top 220px; --d-size: 50px 76px, 70px 106px; }
}

/* Formes : disque, anneau, pastille ; un demi-rond sur ordinateur (dégradés, sans image) */
html[data-deco="geo"] .mp-hero::before {
  content: ""; -webkit-mask: none; mask: none; background-color: transparent; background-repeat: no-repeat;
  background-image:
    radial-gradient(circle closest-side, var(--accent) calc(100% - 1px), transparent 100%),
    radial-gradient(circle closest-side, transparent calc(100% - 5.5px), var(--primary) calc(100% - 5px) calc(100% - 1px), transparent 100%),
    radial-gradient(circle closest-side, var(--rose) calc(100% - 1px), transparent 100%);
  background-position: right -36px top -36px, left 18px top 28px, left 66px top 120px;
  background-size: 112px 112px, 44px 44px, 14px 14px;
}
@container page (min-width: 1024px) {
  html[data-deco="geo"] .mp-hero::after {
    content: ""; -webkit-mask: none; mask: none; background: radial-gradient(circle at 50% 100%, var(--secondary) 89.5px, transparent 90px) right 7% bottom 0 / 180px 90px no-repeat;
  }
}

/* Bulles de la forme en vague, dans la couleur principale, au-dessus de l'appel à l'action */
.mp-cta::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  -webkit-mask: url("images/bulles.svg") center / contain no-repeat; mask: url("images/bulles.svg") center / contain no-repeat;
}
.mp-cta::before { left: 10%; top: -44px; width: 76px; height: 50px; background: var(--primary); }
@container page (min-width: 1024px) {
  .mp-cta::before { left: 14%; top: -60px; width: 104px; height: 68px; }
}
html:not([data-shape="vague"]) .mp-cta::before { content: none; }

/* ---------- Lien d'évitement (clavier), texte pour lecteurs d'écran, sous-entrées du menu mobile ---------- */
.mp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-drawer[hidden] { display: none; }
.mp-skip { position: absolute; left: var(--space-4); top: -100px; z-index: 10; padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill); background: var(--ink); color: var(--surface-card); font-weight: 700; }
.mp-skip:focus { top: var(--space-3); }
.mp-prose li.mp-site-map__child { margin-left: var(--space-5); }
.mp-drawer li.mp-drawer__child a { padding-left: var(--space-5); font-size: 20px; }

/* ---------- Visionneuse de la galerie ---------- */
.mp-lightbox-dialog { border: 0; padding: 0; background: transparent; width: min(960px, calc(100vw - 2 * var(--space-4))); max-height: 100dvh; }
.mp-lightbox-dialog::backdrop { background: rgba(10, 20, 30, 0.8); }
.mp-embed__frame { position: relative; }

/* ---------- Agenda complet (par mois) ---------- */
.mp-agenda-month { display: grid; gap: var(--space-3); }
.mp-agenda-month + .mp-agenda-month { margin-top: var(--space-4); }
.mp-agenda-month__title { color: var(--secondary); }
/* Agenda complet : chaque événement suit le même gabarit. La date dans une pastille de taille fixe ; sur un écran large,
   le titre puis les détails au milieu, la catégorie à droite dans une étiquette de largeur fixe, la description dessous.
   L'horaire ne se coupe jamais en deux. */
.mp-events--list .mp-date { height: 68px; padding: 0; align-content: center; }
.mp-events--list .mp-time { white-space: nowrap; }
@container page (min-width: 768px) {
  .mp-events--list { grid-template-columns: 1fr; }
  .mp-events--list .mp-event { grid-template-columns: 68px minmax(0, 1fr) 11rem; column-gap: var(--space-5); row-gap: var(--space-2); align-items: center; padding: var(--space-4) var(--space-5); }
  .mp-events--list .mp-event__body { display: contents; }
  .mp-events--list .mp-date { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .mp-events--list .mp-event__body > .mp-badge { grid-column: 3; grid-row: 1 / span 2; width: 100%; justify-content: center; }
  .mp-events--list .mp-event__title { grid-column: 2; grid-row: 1; }
  .mp-events--list .mp-event__meta { grid-column: 2; grid-row: 2; }
  .mp-events--list .mp-note { grid-column: 2; grid-row: 3; }
}
.mp-avatar .mp-photo { height: 100%; border-radius: 0; }


img { object-position: var(--focal-x, 50%) var(--focal-y, 50%); }

/* Le contenu et le pied de page ne dépassent pas --site-max, centrés ; l'en-tête garde toute la largeur.
   Chacun devient le conteneur « page » : les règles @container et les 100cqw se mesurent sur la largeur limitée. */
.mp-page > main, .mp-page > .mp-footer, .mp-page > .mp-divider { max-width: var(--site-max); margin-inline: auto; }
.mp-page > main, .mp-page > .mp-footer { container: page / inline-size; }

/* ---------- Anciens styles écrits dans les gabarits (contrat : le HTML ne porte plus de style) ---------- */
body { margin: 0; }
.mp-note { margin: 0; }
.mp-copy { user-select: all; word-break: break-all; }
.mp-gallery-wrap { display: grid; gap: var(--space-5); }
.mp-lightbox__image { aspect-ratio: auto; object-fit: contain; max-height: 70dvh; background: transparent; }
.mp-lightbox__caption { margin: 0; }
.mp-contact__map .mp-map { object-fit: cover; width: 100%; height: auto; }
.mp-contact__route { display: inline-flex; gap: 8px; align-items: center; justify-self: start; }
.mp-embed__frame[data-format="16:9"] { aspect-ratio: 16 / 9; }
.mp-embed__frame[data-format="4:3"] { aspect-ratio: 4 / 3; }
.mp-embed__frame[data-format="carre"] { aspect-ratio: 1 / 1; }
.mp-embed__frame[data-format="fixe"] { height: var(--embed-height, 480px); }
.mp-embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mp-footer__identity { display: grid; gap: 12px; }
.mp-footer__name strong { color: var(--on-deep); }
.mp-footer__text { margin-top: 12px; }
.mp-footer__legal a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .mp-page * { transition: none !important; animation: none !important; }
  .mp-btn:hover, .mp-card--link:hover, .mp-social__btn:hover { transform: none; }
}

/* ==========================================================================
   17. Carrousel : la rangée défile au doigt ; des cartes blanches, citations en manuscrit
   ========================================================================== */
.mp-carousel { display: grid; gap: var(--space-3); }
.mp-carousel__track { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0 calc(var(--space-4) * -1); padding: var(--space-2) var(--space-4) var(--space-4); scroll-padding-inline: var(--space-4); scrollbar-width: thin; }
.mp-carousel__track:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: -3px; border-radius: var(--radius-md); }
.mp-carousel__item { flex: 0 0 auto; scroll-snap-align: start; }
/* Une seule carte, blanche et arrondie : l'image (logo ou photo) en haut, la citation en manuscrit, l'auteur */
.mp-carousel__item { width: min(78%, 18rem); }
.mp-carousel__card { margin: 0; height: 100%; }
.mp-carousel__card, .mp-carousel__link { box-sizing: border-box; display: grid; align-content: start; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface-card); color: var(--ink); box-shadow: var(--shadow-card); text-decoration: none; }
.mp-carousel__card:has(> .mp-carousel__link) { padding: 0; background: none; box-shadow: none; }
.mp-carousel__link { height: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.mp-carousel__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.mp-carousel__image { display: block; width: 100%; height: 96px; object-fit: contain; }
/* Une photo occupe tout le haut de la carte, bord à bord, en 3:2 ; un logo (PNG, SVG) reste entier, avec sa marge */
.mp-carousel__image:not(.mp-carousel__image--logo) { width: calc(100% + 2 * var(--space-5)); max-width: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.mp-carousel__image:not(.mp-carousel__image--logo):last-child { margin-bottom: calc(var(--space-5) * -1); border-radius: var(--radius-lg); }
.mp-carousel__image--logo { height: 120px; }
.mp-carousel__quote { margin: 0; }
.mp-carousel__quote p { margin: 0; font-family: var(--font-script); font-weight: 700; font-size: calc(26px * var(--script-scale, 1)); line-height: 1.15; color: var(--primary-strong); }
.mp-carousel__author { font-weight: 700; font-size: 15px; line-height: 20px; color: var(--ink-muted); }
.mp-carousel__nav { display: flex; gap: var(--space-2); justify-content: flex-end; }
.mp-carousel__nav[hidden] { display: none; }
.mp-carousel .mp-icon-btn { background: var(--primary-soft); color: var(--primary-strong); }
.mp-carousel .mp-icon-btn:disabled { opacity: .4; cursor: default; }

/* ==========================================================================
   18. Tableau : une carte blanche, en-têtes bleu pâle, lignes séparées de pointillés roses
   ========================================================================== */
.mp-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); background: var(--surface-card); box-shadow: var(--shadow-card); }
.mp-table-wrap:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.mp-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 22px; color: var(--ink); }
.mp-table th, .mp-table td { padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; }
.mp-table td { min-width: 7rem; }
.mp-table thead th { background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; white-space: nowrap; }
.mp-table tbody tr + tr > * { border-top: 2px dashed var(--rose); }
.mp-table tbody > tr > :first-child { font-weight: 700; }
.mp-table__note { margin: var(--space-3) 0 0; text-align: center; }
/* Sur un petit écran, un tableau à titres de colonnes devient une suite de fiches : la première cellule en titre, puis
   chaque valeur précédée du titre de sa colonne (data-label) */
@container page (max-width: 639px) {
  .mp-table:has(thead) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mp-table:has(thead), .mp-table:has(thead) :is(tbody, tr) { display: block; }
  .mp-table:has(thead) tr { padding: var(--space-3) var(--space-4); }
  .mp-table:has(thead) tbody tr + tr { border-top: 2px dashed var(--rose); }
  .mp-table:has(thead) tbody tr + tr > * { border-top: 0; }
  .mp-table:has(thead) tbody :is(td, th) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--space-3); min-width: 0; padding: 3px 0; }
  .mp-table:has(thead) tbody :is(td, th)::before { content: attr(data-label); font-weight: 700; color: var(--primary-strong); }
  .mp-table:has(thead) tbody > tr > :first-child { display: block; padding-bottom: var(--space-2); font-size: 17px; }
  .mp-table:has(thead) tbody > tr > :first-child::before { content: none; }
}
:is([data-bg="accent"], .mp-illustration__content) .mp-table__note { color: inherit; }

/* ==========================================================================
   Image d'illustration : la photo sur toute la largeur, entière et nette, sans effet avec les blocs voisins.
   Un texte posé dessus passe dans un encart bleu nuit.
   ========================================================================== */
.mp-illustration { position: relative; display: grid; }
/* La photo entière, dans ses proportions, jamais recadrée ni recouverte */
.mp-illustration__photo { grid-area: 1 / 1; display: block; width: 100%; height: auto; }
.mp-illustration__content { grid-area: 2 / 1; position: relative; z-index: 2; display: grid; gap: var(--space-4); justify-items: center; max-width: 44rem; margin: calc(var(--space-7) * -1) var(--space-4) var(--space-6); padding: var(--space-6) var(--space-5); text-align: center;
  border-radius: var(--radius-lg); background: rgba(20, 45, 65, 0.72); color: var(--on-primary); --ring: var(--accent); }
.mp-illustration__content .mp-h2 { margin: 0; }
.mp-illustration__content .mp-lead { margin: 0; }
/* Sur téléphone, le texte passe sous la photo en la chevauchant ; dès la tablette, il se pose dessus */
@container page (min-width: 768px) { .mp-illustration__content { grid-area: 1 / 1; align-self: center; margin: var(--space-8) auto; } }

/* Changement de page (Turbo Drive) : un fondu court ; rien si l'appareil demande moins de mouvement */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
