/* ==========================================================================
   AL School, site vitrine
   Direction : le cahier de l'école. Page blanche, encre bleu nuit, marge rouge.
   Une seule audace : la marge rouge du cahier qui guide la lecture.
   Polices : Literata (titres, serif de livre scolaire) + Figtree (texte).
   ========================================================================== */

:root {
  /* Couleurs (reprises du monogramme AL) */
  --paper: #FCFCFA;        /* page */
  --paper-alt: #F2F4F8;    /* bandes alternées, bleu très pâle */
  --ink: #141A2E;          /* texte principal, noir bleuté */
  --ink-soft: #4B5368;     /* texte secondaire */
  --navy: #1E3A78;         /* bleu du logo, assombri */
  --navy-deep: #13264F;    /* fonds sombres */
  --red: #B8202E;          /* rouge du logo : marge, accents rares */
  --rule: #D7DCE7;         /* lignes du cahier */
  --rule-strong: #AEB6C8;
  --on-dark: #F4F6FB;
  --on-dark-soft: #BCC5DA;

  /* Typographie */
  --font-display: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
  --step-4: clamp(2.25rem, 1.5rem + 3vw, 3.6rem);
  --step-5: clamp(2.6rem, 1.6rem + 4.2vw, 4.4rem);

  /* Espacements et mise en page */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(4rem, 3rem + 5vw, 7.5rem);
  --max: 1200px;
  --margin-line: 2px;
  --radius: 6px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h3 { font-family: var(--font-text); font-weight: 650; letter-spacing: 0; line-height: 1.3; }
p { margin: 0; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--red); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); color: var(--paper); }

/* Conteneur avec gouttière latérale */
.wrap {
  max-width: calc(var(--max) + 64px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), 2rem);
  padding-right: max(16px, env(safe-area-inset-right, 0px), 2rem);
}
@media (max-width: 720px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem;
  font: 600 1rem/1.2 var(--font-text);
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #9A1A26; color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--on-dark); color: var(--navy-deep); }
.btn-light:hover { background: #fff; color: var(--red); }

/* ---------- En tête ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: auto; }
.brand-name { font: 700 1.15rem/1 var(--font-text); letter-spacing: 0.02em; }
.brand-sub { display: block; font: 400 0.8rem/1.2 var(--font-text); color: var(--ink-soft); margin-top: 3px; letter-spacing: 0; }

.nav { display: flex; align-items: center; gap: var(--space-3); }
.nav-list { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem; padding: 0.5rem 0; }
.nav-list a:hover { color: var(--red); }
.nav-actions { display: flex; gap: 0.75rem; align-items: center; }
.link-login { font-weight: 600; text-decoration: none; padding: 0.75rem 0.5rem; }

.nav-toggle {
  display: none; min-width: 48px; min-height: 48px; border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { margin: auto; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: var(--space-2);
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: var(--space-2) max(16px, env(safe-area-inset-right, 0px)) var(--space-3) max(16px, env(safe-area-inset-left, 0px));
  }
  .nav[data-open="false"] { display: none; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .link-login { text-align: center; }
}

/* ---------- Hero : la page de cahier ---------- */
.hero { position: relative; padding-block: var(--space-5) var(--space-6); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--space-5); align-items: center;
}
.hero-text {
  position: relative;
  padding-left: clamp(1.25rem, 3vw, 2.75rem);
  border-left: var(--margin-line) solid var(--red); /* la marge du cahier */
  display: flex; flex-direction: column; gap: var(--space-3);
}
.hero-kicker { font-weight: 600; color: var(--navy); font-size: 1rem; }
.hero h1 { font-size: var(--step-5); font-weight: 500; }
.hero-lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 32em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: var(--space-1); }
.hero-note { font-size: var(--step--1); color: var(--ink-soft); }

.hero-photo { aspect-ratio: 4 / 5; }
.hero-photo .photo-placeholder { justify-content: flex-start; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { aspect-ratio: 3 / 2; }
}

/* ---------- Emplacements photo ---------- */
.photo {
  position: relative; margin: 0; width: 100%; max-width: 100%;
  background-color: #DCE2EE;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(30, 58, 120, 0.10) 27px 28px);
  border-radius: var(--radius); overflow: hidden;
}
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem;
  padding: clamp(1rem, 3vw, 1.75rem); color: var(--navy-deep);
}
.photo-placeholder strong { font: 500 var(--step-1)/1.25 var(--font-display); }
.photo-placeholder span { font-size: var(--step--1); color: var(--ink-soft); max-width: 34em; }

/* ---------- Sommaire ---------- */
.contents { background: var(--paper-alt); border-block: 1px solid var(--rule); padding-block: var(--space-6); }
.contents-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-4); align-items: end; margin-bottom: var(--space-4); }
.contents-head h2 { font-size: var(--step-4); }
.contents-head p { color: var(--ink-soft); max-width: 34em; }
.toc { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); counter-reset: chap; }
.toc li { border-bottom: 1px solid var(--rule-strong); }
.toc a {
  display: grid; grid-template-columns: 3.5rem minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-2);
  align-items: baseline; padding-block: 1.35rem; text-decoration: none; color: var(--ink);
}
.toc a:hover .toc-title { color: var(--red); }
.toc-num { font: 500 var(--step-2)/1 var(--font-display); color: var(--red); font-variant-numeric: tabular-nums; }
.toc-title { font: 500 var(--step-2)/1.2 var(--font-display); transition: color .15s ease; }
.toc-items { color: var(--ink-soft); }

