/*
 * Thème « Les Ormeaux » – feuille de style principale.
 * Direction visuelle A (validée) : bleu marine + ocre, titres en Source Serif 4, texte en Source Sans 3.
 * Les polices sont hébergées sur le site (déclarées dans theme.json) : aucun appel à Google.
 * Contrastes vérifiés (WCAG AA ≥ 4,5:1) : texte #1A2233 sur blanc 15,9:1 ; ocre #E3A33C avec texte marine 6,7:1 ;
 * gris #4B5565 sur sable 6,7:1 ; ocre foncé #8A5300 sur sable 5,7:1 ; blanc sur marine 14,6:1.
 */
/* =========================================================
   1. JETONS DE COULEUR – direction A
   ========================================================= */
:root {
  /* Direction A (validée) : bleu marine + ocre chaud, ton institutionnel */
  --brand: #14284B;
  --brand-strong: #0C1A33;
  --brand-soft: #E9EEF6;
  --heading: #14284B;
  --accent: #E3A33C;
  --accent-hover: #F0B654;
  --on-accent: #14284B;
  --accent-ink: #8A5300;
  --bg: #FFFFFF;
  --bg-alt: #F6F2EA;
  --surface: #FFFFFF;
  --ink: #1A2233;
  --muted: #4B5565;
  --line: #E2DCCF;
  --nav-bg: #14284B;
  --nav-ink: #FFFFFF;
  --nav-hover: #22396A;
  --footer-bg: #0E1D38;
  --footer-ink: #E9EDF4;
  --footer-muted: #BCC6D6;
  --footer-link: #FFFFFF;
  --footer-line: #2A3B5C;
  --focus: #0B57D0;
  --focus-on-dark: #FFD27A;
  --heading-font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(12,26,51,.06), 0 6px 20px rgba(12,26,51,.08);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h, 64px) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
h1, h2, h3 { font-family: var(--heading-font); line-height: 1.2; margin: 0 0 .5em; color: var(--heading); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--focus-on-dark); }
.on-dark .submenu :focus-visible { outline-color: var(--focus); outline-offset: -3px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--brand); color: #fff; padding: 12px 16px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-fill { fill: currentColor; stroke: none; }

/* Emplacement à compléter : très visible, pour ne rien inventer */
.todo {
  display: inline-block; background: #FFF4C2; color: #5B3A00; border: 2px dashed #A16207;
  border-radius: 4px; padding: 2px 8px; font-weight: 700; font-size: .95rem;
}

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 80px 0; } }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.kicker {
  display: block; font-family: "Source Sans 3", system-ui, sans-serif; font-size: .9rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: .4em;
}
.section-intro { max-width: 70ch; color: var(--muted); margin: 8px 0 0; }
.link-arrow { font-weight: 700; display: inline-flex; align-items: center; gap: .35em; }
.link-arrow .icon { width: 1.1em; height: 1.1em; }

/* =========================================================
   3. EN-TÊTE
   - Ligne 1 (logo + coordonnées) : défile avec la page.
   - Ligne 2 (menu + École Directe) : reste toujours visible en haut de l'écran.
   ========================================================= */
.site-header {
  position: sticky; z-index: 100;
  top: calc(-1 * var(--mast-h, 0px)); /* la ligne 1 sort de l'écran, la ligne 2 reste collée en haut */
}
.masthead { background: var(--bg); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 84px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 56px; height: 56px; border-radius: 50%; }
.brand-name { display: block; font-family: var(--heading-font); font-weight: 700; font-size: 1.2rem; line-height: 1.15; color: var(--brand); }
.brand-sub { display: block; font-size: .9rem; color: var(--muted); line-height: 1.3; }
@media (min-width: 768px) { .brand img { width: 68px; height: 68px; } .brand-name { font-size: 1.45rem; } .brand-sub { font-size: 1rem; } }

.mast-contact { list-style: none; display: none; align-items: center; gap: 4px 20px; font-size: .98rem; }
.mast-contact a { display: inline-flex; align-items: center; gap: .4em; color: var(--ink); text-decoration: none; min-height: 44px; }
.mast-contact a:hover { color: var(--brand); text-decoration: underline; }
.mast-contact .icon { color: var(--brand); }
.mast-social { display: flex; gap: 4px; }
.mast-social a { width: 44px; justify-content: center; border-radius: 50%; }
.mast-social a:hover { background: var(--brand-soft); }
@media (min-width: 900px) { .mast-contact { display: flex; } }
@media (max-width: 1099px) { .mast-contact .mast-mail { display: none; } }

