/* =====================================================================
   Prépa EMC2 — Design system
   Palette conservée du site actuel, rationalisée. Mobile-first.
   ===================================================================== */

:root {
  /* Couleurs de marque (conservées) */
  --blue:        #2443a1;
  --blue-dark:   #183072;
  --blue-800:    #1b3684;
  --orange:      #ff5a00;
  --orange-dark: #e04e00;
  --green:       #61a229;

  /* Neutres */
  --ink:      #1f2933;
  --ink-soft: #45525f;
  --line:     #e2e8f2;
  --bg:       #ffffff;
  --bg-soft:  #f5f7fb;
  --bg-blue:  #eef2fb;

  /* Typo — polices système : aucun .woff2 à télécharger */
  --font-title: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Rythme */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(24, 48, 114, .08);
  --shadow-lg: 0 18px 48px rgba(24, 48, 114, .14);
  --container: 1140px;
  --gap: clamp(1rem, 3vw, 2rem);
}

/* --- Reset léger --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.15; color: var(--blue-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--soft { background: var(--bg-soft); }
.section--blue { background: var(--blue-dark); color: #fff; }
.section--blue h1, .section--blue h2, .section--blue h3 { color: #fff; }
.grid { display: grid; gap: var(--gap); }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-title); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  text-decoration: none; justify-content: center; text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); box-shadow: var(--shadow); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-dark); }
.btn--ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #fff; }
/* Groupes de boutons (paragraphe ou bloc avec plusieurs boutons) : espacés ;
   sur mobile, empilés et centrés */