@media (max-width: 760px) {
  .contents-head { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .toc a { grid-template-columns: 2.5rem minmax(0, 1fr); row-gap: 0.25rem; }
  .toc-items { grid-column: 2; }
}

/* ---------- Chapitres de fonctionnalités ---------- */
.chapter { padding-block: var(--space-6); }
.chapter + .chapter { border-top: 1px solid var(--rule); }
.chapter-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-5); align-items: start;
}
.chapter-grid.is-flipped { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.chapter-grid.is-flipped .chapter-text { order: 2; }
.chapter-photo { aspect-ratio: 4 / 3; }
.chapter-text.narrow { max-width: 46rem; }
.chapter-text { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.chapter-label { display: flex; align-items: baseline; gap: 0.75rem; color: var(--red); font: 500 var(--step-1)/1 var(--font-display); }
.chapter-label span { color: var(--ink-soft); font: 500 var(--step--1)/1 var(--font-text); }
.chapter h2 { font-size: var(--step-3); }
.chapter-intro { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }

.features { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.features > div { padding-block: 1.1rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.3rem; }
.features dt { font-weight: 650; font-size: 1.08rem; }
.features dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 900px) {
  .chapter-grid, .chapter-grid.is-flipped { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .chapter-grid.is-flipped .chapter-text { order: 0; }
  .chapter-photo { aspect-ratio: 3 / 2; }
}

/* ---------- Tableau de bord ---------- */
.dashboard { padding-block: var(--space-6) var(--space-5); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-5); align-items: center; }
.dashboard-text { display: flex; flex-direction: column; gap: var(--space-3); }
.dashboard-text h2 { font-size: var(--step-4); }
.dashboard-text > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; max-width: 34em; }
.small-head { font: 600 0.95rem/1.3 var(--font-text); color: var(--navy); margin-bottom: 0.75rem; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } }
.indicators { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }
.indicators li { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; }
.indicators li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }

/* Fiche de l'assistant du jour : une page de cahier */
.note-card {
  margin: 0; position: relative; background: #fff; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem 3.25rem;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
  background-position: 0 14px;
  box-shadow: 0 14px 30px -24px rgba(20, 26, 46, 0.45);
  transform: rotate(-0.8deg);
}
.note-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.25rem; width: var(--margin-line); background: var(--red); opacity: .7; }
.note-title { font: 500 var(--step-2)/1.2 var(--font-display); color: var(--navy-deep); }
.note-sub { color: var(--ink-soft); line-height: 32px; margin-top: 0.25rem; }
.note-list { margin: 0; padding: 0; list-style: none; counter-reset: note; }
.note-list li { counter-increment: note; display: flex; align-items: center; gap: 0.75rem; line-height: 32px; font-weight: 500; }
.note-list li::before {
  content: counter(note); flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700; color: #fff; background: var(--navy);
}
.note-card figcaption { margin-top: 0.75rem; font-size: var(--step--1); color: var(--ink-soft); line-height: 32px; }
@media (prefers-reduced-motion: no-preference) { .note-card { transition: transform .3s ease; } .note-card:hover { transform: rotate(0deg); } }

/* ---------- Schémas de parcours ---------- */
.diagram {
  margin: var(--space-5) 0 0; padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--paper-alt); border: 1px solid var(--rule); border-radius: var(--radius);
  display: flex; flex-direction: column; gap: var(--space-3); min-width: 0;
  container-type: inline-size;
}
.diagram-title { font: 500 var(--step-2)/1.2 var(--font-display); color: var(--ink); }
.diagram-note { color: var(--ink-soft); font-size: 0.98rem; }
.lane { display: grid; gap: 0.75rem; }
.lane-title { font-weight: 600; font-size: 0.95rem; color: var(--navy); }

.flow { --gap: 34px; list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--gap); }
.flow li {
  position: relative; background: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 0.85rem 0.95rem; display: flex; flex-direction: column; gap: 0.3rem; min-width: 0;
}
.flow b { font-weight: 650; line-height: 1.3; }
.flow small { font-size: 0.9rem; line-height: 1.4; color: var(--ink-soft); }
/* flèches rouges entre les étapes */
.flow:not(.is-parallel) li + li::before {
  content: ""; position: absolute; top: 50%; left: calc(-1 * var(--gap) + 4px); width: calc(var(--gap) - 10px); height: 2px; background: var(--red);
}
.flow:not(.is-parallel) li + li::after {
  content: ""; position: absolute; top: calc(50% - 5px); left: -8px;
  border-left: 7px solid var(--red); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.flow.is-parallel li { border-style: dashed; }
.flow.is-parallel { grid-auto-columns: minmax(0, 1fr); max-width: 640px; }

/* étroit : le schéma se lit de haut en bas */
@container (max-width: 640px) {
  .flow { grid-auto-flow: row; --gap: 26px; }
  .flow.is-parallel { grid-auto-flow: row; }
  .flow:not(.is-parallel) li + li::before { top: calc(-1 * var(--gap) + 3px); left: 1.5rem; width: 2px; height: calc(var(--gap) - 10px); }
  .flow:not(.is-parallel) li + li::after {
    top: -9px; left: calc(1.5rem - 5px);
    border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--red); border-bottom: 0;
  }
}

