/* Ardoise Scolaire — le site.
   Aucun script, aucune ressource tierce : la politique de sécurité (vercel.json)
   n'autorise que ce qui est servi ici. */

@font-face {
  font-family: "Fredoka";
  src: url("/polices/Fredoka-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/polices/Fredoka-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bleu: #3b82f6;
  --vert: #10b981;
  --degrade: linear-gradient(135deg, var(--bleu), var(--vert));
  --fond: #f6f8fb;
  --surface: #ffffff;
  --texte: #0f172a;
  --doux: #475569;
  --trait: #e2e8f0;
  --lien: #1d4ed8;
  --ombre: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.06);
  --rayon: 20px;
  --titres: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --corps: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #0b1120;
    --surface: #131c2e;
    --texte: #e2e8f0;
    --doux: #94a3b8;
    --trait: #1e293b;
    --lien: #7cb4ff;
    --ombre: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.6 var(--corps);
}

a { color: var(--lien); }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--titres);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.conteneur {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.lecture {
  width: min(720px, 100% - 32px);
  margin-inline: auto;
}

/* En-tête */

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--trait);
}

.entete .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.marque {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--titres);
  font-weight: 700;
  font-size: 1.15rem;
}

.marque img { width: 32px; height: 32px; border-radius: 8px; }

.entete nav { display: flex; gap: 18px; font-size: 0.95rem; }
.entete nav a { color: var(--doux); text-decoration: none; }
.entete nav a:hover, .entete nav a[aria-current="page"] { color: var(--texte); }

@media (max-width: 560px) {
  .entete nav { gap: 12px; font-size: 0.9rem; }
  .entete nav .facultatif { display: none; }
}

/* Accueil */

.heros {
  background: var(--degrade);
  color: #fff;
  padding: 72px 0 88px;
  overflow: hidden;
}

.heros .conteneur {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.heros h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin: 0 0 12px; }
.heros .accroche { font-size: clamp(1.15rem, 2.6vw, 1.4rem); margin: 0 0 20px; opacity: 0.95; }
.heros .precision { margin: 0 0 28px; opacity: 0.9; }

.heros .icone {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgb(11 16 32 / 0.25);
  margin-bottom: 24px;
}

.heros .apercu { justify-self: center; width: min(320px, 80%); }
.heros .apercu img {
  border: 10px solid #0f172a;
  border-radius: 44px;
  box-shadow: 0 24px 60px rgb(11 16 32 / 0.35);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.bouton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.bouton.plein { background: #fff; color: #0f3d91; }
.bouton.contour { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 0.7); }
.bouton.bientot { cursor: default; }

@media (max-width: 800px) {
  .heros { padding: 48px 0 56px; }
  .heros .conteneur { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .heros .icone { margin-inline: auto; }
  .actions { justify-content: center; }
}

section { padding: 72px 0; }
section + section { padding-top: 0; }

.titre-section { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 0 0 12px; }
.intro { color: var(--doux); margin: 0 0 32px; max-width: 60ch; }

/* Galerie de captures */

.galerie {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 260px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 20px;
  margin-inline: -16px;
  scrollbar-width: thin;
}

.galerie figure { margin: 0; scroll-snap-align: start; }
.galerie img { border-radius: 22px; box-shadow: var(--ombre); }

/* Cartes */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.carte {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 24px;
  box-shadow: var(--ombre);
}

.carte h3 { margin: 0 0 8px; font-size: 1.25rem; }
.carte p { margin: 0; color: var(--doux); }
.carte .pictogramme { font-size: 1.8rem; line-height: 1; margin-bottom: 12px; }

.bandeau {
  background: var(--degrade);
  color: #fff;
  border-radius: 28px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.bandeau h2 { margin: 0 0 8px; font-size: 1.8rem; }
.bandeau p { margin: 0; opacity: 0.95; }

@media (max-width: 700px) {
  .bandeau { grid-template-columns: 1fr; padding: 28px; }
}

/* Questions */

details {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: 16px;
  padding: 16px 20px;
}

details + details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
details p, details ol, details ul { color: var(--doux); margin: 8px 0 0; }

/* Pages de texte */

.page { padding: 48px 0 72px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: 0 0 6px; }
.page h2 { font-size: 1.35rem; margin: 40px 0 8px; }
.page .maj { color: var(--doux); margin: 0 0 24px; }
.page ul, .page ol { padding-left: 1.3rem; }
.page li + li { margin-top: 6px; }

.encadre {
  background: var(--surface);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--vert);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}

.encadre p { margin: 0; }

code {
  font-size: 0.9em;
  background: color-mix(in srgb, var(--trait) 60%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

/* Pied de page */

.pied {
  border-top: 1px solid var(--trait);
  padding: 32px 0 48px;
  color: var(--doux);
  font-size: 0.92rem;
}

.pied .conteneur { display: grid; gap: 12px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.pied a { color: var(--doux); }
.pied p { margin: 0; }

/* Page introuvable */

.introuvable { text-align: center; padding: 96px 0; }
.introuvable h1 { font-size: 4rem; margin: 0; }
