/*
  Thème de base de Mon Préau : sobre et minimaliste, écrit sur le HTML des blocs (contrat 1).
  Pas de décor, pas de vague : une typographie lisible, des filets fins, des coins légèrement arrondis.
  Couleurs et polices : variables posées par les réglages (palette calculée, contrastes garantis).
  Conçu à 360 px ; les largeurs suivantes passent par des container queries sur .mp-page.
*/

/* ==========================================================================
   Base
   ========================================================================== */
.mp-page {
  container-type: inline-size;
  container-name: page;
  --b-gutter: 20px;
  --b-max: 1080px;
  /* Largeur maximale du site, hors en-tête (qui garde toute la largeur) */
  --b-site-max: 1440px;
  --b-radius: 8px;
  --b-line: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mp-page *, .mp-page *::before, .mp-page *::after { box-sizing: border-box; }
.mp-page img { display: block; max-width: 100%; }
.mp-page :focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
:where(.mp-page) :is(h1, h2, h3, p, ul, ol) { margin: 0; }
:where(.mp-page) a { color: inherit; }
body { margin: 0; background: var(--surface); }
.mp-ico { width: 20px; height: 20px; flex: none; }
.mp-ico-lg { width: 26px; height: 26px; }
/* 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: 2; }
:is(.mp-ico, .mp-ico-lg) [stroke-width] { stroke-width: inherit; }
.mp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-skip { position: absolute; left: -9999px; }
.mp-skip:focus { left: 16px; top: 12px; z-index: 30; padding: 10px 14px; border-radius: var(--b-radius); background: var(--ink); color: var(--surface); text-decoration: none; }

/* ---------- Texte ---------- */
.mp-h2 { font-family: var(--font-display); font-weight: var(--display-weight, 700); letter-spacing: var(--display-track, 0); font-size: 30px; line-height: 1.15; text-wrap: balance; }
.mp-h2 em, .mp-hero__title em { font-style: normal; color: var(--primary-strong); }
.mp-h3 { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 21px; line-height: 1.3; }
.mp-lead { font-size: 20px; line-height: 1.5; max-width: 40rem; }
.mp-muted { color: var(--ink-muted); }
.mp-small { font-size: 15px; line-height: 1.5; }
.mp-note { margin: 0; }
.mp-copy { user-select: all; word-break: break-all; }
.mp-link, .mp-prose a { color: var(--primary-strong); font-weight: 700; text-underline-offset: 3px; }
.mp-link .mp-ico, .mp-embed__out .mp-ico { width: 16px; height: 16px; vertical-align: -2px; }
.mp-eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary-strong); }
.mp-prose { max-width: 44rem; display: grid; gap: 1em; }
.mp-prose h3 { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 22px; line-height: 1.3; margin-top: 0.5em; }
.mp-prose :is(ul, ol) { padding-left: 1.3em; display: grid; gap: 0.35em; }
.mp-prose blockquote { margin: 0.5em 0; max-width: 42rem; padding-left: 18px; border-left: 3px solid var(--primary-strong); font-family: var(--font-display); font-size: 24px; line-height: 1.35; }

/* ---------- Boutons ---------- */
.mp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* 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: 8px; width: min(300px, 100%); text-align: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--primary-strong); border-radius: var(--b-radius); background: var(--primary-strong); color: var(--on-primary); font: 700 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer; }
.mp-btn:hover { background: var(--ink); border-color: var(--ink); }
.mp-btn--ghost { background: transparent; color: var(--primary-strong); }
.mp-btn--ghost:hover { background: var(--primary-soft); color: var(--ink); }
.mp-btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mp-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); color: inherit; cursor: pointer; }

/* ---------- Photos, pastilles, étiquettes ---------- */
.mp-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--b-radius); background: var(--surface-alt); }
.mp-photo--square { aspect-ratio: 1 / 1; }
.mp-ph { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--b-radius); background: var(--primary-soft); }
.mp-class:nth-child(4n+2) .mp-ph { background: var(--rose-soft); }
.mp-class:nth-child(4n+1) .mp-ph { background: var(--accent-soft); }
.mp-class:nth-child(4n+4) .mp-ph { background: var(--vert-soft); }
.mp-disc { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--b-radius); background: var(--primary-soft); color: var(--primary-strong); }
.mp-disc .mp-ico { width: 22px; height: 22px; }
.mp-badge { display: inline-block; width: fit-content; padding: 2px 8px; border-radius: 4px; background: var(--primary-soft); color: var(--ink); font-size: 13px; font-weight: 700; }
.mp-badge--vacances { background: var(--vert-soft); }
.mp-badge--reunion { background: var(--secondary-soft); }
.mp-badge--fete { background: var(--accent-soft); }
.mp-empty { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); }
.mp-alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--b-radius); background: var(--danger-soft); color: var(--ink); }
.mp-alert--ok { background: var(--vert-soft); }