/* Matrice des rôles */
.table-scroll { overflow-x: auto; max-width: 100%; }
.matrix { width: 100%; min-width: 560px; border-collapse: collapse; background: #fff; border: 1px solid var(--rule-strong); }
.matrix th, .matrix td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); font-size: 0.98rem; vertical-align: top; }
.matrix thead th { font: 600 0.95rem/1.3 var(--font-text); color: var(--navy); border-bottom: 2px solid var(--ink); }
.matrix tbody th { font-weight: 600; }
.matrix td.yes { font-weight: 600; color: var(--ink); }
.matrix td.yes::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); margin-right: 0.5rem; }
.matrix td.part { color: var(--ink); }
.matrix td.part::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--navy); margin-right: 0.5rem; box-sizing: border-box; }
.matrix td.no { color: #8A90A0; }

/* ---------- La démonstration ---------- */
.demo { padding-block: var(--space-6); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); align-items: start; }
.demo-text { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.demo-text h2 { font-size: var(--step-4); }
.demo-text p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.checklist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.checklist li { display: flex; gap: 0.9rem; align-items: flex-start; padding-block: 1rem; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
.checklist li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 0.25rem; border: 2px solid var(--red); border-radius: 3px;
  background: linear-gradient(var(--red), var(--red)) center / 8px 8px no-repeat;
}
@media (max-width: 900px) { .demo-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } }
.steps-section { border-top: 1px solid var(--rule); }

/* ---------- Bande photo : identité de l'école ---------- */
.identity { position: relative; color: var(--on-dark); background: var(--navy-deep); }
.identity .photo { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; background-color: #22345E;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(255,255,255,0.06) 27px 28px); }
.identity .photo-placeholder { color: var(--on-dark-soft); justify-content: flex-start; align-items: flex-end; text-align: right; }
.identity .photo-placeholder strong { color: var(--on-dark); }
.identity .photo-placeholder span { color: var(--on-dark-soft); }
.identity .photo img + .photo-placeholder { display: none; }
.identity-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19,38,79,.92) 0%, rgba(19,38,79,.78) 45%, rgba(19,38,79,.15) 100%); }
.identity-inner { position: relative; padding-block: var(--space-6); }
.identity-text { max-width: 36rem; display: flex; flex-direction: column; gap: var(--space-3);
  padding-left: clamp(1.25rem, 3vw, 2.75rem); border-left: var(--margin-line) solid var(--red); }
.identity h2 { color: var(--on-dark); font-size: var(--step-4); }
.identity p { color: var(--on-dark-soft); font-size: var(--step-1); line-height: 1.55; }
.identity ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; color: var(--on-dark); }
@media (max-width: 760px) {
  .identity-shade { background: rgba(19,38,79,.86); }
  .identity .photo-placeholder { display: none; }
}

/* ---------- Démarrage (vraie séquence) ---------- */
.steps-section { padding-block: var(--space-6); }
.steps-section > .wrap > h2 { font-size: var(--step-4); max-width: 18em; }
.steps { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.6rem; padding-top: var(--space-3); border-top: 2px solid var(--ink); min-width: 0; }
.steps li::before { content: counter(step); font: 500 var(--step-3)/1 var(--font-display); color: var(--red); }
.steps h3 { font-size: var(--step-1); }
.steps p { color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); } }

/* ---------- Contact ---------- */
.contact { background: var(--paper-alt); border-top: 1px solid var(--rule); padding-block: var(--space-6); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); align-items: start; }
.contact-intro { display: flex; flex-direction: column; gap: var(--space-3); }
.contact-intro h2 { font-size: var(--step-4); }
.contact-intro > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.contact-direct { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.contact-direct li { display: grid; gap: 0.15rem; padding-block: 0.9rem; border-bottom: 1px solid var(--rule); }
.contact-direct span { font-size: var(--step--1); color: var(--ink-soft); }
.contact-direct a, .contact-direct strong { font-weight: 600; font-size: 1.08rem; color: var(--ink); text-decoration: none; user-select: all; }
.contact-direct a:hover { color: var(--red); }

.form { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.5rem); display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label small { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius); padding: 0.75rem 0.85rem; min-height: 48px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,120,.18); }
.hp { position: absolute; left: -9999px; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.form-status { font-weight: 500; }
.form-status.ok { color: #1F6A3A; }
.form-status.err { color: var(--red); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-soft); padding-block: var(--space-5) var(--space-4); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-brand .logo-chip { background: var(--paper); border-radius: var(--radius); padding: 6px 8px; width: max-content; }
.footer-brand .logo-chip img { width: 46px; }
.footer-brand p { max-width: 26em; }
.site-footer h2 { font: 600 0.95rem/1.3 var(--font-text); color: var(--on-dark); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); font-size: var(--step--1); }
.site-footer li { overflow-wrap: anywhere; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Composants du site multipage
   ========================================================================== */

/* ---------- Menu : sous menu Fonctionnalités et page active ---------- */
.nav-list > li { position: relative; display: flex; align-items: center; }
.nav-list a[aria-current="page"], .sub-toggle.is-current { color: var(--navy); box-shadow: inset 0 -2px 0 var(--red); }
.sub-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0; min-height: 44px;
  font: 500 0.98rem/1.2 var(--font-text); color: var(--ink); background: none; border: 0; cursor: pointer;
}
.sub-toggle:hover { color: var(--red); }
.sub-toggle svg { transition: transform .15s ease; }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub {
  display: none; position: absolute; top: calc(100% + 10px); left: -1.25rem; min-width: 300px; z-index: 60;
  list-style: none; margin: 0; padding: 0.5rem; background: #fff;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  box-shadow: 0 20px 40px -28px rgba(20, 26, 46, 0.5);
}
.sub-toggle[aria-expanded="true"] + .sub { display: grid; }
.sub a { display: grid; gap: 0.1rem; padding: 0.7rem 0.85rem; border-radius: 4px; box-shadow: none !important; }
.sub a:hover { background: var(--paper-alt); color: var(--ink); }
.sub a[aria-current="page"] { background: var(--paper-alt); }
.sub a span { font-size: 0.85rem; font-weight: 400; color: var(--ink-soft); }

@media (max-width: 1000px) {
  .nav-list > li { display: block; }
  .sub-toggle { width: 100%; justify-content: space-between; padding: 0.85rem 0; border-bottom: 1px solid var(--rule); }
  .sub { position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 0.5rem 1rem; background: transparent; }
  .sub a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--red); padding-left: 0.75rem; }
}