:where(p, div):has(> .btn + .btn) { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.center :where(p, div):has(> .btn + .btn) { justify-content: center; }
.home :where(p, div):has(> .btn + .btn) > .btn { margin: 0; }
@media (max-width: 719px) {
  :where(p, div):has(> .btn + .btn) { flex-direction: column; align-items: stretch; max-width: 22rem; margin-inline: auto; }
}
.btn--on-dark { color: #fff; border-color: rgba(255,255,255,.85); }
.btn--on-dark:hover { background: #fff; color: var(--blue-dark); }

/* --- Cartes --- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); height: 100%;
}
.card h3 { color: var(--blue); }
.badge { display: inline-block; font-size: .8rem; font-weight: 600; color: var(--orange);
  background: #fff3ec; padding: .2rem .7rem; border-radius: 999px; }

/* --- Header / nav --- */
/* Bandeau d'annonce + en-tête : restent ensemble en haut de l'écran */
.site-top { position: sticky; top: 0; z-index: 50; }
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(24, 48, 114, .06);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-title); font-weight: 700; color: var(--blue-dark); line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand__mark { display: block; height: 56px; width: auto; flex: 0 0 auto; }
.brand__bg { fill: var(--blue); }
.brand__e { fill: #fff; font-family: var(--font-title), 'Segoe UI', sans-serif; font-weight: 700; font-size: 34px; }
.brand__sup { fill: var(--orange); font-family: var(--font-title), 'Segoe UI', sans-serif; font-weight: 700; font-size: 20px; }
.brand__text { display: block; font-size: 1.05rem; }
.brand__text small { font-weight: 500; font-size: .72rem; color: var(--ink-soft); }
@media (max-width: 600px) { .brand__mark { height: 46px; } .brand__text { display: none; } }

/* --- Bandeau d'annonce (tout en haut, éditable en back-office) --- */
.announce-bar { background: var(--orange); color: #fff; text-align: center; font-weight: 500; font-size: .95rem; padding: .55rem 1rem; }
.announce-bar a { color: #fff; text-decoration: underline; font-weight: 600; }
.announce-bar strong { font-weight: 700; }
@media (max-width: 600px) { .announce-bar { font-size: .82rem; padding: .4rem .75rem; line-height: 1.35; } }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a { color: var(--ink); font-weight: 500; padding: .5rem .75rem; border-radius: 8px; font-size: .98rem; }
.nav a:hover { background: var(--bg-blue); text-decoration: none; }
.nav__cta { margin-left: .5rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--blue-dark); margin: 5px 0; transition: .2s; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h, 64px) 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 1rem; gap: .25rem;
    box-shadow: var(--shadow-lg); transform: translateY(-120%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
    max-height: calc(100vh - var(--header-h, 64px)); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: translateY(0); visibility: visible; transition: transform .25s ease; }
  .nav a { padding: .8rem 1rem; }
}

/* --- Hero --- */
.hero { background: linear-gradient(160deg, var(--blue-dark), var(--blue) 70%); color: #fff; overflow: hidden; }
.hero .container { position: relative; }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; color: rgba(255,255,255,.85); font-weight: 600; }
/* Figures d'accueil : images bornées (évite les visuels trop grands) */
.home-figure { margin: 0; }
.home-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.home-figure--center { max-width: 460px; margin-inline: auto; }
.home-figure--center img { box-shadow: none; }

/* Blocs "feature" : texte + image sur le côté, en alternance gauche/droite */
.feature { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.feature + .feature { margin-top: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--reverse .feature__media { order: -1; }
}
.feature__media img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.feature__body > :first-child { margin-top: 0; }

.hero__grid { display: grid; gap: var(--gap); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.15fr .85fr; } }
.hero__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
@media (max-width: 899px) { .hero__media { display: none; } }

/* --- Formulaires --- */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 500; margin-bottom: .35rem; }
.form-field .req { color: var(--orange); }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], input[type=file], select, textarea {
  width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(36,67,161,.18); border-color: var(--blue); }
textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 0 0 1.5rem; }
.form-block legend { font-family: var(--font-title); font-weight: 600; color: var(--blue-dark); padding: 0 .5rem; font-size: 1.1rem; }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.form-field label.radio, .form-field label.checkbox { display: inline-flex; align-items: flex-start; gap: .4rem; font-weight: 400; margin: .2rem 1rem .2rem 0; }
.form-field label.checkbox { display: flex; }
.form-field label.radio input, .form-field label.checkbox input { width: auto; }
/* Regroupement de champs sur une ligne (desktop) — empilés sur mobile */
.form-row { display: grid; gap: 1rem; margin-bottom: 1.1rem; }
.form-row .form-field { margin-bottom: 0; }
@media (min-width: 700px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
  .form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
}
.field-err { display: block; color: #a12020; font-size: .85rem; margin-top: .25rem; }
.form-field input[aria-invalid="true"], .form-field .field-err ~ input { border-color: #dd3333; }

/* Champs fichiers personnalisés : catégorie, bouton, nom du fichier dessous */
.filegroup { margin-bottom: 1.4rem; }
.filegroup__title { font-family: var(--font-title); font-weight: 600; color: var(--blue-dark); margin: 0 0 .7rem; }
.file-field { margin-bottom: 1rem; }
.file-field__sub { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .4rem; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.file-btn { display: inline-block; cursor: pointer; padding: .55rem 1rem; border: 1px solid var(--blue);
  color: var(--blue); background: #fff; border-radius: 8px; font-weight: 600; font-size: .9rem; transition: background .15s; }
.file-btn:hover { background: var(--bg-blue); }
.file-input:focus-visible + .file-btn { outline: 3px solid var(--orange); outline-offset: 2px; }
.file-name { display: block; margin-top: .45rem; font-size: .82rem; color: var(--ink-soft); word-break: break-all; }
.file-field.has-file .file-btn { border-color: var(--green); color: var(--green); }
.file-field.has-file .file-name { color: var(--green); font-weight: 500; }
.form-note { font-size: .9rem; color: var(--ink-soft); }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; }
.alert--error { background: #fdecec; color: #a12020; border: 1px solid #f5c2c2; }
.alert--success { background: #eafaf0; color: #1e7a45; border: 1px solid #bde9cd; }
.alert--info { background: var(--bg-blue); color: var(--blue-dark); border: 1px solid #cdd9f3; }

/* --- Footer --- */
.site-footer { background: var(--blue-dark); color: rgba(255,255,255,.82); padding-block: 3rem 2rem; margin-top: 2rem; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer .muted { color: rgba(255,255,255,.65); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.2rem; font-size: .88rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* --- Tableaux de contenu (emplois du temps…) --- */
.table-scroll { overflow-x: auto; }
.content-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; }
.content-table th, .content-table td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); text-align: center; }
.content-table th:first-child, .content-table td:first-child { text-align: left; }
.content-table thead th { background: var(--blue); color: #fff; }
.content-table tbody tr:nth-child(even) td { background: var(--bg-soft); }

/* --- Utilitaires --- */
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--ink-soft); }
.pill-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; }
.pill-list li { background: var(--bg-blue); color: var(--blue-dark); padding: .3rem .8rem; border-radius: 999px; font-size: .9rem; font-weight: 500; }

/* ---- Tableaux de résultats aux concours (reproduction fidèle des images) ---- */
.rt-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; }
.rt { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; font-size: .9rem; line-height: 1.18; color: #1c2433; }
.rt td, .rt th { border: 1px solid #aeb6cb; padding: .4rem .45rem; text-align: center; vertical-align: middle; background: #fff; }
.rt th { font-weight: 700; }
.rt .b { font-weight: 700; }
.rt .lbl { font-weight: 700; background: #fff; }        /* concours / école sur fond blanc */
.rt .blue { background: #dde3f3; }                      /* colonnes 3/2 (ou MP) */
.rt .blue2 { background: #b7c5e3; }                     /* colonnes 5/2 (ou MP*) */
.rt .peach { background: #f7dcc4; }                     /* colonne Total */
.rt .peachh { background: #e8b98f; font-weight: 700; }  /* en-têtes / libellés Total */
.rt .corner { border-color: transparent; background: #fff; }
@media (max-width: 600px) { .rt { font-size: .78rem; min-width: 480px; } .rt td, .rt th { padding: .3rem .3rem; } }
.results-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; margin-top: 1.6rem; }
.results-nav > :first-child { justify-self: start; }
.results-nav > :nth-child(2) { justify-self: center; }
.results-nav > :last-child { justify-self: end; }
@media (max-width: 560px) {
  .results-nav { gap: .4rem; }
  .results-nav .btn { padding: .6rem .85rem; font-size: .9rem; white-space: nowrap; }
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }

/* ---------- Accueil : bandeau « À la une » (campagnes ouvertes, cours du dimanche) ---------- */
.highlights { background: var(--orange); padding: clamp(1.2rem, 3vw, 2rem) 0; }
.highlights__grid { display: grid; gap: 1rem; }
@media (min-width: 760px) {
  .highlights__grid--2 { grid-template-columns: repeat(2, 1fr); }
  .highlights__grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.highlight { background: #fff; border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.highlight__tag { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-dark); }
.highlight__title { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin: 0; }
.highlight p { margin: 0 0 .4rem; color: var(--ink-soft); }
.highlight .btn { margin-top: auto; }

/* Logos des soutiens (page Nous soutenir) */
.partners{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:1.5rem 2.5rem;margin:1.5rem 0}
.partners a,.partners span{display:inline-flex}
.partners img{max-height:90px;max-width:190px;width:auto;height:auto;object-fit:contain}
.sitemap-groups h2{font-size:1.15rem;margin-bottom:.4rem} .sitemap-groups ul{margin:0 0 1rem;padding-left:1.1rem} .sitemap-groups li{margin:.2rem 0}

/* Contact : le bloc « Nous joindre » reste visible pendant la saisie */
.contact-layout { align-items: stretch; }
@media (min-width: 860px) {
  .contact-joindre { height: auto; position: sticky; top: calc(var(--header-h, 76px) + 4rem); box-shadow: var(--shadow-lg); }
}
.form-field.is-invalid input:not([type=checkbox]):not([type=radio]), .form-field.is-invalid textarea, .form-field.is-invalid select { border-color: #dd3333; }
.form-field.is-invalid .file-btn { border-color: #dd3333; color: #a12020; }
.form-field.is-invalid > label, .form-field.is-invalid .file-field__sub { color: #a12020; }

/* Page 404 : formule dont le résultat est 404 */
.e404 .badge { margin-bottom: 1rem; }
.e404__formule { min-height: 7rem; display: flex; align-items: center; justify-content: center; margin: .5rem auto 1.5rem; color: var(--blue); overflow-x: auto; }
.e404__formule math { font-size: clamp(1.6rem, 5vw, 2.6rem); }
.e404__res { color: var(--orange); font-weight: 700; }
.e404__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.5rem; }
.e404__liens { margin-top: 1.5rem; color: #667085; font-size: .95rem; }

/* =====================================================================
   Page d'accueil (contenu éditable : Admin → Pages → accueil)
   ===================================================================== */
/* Bandeau : halos lumineux qui dérivent lentement */
.home .hero { position: relative; isolation: isolate; }
.home .hero::before, .home .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none;
}
.home .hero::before { width: 420px; height: 420px; background: rgba(110, 168, 255, .45); top: -170px; right: -130px; animation: home-drift 14s ease-in-out infinite alternate; }
.home .hero::after { width: 360px; height: 360px; background: rgba(80, 140, 255, .35); bottom: -180px; left: -130px; animation: home-drift 18s ease-in-out infinite alternate-reverse; }
@keyframes home-drift { to { transform: translate(40px, 30px) scale(1.12); } }
.home .hero h1 { text-wrap: balance; }

/* Titres de section : petit trait orange */
.home .section h2 { position: relative; padding-bottom: .55rem; text-wrap: balance; }
.home .section h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--orange); }
.home .center h2::after { left: 50%; transform: translateX(-50%); }

/* Images : léger zoom au survol */
.home .feature__media img, .home .hero__media img { transition: transform .5s ease, box-shadow .5s ease; }
.home .feature__media:hover img { transform: scale(1.02); }

/* Apparition au défilement (classes posées par main.js, contenu visible sans JS) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: .12s; }

@media (max-width: 719px) {
  /* Boutons centrés, pleine largeur raisonnable, bien séparés */
  .home .hero__actions { flex-direction: column; align-items: center; gap: .75rem; }
  .home .btn { display: flex; width: 100%; max-width: 22rem; margin: .5rem auto; }
  .home .hero__actions .btn { margin: 0; }
  .home .hero { text-align: center; }
  .home .hero .badge { margin-inline: auto; }
  .home .section h2::after { left: 50%; transform: translateX(-50%); }
  .home .section h2 { text-align: center; }
  /* Photo du bandeau aussi sur mobile, sous le texte */
  .home .hero__media { display: block; margin-top: .5rem; }
  .home .hero__media img { width: 100%; height: auto; }
  .home .feature__media img { box-shadow: var(--shadow); }
}
@media (prefers-reduced-motion: reduce) {
  .home .hero::before, .home .hero::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =====================================================================
   Recherche
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nav__search { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem; border-radius: 999px; color: var(--ink); }
.nav__search:hover { background: var(--bg-blue); color: var(--blue); text-decoration: none; }
.nav__search-label { display: none; }
@media (max-width: 960px) { .nav__search-label { display: inline; } .nav__search { padding: .6rem .2rem; } }
.search-form { display: flex; gap: .6rem; margin-top: 1.5rem; max-width: 640px; }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: .8rem 1.1rem; border-radius: 999px; border: 2px solid transparent; background: #fff; color: var(--ink); }
.search-form input:focus { outline: none; border-color: var(--orange); }
@media (max-width: 560px) { .search-form { flex-direction: column; } }
.search-results { max-width: 820px; }
.search-count { color: var(--ink-soft); }
.search-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.1rem; }
.search-hit { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 2px 10px rgba(24, 48, 114, .05); transition: box-shadow .2s, transform .2s; }
.search-hit:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.search-hit__type { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--orange-dark); }
.search-hit__title { display: inline-block; margin-top: .2rem; font-family: var(--font-title); font-size: 1.15rem; font-weight: 700; color: var(--blue); }
.search-hit__snippet { margin: .45rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.search-hit mark { background: #ffe3cf; color: inherit; padding: 0 .1em; border-radius: 3px; }

/* Titre de la page figé sous l'en-tête pendant le défilement (main.js) */
.page-sticky { position: fixed; left: 0; right: 0; z-index: 45; background: var(--blue-dark); color: #fff; box-shadow: 0 6px 16px rgba(24, 48, 114, .18);
  transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform .25s ease, opacity .25s ease, visibility 0s .25s; }
.page-sticky.is-on { transform: none; opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }
.page-sticky__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .55rem; }
.page-sticky__title { font-family: var(--font-title); font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-sticky__top { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; font-size: 1rem; cursor: pointer; }
.page-sticky__top:hover { background: #fff; color: var(--blue-dark); }
@media (prefers-reduced-motion: reduce) { .page-sticky, .page-sticky.is-on { transition: none; } }
[id] { scroll-margin-top: 140px; }

/* Logos des écoles construits case par case (main.js) */
.logos-build { position: relative; }
.logos-build picture, .logos-build img { display: block; }
.logos-build.is-ready img { opacity: 0; transition: opacity .6s ease; }
.logos-build.is-done img { opacity: 1; }
.logos-build__tile { position: absolute; background-repeat: no-repeat; opacity: 0; transform: scale(.55) rotate(-8deg); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.9,.3,1.25); pointer-events: none; }
.logos-build.is-on .logos-build__tile { opacity: 1; transform: none; }
.logos-build.is-done .logos-build__tile { opacity: 0; transition: opacity .6s ease .1s; }

/* Résultats : version cartes sur mobile (main.js), tableau sur grand écran */
.rt-cards { display: none; }
@media (max-width: 719px) {
  .has-cards { display: none; }
  .rt-cards { display: grid; gap: 1rem; }
  .rtc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .6rem; }
  .rtc-kpi { background: var(--blue-dark); color: #fff; border-radius: var(--radius); padding: .9rem .6rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
  .rtc-kpi strong { font-family: var(--font-title); font-size: 1.9rem; line-height: 1; }
  .rtc-kpi em { font-style: normal; font-weight: 700; color: #ffd2b8; font-size: .95rem; }
  .rtc-kpi span { font-size: .78rem; line-height: 1.25; opacity: .9; }
  .rtc-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(24, 48, 114, .06); overflow: hidden; }
  .rtc-group h3 { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem 1rem; background: var(--bg-blue); color: var(--blue-dark); font-size: 1.02rem; }
  .rtc-group h3 b { flex: 0 0 auto; min-width: 2rem; height: 2rem; padding: 0 .5rem; border-radius: 999px; background: var(--orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; }
  .rtc-group ul { list-style: none; margin: 0; padding: .3rem 1rem .5rem; }
  .rtc-group li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .rtc-group li:last-child { border-bottom: 0; }
  .rtc-school { font-weight: 600; color: var(--ink); }
  .rtc-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
  .rtc-chip { font-style: normal; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: #e3e9f8; color: var(--blue-dark); white-space: nowrap; }
  .rtc-chip--late { background: #b9c7ea; }
  .rtc-summary { margin: 0; background: var(--bg-soft); border-radius: var(--radius); padding: .4rem 1rem; }
  .rtc-summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
  .rtc-summary > div:last-child { border-bottom: 0; }
  .rtc-summary dt { font-weight: 600; }
  .rtc-summary dd { margin: 0; text-align: right; }
  .rtc-summary dd strong { display: block; font-size: 1.05rem; color: var(--blue-dark); }
  .rtc-summary dd small { display: block; color: var(--ink-soft); font-size: .8rem; white-space: nowrap; }
  .rtc-summary dd small b { color: var(--blue-dark); }
}

/* Changement d'année par glissement (main.js) */
#main { transition: transform .16s ease-in, opacity .16s ease-in; }
#main.swipe-out-left { transform: translateX(-40px); opacity: 0; }
#main.swipe-out-right { transform: translateX(40px); opacity: 0; }
.swipe-hint { display: none; }
@media (hover: none) and (max-width: 719px) { .swipe-hint { display: block; text-align: center; color: var(--ink-soft); font-size: .82rem; margin-top: .75rem; } }

/* Résultats : récapitulatif de toutes les années (page /resultats) */
.recap { margin-top: 1rem; }
.recap h3 { margin-top: 2rem; }
.recap-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-top: 1rem; }
.recap-kpi { background: var(--blue-dark); color: #fff; border-radius: var(--radius); padding: 1.1rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.recap-kpi strong { font-family: var(--font-title); font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1; color: #fff; }
.recap-kpi:first-child strong { color: #ffb48a; }
.recap-kpi span { font-size: .9rem; opacity: .9; }
.recap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: .85rem; color: var(--ink-soft); }
.recap-key { display: inline-block; width: 14px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: middle; }
.recap-key--int, .recap-bar__int { background: var(--blue-dark); }
.recap-key--rec, .recap-bar__rec { background: #7f97d8; }
.recap-key--ins, .recap-bar__ins { background: #dfe6f6; }
.recap-years { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.recap-year { display: grid; grid-template-columns: 3.2rem 1fr auto 1rem; align-items: center; gap: .8rem; padding: .55rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.recap-year:hover, .recap-year:focus-visible { background: var(--bg-blue); border-color: var(--line); text-decoration: none; }
.recap-year__y { font-family: var(--font-title); font-weight: 700; color: var(--blue); }
.recap-bar { position: relative; height: 14px; }
.recap-bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.recap-year__n { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.recap-year__n b { color: var(--blue-dark); font-size: 1rem; }
.recap-year__go { color: var(--orange); font-size: 1.3rem; line-height: 1; }
.recap-schools { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .45rem; }
.recap-schools li { display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr auto; align-items: center; gap: .8rem; }
.recap-school__name { font-weight: 600; }
.recap-school__bar { height: 10px; background: var(--bg-soft); border-radius: 4px; overflow: hidden; }
.recap-school__bar span { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.recap-school__n { font-size: .88rem; color: var(--ink-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.recap-more { margin-top: 1rem; }
.recap-more summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.recap-more p { color: var(--ink-soft); line-height: 1.8; }
@media (max-width: 560px) {
  .recap-year { grid-template-columns: 2.8rem 1fr auto; gap: .6rem; padding: .5rem .3rem; }
  .recap-year__go { display: none; }
  .recap-schools li { grid-template-columns: 1fr auto; gap: .2rem .6rem; }
  .recap-school__bar { grid-column: 1 / -1; order: 3; }
}