/* ==========================================================================
   En-tête, menu, pied de page
   ========================================================================== */
/* Le contenu et le pied de page ne dépassent pas --b-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 { max-width: var(--b-site-max); margin-inline: auto; container: page / inline-size; }
/* L'en-tête reste en haut de l'écran ; le défilement (ancres, tabulation) s'arrête sous lui */
html { scroll-padding-top: 84px; }
.mp-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 10px var(--b-gutter); border-bottom: var(--b-line); background: var(--surface); }
.mp-brand { display: flex; align-items: center; min-height: 44px; margin-right: auto; text-decoration: none; }
.mp-brand img { height: 44px; width: auto; }
.mp-brand__name { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 20px; }
.mp-nav { display: none; list-style: none; padding: 0; gap: 4px; }
.mp-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--b-radius); font-weight: 700; font-size: 16px; text-decoration: none; }
.mp-nav a:hover, .mp-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-strong); }
/* La page en cours : pas seulement une couleur, un soulignement aussi */
.mp-nav a[aria-current="page"], .mp-drawer li a[aria-current="page"] { 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(--b-radius); 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: 8px; list-style: none;
  background: var(--surface-card); border-radius: var(--b-radius); 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(--b-radius); }
.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: 4px; }
.mp-header__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--b-radius); color: var(--primary-strong); }
.mp-header__social a:hover { background: var(--primary-soft); }
.mp-burger { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); color: var(--ink); font: 700 16px/1 var(--font-body); cursor: pointer; }
/* Le menu mobile s'ouvre sous l'en-tête, où que l'on soit dans la page, et défile seul s'il est long */
.mp-drawer { position: fixed; top: 68px; inset-inline: 0; bottom: 0; z-index: 29; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); }
.mp-drawer ul { list-style: none; margin: 0; padding: 8px var(--b-gutter) 20px; border-bottom: var(--b-line); }
.mp-drawer li a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: var(--b-line); font-weight: 700; font-size: 19px; text-decoration: none; }
.mp-drawer li a[aria-current="page"] { color: var(--primary-strong); }
.mp-prose li.mp-site-map__child { margin-left: 20px; }
.mp-drawer li.mp-drawer__child a { padding-left: 18px; font-weight: 400; }

.mp-footer { padding: 48px var(--b-gutter) 28px; border-top: var(--b-line); background: var(--surface-alt); }
.mp-footer__grid { max-width: var(--b-max); margin-inline: auto; display: grid; gap: 28px; }
.mp-footer__identity { display: grid; gap: 6px; }
.mp-footer__script { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 22px; line-height: 1.25; }
.mp-footer :where(p) { color: var(--ink-muted); }
.mp-footer__name { color: var(--ink); }
.mp-footer a { color: var(--primary-strong); }
.mp-footer h2 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.mp-footer ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.mp-footer__text { margin-top: 10px; }
.mp-footer__social { display: flex; gap: 8px; margin-top: 6px; }
.mp-footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--b-radius); background: var(--surface-card); }
.mp-footer__legal { max-width: var(--b-max); margin: 28px auto 0; padding-top: 14px; border-top: var(--b-line); display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--ink-muted); }
.mp-footer__legal a { color: inherit; }
/* Pas de vague dans ce thème */
.mp-divider { display: none; }

/* ==========================================================================
   Sections : fond choisi dans l'éditeur (data-bg : clair, alterne, accent) ; sections côte à côte (.mp-row)
   ========================================================================== */