/* ---------- En tête de page intérieure ---------- */
.page-hero { padding-block: var(--space-5) var(--space-5); border-bottom: 1px solid var(--rule); }
.page-hero.has-photo .page-hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-5); align-items: center; }
.page-hero-text {
  display: flex; flex-direction: column; gap: var(--space-3); min-width: 0;
  padding-left: clamp(1.25rem, 3vw, 2.75rem); border-left: var(--margin-line) solid var(--red);
}
.page-hero h1 { font-size: var(--step-4); max-width: 16em; }
.page-hero .lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 34em; }
.page-hero .photo { aspect-ratio: 4 / 3; }
@media (max-width: 900px) {
  .page-hero.has-photo .page-hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .page-hero .photo { aspect-ratio: 3 / 2; }
}

/* Fil d'Ariane */
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: var(--step--1); color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--rule-strong); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Sections de contenu ---------- */
.section { padding-block: var(--space-6); }
.section + .section { border-top: 1px solid var(--rule); }
.section.is-alt { background: var(--paper-alt); }
.section-head { display: flex; flex-direction: column; gap: var(--space-2); max-width: 44rem; margin-bottom: var(--space-4); }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }

/* Deux colonnes : titre à gauche, contenu à droite */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-5); align-items: start; }
.split-aside { display: flex; flex-direction: column; gap: var(--space-2); position: sticky; top: 104px; }
.split-aside h2 { font-size: var(--step-3); }
.split-aside p { color: var(--ink-soft); }
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .split-aside { position: static; }
}
.diagram.is-flush { margin-top: 0; }

/* Texte courant (À propos, mentions) */
.prose { max-width: 40rem; display: flex; flex-direction: column; gap: 1.1rem; }
.prose h2 { font-size: var(--step-3); margin-top: var(--space-3); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-2); }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; }

/* Listes à puces carrées rouges, comme dans un cahier */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.ticks li { display: flex; gap: 0.75rem; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--red); transform: translateY(-2px); }
.ticks.is-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 2rem; }
@media (max-width: 560px) { .ticks.is-columns { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Index des pages modules (accueil, fonctionnalités) ---------- */
.modules { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.modules > li { border-bottom: 1px solid var(--rule-strong); }
.module-link {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; gap: var(--space-3);
  align-items: center; padding-block: 1.6rem; color: var(--ink); text-decoration: none;
}
.module-link h3 { font: 500 var(--step-2)/1.2 var(--font-display); transition: color .15s ease; }
.module-link p { color: var(--ink-soft); }
.module-go {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink); transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.module-link:hover h3 { color: var(--red); }
.module-link:hover .module-go { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 760px) {
  .module-link { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.4rem; }
  .module-link p { grid-column: 1; grid-row: 2; }
  .module-go { grid-column: 2; grid-row: 1 / span 2; }
}

/* Vue d'ensemble : trois domaines en colonnes */
.domains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.domain { display: flex; flex-direction: column; gap: 0.9rem; padding: var(--space-3) var(--space-3) var(--space-3) 0; min-width: 0; }
.domain + .domain { padding-left: var(--space-3); border-left: 1px solid var(--rule-strong); }
.domain h3 { font: 500 var(--step-2)/1.2 var(--font-display); }
.domain > p { color: var(--ink-soft); }
.domain .ticks { flex: 1; }
.text-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; padding-block: 0.5rem; }
.text-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .domains { grid-template-columns: minmax(0, 1fr); }
  .domain, .domain + .domain { padding: var(--space-3) 0; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* Capture d'écran facultative : n'apparaît que si le fichier existe */
.capture { margin: 0; display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.capture img { width: 100%; height: auto; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: #fff; }
.capture figcaption { font-size: var(--step--1); color: var(--ink-soft); }
.capture-block { margin-top: var(--space-4); }

/* ---------- Bandeau d'appel à la démonstration ---------- */
.cta-band { background: var(--navy-deep); color: var(--on-dark); }
.cta-band .wrap { padding-block: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cta-band-text { display: flex; flex-direction: column; gap: 0.6rem; max-width: 36rem; padding-left: clamp(1.25rem, 3vw, 2.75rem); border-left: var(--margin-line) solid var(--red); }
.cta-band h2 { color: var(--on-dark); font-size: var(--step-3); }
.cta-band p { color: var(--on-dark-soft); }

/* Page suivante / précédente entre les modules */
.pager { border-top: 1px solid var(--rule); }
.pager .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding-block: var(--space-4); }
.pager a { display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; color: var(--ink); padding: 0.5rem 0; }
.pager a span { font-size: var(--step--1); color: var(--ink-soft); }
.pager a strong { font: 500 var(--step-2)/1.2 var(--font-display); }
.pager a:hover strong { color: var(--red); }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager .wrap { grid-template-columns: minmax(0, 1fr); } .pager .next { grid-column: 1; text-align: left; } }

/* ---------- Accueil ---------- */
.home-overview { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-5); align-items: center; }
.home-overview .stack { display: flex; flex-direction: column; gap: var(--space-3); }
.home-overview h2 { font-size: var(--step-4); }
.home-overview .stack > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; max-width: 34em; }
@media (max-width: 900px) { .home-overview { grid-template-columns: minmax(0, 1fr); } }

/* ---------- À propos ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-5); align-items: start; }
.about-facts { border-top: 2px solid var(--ink); }
.about-facts div { padding-block: 1rem; border-bottom: 1px solid var(--rule); display: grid; gap: 0.2rem; }
.about-facts dt { font-size: var(--step--1); color: var(--ink-soft); }
.about-facts dd { margin: 0; font-weight: 600; }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Page introuvable ---------- */
.notfound { padding-block: var(--space-6); }
.notfound .page-hero-text { max-width: 40rem; }

/* ---------- Fond animé « réseau de l'école » ---------- */
.has-canvas {
  position: relative; overflow: hidden; isolation: isolate;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(30, 58, 120, 0.055) 31px 32px);
}
.reseau { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(circle at 74% 42%, rgba(30, 58, 120, 0.09), transparent 52%),
    linear-gradient(90deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 88%, transparent) 36%, transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 60%, transparent) 0%, transparent 22%, transparent 78%, var(--paper) 100%);
}
.has-canvas > .wrap { position: relative; z-index: 2; }
@media (max-width: 999px) {
  .hero-veil {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--paper) 92%, transparent) 0%, color-mix(in srgb, var(--paper) 86%, transparent) 62%, transparent 76%, color-mix(in srgb, var(--paper) 40%, transparent) 100%);
  }
}