/* Barre collante : menu + École Directe */
.header-bar { background: var(--nav-bg); color: var(--nav-ink); transition: box-shadow .2s; }
.site-header.is-stuck .header-bar { box-shadow: 0 4px 16px rgba(12,26,51,.28); }
.header-bar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.btn-ed { min-height: 44px; padding: 6px 16px; }
.bar-call {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none;
  border: 2px solid rgba(255,255,255,.45); border-radius: var(--radius); color: #fff;
}
.bar-call:hover { background: var(--nav-hover); color: #fff; }
.burger {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 8px 12px;
  background: transparent; border: 2px solid rgba(255,255,255,.45); border-radius: var(--radius);
  color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.burger:hover { background: var(--nav-hover); }
.burger .icon { width: 1.4em; height: 1.4em; }

/* Menu principal */
.nav-list { list-style: none; display: flex; }
.nav-item { position: relative; }
.nav-link, .nav-toggle {
  display: flex; align-items: center; gap: .3em; width: 100%;
  padding: 14px 12px; min-height: 52px;
  background: none; border: 0; color: var(--nav-ink); font: inherit; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap;
}
.nav-link:hover, .nav-toggle:hover, .nav-toggle[aria-expanded="true"] { background: var(--nav-hover); color: var(--nav-ink); }
.nav-link[aria-current="page"] { box-shadow: inset 0 -4px 0 var(--accent); }
.nav-toggle .chev { width: 1em; height: 1em; transition: transform .15s; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.submenu { display: none; list-style: none; background: var(--surface); }
.nav-toggle[aria-expanded="true"] + .submenu { display: block; }
.submenu a { display: block; padding: 10px 16px; color: var(--ink); text-decoration: none; white-space: normal; }
.submenu a:hover { background: var(--brand-soft); color: var(--brand-strong); text-decoration: underline; }
.submenu .overview a { font-weight: 700; color: var(--brand); }

/* Téléphone et tablette : [Menu] [École Directe] [Appeler] puis le menu en accordéon */
@media (max-width: 1199px) {
  .header-bar-inner { padding-top: 8px; padding-bottom: 8px; }
  .burger { order: 1; min-width: 6.9em; justify-content: center; }
  .btn-ed { order: 2; flex: 1 1 0; min-width: 0; }
  .bar-call { order: 3; }
  .main-nav { order: 4; flex: 1 0 100%; display: none; }
  .site-header.nav-open .main-nav {
    display: block; max-height: calc(100vh - var(--bar-h, 64px)); max-height: calc(100dvh - var(--bar-h, 64px));
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-list { flex-direction: column; padding: 4px 0 12px; }
  .nav-item + .nav-item { border-top: 1px solid rgba(255,255,255,.18); }
  .nav-toggle { justify-content: space-between; }
  .submenu { border-radius: var(--radius); margin: 0 0 8px; }
  .submenu a { padding-left: 24px; }
}
@media (min-width: 600px) and (max-width: 1199px) { .btn-ed { flex: 0 1 auto; margin-left: auto; } }
@media (max-width: 399px) { .header-bar-inner { gap: 6px; } .btn-ed { padding-left: 10px; padding-right: 10px; } .btn-ed .icon { display: none; } }
/* Ordinateur : menu horizontal + École Directe à droite, sur une seule ligne */
@media (min-width: 1200px) {
  .header-bar-inner { flex-wrap: nowrap; gap: 16px; }
  .burger, .bar-call { display: none; }
  .main-nav { flex: 1 1 auto; }
  .nav-list { justify-content: space-between; }
  .submenu {
    position: absolute; top: 100%; left: 0; z-index: 50; min-width: 280px;
    padding: 8px 0; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow);
  }
  .nav-item:last-child .submenu, .nav-item:nth-last-child(2) .submenu { left: auto; right: 0; }
}
@media (min-width: 1200px) and (hover: hover) {
  .nav-item:hover > .submenu { display: block; }
}

/* =========================================================
   4. BANNIÈRE
   ========================================================= */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--brand-strong); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; z-index: -3; }
.hero-shade { position: absolute; inset: 0; z-index: -1; }
.hero-inner { display: flex; align-items: center; min-height: 520px; padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 1024px) { .hero-inner { min-height: 600px; } }
.hero-card { max-width: 640px; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.6rem); margin: .1em 0 .25em; }
.hero-eyebrow { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; margin: 0; }
.hero-lead { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); margin: 0 0 .6em; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.hero-facts li { padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Direction A : texte blanc sur voile marine */
.hero-shade { background: linear-gradient(90deg, rgba(12,26,51,.92) 0%, rgba(12,26,51,.78) 42%, rgba(12,26,51,.25) 100%); }
.hero, .hero h1 { color: #fff; }
.hero-eyebrow { color: #FFD27A; }
.hero-facts li { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--brand); }
.hero :focus-visible { outline-color: var(--focus-on-dark); }
@media (max-width: 767px) {
  .hero-shade { background: linear-gradient(180deg, rgba(12,26,51,.5) 0%, rgba(12,26,51,.86) 55%); }
}

@media (max-width: 767px) {
  .hero-inner { min-height: 0; padding-top: 40px; padding-bottom: 40px; }
}

/* Vidéo du collège : fenêtre sous la bannière, avec ses boutons de lecture et le son */
.film-section { padding: 40px 0 48px; }
@media (min-width: 1024px) { .film-section { padding: 56px 0 64px; } }
.film-fenetre {
  max-width: 1040px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden;
  background: #000; box-shadow: 0 2px 4px rgba(12,26,51,.08), 0 18px 48px rgba(12,26,51,.22);
  border: 1px solid rgba(12,26,51,.12);
}
.film-fenetre video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.film-fenetre { position: relative; }
.film-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; border-radius: 50%; border: 3px solid #fff;
  background: rgba(12,26,51,.78); color: #fff; cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: background .15s, transform .15s;
}
.film-play:hover { background: var(--accent); color: var(--brand); transform: translate(-50%, -50%) scale(1.06); }
.film-play:focus-visible { outline: 3px solid var(--focus-on-dark); outline-offset: 4px; }
.film-play .icon { width: 40px; height: 40px; margin-left: 5px; }
.film-play[hidden] { display: none; }
@media (max-width: 599px) { .film-play { width: 64px; height: 64px; } .film-play .icon { width: 30px; height: 30px; } }
@media (max-width: 599px) {
  .film-section { padding: 20px 0 28px; }
  .film-section .container { padding-left: 12px; padding-right: 12px; }
}

/* =========================================================
   5. ACCÈS RAPIDES
   ========================================================= */
.quick { position: relative; z-index: 2; }
.quick-grid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }
.quick-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 100%; min-height: 124px; padding: 18px 10px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.3; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.quick-tile:hover { border-color: var(--brand); color: var(--brand-strong); transform: translateY(-2px); }
.quick-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
}
.quick-icon .icon { width: 26px; height: 26px; }
.quick-tile.is-ed .quick-icon { background: var(--accent); color: var(--on-accent); }
.ext { display: inline-flex; align-items: center; gap: .25em; }
.ext .icon { width: .9em; height: .9em; }