.mp-section { padding: 48px var(--b-gutter); 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); }
/* 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; }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) :is(.mp-eyebrow, .mp-muted, .mp-link, .mp-prose a, .mp-h2 em, .mp-figure__value, .mp-figure__label) { color: inherit; }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) .mp-btn { background: var(--surface-card); border-color: var(--surface-card); color: var(--ink); }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) .mp-btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) .mp-btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mp-inner { max-width: var(--b-max); margin-inline: auto; display: grid; gap: 28px; }
/* 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: 44rem; }
.mp-head { display: grid; gap: 10px; max-width: 44rem; }
.mp-head--center { margin-inline: auto; justify-items: center; text-align: center; }
.mp-head--center .mp-actions { justify-content: center; }

/* ==========================================================================
   Bandeau d'accueil
   ========================================================================== */
.mp-hero { background: var(--surface); }
.mp-hero__body { display: grid; gap: 16px; max-width: 42rem; }
.mp-hero__heading { margin: 0; display: grid; gap: 4px; }
.mp-hero__heading > span { display: block; }
.mp-hero__title { font-family: var(--font-display); font-weight: var(--display-weight, 700); letter-spacing: var(--display-track, 0); font-size: 38px; line-height: 1.1; text-wrap: balance; }
.mp-hero__script { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 22px; line-height: 1.2; color: var(--primary-strong); }
.mp-hero__logo { width: 80px; height: auto; }
/* Un seul bandeau : fond pâle, texte ; la photo et son slogan dessous quand ils sont remplis (à côté sur ordinateur) */
.mp-hero { display: grid; gap: 28px; padding: 40px var(--b-gutter) 48px; background: var(--surface-alt); }
.mp-hero .mp-hero__body { margin-inline: auto; width: 100%; max-width: var(--b-max); }
.mp-hero__media { display: grid; gap: 10px; width: 100%; max-width: var(--b-max); margin-inline: auto; }
.mp-hero__photo { display: block; aspect-ratio: 16 / 9; border-radius: var(--b-radius); }

/* ==========================================================================
   Blocs
   ========================================================================== */
.mp-image { margin: 0; display: grid; gap: 8px; }
.mp-image__photo { aspect-ratio: auto; }
.mp-image__caption { font-size: 15px; color: var(--ink-muted); }
:is(.mp-section[data-bg="accent"], .mp-illustration__content) .mp-image__caption { color: inherit; }

.mp-cards { list-style: none; padding: 0; display: grid; gap: 16px; }
.mp-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); color: var(--ink); }
.mp-card--image { padding: 0 0 20px; overflow: hidden; }
.mp-card--image > :not(.mp-photo, .mp-ph) { margin-inline: 20px; }
.mp-card--image .mp-photo, .mp-card--image .mp-ph { border-radius: 0; margin-bottom: 4px; }
.mp-card .mp-h3 a { text-decoration: none; }
.mp-card--link .mp-h3 a::after { content: ""; position: absolute; inset: 0; }
.mp-card--link:hover { border-color: var(--primary-strong); }
.mp-card--link:has(a:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.mp-card--link a:focus-visible { outline: none; }
.mp-card__more { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; color: var(--primary-strong); }
.mp-card__more .mp-ico { width: 16px; height: 16px; }

.mp-figures { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mp-figure { display: grid; gap: 4px; align-content: start; }
.mp-figure .mp-disc { width: 40px; height: 40px; }
.mp-figure__value { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 42px; line-height: 1.05; color: var(--primary-strong); }
.mp-figure__label { color: var(--ink-muted); }

.mp-gallery-wrap { display: grid; gap: 16px; }
.mp-gallery { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.mp-gallery .mp-photo { aspect-ratio: 1 / 1; }
.mp-gallery-more { justify-self: start; }
.mp-lightbox-dialog { width: min(960px, calc(100vw - 24px)); max-height: 100dvh; padding: 0; border: 0; border-radius: var(--b-radius); background: transparent; }
.mp-lightbox-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }
.mp-lightbox { display: grid; gap: 10px; padding: 12px; border-radius: var(--b-radius); background: var(--surface-card); color: var(--ink); }
.mp-lightbox__bar, .mp-lightbox__nav { display: flex; justify-content: space-between; align-items: center; }
.mp-lightbox__image { aspect-ratio: auto; object-fit: contain; max-height: 72dvh; background: transparent; }
.mp-lightbox__caption { margin: 0; }

.mp-cta { display: grid; gap: 16px; }
.mp-cta__title { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 28px; line-height: 1.2; text-wrap: balance; }

.mp-embed { display: grid; gap: 10px; }
.mp-embed__frame { position: relative; width: 100%; overflow: hidden; border-radius: var(--b-radius); background: var(--surface-alt); }
.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-embed__consent { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; }
.mp-embed__out { justify-self: start; font-size: 15px; }

.mp-docs { list-style: none; padding: 0; display: grid; gap: 8px; }
.mp-doc a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; overflow-wrap: anywhere; gap: 14px; align-items: center; min-height: 64px; padding: 12px 16px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); text-decoration: none; }
.mp-doc a:hover { border-color: var(--primary-strong); }
.mp-doc__ico, .mp-doc__dl { color: var(--primary-strong); }
.mp-doc__name { display: block; font-weight: 700; }
.mp-doc__meta { display: block; font-size: 15px; color: var(--ink-muted); }