/* Accueil : en tête plein cadre sur le réseau */
.hero.has-canvas { padding-block: clamp(5rem, 9vw, 8.5rem) clamp(6rem, 11vw, 10rem); }
.hero.has-canvas .hero-grid { grid-template-columns: minmax(0, 1fr); }
.hero.has-canvas .hero-text { max-width: 40rem; }
.hero.has-canvas h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.6rem); line-height: 1.04; }
@media (max-width: 999px) { .hero.has-canvas { padding-block: 3.5rem 10.5rem; } }

/* Pages intérieures */
.page-hero.has-canvas { padding-block: clamp(4rem, 7vw, 6.5rem); }
.page-hero.has-canvas .page-hero-text { max-width: 40rem; }
@media (max-width: 999px) { .page-hero.has-canvas { padding-block: 2.5rem 9.5rem; } }

/* Photo placée sous le titre de la colonne latérale */
.split-aside .photo { aspect-ratio: 4 / 3; margin-top: var(--space-2); }
.about-side { display: flex; flex-direction: column; gap: var(--space-3); }
.about-side .photo { aspect-ratio: 4 / 3; }

/* ==========================================================================
   Interactions douces au curseur
   ========================================================================== */
.cursor-halo {
  position: fixed; left: 0; top: 0; z-index: 45; width: 440px; height: 440px; margin: -220px 0 0 -220px;
  border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(circle, rgba(30, 58, 120, 0.075) 0%, rgba(184, 32, 46, 0.03) 38%, transparent 68%);
  mix-blend-mode: multiply; will-change: transform;
}
.cursor-halo.is-on { opacity: 1; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor-halo { display: none; } }