/* =========================================================
   6. MOT DE LA DIRECTION
   ========================================================= */
.word { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .word { grid-template-columns: 5fr 7fr; gap: 56px; } }
.word-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.word-photo figcaption { font-size: .95rem; color: var(--muted); margin-top: 8px; }
.word blockquote {
  margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent);
  font-family: var(--heading-font); font-size: 1.3rem; line-height: 1.45; color: var(--brand);
}
.word blockquote p { margin: 0; }
.signature { font-weight: 700; margin: 0; }
.signature span { display: block; font-weight: 400; color: var(--muted); }
.word-links { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; margin-top: 24px; }

/* =========================================================
   7. SPÉCIFICITÉS (cartes)
   ========================================================= */
.cards { list-style: none; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--brand); }
.card:focus-within { border-color: var(--brand); }
.card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.card-tag { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 4px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; } /* toute la carte est cliquable */
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.card p { color: var(--muted); margin-bottom: 12px; }
.card .more { margin-top: auto; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: .35em; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chips li { font-size: .9rem; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); }

/* =========================================================
   8. AGENDA (texte, plus d'affiches)
   ========================================================= */
.agenda { list-style: none; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .agenda { grid-template-columns: repeat(2, 1fr); } }
.event {
  display: flex; gap: 16px; height: 100%; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.event-date {
  flex: none; width: 84px; padding: 10px 6px; border-radius: var(--radius); text-align: center;
  background: var(--brand); color: #fff; line-height: 1.1; align-self: flex-start;
}
.event-date .d { display: block; font-size: 1.7rem; font-weight: 700; font-family: var(--heading-font); }
.event-date .m { display: block; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.event-date .to { display: block; font-size: .85rem; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.4); }
.event h3 { font-size: 1.1rem; margin: 0 0 6px; font-family: "Source Sans 3", system-ui, sans-serif; }
.event p { margin: 0; color: var(--muted); font-size: 1rem; }
.event .event-date { color: #fff; }
.event ul { list-style: none; color: var(--muted); font-size: 1rem; }
.event ul strong { color: var(--ink); }
.event.is-todo { border: 2px dashed #A16207; background: #FFFBEA; }
.event.is-todo .event-date { background: #A16207; }

/* =========================================================
   9. GALERIE ÉVÉNEMENTS
   ========================================================= */
.gallery { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.shot { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); height: 100%; border: 1px solid var(--line); }
.shot a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.shot img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; transition: transform .3s; }
.shot a:hover img { transform: scale(1.03); }
.shot:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.shot a:focus-visible { outline: none; }
.shot img, .shot-placeholder { flex: none; }
.shot-text { display: block; padding: 12px 14px 14px; }
.shot-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 5 / 4; background: var(--bg-alt); }
.shot-placeholder img { width: 72px; height: 72px; aspect-ratio: 1; border-radius: 50%; opacity: .85; }
.shot h2.t, .shot h3.t { font-family: "Source Sans 3", system-ui, sans-serif; font-size: 1.05rem; margin: 2px 0 0; }
.shot time { display: block; font-size: .9rem; font-weight: 700; color: var(--accent-ink); }
.shot .t { display: block; font-weight: 700; color: var(--ink); line-height: 1.3; }
.shot a:hover .t { color: var(--brand); text-decoration: underline; }
@media (max-width: 479px) { .shot-text { padding: 10px; } .shot h2.t, .shot h3.t { font-size: .98rem; } }

/* =========================================================
   10. CONTACT
   ========================================================= */
.contact { display: grid; gap: 32px; }
@media (min-width: 900px) { .contact { grid-template-columns: 5fr 7fr; gap: 48px; } }
.contact-list { list-style: none; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list .ci {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
}
.contact-list strong { display: block; }
.contact-list p { margin: 0; color: var(--muted); }
.contact-list a { font-weight: 700; }
.map {
  position: relative; min-height: 340px; height: 100%; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background:
    linear-gradient(135deg, var(--brand-soft) 25%, transparent 25%) -20px 0/40px 40px,
    linear-gradient(225deg, var(--brand-soft) 25%, transparent 25%) -20px 0/40px 40px,
    linear-gradient(315deg, var(--brand-soft) 25%, transparent 25%) 0 0/40px 40px,
    linear-gradient(45deg, var(--brand-soft) 25%, var(--bg-alt) 25%) 0 0/40px 40px;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 24px; text-align: center;
}
.map-consent .box { background: var(--surface); padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow); max-width: 440px; }
.map-consent p { color: var(--muted); font-size: 1rem; }
.map-consent .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* =========================================================
   11. PIED DE PAGE
   ========================================================= */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 56px 0 0; font-size: 1rem; }
.site-footer a { color: var(--footer-link); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--footer-link); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.05rem; font-family: "Source Sans 3", system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--footer-ink); margin-bottom: 14px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 60px; height: 60px; border-radius: 50%; background: #fff; }
.footer-brand strong { font-family: var(--heading-font); font-size: 1.2rem; display: block; line-height: 1.2; }
.footer-brand span { color: var(--footer-muted); }
.footer-contact { list-style: none; display: grid; gap: 8px; color: var(--footer-muted); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { margin-top: .2em; }
.footer-links { list-style: none; display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 4px 0; }
.footer-links .sub { color: var(--footer-muted); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--footer-line);
}
.socials a:hover { background: rgba(127,127,127,.15); }
.footer-bottom { margin-top: 48px; border-top: 1px solid var(--footer-line); padding: 18px 0; color: var(--footer-muted); font-size: .95rem; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 20px; }


