/* =========================================================
   Collège La Fraternité — Kinkole
   Charte : rouge (amour, énergie) + bleu (discipline, confiance)
   ========================================================= */

:root {
  --red: #c8102e;
  --red-dark: #9e0b23;
  --red-soft: #fdecef;
  --blue: #1b3a8c;
  --blue-dark: #0f2459;
  --blue-soft: #eaf0fb;
  --ink: #141a2e;
  --muted: #5a6275;
  --line: #e3e7ef;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --white: #ffffff;

  /* Une seule police pour tout le site : Alegreya Sans (humaniste, d'inspiration calligraphique) */
  --font-body: "Alegreya Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-head: var(--font-body);

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 10px 30px -12px rgba(15, 36, 89, .25);
  --shadow-lg: 0 24px 60px -20px rgba(15, 36, 89, .35);
  --container: 1180px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.08; margin: 0 0 .5em; color: var(--blue-dark); font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.35rem; font-family: var(--font-body); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--bg-alt); }
.section--blue { background: var(--blue-dark); color: #dfe6f7; }
.section--blue h2, .section--blue h3 { color: var(--white); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.icon { width: 1.25em; height: 1.25em; flex: none; display: inline-block; vertical-align: middle; }
[data-icon] { display: inline-flex; }

/* ---------- Eyebrow & headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 26px; height: 2px; background: currentColor; }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--blue .lead { color: #c3cde6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  min-height: 50px;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(200, 16, 46, .7); }
.btn--primary:hover { background: var(--red-dark); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(6px); }
.btn--ghost:hover { background: #fff; color: var(--blue-dark); }
.btn--outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--outline:hover { background: var(--blue); color: #fff; }
.btn--sm { padding: 10px 18px; min-height: 42px; font-size: .95rem; }
.btn--block { width: 100%; }

/* ---------- Top bar ---------- */
.topbar { background: var(--blue-dark); color: #c9d3ec; font-size: .85rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar__items { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar__items span, .topbar__items a { display: inline-flex; gap: 6px; align-items: center; }
.topbar__motto { font-weight: 600; color: #fff; letter-spacing: .04em; }
@media (max-width: 720px) { .topbar__motto { display: none; } .topbar__items { gap: 14px; } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-dark); }
.brand img { height: 52px; width: auto; border-radius: 6px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.brand__name b { color: var(--red); font-weight: 700; }
.brand__place { font-size: .75rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__link {
  padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: .98rem; position: relative;
}
.nav__link:hover { color: var(--blue); background: var(--blue-soft); }
.nav__link[aria-current="page"] { color: var(--red); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--red); border-radius: 2px;
}
.nav__cta { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; color: var(--blue-dark); cursor: pointer; border-radius: 10px; }
.nav-toggle .icon { width: 28px; height: 28px; }

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: calc(var(--header-h)) 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px; gap: 4px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .25s ease;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__link { padding: 14px 12px; font-size: 1.05rem; }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__cta { margin: 8px 0 0; }
  .brand__place { display: none; }
}

/* ---------- Hero carousel ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 86vh, 820px);
  display: flex; align-items: center; color: #fff;
  /* 1) photo choisie dans /admin  2) photo des élèves en classe  3) dégradé de secours */
  background:
    /* --hero-bg : photo choisie dans /admin (injectée par resources/views/layouts/site.blade.php) */
    var(--hero-bg, url("../img/accueil/eleves-en-classe.jpg") center / cover no-repeat),
    linear-gradient(135deg, var(--blue-dark), var(--blue) 60%, var(--red));
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(10, 24, 64, .92) 0%, rgba(15, 36, 89, .78) 45%, rgba(15, 36, 89, .25) 100%),
    linear-gradient(0deg, rgba(158, 11, 35, .35), transparent 40%);
}
.hero::after { /* liseré rouge / bleu aux couleurs du collège */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%);
}
.carousel { position: relative; width: 100%; }
.carousel__track { display: grid; }
.slide {
  grid-area: 1 / 1; max-width: 720px;
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease, visibility 0s linear .7s;
}
.slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease, transform .7s ease; }
.slide__tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: rgba(200, 16, 46, .9); color: #fff; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 20px;
}
.slide h1, .slide h2 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.8rem); margin-bottom: 18px; }
.slide h1 em, .slide h2 em { font-style: italic; color: #ffd3da; }
.slide p { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #dbe3f5; max-width: 600px; margin-bottom: 30px; }
.slide__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Nombre d'élèves (primaire, secondaire), sous les diapositives */
.hero__effectifs { display: flex; flex-wrap: wrap; gap: 14px; margin: 40px 0 0; }
.hero__effectifs div {
  display: flex; flex-direction: column-reverse; padding: 12px 20px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-left: 4px solid var(--red);
  backdrop-filter: blur(4px);
}
.hero__effectifs dd { margin: 0; font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.1; color: #fff; }
.hero__effectifs dt { font-size: .9rem; color: #dbe3f5; }
.hero__effectifs + .carousel__controls { margin-top: 28px; }
.carousel__controls { display: flex; align-items: center; gap: 18px; margin-top: 48px; }
.carousel__btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: .2s;
}
.carousel__btn:hover { background: #fff; color: var(--blue-dark); }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dot {
  width: 10px; height: 10px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: .3s;
}
.carousel__dot[aria-selected="true"] { width: 34px; background: var(--red); }
/* zone tactile élargie pour mobile */
.carousel__dot { position: relative; }
.carousel__dot::before { content: ""; position: absolute; inset: -12px -4px; }

/* ---------- Trust strip (stats) ---------- */
.stats { position: relative; z-index: 2; margin-top: -54px; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { padding: 28px 24px; display: flex; gap: 16px; align-items: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.stat:nth-child(even) .stat__icon { background: var(--red-soft); color: var(--red); }
.stat__icon .icon { width: 26px; height: 26px; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.45rem; color: var(--blue-dark); line-height: 1.1; }
.stat span { font-size: .9rem; color: var(--muted); }
@media (max-width: 920px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .stat:last-child { border-bottom: 0; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff;
}
.card__icon--red { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.card__icon .icon { width: 28px; height: 28px; }
.card p { color: var(--muted); margin: 0; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); }
.card li { display: flex; gap: 8px; padding: 4px 0; }
.card li .icon { color: var(--red); margin-top: 3px; width: 18px; height: 18px; }

/* ---------- Values (motto) ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(255,255,255,.12); border-radius: var(--radius-lg); overflow: hidden; }
.value { background: var(--blue-dark); padding: 40px 32px; }
.value__num { font-family: var(--font-head); font-size: 3rem; color: var(--red); line-height: 1; opacity: .9; }
.value h3 { font-family: var(--font-head); font-size: 1.7rem; margin: 14px 0 10px; }
.value p { margin: 0; color: #c3cde6; }
@media (max-width: 820px) { .values { grid-template-columns: 1fr; } }

/* ---------- Split (about teaser / prefet) ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: var(--red); width: 24px; height: 24px; margin-top: 2px; }

.media-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.4; box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.media-frame picture { display: block; width: 100%; height: 100%; }
.media-badge {
  position: absolute; left: 20px; bottom: 20px; right: 20px; background: rgba(255,255,255,.95); border-radius: 14px; padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
}
.media-badge img { width: 54px; height: auto; border-radius: 6px; }
.media-badge strong { display: block; color: var(--blue-dark); }
.media-badge span { font-size: .88rem; color: var(--muted); }

/* Mot du Préfet — sans visage, avec un monogramme */
.prefet {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(28px, 4vw, 48px);
  position: relative; border-top: 5px solid var(--red);
}
.prefet__quote-mark { position: absolute; top: 18px; right: 28px; font-family: var(--font-head); font-size: 6rem; line-height: 1; color: var(--blue-soft); }
.prefet blockquote { margin: 0 0 28px; font-family: var(--font-head); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; color: var(--ink); position: relative; }
.prefet__sig { display: flex; align-items: center; gap: 16px; }
.prefet__seal {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; border: 3px solid var(--red-soft);
}
.prefet__seal .icon { width: 30px; height: 30px; }
.prefet__name { font-weight: 700; color: var(--blue-dark); display: block; }
.prefet__role { font-size: .9rem; color: var(--red); font-weight: 600; }

/* ---------- Steps (inscription) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 28px 24px; border: 1px solid var(--line); }
.step__num {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff;
  font-weight: 700; margin-bottom: 18px;
}
.step:nth-child(even) .step__num { background: var(--blue); }
.step p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px);
  background: linear-gradient(120deg, var(--red) 0%, var(--red-dark) 45%, var(--blue-dark) 100%); color: #fff;
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #ffe1e6; margin: 0; max-width: 560px; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-band .btn--primary { background: #fff; color: var(--red); box-shadow: none; }
.cta-band .btn--primary:hover { background: var(--blue-soft); }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Page hero (pages internes) ---------- */
.page-hero {
  position: relative; isolation: isolate; color: #fff; padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px);
  background:
    /* --hero-bg : photo choisie dans /admin (injectée par resources/views/layouts/site.blade.php) */
    var(--hero-bg, url("../img/accueil/eleves-en-classe.jpg") center / cover no-repeat),
    var(--blue-dark);
}
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10,24,64,.94), rgba(15,36,89,.8)); }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%); }
.page-hero h1 { color: #fff; max-width: 820px; }
.page-hero p { color: #d3dcf1; font-size: 1.15rem; max-width: 640px; margin: 0; }
.breadcrumb { display: flex; gap: 8px; font-size: .88rem; margin-bottom: 18px; color: #aebbdc; align-items: center; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb .icon { width: 14px; height: 14px; }

/* ---------- Timeline (à propos) ---------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 36px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--red), var(--blue)); }
.timeline li { position: relative; padding-bottom: 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--red);
}
.timeline li:nth-child(even)::before { border-color: var(--blue); }
.timeline__label { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.timeline h3 { margin: 4px 0 6px; }
.timeline p { color: var(--muted); margin: 0; }

.prose { max-width: 720px; }
.prose p { color: #33394a; }
.prose p:first-of-type::first-letter {
  font-family: var(--font-head); float: left; font-size: 3.6em; line-height: .9; padding: 6px 10px 0 0; color: var(--red);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; align-items: start; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { display: grid; gap: 14px; }
.info-item { display: flex; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); align-items: flex-start; }
.info-item__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); flex: none; }
.info-item:nth-child(even) .info-item__icon { background: var(--red-soft); color: var(--red); }
.info-item strong { display: block; color: var(--blue-dark); }
.info-item span, .info-item a { color: var(--muted); word-break: break-word; }

.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 40px); border-top: 5px solid var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg-alt);
  transition: border-color .2s, background .2s; color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.form-note { font-size: .88rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; }
.form-note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--blue); }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.is-ok { display: block; background: #e9f8ef; color: #17643a; }
.form-status.is-error { display: block; background: var(--red-soft); color: var(--red-dark); }

.map { border: 0; width: 100%; height: 340px; border-radius: var(--radius-lg); display: block; background: var(--bg-alt); }

/* ---------- Inscription ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: .85rem; }
.pill--blue { background: var(--blue-soft); color: var(--blue); }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.doc-list li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.doc-list .icon { color: var(--blue); }
[hidden] { display: none !important; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--blue-dark); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .25s; color: var(--red); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* ---------- Blog ---------- */
.section-head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.section-head--split h2 { margin: 0; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.chip {
  font: 600 .95rem var(--font-body); padding: 9px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: .2s; min-height: 42px;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.post-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media picture, .article__cover picture { display: block; width: 100%; height: 100%; }
.post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card__img { transform: scale(1.04); }
.post-cover--fallback {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 55%, var(--red));
}
.post-cover--fallback img { width: 34%; max-width: 160px; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-family: var(--font-head); font-size: 1.3rem; margin: 12px 0 8px; }
.post-card h3 a { color: var(--blue-dark); text-decoration: none; }
.post-card h3 a:hover { color: var(--red); }
.post-card p { color: var(--muted); margin: 0 0 18px; font-size: .97rem; }
.post-card__more { margin-top: auto; font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; color: var(--red); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .88rem; color: var(--muted); }
.post-meta--light { color: #d3dcf1; margin-top: 8px; }
.post-meta--light > span { display: inline-flex; gap: 6px; align-items: center; }

.page-hero--article h1 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.article { padding-top: clamp(40px, 6vw, 64px); }
.article__wrap { max-width: 800px; }
.article__cover { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 8; margin-bottom: 40px; box-shadow: var(--shadow); }
.article__img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 1.12rem; line-height: 1.8; color: #2b3142; }
.article-body h2 { font-size: 1.8rem; margin: 1.6em 0 .5em; }
.article-body h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; color: var(--blue-dark); }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article-body li { margin-bottom: .4em; }
.article-body li::marker { color: var(--red); }
.article-body blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 4px solid var(--red); background: var(--red-soft); border-radius: 0 12px 12px 0; font-style: italic; }
.article-body blockquote p:last-child { margin: 0; }
.article-body img { border-radius: 12px; margin: 1.5em 0; }
.article-body a { color: var(--red); font-weight: 600; }
.share { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.share strong { margin-right: 6px; color: var(--blue-dark); }

/* ---------- Footer ---------- */
.footer { background: #0b1a44; color: #aab6d6; padding: 72px 0 0; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 920px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; font-family: var(--font-body); font-size: 1rem; margin-bottom: 16px; letter-spacing: .02em; }
.footer a { color: #d6deef; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li { display: flex; gap: 10px; align-items: flex-start; }
.footer li .icon { color: var(--red); margin-top: 3px; width: 18px; height: 18px; }
.footer__brand { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.footer__brand img { height: 56px; border-radius: 6px; background: #fff; }
.footer__brand strong { color: #fff; font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; }
.footer__motto { display: inline-block; margin-top: 8px; color: #fff; font-weight: 700; letter-spacing: .05em; }
.footer__bottom { margin-top: 56px; border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Floating mobile CTA (conversion) ---------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta {
    display: flex; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    padding: 10px; background: rgba(255,255,255,.96); border-radius: 18px; box-shadow: var(--shadow-lg);
    transform: translateY(140%); transition: transform .3s ease;
  }
  .mobile-cta.is-visible { transform: none; }
  .mobile-cta .btn { flex: 1; min-height: 46px; padding: 10px 12px; font-size: .95rem; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Formulaires enregistrés sur le serveur ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-card .form-status { margin: 0 0 18px; }
.form-status ul { margin: 6px 0 0; padding-left: 20px; font-weight: 500; }
.form-legend { font-size: 1.05rem; margin: 22px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--blue); }
.draft-banner { background: #fff4d6; color: #6b4e00; text-align: center; padding: 10px 16px; font-weight: 600; font-size: .95rem; }

/* ---------- Article : galerie et rédacteur ---------- */
.gallery { margin-top: 40px; }
.gallery h2 { font-size: 1.5rem; display: flex; align-items: baseline; gap: 10px; }
.gallery h2 small { font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-weight: 500; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .gallery__grid { grid-template-columns: 1fr 1fr; gap: 6px; } }
.gallery__item { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--bg-alt); aspect-ratio: 4 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item span { position: absolute; inset: auto 0 0; padding: 18px 10px 8px; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.article-author { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.article-author strong { color: var(--blue-dark); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 14, 32, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 8px; }
.lightbox__caption { color: #fff; text-align: center; margin: 10px 16px 0; min-height: 1.5em; }
.lightbox__btn { position: fixed; background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Fiche des frais ---------- */
.fees { margin-bottom: 32px; }
.fees h2 { font-size: 1.4rem; }
.fees__table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.fees__table th { background: var(--blue-dark); color: #fff; text-align: left; padding: 12px 16px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.fees__table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fees__table tr:last-child td { border-bottom: 0; }
.fees__table small { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; }
.fees__amount { font-weight: 700; color: var(--blue-dark); white-space: nowrap; text-align: right; }
.fees__table th:last-child { text-align: right; }
.fees__amount.is-free { color: #17643a; }
@media (max-width: 560px) {
  .fees__table th:nth-child(2), .fees__table td:nth-child(2) { display: none; }
  .fees__table td, .fees__table th { padding: 10px 12px; }
}
.fees-print { display: none; }
@media print {
  .topbar, .header, .footer, .mobile-cta, .page-hero, .no-print, .skip-link { display: none !important; }
  .section { padding: 0; }
  .fees-print { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
  .fees__table { box-shadow: none; border: 1px solid #999; }
  .fees__table th { background: #eee; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================
   Smartphones (la majorité des visiteurs)
   ========================================================= */
.header-call { display: none; }
.fees__niveau { display: none !important; }

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  body { font-size: 1.0625rem; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .section { padding: 52px 0; }
  .container { width: min(100% - 32px, var(--container)); }

  /* En-tête compact : la barre d'infos laisse la place au bouton d'appel */
  .topbar { display: none; }
  .header .container { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { height: 40px; }
  .brand__name { font-size: 1.02rem; }
  .header-call { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border-radius: 12px; color: var(--blue); background: var(--blue-soft); }
  .header-call .icon { width: 22px; height: 22px; }
  .nav-toggle { width: 48px; height: 48px; padding: 10px; justify-content: center; }

  /* Bannière : hauteur naturelle, gros boutons pleine largeur */
  .hero { min-height: 0; padding: 36px 0 88px; align-items: flex-start; }
  .slide__tag { font-size: .72rem; padding: 6px 12px; margin-bottom: 14px; }
  .slide h1, .slide h2 { font-size: clamp(1.85rem, 8.4vw, 2.3rem); margin-bottom: 14px; }
  .slide p { font-size: 1.02rem; margin-bottom: 22px; }
  .slide__actions { gap: 10px; }
  .slide__actions .btn { flex: 1 1 100%; justify-content: center; min-height: 50px; }
  .carousel__controls { margin-top: 24px; }
  .hero__effectifs { margin-top: 26px; gap: 10px; }
  .hero__effectifs div { flex: 1 1 0; padding: 10px 14px; }
  .hero__effectifs + .carousel__controls { margin-top: 20px; }
  .carousel__btn { width: 44px; height: 44px; }
  .stats { margin-top: -44px; }
  .stat { padding: 16px 18px; }

  .page-hero { padding: 40px 0 36px; }
  .page-hero h1 { font-size: clamp(1.75rem, 7.6vw, 2.2rem); }

  /* Zones tactiles d'au moins 44 px */
  .post-card__more { min-height: 44px; }
  .chip { min-height: 40px; }
  .footer a { display: inline-block; padding: 6px 0; }
  .breadcrumb a { padding: 8px 0; }
  .btn { min-height: 48px; }
  .btn--sm { min-height: 42px; }
  .cta-band__actions .btn { flex: 1 1 100%; justify-content: center; }

  /* Pas d'animation d'apparition : le contenu est là tout de suite */
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }

  /* Barre d'actions du bas : appeler, WhatsApp, s'inscrire */
  .mobile-cta { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); gap: 8px; padding: 8px; }
  .mobile-cta__icon { flex: 0 0 48px !important; padding: 0 !important; }
  .mobile-cta .icon { width: 20px; height: 20px; }

  /* Fiche des frais : la classe passe sous le libellé */
  .fees__niveau { display: block !important; color: var(--blue) !important; font-weight: 600 !important; }
  .fees__table th:nth-child(2), .fees__table td:nth-child(2) { display: none; }

  .article-body img { border-radius: 10px; }
  .map { height: 280px; }
}

/* Photo de bannière par défaut plus légère sur téléphone (WebP 800 px) */
@media (max-width: 720px) {
  .hero, .page-hero {
    background:
      var(--hero-bg, url("../img/accueil/eleves-en-classe-800.webp") center / cover no-repeat),
      linear-gradient(135deg, var(--blue-dark), var(--blue) 60%, var(--red));
  }
}
@media (max-width: 720px) {
  .info-item a { display: inline-block; padding: 8px 0; }
  .carousel__dot { height: 12px; width: 12px; }
}

/* ---------- Responsables (page /direction et accueil) ---------- */
.portrait { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); background: var(--blue-soft); }
picture .portrait { height: auto; }
.portrait--initiales { display: grid; place-items: center; font-family: var(--font-head); font-size: clamp(2.4rem, 8vw, 4rem); color: var(--blue); background: linear-gradient(135deg, var(--blue-soft), var(--red-soft)); }
.leader { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(20px, 4vw, 40px); border-top: 5px solid var(--red); }
.leader h2 { margin-bottom: 4px; }
.leader__role, .member__role { color: var(--red); font-weight: 700; margin: 0 0 14px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.member { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-align: center; }
.member .portrait { width: 160px; margin: 0 auto 16px; border-radius: 50%; aspect-ratio: 1; }
.member .portrait--initiales { font-size: 2.6rem; }
.member h3 { margin-bottom: 2px; font-size: 1.2rem; }
.member p:last-child { color: var(--muted); font-size: .95rem; margin: 0; }

/* Accueil : photo du Préfet à côté de son mot */
.prefet-home { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.prefet-home__photo { position: relative; }
.prefet-home__photo figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; background: rgba(255,255,255,.95); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.prefet-home__photo .prefet__name { display: block; }

@media (max-width: 820px) {
  .leader, .prefet-home { grid-template-columns: 1fr; gap: 24px; }
  .leader__photo, .prefet-home__photo { max-width: 280px; margin: 0 auto; width: 100%; }
}
@media (max-width: 720px) {
  .team { grid-template-columns: 1fr; gap: 14px; }
  .member { display: grid; grid-template-columns: 96px 1fr; gap: 4px 16px; text-align: left; align-items: start; padding: 16px; }
  .member .portrait { width: 96px; margin: 0; grid-row: span 3; }
  .member .portrait--initiales { font-size: 1.8rem; }
  .member__role { margin-bottom: 6px; font-size: .95rem; }
}
.member > picture, .leader__photo picture, .prefet-home__photo picture { display: block; }
.member > picture { width: 160px; margin: 0 auto 16px; }
.member > picture .portrait { margin: 0; }
@media (max-width: 720px) {
  .member > picture { width: 96px; margin: 0; grid-row: span 3; }
}
.prefet-home__mot { margin: 0 0 26px; padding: 4px 0 4px 20px; border-left: 4px solid var(--red); font-family: var(--font-head); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; color: var(--ink); }
.portrait--initiales .icon { width: 45%; height: 45%; stroke-width: 1; opacity: .7; }

/* ---------- Bannière : une photo de fond par diapositive ---------- */
.hero__bgs { position: absolute; inset: 0; z-index: -2; }
.hero__bg { position: absolute; inset: 0; background: var(--bg-l) center / cover no-repeat; opacity: 0; transition: opacity .9s ease; }
.hero__bg.is-active { opacity: 1; }
@media (max-width: 720px) { .hero__bg { background-image: var(--bg-s); } }
.history-photo { margin-bottom: 28px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.history-photo img { width: 100%; height: auto; display: block; }

/* Logo envoyé depuis l'admin : jamais déformé, quelles que soient ses proportions */
.brand img, .footer__brand img, .media-badge img, .fees-print img, .post-cover--fallback img { object-fit: contain; }
/* Téléphone : voile un peu plus léger pour que la photo de fond reste visible */
@media (max-width: 720px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgba(10, 24, 64, .82) 0%, rgba(15, 36, 89, .72) 55%, rgba(15, 36, 89, .55) 100%),
      linear-gradient(0deg, rgba(158, 11, 35, .35), transparent 40%);
  }
  .slide h1, .slide h2, .slide p { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
}

/* ---------- Réseaux : Facebook, chaîne WhatsApp ---------- */
.social { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.social__link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .2s, opacity .2s; }
.social__link:hover { transform: translateY(-2px); }
.social__icon { width: 20px; height: 20px; flex: none; }
.social--icons .social__link { width: 40px; height: 40px; border-radius: 50%; color: #fff; }
.social__link--facebook { background: #1877f2; }
.social__link--whatsapp { background: #25d366; }
.social--buttons .social__link { padding: 12px 18px; border-radius: 12px; color: #fff; font-weight: 700; min-height: 48px; }
.social--buttons .social__icon { width: 22px; height: 22px; }
.topbar .social { gap: 6px; }
.topbar .social--icons .social__link { width: 28px; height: 28px; }
.topbar .social__icon { width: 15px; height: 15px; }
.footer .social { margin-top: 18px; }
.header-social { display: none; }
@media (max-width: 720px) {
  .social--icons .social__link { width: 44px; height: 44px; }
  .social--buttons .social__link { flex: 1 1 100%; justify-content: center; }
}
.topbar__end { display: flex; align-items: center; gap: 14px; }
.nav__social { display: none; }
.info-social { padding: 18px 0 0; display: grid; gap: 10px; }
.info-social strong { color: var(--blue-dark); }
@media (max-width: 920px) {
  .nav__social { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav__social .social__link { flex: 1 1 100%; justify-content: center; }
}
/* Menu : libellés sur une ligne, un peu plus serrés sur les écrans moyens */
.nav__link, .brand__place { white-space: nowrap; }
@media (min-width: 921px) and (max-width: 1140px) {
  .nav { gap: 0; }
  .nav__link { padding: 10px 9px; font-size: .93rem; }
  .nav__link[aria-current="page"]::after { left: 9px; right: 9px; }
  .nav__cta { margin-left: 6px; }
  .brand__place { display: none; }
}

/* Alegreya Sans : les citations en italique, les titres de marque en gras appuyé */
.prefet-home__mot, .prefet blockquote { font-style: italic; font-weight: 500; }
.brand__name, .footer__brand strong { font-weight: 800; letter-spacing: -.01em; }
.slide h1 em, .slide h2 em, h2 em { font-weight: 800; }
/* Chiffres alignés : téléphones, années, montants des frais restent faciles à lire */
body { font-variant-numeric: lining-nums; }
.fees__table, .fees__amount { font-variant-numeric: lining-nums tabular-nums; }