/* ---------- Mosaïque de cartes ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tile {
  position: relative; overflow: hidden; isolation: isolate; min-width: 0; min-height: 250px;
  display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: #fff; color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 20px;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), border-color .35s ease, box-shadow .45s ease;
}
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(30, 58, 120, 0.09), transparent 62%);
}
.tile:hover { transform: translateY(-4px); border-color: rgba(30, 58, 120, 0.32); box-shadow: 0 26px 50px -34px rgba(20, 26, 46, 0.5); }
.tile:hover::before { opacity: 1; }
.tile:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.tile-icon {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px;
  background: var(--paper-alt); border: 1px solid var(--rule); color: var(--navy);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.tile:hover .tile-icon { transform: translateY(-3px); }
.tile-mark {
  position: absolute; right: -36px; top: -36px; z-index: -1; color: var(--navy); opacity: .055; pointer-events: none;
  transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .5s ease;
}
.tile:hover .tile-mark { transform: scale(1.1) rotate(-5deg); opacity: .1; }
.tile h3 { font: 500 var(--step-2)/1.2 var(--font-display); margin-top: 0.5rem; }
.tile p { color: var(--ink-soft); }
.tile .ticks { margin-top: 0.25rem; }
.tile-go { margin-top: auto; padding-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--navy); }
.tile-go svg { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.tile:hover .tile-go svg, .tile-go:hover svg { transform: translateX(5px); }
a.tile-go { text-decoration: none; }
.tile.is-wide { grid-column: span 2; min-height: 320px; background: var(--paper-alt); }
.tile.is-wide .tile-mark { opacity: .07; }
.tile.is-dark { background: var(--navy-deep); color: var(--on-dark); border-color: transparent; }
.tile.is-dark::before { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 62%); }
.tile.is-dark h3 { color: var(--on-dark); }
.tile.is-dark p, .tile.is-dark .ticks li { color: var(--on-dark-soft); }
.tile.is-dark .tile-icon { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.tile.is-dark .tile-mark { color: #fff; opacity: .06; }
.tile.is-dark .tile-go, .tile.is-dark a.tile-go { color: #fff; }
.tile.is-dark:hover { border-color: transparent; }
@media (max-width: 900px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile.is-wide { grid-column: auto; } .tile { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .tile, .tile-mark, .tile-icon, .tile-go svg { transition: none; } .tile:hover { transform: none; } }

/* ---------- Page Contact : en tête sombre et halos ---------- */
.contact-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--navy-deep); color: var(--on-dark); }
.contact-hero .wrap { position: relative; z-index: 1; padding-block: clamp(4rem, 8vw, 7rem); }
.glow { position: absolute; z-index: 0; border-radius: 50%; filter: blur(80px); pointer-events: none; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.glow-a { width: 560px; height: 560px; left: 46%; top: -260px; background: rgba(62, 104, 196, 0.55); }
.glow-b { width: 440px; height: 440px; right: -140px; bottom: -260px; background: rgba(184, 32, 46, 0.42); }
.contact-hero .page-hero-text { max-width: 44rem; }
.contact-hero h1 { color: var(--on-dark); font-size: var(--step-4); }
.contact-hero .lead { color: var(--on-dark-soft); font-size: var(--step-1); line-height: 1.55; }
.contact-hero .breadcrumb ol, .contact-hero .breadcrumb a { color: var(--on-dark-soft); }
.contact-hero .breadcrumb li + li::before { color: rgba(255, 255, 255, 0.3); }

.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.way { min-height: 0; gap: 0.35rem; padding: 1.5rem; }
.way h2 { font: 650 1.05rem/1.3 var(--font-text); margin-top: 0.75rem; }
.way p { font-size: 0.95rem; }
.way strong, .way a.way-value { margin-top: 0.6rem; font-weight: 650; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.way a.way-value:hover { color: var(--red); }
.ways-section { padding-block: var(--space-4); background: var(--paper-alt); border-bottom: 1px solid var(--rule); }
@media (max-width: 1000px) { .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ways { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Inspiré des exemples : accueil centré, bande colorée, bloc d'appel, pied de page
   ========================================================================== */

/* Espacements resserrés entre les blocs */
:root {
  --space-5: clamp(2rem, 1.6rem + 1.4vw, 3rem);
  --space-6: clamp(2.75rem, 2.2rem + 2.2vw, 4.25rem);
}
.section-head { margin-bottom: var(--space-3); }
.diagram { margin-top: var(--space-3); }
.capture-block { margin-top: var(--space-3); }

/* Badge en pastille */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 1rem; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; color: var(--ink);
  background: color-mix(in srgb, var(--red) 7%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--red) 26%, var(--paper));
  box-shadow: 0 10px 30px -14px rgba(30, 58, 120, 0.35);
}
.pill svg { color: var(--red); }
.pill.is-dark { color: rgba(255,255,255,.85); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); box-shadow: none; }

/* Accueil : en tête centré sur le réseau */
.hero-center { position: relative; min-height: min(780px, 88vh); display: flex; align-items: center; padding-block: 4rem; }
.hero-center .wrap { width: 100%; }
.hero-center-text { max-width: 54rem; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hero-center h1 {
  font-size: clamp(2.6rem, 1.4rem + 5vw, 5.6rem); line-height: 1.02; letter-spacing: -0.025em;
  background: linear-gradient(180deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 80%, var(--navy)) 55%, var(--navy) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-center .hero-lead { max-width: 38rem; margin-inline: auto; }
.hero-center .hero-cta { justify-content: center; }
.hero-center .hero-veil {
  background:
    radial-gradient(ellipse 46% 50% at 50% 48%, var(--paper) 0%, color-mix(in srgb, var(--paper) 90%, transparent) 45%, transparent 100%),
    radial-gradient(circle at 50% 34%, rgba(30, 58, 120, 0.10), transparent 48%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper) 55%, transparent), transparent 30%, transparent 75%, var(--paper));
}
@media (max-width: 999px) {
  .hero-center { min-height: 0; padding-block: 3.5rem 10.5rem; }
  .hero-center .hero-veil { background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 92%, transparent) 0%, color-mix(in srgb, var(--paper) 88%, transparent) 66%, transparent 80%, color-mix(in srgb, var(--paper) 40%, transparent) 100%); }
}