/* =========================================================
   12. COMPLÉMENTS WORDPRESS (classes générées par WordPress)
   ========================================================= */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.editor-hint {
  margin: 12px 0; padding: 10px 14px; border: 2px dashed #A16207; border-radius: 4px;
  background: #FFFBEA; color: #5B3A00; font-weight: 600;
}
.nav-empty a { color: #fff; }
.nav-item.is-current > .nav-toggle, .nav-item.is-current > .nav-link { box-shadow: inset 0 -4px 0 var(--accent); }
.submenu a[aria-current="page"] { font-weight: 700; color: var(--brand); box-shadow: inset 4px 0 0 var(--accent); }
.brand[aria-current="page"] { cursor: default; }
.event-when { font-weight: 600; color: var(--ink) !important; margin: 0 0 4px !important; }
.event-details { margin-top: 4px; }
.event-link { margin-top: 6px !important; }
.event-link a { font-weight: 700; }
.agenda-empty { color: var(--muted); }
.contact-list strong { color: var(--ink); }
.contact-more { margin-top: 24px; }
.map-consent strong { color: var(--ink); }

/* =========================================================
   13. PAGE D'ACCUEIL : sections construites avec les blocs de WordPress
   (groupe avec la classe « section » = bande pleine largeur)
   ========================================================= */
.home-content > .wp-block-group.section {
  margin: 0; padding: 56px max(16px, calc((100% - 1168px) / 2));
}
@media (min-width: 768px) { .home-content > .wp-block-group.section { padding-left: max(24px, calc((100% - 1152px) / 2)); padding-right: max(24px, calc((100% - 1152px) / 2)); } }
@media (min-width: 1024px) { .home-content > .wp-block-group.section { padding-top: 80px; padding-bottom: 80px; } }
.home-content > * { margin-top: 0; margin-bottom: 0; }
.wp-block-group.section-alt, .wp-block-group.is-style-fond-sable { background: var(--bg-alt); }
.wp-block-group.section > * + * { margin-top: 0; }
.wp-block-group.section > .kicker, .is-style-surtitre {
  display: block; font-family: "Source Sans 3", system-ui, sans-serif; font-size: .9rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 .4em;
}
.wp-block-group.section > h2 { margin: 0; }
.wp-block-group.section > .section-intro { margin: 8px 0 28px; }

/* Mot de la direction (colonnes : photo + texte) */
.wp-block-columns.word { gap: 32px 56px; align-items: center; margin: 0; }
.wp-block-columns.word .wp-block-image { margin: 0; }
.wp-block-columns.word .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.wp-block-columns.word .wp-block-column > * { margin-top: 0; }
.wp-block-columns.word .kicker { margin-bottom: .4em; }
.wp-block-columns.word p { margin: 0 0 1em; }
.wp-block-columns.word .wp-block-quote {
  margin: 24px 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent);
  font-family: var(--heading-font); font-size: 1.3rem; line-height: 1.45; color: var(--brand);
}
.wp-block-columns.word .wp-block-quote p { margin: 0; }
.wp-block-columns.word p.signature { font-weight: 700; margin: 0; }
.wp-block-columns.word p.signature + p { color: var(--muted); margin: 0; }
.wp-block-columns.word .wp-block-buttons { margin-top: 24px; align-items: center; gap: 12px 24px; }