.mp-faq { display: grid; gap: 8px; }
.mp-faq details { border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; font-weight: 700; list-style: none; cursor: pointer; }
.mp-faq summary::-webkit-details-marker { display: none; }
.mp-faq__plus { display: grid; place-items: center; flex: none; color: var(--primary-strong); }
.mp-faq details[open] .mp-faq__plus { transform: rotate(45deg); }
.mp-faq__a { padding: 0 16px 16px; }

.mp-social { display: grid; gap: 8px; }
.mp-social__btn { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; min-height: 64px; padding: 10px 16px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); text-decoration: none; }
.mp-social__btn:hover { border-color: var(--primary-strong); }
.mp-social__btn strong, .mp-social__btn span span { display: block; }
.mp-social__btn span span { font-size: 15px; color: var(--ink-muted); }

.mp-contact { display: grid; gap: 28px; }
.mp-coords { list-style: none; padding: 0; display: grid; gap: 14px; }
.mp-coords li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.mp-coords .mp-disc { width: 40px; height: 40px; }
.mp-coords__k { display: block; font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.mp-coords a { color: var(--primary-strong); font-weight: 700; }
.mp-form { display: grid; gap: 16px; }
.mp-form--card { padding: 20px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-field { display: grid; gap: 6px; }
.mp-field label { font-weight: 700; font-size: 16px; }
.mp-field__opt { font-weight: 400; color: var(--ink-muted); }
.mp-input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--b-radius); background: var(--surface-card); color: var(--ink); font: inherit; }
textarea.mp-input { min-height: 140px; resize: vertical; }
.mp-field--error .mp-input { border-color: var(--danger); }
.mp-field__error { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; font-weight: 700; color: var(--danger); }
.mp-contact__map { display: grid; gap: 8px; }
.mp-contact__map .mp-map { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--b-radius); }
/* Le marqueur de l'école au centre du plan, dans la couleur principale */
.mp-map__frame { position: relative; }
.mp-map__frame::after { content: ""; position: absolute; left: calc(50% - 16px); top: calc(50% - 39px); width: 32px; height: 32px; rotate: -45deg;
  border: 3px solid #fff; border-radius: 999px 999px 999px 0; background: radial-gradient(circle, #fff 0 4px, var(--primary-strong) 5px); pointer-events: none; }
.mp-contact__route { display: inline-flex; gap: 8px; align-items: center; justify-self: start; }

.mp-classes { list-style: none; padding: 0; display: grid; gap: 16px; }
.mp-class { display: grid; grid-template-rows: auto 1fr; gap: 0; overflow: hidden; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-class .mp-photo, .mp-class .mp-ph { border-radius: 0; }
.mp-class__body { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.mp-class__name { margin: 0; color: var(--ink-muted); font-style: italic; }
.mp-class__team { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--ink-muted); font-size: 16px; }
.mp-class__team li { display: flex; align-items: center; gap: 8px; }
.mp-class__presentation { margin: auto 0 0; color: var(--ink-muted); }

.mp-team { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
.mp-person { display: grid; justify-items: center; gap: 2px; text-align: center; }
.mp-avatar { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 8px; overflow: hidden; border-radius: 50%; background: var(--primary-soft); font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 26px; color: var(--primary-strong); }
.mp-avatar--2 { background: var(--rose-soft); }
.mp-avatar--3 { background: var(--accent-soft); }
.mp-avatar--4 { background: var(--vert-soft); }
.mp-avatar .mp-photo { width: 100%; height: 100%; aspect-ratio: 1 / 1; border-radius: 0; }
.mp-person__name { font-weight: 700; }
.mp-person__role { font-size: 15px; color: var(--ink-muted); }

.mp-events { list-style: none; padding: 0; display: grid; gap: 8px; }
.mp-event { display: grid; grid-template-columns: 60px 1fr; gap: 14px; padding: 14px 16px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-date { display: grid; align-content: start; justify-items: center; padding: 6px 0; border-radius: var(--b-radius); background: var(--primary-soft); color: var(--primary-strong); }
.mp-date__d { font-family: var(--font-display); font-weight: var(--display-weight, 700); font-size: 26px; line-height: 1; }
.mp-date__m { font-size: 14px; font-weight: 700; }
.mp-event__body { display: grid; gap: 4px; }
.mp-event__title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.mp-event__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; color: var(--ink-muted); }
.mp-event__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.mp-event__meta .mp-ico { width: 16px; height: 16px; }
.mp-agenda-month { display: grid; gap: 10px; }
.mp-agenda-month + .mp-agenda-month { margin-top: 16px; }
.mp-events .mp-time { white-space: nowrap; }
/* Agenda complet sur un écran large : la date, le texte, la catégorie à droite dans une colonne de largeur fixe */
@container page (min-width: 768px) {
  .mp-events--list .mp-event { grid-template-columns: 60px minmax(0, 1fr) 10rem; align-items: center; }
  .mp-events--list .mp-event__body { display: contents; }
  .mp-events--list .mp-event__body > :not(.mp-badge) { grid-column: 2; }
  .mp-events--list .mp-date { grid-row: 1 / span 3; align-self: center; }
  .mp-events--list .mp-event__body > .mp-badge { grid-column: 3; grid-row: 1 / span 3; justify-self: end; }
}

.mp-canteen { display: grid; gap: 12px; }
.mp-canteen__day { margin: 0; font-weight: 700; font-size: 18px; }
.mp-canteen__group { display: grid; gap: 8px; }
.mp-canteen__title { margin: 0; font-size: 18px; }
.mp-canteen__dishes { list-style: none; margin: 0; padding: 0; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-canteen__dish { padding: 12px 16px; }
.mp-canteen__dish + .mp-canteen__dish { border-top: var(--b-line); }
.mp-canteen__name { font-weight: 700; }
.mp-canteen__connector { color: var(--ink-muted); }
.mp-canteen__extra { display: block; font-size: 15px; color: var(--ink-muted); }
.mp-canteen__labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mp-canteen__label { padding: 2px 8px; border-radius: 4px; background: var(--vert-soft); font-size: 13px; font-weight: 700; }
.mp-canteen__note { margin: 0; font-size: 14px; color: var(--ink-muted); }
.mp-canteen .mp-actions { margin: 0; }

/* ==========================================================================
   Tablettes et ordinateurs
   ========================================================================== */
@container page (min-width: 640px) {
  .mp-cards, .mp-classes { grid-template-columns: repeat(2, 1fr); }
  .mp-gallery { grid-template-columns: repeat(3, 1fr); }
  .mp-team { grid-template-columns: repeat(3, 1fr); }
  .mp-contact { grid-template-columns: 1fr 1fr; }
  .mp-contact__form { grid-column: 2; grid-row: 1 / span 2; }
}

@container page (min-width: 1024px) {
  .mp-page { --b-gutter: 40px; }
  .mp-header { min-height: 80px; }
  .mp-brand img { height: 52px; }
  .mp-nav { display: flex; }
  .mp-burger, .mp-drawer { display: none; }
  .mp-section { padding-block: 72px; }

  .mp-h2 { font-size: 40px; }
  .mp-prose blockquote { font-size: 30px; }
  .mp-hero__title { font-size: 56px; }
  .mp-hero__script { font-size: 26px; }
  .mp-hero__logo { width: 96px; }
  .mp-hero { padding-block: 72px 80px; }
  .mp-hero:has(.mp-hero__media) { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding-inline: max(var(--b-gutter), calc((100cqw - var(--b-max)) / 2)); }
  .mp-hero:has(.mp-hero__media) :is(.mp-hero__body, .mp-hero__media) { max-width: none; margin: 0; }
  .mp-hero__photo { aspect-ratio: 4 / 3; }
  .mp-cards:has(> li:nth-child(3)), .mp-classes { grid-template-columns: repeat(3, 1fr); }
  .mp-cards:has(> li:nth-child(4):last-child), .mp-classes--4 { grid-template-columns: repeat(4, 1fr); }
  .mp-figures { grid-template-columns: repeat(var(--n, 4), 1fr); gap: 32px; }
  .mp-gallery { grid-template-columns: repeat(4, 1fr); }
  .mp-cta { grid-template-columns: 1fr auto; align-items: center; column-gap: 40px; }
  .mp-cta > .mp-actions { grid-column: 2; grid-row: 1 / span 3; }
  .mp-cta__title { font-size: 34px; }
  .mp-team { grid-template-columns: repeat(5, 1fr); }
  .mp-contact { grid-template-columns: 5fr 6fr; gap: 48px; }
  .mp-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Carrousel */
.mp-carousel { display: grid; gap: 10px; }
.mp-carousel__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; margin: 0; padding: 4px 0 12px; scrollbar-width: thin; }
.mp-carousel__item { flex: 0 0 auto; scroll-snap-align: start; }
.mp-carousel__item { width: min(80%, 18rem); }
.mp-carousel__card { margin: 0; height: 100%; }
.mp-carousel__card, .mp-carousel__link { box-sizing: border-box; display: grid; align-content: start; gap: 10px; padding: 16px; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); color: var(--ink); text-decoration: none; }
.mp-carousel__card:has(> .mp-carousel__link) { padding: 0; border: 0; background: none; }
.mp-carousel__link { height: 100%; }
.mp-carousel__link:hover { border-color: var(--primary-strong); }
.mp-carousel__image { display: block; width: 100%; height: 88px; object-fit: contain; }
.mp-carousel__quote { margin: 0; }
.mp-carousel__quote p { margin: 0; font-size: 18px; line-height: 1.45; }
.mp-carousel__author { font-size: 15px; font-weight: 700; color: var(--ink-muted); }
.mp-carousel__nav { display: flex; gap: 8px; }
.mp-carousel__nav[hidden] { display: none; }
.mp-carousel .mp-icon-btn:disabled { opacity: 0.4; cursor: default; }

/* Tableau */
.mp-table-wrap { overflow-x: auto; border: var(--b-line); border-radius: var(--b-radius); background: var(--surface-card); }
.mp-table { width: 100%; border-collapse: collapse; color: var(--ink); }
.mp-table th, .mp-table td { padding: 10px 14px; text-align: left; vertical-align: top; }
.mp-table td { min-width: 7rem; }
.mp-table tr + tr > * { border-top: var(--b-line); }
.mp-table thead th { background: var(--surface-alt); font-weight: 700; white-space: nowrap; }
.mp-table__note { margin: 10px 0 0; }
/* Sur un petit écran, un tableau à titres de colonnes devient une suite de fiches (titre de colonne devant chaque valeur) */
@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: 10px 14px; }
  .mp-table:has(thead) tr + tr > * { border-top: 0; }
  .mp-table:has(thead) tbody tr + tr { border-top: var(--b-line); }
  .mp-table:has(thead) tbody :is(td, th) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; min-width: 0; padding: 2px 0; }
  .mp-table:has(thead) tbody :is(td, th)::before { content: attr(data-label); font-weight: 700; }
  .mp-table:has(thead) tbody > tr > :first-child { display: block; padding-bottom: 6px; font-weight: 700; }
  .mp-table:has(thead) tbody > tr > :first-child::before { content: none; }
}
:is(.mp-section[data-bg="accent"], .mp-illustration__content) .mp-table__note { color: inherit; }

/* Image d'illustration : la photo sur toute la largeur ; un texte posé dessus passe dans un encart sombre */
.mp-illustration { position: relative; display: grid; }
.mp-illustration__photo { grid-area: 1 / 1; display: block; width: 100%; height: auto; min-height: 280px; aspect-ratio: 4 / 3; object-fit: cover; }
.mp-illustration__content { grid-area: 2 / 1; position: relative; z-index: 1; display: grid; gap: 12px; max-width: 34rem; margin: -32px var(--b-gutter) 20px; padding: 24px; border-radius: var(--b-radius); background: rgba(15, 20, 25, 0.84); color: #fff; }
.mp-illustration__content :is(.mp-h2, .mp-lead) { margin: 0; }
@container page (min-width: 768px) { .mp-illustration__content { grid-area: 1 / 1; align-self: end; margin: 24px var(--b-gutter); } }
@container page (min-width: 1024px) { .mp-illustration__photo { aspect-ratio: 21 / 9; } }

/* 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; } }