/* Bande colorée avec cartes vitrées */
.band { background: var(--navy); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.band::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -220px; border-radius: 50%; background: rgba(184, 32, 46, 0.35); filter: blur(90px); }
.band .wrap { padding-block: var(--space-6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: center; }
.band h2 { color: #fff; font-size: var(--step-4); }
.band-text { display: flex; flex-direction: column; gap: 1.25rem; }
.band-text > p { color: rgba(255, 255, 255, 0.8); font-size: var(--step-1); line-height: 1.55; }
.band-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.band-list li { display: flex; gap: 0.75rem; align-items: center; font-size: 1.08rem; }
.band-list svg { flex: none; color: #fff; background: rgba(255,255,255,.14); border-radius: 50%; padding: 4px; }
.glass-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.glass {
  position: relative; overflow: hidden; padding: 1.75rem; border-radius: 24px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 0.5rem; transition: background-color .35s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
.glass:nth-child(even) { transform: translateY(2rem); }
.glass:hover { background: rgba(255, 255, 255, 0.15); }
.glass strong { font: 500 clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem)/1.1 var(--font-display); color: #fff; }
.glass span { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
@media (max-width: 900px) {
  .band .wrap { grid-template-columns: minmax(0, 1fr); }
  .glass:nth-child(even) { transform: none; }
}
@media (max-width: 420px) { .glass-grid { grid-template-columns: minmax(0, 1fr); } }

/* Bloc d'appel final arrondi */
.cta-panel-section { padding-block: var(--space-6); }
.cta-panel {
  position: relative; overflow: hidden; isolation: isolate; max-width: 64rem; margin-inline: auto; text-align: center;
  padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 4rem); border-radius: 36px;
  background: var(--paper-alt); border: 1px solid var(--rule);
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
}
.cta-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(45deg, rgba(30,58,120,.06), transparent 45%, rgba(184,32,46,.06)); }
.cta-panel-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #fff; border: 1px solid var(--rule); color: var(--navy); }
.cta-panel h2 { font-size: var(--step-4); }
.cta-panel p { color: var(--ink-soft); font-size: var(--step-1); max-width: 36rem; }
.btn-dark {
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 1rem 2rem; min-height: 56px; font-size: 1.05rem;
  box-shadow: 0 18px 30px -18px rgba(20,26,46,.6); transition: transform .3s cubic-bezier(.2,.7,.2,1), background-color .2s ease;
}
.btn-dark:hover { background: var(--navy-deep); color: #fff; transform: scale(1.03); }
.btn-dark svg { transition: transform .3s ease; }
.btn-dark:hover svg { transform: translateX(4px); }
.cta-panel-section + .pager { border-top: 0; }

/* Pied de page sombre avec halos */
.site-footer { position: relative; overflow: hidden; isolation: isolate; padding-block: var(--space-5) var(--space-3); }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--red), transparent); }
.site-footer .foot-glow { position: absolute; z-index: -1; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.site-footer .foot-glow.a { width: 300px; height: 300px; right: -110px; top: -110px; background: rgba(30, 58, 120, 0.55); }
.site-footer .foot-glow.b { width: 300px; height: 300px; left: 40px; bottom: -150px; background: rgba(184, 32, 46, 0.25); }
.footer-brand .btn { width: max-content; margin-top: 0.5rem; }

/* Contact centré comme l'exemple */
.contact-hero .page-hero-text.is-center { margin-inline: auto; text-align: center; align-items: center; border-left: 0; padding-left: 0; }
.contact-hero .is-center .breadcrumb ol { justify-content: center; }
.contact-hero .glow-a { left: 50%; margin-left: -280px; }

/* ==========================================================================
   Logo AL School seul, mention de pied de page, photos de l'univers scolaire
   ========================================================================== */
.brand img { width: auto; height: 58px; }
.site-header .wrap { min-height: 76px; }
.footer-brand .logo-chip { padding: 10px 14px; }
.footer-brand .logo-chip img { width: auto; height: 64px; }
.footer-by { color: #fff; font-weight: 600; letter-spacing: 0.01em; }
@media (max-width: 760px) { .brand img { height: 50px; } }

/* Mosaïque photo de l'accueil */
.school-photos { padding-block: var(--space-6) var(--space-5); }
.school-photos-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: var(--space-3); }
.school-photos-head h2 { font-size: var(--step-3); }
.school-photos-head p { color: var(--ink-soft); max-width: 34rem; }
.photo-mosaic {
  display: grid; gap: 1rem;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr);
  grid-template-rows: repeat(2, minmax(0, 220px));
}
.pm { position: relative; margin: 0; overflow: hidden; border-radius: 20px; background-color: #DCE2EE;
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(30, 58, 120, 0.10) 27px 28px); }
.pm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.pm:hover img { transform: scale(1.04); }
.pm figcaption {
  position: absolute; left: 0.9rem; bottom: 0.9rem; padding: 0.35rem 0.8rem; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.pm-a { grid-row: 1 / span 2; }
.pm-b { grid-column: 2 / span 2; }
@media (max-width: 760px) {
  .photo-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; }
  .photo-mosaic .pm { grid-row: auto; aspect-ratio: 1 / 1; }
  .photo-mosaic .pm-a, .photo-mosaic .pm-b { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
}
@media (prefers-reduced-motion: reduce) { .pm img { transition: none; } .pm:hover img { transform: none; } }

/* ==========================================================================
   Inscription par QR code : affiche + téléphone
   ========================================================================== */
.qr-section { overflow: hidden; }
.qr-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-5); align-items: center; }
.qr-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.qr-text h2 { font-size: var(--step-3); }
.qr-text > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; max-width: 34rem; }
.qr-steps { list-style: none; margin: 0.25rem 0 0.5rem; padding: 0; display: grid; gap: 0.85rem; counter-reset: qr; }
.qr-steps li { counter-increment: qr; display: grid; grid-template-columns: 2.1rem minmax(0, 1fr); column-gap: 0.85rem; }
.qr-steps li::before {
  content: counter(qr); grid-row: 1 / span 2; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; color: #fff; background: var(--navy);
}
.qr-steps li:last-child::before { background: var(--red); }
.qr-steps b { font-weight: 650; }
.qr-steps span { color: var(--ink-soft); font-size: 0.97rem; }

.qr-visual { position: relative; margin: 0; min-height: 470px; padding-bottom: 3rem; display: flex; align-items: center; }
.qr-poster {
  position: relative; overflow: hidden; isolation: isolate; width: min(300px, 70%); padding: 1.6rem 1.5rem 1.4rem; text-align: center;
  background: #fff; border: 1px solid var(--rule); border-radius: 22px; transform: rotate(-3deg);
  box-shadow: 0 30px 60px -36px rgba(20, 26, 46, 0.55);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(30, 58, 120, 0.05) 31px 32px);
}
.qr-poster::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(30, 58, 120, 0.08), transparent 60%); }
.qr-poster:hover::before { opacity: 1; }
.qr-poster-school { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.qr-poster-title { font: 500 1.5rem/1.15 var(--font-display); color: var(--navy-deep); margin: 0.3rem 0 1rem; }
.qr-code { position: relative; width: 78%; margin-inline: auto; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; }
.qr-code img { width: 100%; height: 100%; display: block; }
.qr-code.is-sample img { filter: blur(3.2px); transform: scale(1.03); }
.qr-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0.3rem 0.8rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; color: #fff; background: var(--red); letter-spacing: 0.02em;
}
.qr-code:not(.is-sample) .qr-badge { display: none; }
.qr-poster-hint { margin-top: 0.9rem; font-weight: 600; font-size: 0.92rem; }

