/* École Sainte Marie — palette tirée du logo (bleu ciel) et des affiches (sarcelle, marine). */
:root {
  --sky: #3ab4dc;
  --sky-soft: #e4f4fa;
  --teal: #1d7590;
  --teal-dark: #155a6f;
  --ink: #16314a;
  --text: #24323f;
  --muted: #5d6b78;
  --sun: #f5a524;
  --sun-dark: #d98a0b;
  --paper: #fbfaf7;
  --white: #fff;
  --line: #e3e6e8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(22 49 74 / .06), 0 6px 24px rgb(22 49 74 / .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", var(--font);
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--font);
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin: 0 0 .4em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin: 0 0 .6em; font-weight: 750; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; font-weight: 700; }
p { margin: 0 0 1em; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin: 0 0 .5em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* -- barre supérieure et en-tête */
.topbar { background: var(--ink); color: #d7e4ee; font-size: .85rem; }
.topbar__inner { display: flex; gap: 24px; align-items: center; min-height: 36px; }
.topbar a, .topbar span { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.topbar a:hover { color: #fff; }
.topbar span { margin-left: auto; }

.header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 58px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.brand__motto { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.brand__name { white-space: nowrap; }
.nav__cta { white-space: nowrap; }

.nav { display: flex; align-items: center; gap: 12px; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 11px; border-radius: var(--radius-sm);
  font: 600 .95rem/1.2 var(--font); color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav__link:hover { background: var(--sky-soft); color: var(--ink); }
.nav__link.is-active { color: var(--teal); box-shadow: inset 0 -2px 0 var(--sky); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.caret { width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.nav__sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 270px;
  list-style: none; margin: 0; padding: 8px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none;
}
.nav__item.is-open .nav__sub { display: block; }
.nav__sub a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .95rem; }
.nav__sub a:hover, .nav__sub a[aria-current] { background: var(--sky-soft); color: var(--ink); }
.nav__sub a[aria-current] { font-weight: 600; }
@media (hover: hover) and (min-width: 1181px) {
  .has-children:hover .nav__sub, .has-children:focus-within .nav__sub { display: block; }
  .nav__sub::before { content: ""; position: absolute; inset: -8px 0 auto; height: 8px; }
}

.menu-toggle { display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; font: 600 .95rem var(--font); color: var(--ink); cursor: pointer; }
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px 20px 20px; max-height: calc(100vh - 76px); overflow-y: auto;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; }
  .nav__link { width: 100%; justify-content: space-between; padding: 12px; font-size: 1.05rem; }
  .nav__link.is-active { box-shadow: inset 3px 0 0 var(--sky); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .nav__sub { position: static; box-shadow: none; border: 0; padding: 0 0 6px 12px; min-width: 0; }
  .nav__cta { text-align: center; justify-content: center; }
}
@media (max-width: 760px) { .hide-sm { display: none !important; } }
@media (max-width: 480px) {
  .header__inner { min-height: 64px; gap: 12px; }
  .brand img { width: 44px; }
  .brand__name { font-size: 1.05rem; }
  .brand__motto { display: none; }
  .menu-toggle__label { display: none; }
  .nav { max-height: calc(100vh - 64px); }
  html { scroll-padding-top: 80px; }
}
@media (max-width: 900px) { .hide-md { display: none !important; } }

/* -- boutons et liens */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn--accent { background: var(--sun); color: var(--ink); }
.btn--accent:hover { background: var(--sun-dark); color: var(--ink); }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--ghost { border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: rgb(255 255 255 / .14); color: #fff; }
.nav__cta { padding: 10px 18px; font-size: .95rem; }
.link-arrow { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; text-decoration: none; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* -- accueil */
.hero { position: relative; min-height: min(78vh, 640px); display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--ink); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(22 49 74 / .1) 20%, rgb(22 49 74 / .82) 100%); }
.hero__content { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 56px; width: 100%; }
.hero__kicker { font-weight: 700; letter-spacing: .04em; color: #cfeefa; margin-bottom: .6em; }
.hero__title { color: #fff; max-width: 15ch; font-size: clamp(2.3rem, 6vw, 3.8rem); text-shadow: 0 2px 18px rgb(0 0 0 / .25); }
.hero__lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 42ch; margin-bottom: 1.6em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.announce { margin-top: -28px; position: relative; z-index: 2; }
.announce__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.announce__card {
  display: flex; gap: 16px; align-items: center; padding: 18px 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); border-left: 5px solid var(--sky);
  transition: transform .15s;
}
.announce__card:hover { transform: translateY(-2px); color: var(--text); }
.announce__date { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--sky-soft); color: var(--teal-dark); font-size: .75rem; line-height: 1.2; text-align: center; }
.announce__date strong { font: 800 1.8rem/1 var(--font-display); color: var(--ink); }
.announce__badge { display: grid; place-items: center; min-width: 58px; height: 58px; border-radius: 50%; background: #fff4df; color: var(--sun-dark); }
.announce__badge .icon { width: 26px; height: 26px; }
.announce__title { display: block; font-weight: 750; color: var(--ink); font-size: 1.05rem; }
.announce__text { display: block; color: var(--muted); font-size: .95rem; }

.section { padding: 64px 0; }
.section--tint { background: var(--sky-soft); }
.section--ink { background: var(--ink); color: #dce8f1; }
.section--ink h2 { color: #fff; }
.section__title { text-align: center; margin-bottom: 1.2em; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 1.2em; }
.section__head .section__title { margin: 0; text-align: left; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.facts strong { font: 800 1.45rem/1.2 var(--font-display); color: var(--teal); }
.facts span { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 2em; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-link {
  display: flex; flex-direction: column; gap: 6px; padding: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card-link:hover { border-color: var(--sky); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.card-link > .icon { width: 30px; height: 30px; color: var(--teal); margin-bottom: 6px; }
.card-link__title { font: 750 1.15rem/1.25 var(--font-display); color: var(--ink); }
.card-link__text { color: var(--muted); font-size: .97rem; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.split--top { align-items: start; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split--top .split__media { order: 2; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 820px) { .split, .split--top { grid-template-columns: 1fr; gap: 28px; } .split--top .split__media { order: 0; max-width: 420px; } }

.values { list-style: none; margin: 0 auto 1.6em; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 880px; }
.values--left { justify-content: flex-start; margin-left: 0; }
.values li { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid #c7e6f2; color: var(--ink); font-weight: 600; }
.values li:nth-child(3n+2) { background: var(--teal); border-color: var(--teal); color: #fff; }
.values li:nth-child(5n+4) { background: #fff4df; border-color: #fbd896; color: var(--ink); }

.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-bottom: 2em; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.news-card__media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.news-card__body { padding: 18px 20px 22px; }
.news-card time { font-size: .85rem; color: var(--muted); font-weight: 600; }
.news-card h3 { margin: .3em 0 .5em; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--teal); }
.news-card p { color: var(--muted); font-size: .97rem; margin: 0; }

.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.visit__address { font: 700 1.3rem/1.4 var(--font-display); color: #fff; }
.visit__media img { border-radius: var(--radius); }
@media (max-width: 820px) { .visit { grid-template-columns: 1fr; } }

/* -- pages intérieures */
.page-head { background: linear-gradient(135deg, var(--sky-soft), #f3fafd 60%, #fff8ea); border-bottom: 1px solid var(--line); padding: 48px 0 36px; }
.page-head h1 { margin-bottom: .25em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; margin: 0; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .6em; }
.crumbs a { font-weight: 600; }
.page-body { padding-top: 40px; padding-bottom: 72px; }
.block { margin-bottom: 48px; }
.block:last-child { margin-bottom: 0; }

.prose { max-width: 760px; }
.prose > .block > p, .prose > p { max-width: 68ch; }
.prose h2 { margin-top: 1.2em; }
.prose .block > h2:first-child, .prose > h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }
.page-body > .prose { max-width: none; }
.page-body > .prose > .block > :not(.gallery):not(.figure) { max-width: 760px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 1em 0 1.6em; }
.gallery--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery a { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.figure { margin: 1em 0 1.6em; max-width: 720px; }
.figure img { border-radius: var(--radius); }
@media (max-width: 520px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } }

.toc { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.toc a { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.toc a:hover { border-color: var(--sky); background: var(--sky-soft); }

.schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; max-width: 760px; margin: 1em 0 1.4em; }
.schedule__col { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--sky); border-radius: var(--radius); padding: 20px 22px; }
.schedule__col h3 { font-size: 1rem; color: var(--muted); font-family: var(--font); font-weight: 600; margin: 0; }
.schedule__time { font: 800 1.7rem/1.3 var(--font-display); color: var(--ink); margin: .1em 0 .2em; }
.schedule__col .muted { margin: 0; font-size: .95rem; }

.lead-card { display: inline-block; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--sun); border-radius: var(--radius); padding: 18px 26px; margin-bottom: 36px; }
.lead-card__name { font: 800 1.4rem/1.2 var(--font-display); color: var(--ink); margin: 0; }
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 48px; }
.team__col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.classes { margin: 0; }
.classes div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.classes div:first-child { border-top: 0; }
.classes dt { font-weight: 750; color: var(--teal); }
.classes dd { margin: 0; }

.steps { list-style: none; counter-reset: step; margin: 0 0 48px; padding: 0; display: grid; gap: 16px; max-width: 820px; }
.steps > li { counter-increment: step; position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 20px 84px; }
.steps > li::before { content: counter(step); position: absolute; left: 24px; top: 22px; width: 40px; height: 40px; border-radius: 50%; background: var(--sky); color: #fff; font: 800 1.2rem/40px var(--font-display); text-align: center; }
.steps h2 { font-size: 1.25rem; margin-bottom: .4em; }
.steps p:last-child { margin-bottom: 0; }
@media (max-width: 520px) { .steps > li { padding: 70px 20px 18px; } .steps > li::before { left: 20px; top: 18px; } }

.contact-list { list-style: none; padding: 0; margin: .6em 0 0; display: grid; gap: 8px; }
.contact-list li, .contact-list a { display: flex; align-items: center; gap: 10px; }
.contact-list .icon { color: var(--teal); }

.callout { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; background: var(--ink); color: #dce8f1; border-radius: var(--radius); padding: 32px; margin-bottom: 32px; max-width: 980px; }
.callout h2 { color: #fff; }
.callout .eyebrow { color: var(--sky); }
.callout p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.callout__media img { width: 220px; border-radius: var(--radius-sm); }
@media (max-width: 700px) { .callout { grid-template-columns: 1fr; padding: 24px; } .callout__media img { width: 100%; max-width: 280px; } }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 48px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.contact-card:hover { border-color: var(--sky); box-shadow: var(--shadow); color: var(--text); }
.contact-card .icon { width: 26px; height: 26px; color: var(--teal); margin-bottom: 6px; }
.contact-card__label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.contact-card__value { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 760px; }
.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 760px; }
.links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.links a:hover { border-color: var(--sky); background: var(--sky-soft); }
.links strong { color: var(--ink); }
.links .icon { color: var(--teal); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 3px solid #c7e6f2; }
.timeline__item { position: relative; padding-bottom: 40px; }
.timeline__item::before { content: ""; position: absolute; left: -38px; top: 6px; width: 17px; height: 17px; border-radius: 50%; background: var(--sky); border: 4px solid var(--paper); }
.timeline__item .prose { max-width: none; }
.timeline__item .prose > p { max-width: 68ch; }

/* -- pied de page */
.footer { background: #0f2436; color: #b9c9d6; font-size: .95rem; padding: 56px 0 0; }
.footer a { color: #e3eef6; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px; }
.footer__title { font: 700 1rem/1.3 var(--font-display); color: #fff; margin-bottom: .7em; }
.footer__motto { font-style: italic; color: var(--sky); }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer__bottom { border-top: 1px solid rgb(255 255 255 / .1); margin-top: 40px; padding-top: 18px; padding-bottom: 24px; font-size: .85rem; }

/* -- visionneuse */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(10 20 30 / .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 86vh; width: auto; border-radius: 6px; }
.lightbox button { position: absolute; background: rgb(255 255 255 / .12); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / .25); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #cbd6df; font-size: .9rem; margin: 0; }

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