/* Spécificités : grille de cartes faite de groupes */
.wp-block-group.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .wp-block-group.cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .wp-block-group.cards { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.wp-block-group.cards > * { margin: 0 !important; }
.wp-block-group.card { padding: 0; }
.wp-block-group.card > .wp-block-image { margin: 0; }
.wp-block-group.card > .wp-block-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.wp-block-group.card > :not(.wp-block-image) { margin: 0 22px; }
.wp-block-group.card > .card-tag { margin-top: 20px; margin-bottom: 4px; display: block; }
.wp-block-group.card > h3 { margin-bottom: .5em; }
.wp-block-group.card > p:not(.card-tag) { color: var(--muted); margin-bottom: 12px; }
.wp-block-group.card > .chips { margin-bottom: 14px; }
.wp-block-group.card::after {
  content: "En savoir plus →"; display: block; margin: auto 22px 22px; padding-top: 4px;
  font-weight: 700; color: var(--brand);
}
.card-noimg .card-body { padding-top: 24px; }

/* =========================================================
   14. PAGES INTÉRIEURES
   ========================================================= */
.page-header { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 20px 0 32px; }
@media (min-width: 1024px) { .page-header { padding: 28px 0 44px; } }
.page-title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); margin: 12px 0 0; max-width: 28ch; }
.page-meta { margin: 10px 0 0; font-weight: 700; color: var(--accent-ink); }
.page-intro { margin: 12px 0 0; font-size: 1.2rem; color: var(--muted); max-width: 65ch; }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0; padding: 0; font-size: .95rem; }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 .5em; color: var(--muted); }
.breadcrumbs a { color: var(--brand); padding: 6px 0; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

.page-layout { padding-top: 40px; padding-bottom: 64px; }
@media (min-width: 1024px) {
  .page-layout { padding-top: 56px; padding-bottom: 88px; }
  .page-layout.has-section-nav { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
}
.entry-content { max-width: 760px; min-width: 0; }
.page-layout:not(.has-section-nav) .entry-content { margin-left: auto; margin-right: auto; }
.section-tight { padding-top: 40px; padding-bottom: 64px; }

/* Menu « Dans cette rubrique » */
.page-aside { margin-top: 48px; }
@media (min-width: 1024px) { .page-aside { margin-top: 0; position: sticky; top: calc(var(--bar-h, 64px) + 24px); } }
.section-nav { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.section-nav h2 { font-size: 1.2rem; margin: 0 0 10px; }
.section-nav-kicker { display: block; font-family: "Source Sans 3", system-ui, sans-serif; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.section-nav ul { list-style: none; margin: 0; padding: 0; }
.section-nav li + li { border-top: 1px solid var(--line); }
.section-nav a { display: block; padding: 10px 4px; text-decoration: none; color: var(--ink); }
.section-nav a:hover { color: var(--brand); text-decoration: underline; }
.section-nav a[aria-current="page"] { font-weight: 700; color: var(--brand); box-shadow: inset 4px 0 0 var(--accent); padding-left: 14px; }

/* Typographie du contenu */
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem); margin-top: 1.8em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.5em; }
.entry-content h4 { font-size: 1.1rem; margin-top: 1.3em; font-family: "Source Sans 3", system-ui, sans-serif; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li > ul, .entry-content li > ol { margin-top: .35em; }
.entry-content a { font-weight: 600; }
.entry-content strong { color: var(--ink); }
.entry-content hr, .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry-content .wp-block-quote {
  margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent);
  font-family: var(--heading-font); font-size: 1.2rem; color: var(--brand);
}
.entry-content .wp-block-quote cite { display: block; margin-top: 8px; font-family: "Source Sans 3", system-ui, sans-serif; font-size: 1rem; font-style: normal; color: var(--muted); }
.entry-content .wp-block-image img { border-radius: var(--radius); }
.entry-content figcaption, .entry-content .wp-element-caption { font-size: .95rem; color: var(--muted); margin-top: 8px; text-align: left; }
.entry-content .wp-block-gallery { gap: 10px; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: var(--radius); }
.entry-content .wp-block-video video { width: 100%; border-radius: var(--radius); background: #000; }
.entry-content .wp-block-embed iframe { width: 100%; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.entry-content thead th, .entry-content tr:first-child th { background: var(--brand-soft); color: var(--brand-strong); }
.entry-content .alignwide, .entry-content .alignfull { max-width: 100%; }

/* Boutons (bloc « Boutons ») */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button__link, .wp-element-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius) !important;
  background: var(--accent); color: var(--on-accent); border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; line-height: 1.3;
}
.wp-block-button__link:hover, .wp-element-button:hover { background: var(--accent-hover); color: var(--on-accent); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--brand); border-color: var(--brand); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--brand); color: #fff; }

/* Styles de blocs du collège */
.wp-block-group.is-style-encadre { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; background: var(--surface); box-shadow: var(--shadow); }
.wp-block-group.is-style-encadre-info { border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 18px 22px; background: var(--bg-alt); }
.wp-block-group.is-style-fond-sable { border-radius: var(--radius-lg); padding: 24px; }
.wp-block-group.is-style-encadre > :last-child, .wp-block-group.is-style-encadre-info > :last-child, .wp-block-group.is-style-fond-sable > :last-child { margin-bottom: 0; }
.wp-block-group.is-style-encadre > :first-child, .wp-block-group.is-style-encadre-info > :first-child, .wp-block-group.is-style-fond-sable > :first-child { margin-top: 0; }
.is-style-chapeau { font-size: 1.2rem; color: var(--muted); }
.wp-block-image.is-style-arrondie img { border-radius: var(--radius-lg); }
ul.is-style-pastilles, ul.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; }
ul.is-style-pastilles li, ul.chips li { font-size: .95rem; padding: 2px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); margin: 0; }