.phone {
  position: absolute; right: 0; top: 50%; transform: translateY(-46%) rotate(4deg); width: min(230px, 52%);
  padding: 10px; border-radius: 34px; background: var(--ink); box-shadow: 0 34px 60px -30px rgba(20, 26, 46, 0.7);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.qr-visual:hover .phone { transform: translateY(-48%) rotate(2deg); }
.phone-screen { border-radius: 26px; background: var(--paper); padding: 1.1rem 0.9rem 1rem; display: grid; gap: 0.5rem; }
.ph-top { font: 500 1rem/1.2 var(--font-display); color: var(--navy-deep); padding-bottom: 0.4rem; border-bottom: 2px solid var(--red); margin-bottom: 0.2rem; }
.ph-field { display: grid; gap: 0.15rem; }
.ph-field span { font-size: 0.68rem; color: var(--ink-soft); }
.ph-field b { font-size: 0.8rem; font-weight: 600; padding: 0.4rem 0.55rem; border: 1px solid var(--rule-strong); border-radius: 7px; background: #fff; }
.ph-btn { margin-top: 0.35rem; text-align: center; padding: 0.55rem; border-radius: 8px; background: var(--red); color: #fff; font-size: 0.8rem; font-weight: 600; }
.qr-toast {
  position: absolute; left: 6%; bottom: 0; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.95rem; border-radius: 999px; background: #fff; border: 1px solid var(--rule);
  font-size: 0.88rem; font-weight: 600; color: var(--ink); box-shadow: 0 14px 30px -20px rgba(20, 26, 46, 0.5);
}
.qr-toast svg { color: #fff; background: #1F6A3A; border-radius: 50%; padding: 2px; }
@media (max-width: 900px) {
  .qr-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-visual { min-height: 440px; max-width: 520px; width: 100%; margin-inline: auto; }
}
@media (max-width: 480px) {
  .qr-visual { min-height: 400px; }
  .qr-poster { width: 62%; padding: 1.1rem 0.8rem; }
  .qr-poster-hint { font-size: 0.8rem; }
  .qr-poster-title { font-size: 1.2rem; }
  .phone { width: 45%; padding: 7px; border-radius: 26px; }
  .phone-screen { border-radius: 20px; padding: 0.8rem 0.6rem; gap: 0.35rem; }
  .ph-field:nth-of-type(n+5) { display: none; }
  .qr-toast { right: auto; left: 4%; font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .phone, .qr-visual:hover .phone { transition: none; } }

/* ==========================================================================
   Photos réparties dans le site
   ========================================================================== */
/* Accueil : une photo et son texte */
.intro-photo { padding-block: var(--space-6) var(--space-5); }
.intro-photo-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-5); align-items: center; }
.intro-photo-frame {
  position: relative; margin: 0; aspect-ratio: 5 / 4; border-radius: 26px; overflow: hidden;
  background-color: #DCE2EE; background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(30, 58, 120, 0.10) 27px 28px);
}
.intro-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.intro-photo-frame:hover img { transform: scale(1.03); }
.intro-chip {
  position: absolute; left: 1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.intro-chip svg { color: var(--red); }
.intro-photo-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
.intro-photo-text h2 { font-size: var(--step-4); }
.intro-photo-text > p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
@media (max-width: 900px) { .intro-photo-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } .intro-photo-frame { aspect-ratio: 3 / 2; } }

/* Carte large avec photo */
.tile.has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; padding: 0; }
.tile.has-photo .tile-body { display: flex; flex-direction: column; gap: 0.75rem; padding: clamp(1.5rem, 2.5vw, 2.25rem) 0 clamp(1.5rem, 2.5vw, 2.25rem) clamp(1.5rem, 2.5vw, 2.25rem); }
.tile-photo {
  position: relative; display: block; overflow: hidden; min-height: 220px; border-radius: 0 20px 20px 0;
  background-color: #DCE2EE; background-image: repeating-linear-gradient(to bottom, transparent 0 27px, rgba(30, 58, 120, 0.10) 27px 28px);
}
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tile.has-photo:hover .tile-photo img { transform: scale(1.05); }
@media (max-width: 600px) {
  .tile.has-photo { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tile.has-photo .tile-body { padding: 1.5rem; order: 2; }
  .tile-photo { order: 1; min-height: 190px; border-radius: 20px 20px 0 0; }
}

/* Bande bleue avec photo en fond */
.band-photo { position: absolute; inset: 0; z-index: -2; }
.band-photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0.32; filter: grayscale(0.35); }
.band .wrap { position: relative; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(19, 38, 79, 0.96) 0%, rgba(30, 58, 120, 0.86) 50%, rgba(30, 58, 120, 0.72) 100%); }

@media (prefers-reduced-motion: reduce) { .intro-photo-frame img, .tile-photo img { transition: none; } }

/* La légende d'attente disparaît dès qu'une photo est chargée */
.photo img + .photo-placeholder { display: none; }

/* À propos : bandeau photo */
.about-banner { padding-block: 0 var(--space-5); }
.about-banner-frame { position: relative; margin: 0; overflow: hidden; border-radius: 26px; aspect-ratio: 21 / 8; background: #DCE2EE; }
.about-banner-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.about-banner-frame figcaption {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: clamp(1.25rem, 4vw, 3rem);
  background: linear-gradient(90deg, rgba(19, 38, 79, 0.82) 0%, rgba(19, 38, 79, 0.35) 55%, transparent 80%);
}
.about-banner-frame figcaption p { max-width: 26rem; color: #fff; font: 500 var(--step-3)/1.2 var(--font-display); }
@media (max-width: 700px) {
  .about-banner-frame { aspect-ratio: 4 / 5; }
  .about-banner-frame figcaption { background: linear-gradient(0deg, rgba(19, 38, 79, 0.85) 0%, rgba(19, 38, 79, 0.2) 60%, transparent 100%); }
}