/* Documents (bloc « Fichier ») : une ligne par document */
.wp-block-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; margin: 0 0 10px !important;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wp-block-file > a:first-child { flex: 1 1 260px; font-weight: 700; color: var(--brand); padding-left: 32px; position: relative; }
.wp-block-file > a:first-child::before {
  content: ""; position: absolute; left: 0; top: .1em; width: 22px; height: 26px; border-radius: 3px;
  background: var(--brand-soft); border: 2px solid var(--brand); border-top-right-radius: 9px;
}
.wp-block-file .file-meta { font-weight: 400; color: var(--muted); white-space: nowrap; }
.wp-block-file .wp-block-file__button { min-height: 44px; padding: 8px 16px; font-size: 1rem; }

/* Pages de la rubrique */
.subpages { margin: 2em 0; }
.subpages .cards { grid-template-columns: 1fr; }
@media (min-width: 640px) { .subpages .cards { grid-template-columns: repeat(2, 1fr); } }
.page-layout:not(.has-section-nav) .subpages .cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card .card-body h3 { font-size: 1.2rem; }

/* Plan du site */
.sitemap ul { list-style: none; padding-left: 0; }
.sitemap ul ul { padding-left: 1.4em; border-left: 2px solid var(--line); margin: 6px 0 14px 4px; }
.sitemap ul ul ul { border-left-style: dotted; }
.sitemap li { margin: 0 0 6px; }
.sitemap > ul > li > a { font-weight: 700; font-size: 1.1rem; }

/* Événements : liste et article */
.gallery-list { margin-top: 8px; }
.post-nav { display: grid; gap: 12px; margin: 0 0 24px; }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav-link { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 700; color: var(--brand); }
.post-nav-link:hover { border-color: var(--brand); text-decoration: underline; }
.post-nav-label { display: block; font-size: .9rem; font-weight: 600; color: var(--muted); }
.post-nav .is-prev { text-align: right; }
@media (min-width: 700px) { .post-nav .is-next:only-child { grid-column: 1; } .post-nav .is-prev:only-child { grid-column: 2; } }
.back-link { margin: 0 0 64px; }

.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 40px 0 0; }
.pagination a, .pagination span.page-numbers {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 700; color: var(--brand); background: var(--surface);
}
.pagination a:hover { border-color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .dots { border: 0; background: none; }

/* Recherche */
.search-form label { display: block; font-weight: 700; margin-bottom: 6px; }
.search-row { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form input[type="search"] {
  flex: 1 1 220px; min-height: 48px; padding: 8px 12px; font: inherit;
  border: 2px solid var(--muted); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.search-form .btn { border: 0; }
.search-results { list-style: none; padding: 0; margin-top: 32px; }
.search-results li { padding: 16px 0; border-top: 1px solid var(--line); }
.search-results h2 { font-size: 1.25rem; margin: 0 0 4px; }

.footer-bottom p { margin: 0; }

/* =========================================================
   15. IMPRESSION
   ========================================================= */
@media print {
  .site-header, .site-footer, .page-aside, .post-nav, .back-link, .skip-link, .map, .film-section { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .page-header { background: none; border: 0; padding: 0; }
  .entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-weight: 400; font-size: .85em; }
  .hero { color: #000; background: none; }
  .hero-img, .hero-shade { display: none; }
}

/* Cadrage des photos en hauteur dans les cartes (classe ajoutée au bloc Image) */
.focus-haut img { object-position: 50% 30%; }
.focus-milieu img { object-position: 50% 50%; }
.focus-bas img { object-position: 50% 75%; }
