/* =====================================================================
   La Clef des Champs : refonte accueil "cahier d'école"
   Thème posé sur le moteur scrollcraft (jamais modifié).
   ===================================================================== */

@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-full-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Cursive Ecole"; src: url("fonts/playwrite-fr-trad-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Cursive Ecole"; src: url("fonts/playwrite-fr-trad-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* charte existante de l'école */
  --vert-fonce: #2A4A35;
  --vert: #3D6B4E;
  --vert-mid: #5A8A6A;
  --vert-pale: #E8F2EB;
  --ocre: #C8934A;
  --ocre-clair: #F5E8D0;
  --terra: #B85C38;
  --lin: #EBE3D4;
  --creme: #F7F3EC;
  --papier: #FBF7EF;
  /* encres d'école */
  --encre: #43328F;        /* encre violette */
  --rouge: #B8332A;        /* stylo rouge de la maîtresse */
  --seyes: rgba(70, 104, 178, 0.16);
  --seyes-fin: rgba(70, 104, 178, 0.075);
  --marge: rgba(196, 64, 64, 0.5);
  --album: #2D2924;
  --ardoise: #22312A;
  --craie: #F1EEE4;
  --texte: #2A2723;
  --texte-doux: #574F45;

  --sc-canvas: var(--papier);
  --sc-surface: #FFFDF8;
  --sc-ink: var(--texte);
  --sc-ink-soft: var(--texte-doux);
  --sc-accent: var(--vert-fonce);
  --sc-accent-ink: #FBF7EF;
  --sc-font-display: "Fraunces", Georgia, serif;
  --sc-font-text: "Fraunces", Georgia, serif;
  --sc-shadow-color: 30 30% 18%;
  --hand: "Cursive Ecole", "Segoe Script", cursive;
  --marge-x: clamp(3.2rem, 7vw, 6.5rem);
  --r: 4px;
  --page-max: 76rem;
}

html { scroll-padding-top: 1rem; }
body {
  background: var(--papier);
  color: var(--texte);
  font-family: var(--sc-font-text);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  line-height: 1.62;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: color-mix(in oklab, var(--ocre) 40%, transparent); }
:focus-visible { outline: 2.5px solid var(--encre); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--vert-fonce); color: #fff; padding: .6rem 1rem; z-index: 999; }
.skip:focus { left: 1rem; top: 1rem; }

.h-hand { font-family: var(--hand); font-weight: 400; letter-spacing: 0; }
.wrap { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }

/* -------- papiers ---------------------------------------------------- */
.seyes {
  background-color: var(--papier);
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--seyes) 31px 32px),
    repeating-linear-gradient(to bottom, transparent 0 7px, var(--seyes-fin) 7px 8px),
    repeating-linear-gradient(to right, transparent 0 31px, var(--seyes-fin) 31px 32px);
  position: relative;
}
.seyes.avec-marge::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: var(--marge-x); width: 2px;
  background: var(--marge); pointer-events: none;
}
.lin { background: var(--lin); }

/* titres de chapitre : le numéro vit dans la marge, comme dans un cahier */
.chap { position: relative; }
.chap-num {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 500; color: var(--rouge); font-size: 1.35rem; line-height: 1; letter-spacing: .02em;
  position: absolute; left: calc(var(--marge-x) * -1 + .5rem); top: .35em; width: calc(var(--marge-x) - 1rem); text-align: right;
}
h2.titre {
  font-family: "Fraunces", serif; font-weight: 420; font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em;
  color: var(--vert-fonce); text-wrap: balance; margin: 0 0 1.25rem; max-width: 22ch;
}
.lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.28rem); color: var(--texte-doux); max-width: 58ch; margin: 0; text-wrap: pretty; }
.chapitre { padding-block: clamp(4.5rem, 9vw, 9rem); }
.chapitre .inner { padding-left: calc(var(--marge-x) + clamp(1rem, 2.5vw, 2.5rem)); padding-right: clamp(1.25rem, 4vw, 3rem); max-width: calc(var(--page-max) + var(--marge-x)); margin-inline: auto; }

/* -------- boutons ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; font: 600 1rem/1.2 "Fraunces", serif;
  padding: .85rem 1.35rem; border-radius: var(--r); text-decoration: none; cursor: pointer; border: 0;
  background: var(--vert-fonce); color: #FBF7EF;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 2px 0 #1a3022, 0 6px 14px -6px rgba(30,40,30,.45);
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
  white-space: nowrap;
}
.btn:hover { background: var(--vert); }
.btn:active { transform: translateY(1px); }
.btn--papier { background: #FFFDF8; color: var(--vert-fonce); box-shadow: 0 0 0 1.5px var(--vert-fonce) inset, 0 2px 0 rgba(42,74,53,.35); }
.btn--papier:hover { background: var(--vert-pale); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.lien-encre { font-family: var(--hand); color: var(--encre); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; font-size: 1rem; }
.lien-encre:hover { color: var(--rouge); }

/* -------- case à cocher tracée à l'encre (Nos valeurs, Nous aider) -------- */
.case { width: 1.35rem; height: 1.35rem; margin-top: .25rem; overflow: visible; flex: none; }
.case rect { fill: #fff; stroke: #3B3B3B; stroke-width: 1.3; }
.case path { fill: none; stroke: var(--encre); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset 520ms 320ms var(--sc-ease-out); }

/* -------- tirages photo ---------------------------------------------- */
.tirage {
  background: #FFFEFA; padding: clamp(6px, .9vw, 11px); padding-bottom: clamp(18px, 2.4vw, 30px);
  box-shadow: 0 1px 2px rgba(40,30,20,.18), 0 12px 26px -10px rgba(40,30,20,.45);
  position: relative; margin: 0;
}
.tirage img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.16) saturate(.9) contrast(1.03); }
.scotch {
  position: absolute; width: 96px; height: 28px; background: rgba(236, 222, 186, .78);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
  clip-path: polygon(3% 0, 97% 4%, 100% 30%, 96% 55%, 100% 100%, 4% 96%, 0 70%, 3% 40%);
  z-index: 3;
}
.zoomable { cursor: zoom-in; }
button.zoomable { all: unset; display: block; cursor: zoom-in; width: 100%; height: 100%; }
button.zoomable:focus-visible { outline: 2.5px solid var(--ocre); outline-offset: 4px; }

/* =====================================================================
   EN-TÊTE
   ===================================================================== */
.entete { position: relative; z-index: 30; background: var(--papier); border-bottom: 1px solid rgba(42,74,53,.14); }
.entete .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; max-width: 86rem; }
.marque { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--vert-fonce); flex: none; }
.marque img { width: 52px; height: 54px; }
.marque b { display: block; font-family: var(--hand); font-weight: 400; font-size: 1.1rem; line-height: 1.9; }
.marque small { display: block; margin-top: .3rem; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); }
.nav { display: flex; gap: clamp(.8rem, 1.6vw, 1.6rem); margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-size: .98rem; color: var(--texte); padding: .3rem 0; background: linear-gradient(var(--rouge), var(--rouge)) left 100% / 0 2px no-repeat; transition: background-size 200ms var(--sc-ease-out); }
.nav a:hover, .nav a[aria-current] { background-size: 100% 2px; }
.nav a[aria-current] { color: var(--vert-fonce); font-weight: 600; }
.entete .btn { padding: .65rem 1.1rem; font-size: .95rem; }
.burger { display: none; margin-left: auto; background: none; border: 1.5px solid var(--vert-fonce); border-radius: var(--r); padding: .5rem .7rem; color: var(--vert-fonce); font: 600 .9rem "Fraunces", serif; cursor: pointer; }

/* =====================================================================
   PAGE DE GARDE
   ===================================================================== */
.garde { padding-block: clamp(2rem, 4.2vw, 4rem) clamp(4rem, 8vw, 7rem); overflow: hidden; }
.garde .inner { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(2rem, 4.5vw, 4.5rem); align-items: center; }
.date-cahier { font-family: var(--hand); color: var(--encre); font-size: clamp(1rem, .9rem + .4vw, 1.3rem); line-height: 2; padding: .15em .1em .2em; margin: 0 0 1.2rem; display: inline-block;
  clip-path: inset(-.6em 100% -.7em -.4em); animation: ecrire 1.9s .35s steps(38, end) forwards; }
@keyframes ecrire { to { clip-path: inset(-.6em -.4em -.7em -.4em); } }
.etiquette {
  display: inline-flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem;
  padding: .7rem 1.6rem .8rem; margin-bottom: 1.6rem; background: #FFFEF9;
  border: 1.5px solid var(--vert-fonce); border-radius: 18px / 50%;
  box-shadow: 0 0 0 4px #FFFEF9, 0 0 0 5px rgba(42,74,53,.55), 0 6px 14px -8px rgba(0,0,0,.35);
}
.etiquette span { font-family: var(--hand); font-size: 1.12rem; line-height: 2; color: var(--vert-fonce); }
.etiquette small { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-doux); }
.garde h1 {
  font-weight: 380; font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4rem); line-height: 1.04; letter-spacing: -0.03em;
  color: var(--vert-fonce); margin: 0 0 1.4rem; text-wrap: balance; max-width: 17ch;
}
.garde h1 em { font-style: italic; position: relative; white-space: nowrap; }
/* V44-01 : entre 1001 et 1180 px, la colonne du titre est étroite et « grandir en confiance. »
   (qui ne se coupe jamais, pour garder son soulignement d'un seul trait) débordait sous la photo.
   Le titre se règle alors sur la largeur réelle de sa colonne : il ne rétrécit que de ce qu'il faut
   pour s'arrêter avant le cadre. Navigateurs sans unités de conteneur : taille d'origine. */
@media (min-width: 1001px) and (max-width: 1180px) {
  .garde .inner > div:first-child { container-type: inline-size; }
  .garde h1 { font-size: min(clamp(2.4rem, 1.4rem + 3vw, 4rem), calc((100cqi + 1.5rem) / 8.45)); }
}
.souligne { position: absolute; left: -2%; right: -2%; bottom: -.14em; width: 104%; height: .32em; overflow: visible; }
.souligne path { fill: none; stroke: var(--rouge); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: tracer 1.1s 1.7s var(--sc-ease-out) forwards; }
@keyframes tracer { to { stroke-dashoffset: 0; } }
.garde .lede { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }

.pile { position: relative; padding: 1.2rem 0 0; margin-right: clamp(-2rem, -1.5vw, 0rem); }
.pile .t1 { position: relative; width: 100%; aspect-ratio: 4 / 3; rotate: 2.2deg; }
.pile .t1 .scotch { top: -12px; left: 40%; rotate: -4deg; width: 112px; }
.pile .legende { margin: 2.8rem 0 0 1.2rem; font-family: var(--hand); color: var(--encre); font-size: clamp(.86rem, .78rem + .3vw, 1.05rem); line-height: 1.75; rotate: -1.2deg; max-width: 34rem; }

/* =====================================================================
   I. POUR VOTRE ENFANT : exercices à relier
   ===================================================================== */
.ch-enfant { /* la même page Seyès que le reste du cahier ; une ombre marque le passage à la page suivante */
  position: relative; background-color: var(--papier);
  background-image:
    linear-gradient(to right, transparent calc(var(--marge-x) - 1px), var(--marge) calc(var(--marge-x) - 1px) calc(var(--marge-x) + 1px), transparent calc(var(--marge-x) + 1px)),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--seyes) 31px 32px),
    repeating-linear-gradient(to bottom, transparent 0 7px, var(--seyes-fin) 7px 8px),
    repeating-linear-gradient(to right, transparent 0 31px, var(--seyes-fin) 31px 32px);
  box-shadow: inset 0 14px 18px -16px rgba(60,45,25,.35), inset 0 -14px 18px -16px rgba(60,45,25,.35);
}
/* deux exercices « relier » : le besoin à gauche, la réponse de l'école à droite,
   reliés à l'encre violette quand l'exercice arrive à l'écran */
.exercices { margin-top: clamp(2.5rem, 4.5vw, 4rem); display: grid; gap: clamp(3rem, 6vw, 5rem); max-width: 66rem; }
.ex-tete { margin-bottom: clamp(1.2rem, 2.5vw, 2rem); }
.ex-num { display: block; font-family: var(--hand); color: var(--rouge); font-size: 1rem; margin-bottom: .2rem; }
.ex-tete h3 { margin: 0; font-weight: 420; font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; color: var(--vert-fonce); font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.3rem); line-height: 1.1; }
.consigne { margin: .45rem 0 0; color: var(--texte-doux); font-size: 1rem; }
.consigne::before { content: "Consigne : "; font-family: var(--hand); color: var(--encre); font-size: .95rem; }
.relier { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(6rem, 13vw, 11rem) minmax(0, 1.15fr); row-gap: clamp(.8rem, 1.6vw, 1.3rem); align-items: center; }
.paire { display: contents; }
.besoin, .reponse { margin: 0; display: flex; align-items: center; gap: .8rem; position: relative; z-index: 1; }
.besoin { grid-column: 1; grid-row: var(--r); justify-content: flex-end; text-align: right; font-family: var(--hand); color: var(--vert-fonce); font-size: clamp(1rem, .92rem + .35vw, 1.2rem); line-height: 1.7; }
.reponse { grid-column: 3; grid-row: var(--rr); font-size: .98rem; line-height: 1.5; color: var(--texte); padding: .35rem 0; }
.point { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--encre); box-shadow: 0 0 0 3px color-mix(in oklab, var(--encre) 16%, transparent); }
.fils { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.fils path { fill: none; stroke: var(--encre); stroke-width: 2; stroke-linecap: round; opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s var(--sc-ease-out); }
.relier.relie .fils path { stroke-dashoffset: 0; }
.ch-enfant .cta-ligne { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

/* =====================================================================
   II. ENGAGEMENT + BONS POINTS (geste signature)
   ===================================================================== */
/* II. Notre engagement : le pupitre en bois, et le buvard posé dessus */
.ch-pupitre { position: relative; padding: 0 0 clamp(4rem, 8vw, 7rem); color: var(--texte);
  background-color: #94653F;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) calc(50% - 1px), rgba(40,20,8,.35) calc(50% - 1px), rgba(255,220,180,.12) calc(50% + 1px), rgba(0,0,0,0) calc(50% + 2px)),
    radial-gradient(120% 70% at 20% 10%, rgba(255,215,160,.18), transparent 60%),
    repeating-linear-gradient(179.4deg, rgba(60,30,10,.07) 0 1px, transparent 1px 7px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='420'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0028 0.16' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.22 0 0 0 0 0.11 0 0 0 0 0.04 0 0 0 1.05 -0.08'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 100% 100%, 900px 420px;
  box-shadow: inset 0 18px 26px -18px rgba(0,0,0,.5), inset 0 -18px 26px -18px rgba(0,0,0,.45);
}
.rainure { position: relative; height: clamp(3.4rem, 6vw, 4.4rem); display: flex; align-items: center; padding-inline: clamp(1.25rem, 5vw, 5rem); gap: 1.5rem; margin-bottom: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(to bottom, #6F4626, #83552F 40%, #6A4223); box-shadow: inset 0 6px 10px -4px rgba(0,0,0,.55), inset 0 -2px 0 rgba(255,220,180,.12), 0 1px 0 rgba(0,0,0,.25); }
.porte-plume { width: clamp(14rem, 30vw, 26rem); height: auto; rotate: -1.2deg; filter: drop-shadow(0 4px 3px rgba(0,0,0,.45)); }
.encrier { width: clamp(2.6rem, 4.6vw, 3.6rem); height: auto; margin-left: auto; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }

.buvard { --buvard: #EDB9B2; position: relative; max-width: 66rem; margin-inline: auto; background-color: var(--buvard); padding: clamp(.8rem, 1.6vw, 1.1rem); rotate: -.8deg;
  background-image: radial-gradient(rgba(255,255,255,.18) .6px, transparent .8px), radial-gradient(rgba(120,40,40,.08) .6px, transparent .9px);
  background-size: 5px 5px, 7px 7px; background-position: 0 0, 2px 3px;
  box-shadow: 0 2px 2px rgba(0,0,0,.18), 0 26px 40px -18px rgba(30,15,5,.65); }
.buvard-cadre { border: 2px solid #7E2E2A; outline: 1px solid rgba(126,46,42,.55); outline-offset: -7px; padding: clamp(1.4rem, 3.4vw, 3rem) clamp(1.2rem, 3.6vw, 3.4rem) clamp(1.6rem, 3.6vw, 3.2rem); position: relative; z-index: 1; }
.buvard-bandeau { margin: 0 0 clamp(1.4rem, 3vw, 2.4rem); text-align: center; }
.buvard-bandeau span { display: inline-block; background: #7E2E2A; color: #FBE9E4; font-size: .74rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; padding: .45rem 1.3rem .45rem 1.6rem; }
.buvard-grille { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(1.4rem, 4vw, 3.6rem); align-items: center; }
.buvard-annee { margin: 0 0 .6rem; font-family: "Fraunces", serif; font-variation-settings: "SOFT" 0, "WONK" 0; font-weight: 800; font-size: clamp(3.4rem, 2.2rem + 5vw, 6.4rem); line-height: .9; letter-spacing: -.03em; color: #7E2E2A; opacity: .92; }
.buvard-annee span { display: block; font-family: var(--hand); font-weight: 400; font-size: clamp(1rem, .9rem + .5vw, 1.35rem); letter-spacing: 0; line-height: 1.6; opacity: .9; }
.buvard h2 { margin: 0; font-weight: 520; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.6rem); line-height: 1.08; letter-spacing: -.02em; color: #3A1F1B; text-wrap: balance; max-width: 18ch; }
.buvard-texte p { margin: 0 0 1rem; color: #3E2A27; max-width: 58ch; }
.buvard-texte p:first-child { font-size: 1.12rem; color: #5B1F1B; font-weight: 520; }
.buvard-texte p:last-child { margin-bottom: 0; }
.tache { position: absolute; fill: #3A2C86; mix-blend-mode: multiply; pointer-events: none; z-index: 0; filter: blur(.4px); }
.tache.t1 { width: clamp(4rem, 8vw, 6.5rem); right: 6%; top: -1.2rem; opacity: .55; rotate: 20deg; }
.tache.t2 { width: clamp(2.6rem, 5vw, 4rem); left: 3.5%; bottom: 9%; opacity: .35; rotate: -35deg; }
.eclabous { position: absolute; border-radius: 50%; background: #3A2C86; mix-blend-mode: multiply; opacity: .45; pointer-events: none; }
.eclabous.e1 { width: 9px; height: 8px; right: 14%; top: 2.6rem; } .eclabous.e2 { width: 5px; height: 5px; right: 4%; top: 5.4rem; } .eclabous.e3 { width: 6px; height: 6px; left: 8%; bottom: 5%; }
.buvard.sc-in .tache.t1 { animation: tache-boit 1.4s var(--sc-ease-out) .25s both; }
@keyframes tache-boit { from { scale: .55; opacity: 0; } to { scale: 1; opacity: .55; } }

.bons-points { background: var(--papier); }
.bons-points .sc-stage, .bons-points [data-sc-stage] { display: flex; align-items: center; overflow: hidden; }
.rail { display: flex; gap: clamp(1.25rem, 2.5vw, 2.25rem); align-items: center; padding-inline: calc(var(--marge-x) + clamp(1rem, 2.5vw, 2.5rem)) clamp(2rem, 6vw, 6rem); width: max-content; }
.rail-tete { width: min(26rem, 78vw); flex: none; }
.rail-tete .h-hand { color: var(--rouge); font-size: 1.15rem; display: block; margin-bottom: .6rem; }
.rail-tete h2 { font-weight: 420; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.8rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--vert-fonce); margin: 0 0 1rem; text-wrap: balance; }
.rail-tete p { margin: 0; color: var(--texte-doux); }

.bp {
  --teinte: #F3EBD5; --trait: var(--vert-fonce);
  width: clamp(16rem, 25vw, 22rem); flex: none; position: relative;
  background: var(--teinte); padding: 1.1rem 1.15rem 1.4rem; border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 14px 26px -14px rgba(60,40,20,.5);
  rotate: var(--rot, 0deg);
}
.bp::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid var(--trait); outline: 1px solid color-mix(in oklab, var(--trait) 55%, transparent); outline-offset: 3px; border-radius: 2px; pointer-events: none; opacity: .8; }
.bp-haut { display: flex; justify-content: space-between; align-items: center; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--trait); font-weight: 700; padding: .25rem .5rem 0; }
.bp-haut i { font-style: normal; letter-spacing: 0; font-size: .8rem; }
.bp-icone { width: 6.4rem; height: 6.4rem; margin: .9rem auto .5rem; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 0 rgba(0,0,0,.1); }
.bp-icone img { width: 100%; height: 100%; object-fit: cover; }
.bp-cat { font-family: var(--hand); color: var(--rouge); text-align: center; font-size: 1.05rem; margin: 0; }
.bp h3 { text-align: center; font-weight: 560; font-size: 1.22rem; line-height: 1.25; color: var(--vert-fonce); margin: .35rem .4rem .55rem; text-wrap: balance; }
.bp p { margin: 0 .5rem; font-size: .95rem; line-height: 1.5; color: #4A433A; text-align: center; text-wrap: pretty; }
.bp:nth-of-type(1) { --teinte: #EEF0DE; --rot: -1.2deg; }
.bp:nth-of-type(2) { --teinte: #F7E6D6; --trait: #8A3F22; --rot: .9deg; }
.bp:nth-of-type(3) { --teinte: #F8EDCD; --trait: #7A5A1E; --rot: -.6deg; }
.bp:nth-of-type(4) { --teinte: #E9EEE4; --rot: 1.3deg; }
.bp:nth-of-type(5) { --teinte: #EAF1E1; --rot: -1deg; }
.bp:nth-of-type(6) { --teinte: #F6E2D8; --trait: #8A3F22; --rot: .7deg; }
.tampon {
  position: absolute; right: .9rem; top: 2.6rem; width: 5rem; height: 5rem; border-radius: 50%;
  border: 2.5px solid var(--rouge); color: var(--rouge); display: grid; place-items: center; text-align: center;
  font-family: var(--hand); font-size: .9rem; line-height: 1.15; rotate: -14deg;
  box-shadow: 0 0 0 3px transparent, inset 0 0 0 3px rgba(184,51,42,.18);
  opacity: 0; scale: 1.5; transition: opacity 220ms ease-out, scale 260ms var(--sc-ease-out);
  mix-blend-mode: multiply; pointer-events: none;
}
.bp.gagne .tampon { opacity: .88; scale: 1; }
.rail-fin { width: min(20rem, 70vw); flex: none; font-family: var(--hand); color: var(--encre); font-size: 1.15rem; line-height: 1.8; }

/* pochette de bons points */
.pochette {
  position: fixed; right: clamp(.75rem, 2vw, 1.5rem); bottom: clamp(.75rem, 2vw, 1.5rem); z-index: 50;
  background: #C9A877; background-image: linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.06));
  border-radius: 4px; padding: .55rem .7rem .6rem; color: #3B2A16;
  box-shadow: 0 2px 3px rgba(0,0,0,.15), 0 12px 24px -10px rgba(40,25,10,.55);
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity 260ms var(--sc-ease-out), translate 260ms var(--sc-ease-out);
}
.pochette.visible { opacity: 1; translate: 0 0; pointer-events: auto; }
.pochette p { margin: 0 0 .35rem; font-family: var(--hand); font-size: .82rem; display: flex; justify-content: space-between; gap: .8rem; }
.pochette p b { font-family: "Fraunces", serif; font-weight: 700; font-variant-numeric: tabular-nums; }
.pochette ol { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.pochette li button { all: unset; display: block; width: 1.9rem; height: 1.9rem; border-radius: 4px; background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 1px rgba(59,42,22,.35); cursor: pointer; overflow: hidden; }
.pochette li button[disabled] { cursor: default; }
.pochette li button img { width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: .6; transition: opacity 200ms, scale 260ms var(--sc-ease-out); }
.pochette li.ok button img { opacity: 1; scale: 1; }
.pochette li button:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.vol { position: fixed; z-index: 60; pointer-events: none; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 18px -6px rgba(0,0,0,.4); }
.vol img { width: 100%; height: 100%; object-fit: cover; }

/* folio de marge */
.folio { position: fixed; left: clamp(.6rem, 1.4vw, 1.4rem); bottom: 1.4rem; z-index: 40; display: none; align-items: baseline; gap: .5rem; pointer-events: none; opacity: 0; transition: opacity 240ms; }
.folio.visible { opacity: 1; }
.folio b { font-family: "Fraunces", serif; font-style: italic; font-weight: 500; color: var(--rouge); font-size: 1.05rem; }
.folio span { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-doux); background: color-mix(in oklab, var(--papier) 85%, transparent); padding: .1rem .35rem; }
.folio.sombre span { color: #D9CFBD; background: rgba(0,0,0,.25); }
@media (min-width: 1200px) { .folio { display: flex; } }

/* =====================================================================
   III. AU QUOTIDIEN : album photo
   ===================================================================== */
.ch-album {
  background-color: var(--album); color: #EDE4D2;
  background-image: radial-gradient(120% 80% at 30% 0%, rgba(255,255,255,.05), transparent 60%),
                    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 2px, transparent 2px 5px);
}
.ch-album h2.titre { color: #F3EAD7; }
.ch-album .lede { color: #CFC4AF; }
.ch-album .chap-num { color: #E6826F; }
.album { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.4rem, 2.6vw, 2.6rem) clamp(1rem, 2vw, 2rem); margin-top: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.photo { margin: 0; position: relative; }
.photo .cadre { background: #F6F1E6; padding: 7px; position: relative; box-shadow: 0 2px 3px rgba(0,0,0,.35), 0 16px 30px -12px rgba(0,0,0,.65); rotate: var(--rot, 0deg); }
.photo .cadre img { width: 100%; height: auto; aspect-ratio: var(--ar, 3 / 4); object-fit: cover; filter: sepia(.18) saturate(.88) contrast(1.04); }
.coins::before, .coins::after, .coins i::before, .coins i::after {
  content: ""; position: absolute; width: 26px; height: 26px; background: #191613; z-index: 2;
}
.coins::before { top: -4px; left: -4px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.coins::after { top: -4px; right: -4px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.coins i::before { bottom: -4px; left: -4px; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.coins i::after { bottom: -4px; right: -4px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.photo figcaption { margin-top: .9rem; padding-inline: .3rem; rotate: calc(var(--rot, 0deg) * .5); }
.photo figcaption b { display: block; font-family: var(--hand); font-weight: 400; color: #F4E7C8; font-size: 1.05rem; line-height: 1.85; margin-bottom: .45rem; }
.photo figcaption span { font-size: .9rem; line-height: 1.5; color: #CFC4AF; display: block; }
.p1 { grid-column: 1 / span 5; --rot: -1.6deg; --ar: 3 / 4; }
.p2 { grid-column: 7 / span 3; --rot: 1.8deg; margin-top: 3rem; }
.p3 { grid-column: 10 / span 3; --rot: -1.2deg; --ar: 9 / 16; }
.p4 { grid-column: 6 / span 4; --rot: -2deg; margin-top: -5rem; --ar: 4 / 3; }
.p5 { grid-column: 2 / span 3; --rot: 2.2deg; }
.p6 { grid-column: 5 / span 4; --rot: 1deg; margin-top: 2rem; --ar: 3 / 4; }
.p7 { grid-column: 9 / span 4; --rot: -1.4deg; margin-top: -1rem; --ar: 3 / 4; }
.p8 { grid-column: 4 / span 4; --rot: 1.6deg; margin-top: 1rem; --ar: 4 / 3; }

/* =====================================================================
   IV. NOTRE APPROCHE
   ===================================================================== */
.approche { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.approche p { margin: 0 0 1rem; max-width: 60ch; }
.etiquettes { display: flex; flex-wrap: wrap; gap: .8rem 1rem; margin: 1.6rem 0 1.4rem; padding: 0; list-style: none; }
.etiquettes li {
  background: #FFFEF8; border: 1.3px solid var(--vert-fonce); border-radius: 14px / 50%;
  box-shadow: 0 0 0 3px #FFFEF8, 0 0 0 4px rgba(42,74,53,.45); padding: .3rem 1rem .5rem; font-family: var(--hand); font-size: .95rem; color: var(--vert-fonce);
}
.etiquettes li:nth-child(odd) { rotate: -1.5deg; } .etiquettes li:nth-child(even) { rotate: 1.2deg; }
.correction { position: relative; white-space: nowrap; }
.correction svg { position: absolute; left: -3%; width: 106%; bottom: -.45em; height: .7em; overflow: visible; }
.correction path { fill: none; stroke: var(--rouge); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 900ms 400ms var(--sc-ease-out); }
.sc-in .correction path, .correction.sc-in path { stroke-dashoffset: 0; }
.je-retiens { position: relative; margin-top: 1.8rem; padding: 1.4rem 1.5rem 1.2rem; max-width: 34rem; }
.je-retiens > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.je-retiens > svg rect { fill: rgba(255,253,246,.7); stroke: var(--rouge); stroke-width: 2; }
.je-retiens b { position: relative; display: block; font-family: var(--hand); font-weight: 400; color: var(--rouge); font-size: 1.1rem; margin-bottom: .3rem; }
.je-retiens p { position: relative; margin: 0; color: var(--texte); }
.approche .tirage { rotate: 2deg; aspect-ratio: 9 / 15; max-width: 25rem; justify-self: center; width: 100%; }
.approche .tirage .scotch { top: -12px; left: 30%; rotate: -5deg; }

/* =====================================================================
   V. LES FAMILLES : carnet de correspondance (le pic)
   ===================================================================== */
.ch-familles { background: #E9E2D2; }
.scene-livre { height: 100svh; display: grid; place-items: center; padding: clamp(1rem, 3vh, 2rem) clamp(1rem, 3vw, 2.5rem); }
.livre {
  --h: min(80svh, 46rem); --w: min(94vw, 76rem, calc(var(--h) * 1.62));
  position: relative; width: var(--w); height: var(--h); display: grid; grid-template-columns: 1fr 1fr; perspective: 2600px;
}
.livre::before { /* la couverture qui dépasse sous les pages */
  content: ""; position: absolute; inset: -12px -14px -14px -14px; background: #6E3B2A; border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.12), 0 30px 50px -24px rgba(40,20,10,.7); z-index: 0;
}
.livre::after { /* le pli de la reliure */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 46px; translate: -50% 0; z-index: 30; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(60,40,20,.18) 42%, rgba(60,40,20,.28) 50%, rgba(60,40,20,.18) 58%, transparent);
}
.garde-int { position: relative; z-index: 1; background: #E7D7B8; color: #4A2C1E; padding: clamp(1.4rem, 3.5vw, 3rem); display: flex; flex-direction: column; justify-content: center; border-radius: 3px 0 0 3px;
  background-image: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.25), transparent 60%); box-shadow: inset -18px 0 24px -18px rgba(60,40,20,.35); }
.garde-int .plaque { border: 1.5px solid rgba(110,59,42,.5); padding: 1rem 1.1rem; border-radius: 3px; text-align: center; max-width: 22rem; }
.garde-int .plaque small { display: block; letter-spacing: .26em; text-transform: uppercase; font-size: .68rem; opacity: .8; }
.garde-int .plaque span { display: block; font-family: var(--hand); font-size: clamp(1.1rem, .95rem + .7vw, 1.6rem); margin-top: .35rem; }
.garde-int h2 { font-weight: 420; font-variation-settings: "SOFT" 100, "WONK" 1; font-size: clamp(1.5rem, 1.05rem + 1.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.015em; color: #4A2C1E; margin: 1.6rem 0 0; text-wrap: balance; max-width: 18ch; }

.feuillets { position: relative; z-index: 2; grid-column: 2; }
.feuillet { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; transform: rotateY(calc(var(--f, 0) * -180deg)); will-change: transform; }
.page { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  background-color: #FFFDF6; padding: .9rem clamp(1rem, 2.4vw, 2.2rem) 1.6rem clamp(2.6rem, 4.6vw, 4.2rem);
  background-image: linear-gradient(to right, transparent calc(clamp(2rem, 3.6vw, 3.2rem) - 1px), var(--marge) calc(clamp(2rem, 3.6vw, 3.2rem) - 1px) calc(clamp(2rem, 3.6vw, 3.2rem) + 1px), transparent calc(clamp(2rem, 3.6vw, 3.2rem) + 1px)),
                    repeating-linear-gradient(to bottom, transparent 0 calc(1.75rem - 1px), rgba(70,104,178,.18) calc(1.75rem - 1px) 1.75rem);
  background-position: 0 0, 0 3.2rem; display: flex; flex-direction: column; }
.page.recto { border-radius: 0 3px 3px 0; box-shadow: inset 16px 0 22px -16px rgba(60,40,20,.28); }
.page.verso { transform: rotateY(180deg); border-radius: 3px 0 0 3px; box-shadow: inset -16px 0 22px -16px rgba(60,40,20,.28); }
.page::after { /* ombre qui passe sur la page pendant qu'elle tourne */
  content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(40,25,10,.22), transparent 70%); opacity: calc(var(--ombre, 0)); }
.page-tete { flex: none; display: flex; justify-content: space-between; align-items: baseline; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-doux); height: 2.3rem; }
.page-tete .h-hand { text-transform: none; letter-spacing: 0; color: var(--rouge); font-size: .95rem; }
.mot-famille { margin: 0; padding-top: .6rem; }
.mot-famille p { font-style: italic; font-weight: 380; font-size: clamp(1rem, .9rem + .45vw, 1.28rem); line-height: 1.75rem; margin: 0 0 1.75rem; color: #2E2A33; text-wrap: pretty; }
.page.long .mot-famille p { font-size: clamp(.92rem, .86rem + .25vw, 1.06rem); margin-bottom: .9rem; }
.page.tres-long .mot-famille p { font-size: clamp(.84rem, .79rem + .2vw, .96rem); line-height: 1.75rem; margin-bottom: .4rem; }
.page .signe { margin: .2rem 0 0; font-family: var(--hand); color: var(--encre); font-size: 1rem; text-align: right; }
.folio-page { position: absolute; bottom: .55rem; font-size: .75rem; color: var(--texte-doux); font-style: italic; }
.recto .folio-page { right: 1.1rem; } .verso .folio-page { left: 1.1rem; }
.page.vu { display: grid; place-items: end center; padding-bottom: 3rem; }
.vu-cadre { border: 1.5px solid rgba(70,104,178,.45); padding: 1.6rem 2.4rem 2.6rem; }
.vu-cadre span { font-family: var(--hand); color: var(--texte-doux); font-size: .95rem; }
.glisser { display: none; font-family: var(--hand); color: #6E3B2A; font-size: .9rem; margin: .8rem 0 0; }

/* =====================================================================
   VI. L'ÉQUIPE : trombinoscope
   ===================================================================== */
.trombi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 2.5vw, 2.5rem); margin-top: clamp(2.5rem, 5vw, 4rem); align-items: start; }
.prof:nth-child(2) { margin-top: 3rem; } .prof:nth-child(4) { margin-top: 2rem; }
.prof .tirage { padding-bottom: 3.75rem; rotate: var(--rot, 0deg); }
.prof:nth-child(1) { --rot: -1.5deg; } .prof:nth-child(2) { --rot: 1.2deg; } .prof:nth-child(3) { --rot: -.8deg; } .prof:nth-child(4) { --rot: 1.6deg; }
.prof .tirage img { height: auto; aspect-ratio: 4 / 5; object-position: 50% 25%; }
.prof .nom { position: absolute; left: 0; right: 0; bottom: 1.2rem; text-align: center; font-family: var(--hand); color: var(--encre); font-size: 1.2rem; }
.prof .role { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); margin: 1.2rem 0 .5rem; font-weight: 650; line-height: 1.5; }
.prof p { margin: 0; font-size: .95rem; color: var(--texte-doux); line-height: 1.6; }

/* =====================================================================
   VII. INSCRIPTIONS : le tableau noir
   ===================================================================== */
.ch-inscriptions { background: #5C4430; padding-block: clamp(3rem, 6vw, 5rem); }
.tableau {
  background-color: var(--ardoise); color: var(--craie); border-radius: 4px; position: relative;
  border: clamp(10px, 1.4vw, 16px) solid #7A5636;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 80px rgba(0,0,0,.35), 0 20px 40px -18px rgba(0,0,0,.6);
  background-image: radial-gradient(60% 50% at 25% 30%, rgba(255,255,255,.06), transparent 70%),
                    radial-gradient(40% 40% at 80% 70%, rgba(255,255,255,.045), transparent 70%);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.4rem, 5vw, 4.5rem); max-width: 72rem; margin-inline: auto;
}
.tableau .rentree { font-family: var(--hand); font-size: clamp(1rem, .9rem + .4vw, 1.25rem); opacity: .82; margin: 0 0 .8rem; }
.tableau h2 { font-family: var(--hand); font-weight: 400; font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3.1rem); line-height: 2.1; margin: 0 0 1.4rem; max-width: 24ch; color: #F7F4EA; text-shadow: 0 0 1px rgba(247,244,234,.5); }
.tableau .grille { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.tableau .grille p { color: #E2E0D6; margin: 0 0 1rem; max-width: 52ch; }
.convocations { display: flex; flex-direction: column; gap: .9rem; margin-top: 1.6rem; align-items: flex-start; }
.convoc { display: inline-flex; align-items: center; gap: .7rem; background: #FBF6E9; color: var(--vert-fonce); text-decoration: none; padding: .8rem 1.1rem; border-radius: 2px; font-weight: 600; box-shadow: 0 2px 0 rgba(0,0,0,.25), 0 10px 18px -10px rgba(0,0,0,.6); transition: transform 140ms var(--sc-ease-out); rotate: -.6deg; }
.convoc:nth-child(2) { rotate: .5deg; }
.convoc:hover { transform: translateY(-2px); }
.convoc svg { width: 1.2rem; height: 1.2rem; color: var(--rouge); }
.convoc small { display: block; font-weight: 400; font-size: .75rem; color: var(--texte-doux); }
.note-essai { background: #FFF8E6; color: var(--texte); padding: 1.5rem 1.4rem 1.6rem; border-radius: 2px; position: relative; rotate: 1.4deg; box-shadow: 0 2px 3px rgba(0,0,0,.2), 0 18px 30px -16px rgba(0,0,0,.7); }
.note-essai .punaise { position: absolute; top: -9px; left: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F08C78, #B8332A 60%, #7E1F18); box-shadow: 0 3px 4px rgba(0,0,0,.4); }
.note-essai h3 { font-weight: 560; font-size: 1.25rem; line-height: 1.3; color: var(--vert-fonce); margin: 0 0 .6rem; }
.note-essai p { color: var(--texte-doux) !important; font-size: .98rem; }
.craie-bas { margin-top: 2.2rem; height: 10px; border-radius: 3px; background: linear-gradient(#8A6443, #6B4A2E); box-shadow: 0 4px 6px -2px rgba(0,0,0,.5); position: relative; }
.craie-bas::before { content: ""; position: absolute; left: 12%; top: -7px; width: 54px; height: 9px; border-radius: 3px; background: #F2EFE6; rotate: -3deg; }

/* =====================================================================
   VIII. QUESTIONS
   ===================================================================== */
.questions { margin-top: clamp(2rem, 4vw, 3rem); max-width: 52rem; }
.questions details { border-bottom: 1px solid rgba(70,104,178,.3); }
.questions summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.4rem 1fr 1.5rem; gap: .6rem; align-items: baseline; padding: 1.1rem 0; font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); font-weight: 520; color: var(--vert-fonce); }
.questions summary::-webkit-details-marker { display: none; }
.questions summary .n { font-family: var(--hand); color: var(--rouge); font-weight: 400; }
.questions summary .plus { font-family: var(--hand); color: var(--encre); transition: rotate 200ms var(--sc-ease-out); justify-self: end; }
.questions details[open] summary .plus { rotate: 45deg; }
.questions summary:hover { color: var(--vert); }
.questions details p { margin: 0 0 1.3rem 3rem; color: var(--texte-doux); max-width: 62ch; }
.questions + .cta-ligne { margin-top: 2rem; }

/* La plume des questions : les cinq intitulés s'écrivent à l'encre violette quand on arrive dessus.
   Le texte est toujours dans la page ; seul l'affichage est retenu le temps du tracé (et seulement si le JS l'a préparé). */
.questions summary { align-items: baseline; padding: .55rem 0 .7rem; }
.questions summary .n { font-size: 1.08em; line-height: 1.95; }
.questions summary .q { font-family: var(--hand); font-weight: 400; color: var(--encre); font-size: clamp(1.02rem, .96rem + .32vw, 1.24rem); line-height: 1.95; position: relative; transition: color 200ms; }
.questions summary:hover .q { color: #2F2275; }
.questions summary:focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; border-radius: 3px; }
.questions .q .m { display: inline-block; }
.questions .q .ligne-base { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.questions .bec { position: absolute; left: 0; top: 0; width: 1.55em; height: 1.55em; margin: -1.5em 0 0 -.08em; pointer-events: none; opacity: 0; z-index: 1; }
.questions .bec svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(1px 2px 1.5px rgba(30,20,60,.35)); }
.questions.plume-prete summary:not(.ecrit) .q .m,
.questions.plume-prete summary:not(.ecrit) .n { clip-path: inset(-.8em calc(100% + .5em) -.9em -.5em); }
.questions.plume-prete summary:not(.ecrit) .plus { opacity: 0; }
@media (max-width: 760px) {
  .questions summary { grid-template-columns: 1.9rem 1fr 1.3rem; gap: .45rem; padding: .5rem 0 .65rem; }
  .questions summary .q { font-size: 1.04rem; line-height: 2.45; }
  .questions summary .n { line-height: 2.25; }
  .questions details p { margin-left: 2.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .questions.plume-prete summary .q .m, .questions.plume-prete summary .n { clip-path: none !important; }
  .questions.plume-prete summary .plus { opacity: 1 !important; }
  .questions .bec { display: none; }
}

/* =====================================================================
   IX. NOUS ÉCRIRE + colophon
   ===================================================================== */
.ch-contact { background: var(--creme); position: relative; padding-top: 0; } /* V32 : le colophon de l'accueil finit la page comme sur les autres pages */
.chapitre.ch-contact { padding-bottom: 0; }
.par-avion { height: 12px; background: repeating-linear-gradient(-45deg, #B8332A 0 18px, #FBF7EF 18px 30px, #2F4D8F 30px 48px, #FBF7EF 48px 60px); }
.contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); padding-top: clamp(4rem, 8vw, 7rem); align-items: start; }
.cachet { width: 9.5rem; height: 9.5rem; color: var(--encre); rotate: -10deg; margin: 0 0 1.5rem -.5rem; opacity: .85; }
.cachet text { font: 600 11px "Fraunces", serif; letter-spacing: 3px; fill: currentColor; }
.cachet .centre { font-family: var(--hand); font-size: 9.5px; letter-spacing: 0; font-weight: 400; }
.coord { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .7rem; }
.coord li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .6rem; align-items: start; }
.coord svg { width: 1.2rem; height: 1.2rem; color: var(--vert); margin-top: .25rem; }
.coord a { text-decoration-color: rgba(42,74,53,.35); text-underline-offset: .2em; word-break: break-word; }
.reseaux { display: flex; gap: .6rem; }
.reseaux a { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--vert-fonce); color: var(--vert-fonce); transition: background-color 160ms; }
.reseaux a:hover { background: var(--vert-pale); }
.reseaux svg { width: 1.15rem; height: 1.15rem; }

.lettre {
  background-color: #FFFEFA; padding: clamp(1.5rem, 3vw, 2.6rem); position: relative; border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 22px 40px -22px rgba(60,45,25,.5); rotate: .5deg;
}
.lettre h3 { font-family: var(--hand); font-weight: 400; font-size: 1.5rem; color: var(--encre); margin: 0 0 1.2rem; }
.champ { margin-bottom: 1.15rem; }
.champ label { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-doux); margin-bottom: .1rem; }
.champ label em { font-style: normal; text-transform: none; letter-spacing: 0; }
.champ input, .champ select, .champ textarea {
  width: 100%; font: 400 1.05rem "Cursive Ecole", cursive; color: var(--encre); background: transparent;
  border: 0; border-bottom: 1.5px solid rgba(70,104,178,.45); padding: .55rem .1rem .45rem; border-radius: 0;
}
.champ select { font-family: "Fraunces", serif; color: var(--texte); appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232A4A35' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .3rem center / 12px; }
.champ textarea { min-height: 8.5rem; resize: vertical; line-height: 2rem; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(2rem - 1px), rgba(70,104,178,.3) calc(2rem - 1px) 2rem); background-attachment: local; border-bottom: 0; }
/* la cursive dépasse largement de sa ligne (boucles du j, du p, du f) :
   on donne aux champs une hauteur de ligne généreuse pour ne rien couper */
.champ input { height: 3.1rem; line-height: 2.5rem; padding: .3rem .15rem .3rem; }
.champ textarea { line-height: 34px; padding: 6px .15rem 4px; min-height: calc(34px * 4 + 10px);
  background-image: repeating-linear-gradient(to bottom, transparent 0 33px, rgba(70,104,178,.32) 33px 34px); background-position: 0 6px; }
.champ input::placeholder, .champ textarea::placeholder { color: #70649F; opacity: 1; } /* 5,2:1 sur le papier de la lettre */
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-bottom-color: var(--encre); box-shadow: 0 2px 0 -0.5px var(--encre); }
.miel { position: absolute; left: -9999px; }
.lettre .btn { margin-top: .4rem; }
.statut { min-height: 1.5rem; margin: .8rem 0 0; font-size: .95rem; }
.statut.ok { color: var(--vert); } .statut.err { color: var(--rouge); }
.rgpd { font-size: .82rem; color: var(--texte-doux); margin: 1rem 0 0; line-height: 1.5; }

.colophon { margin-top: clamp(4rem, 7vw, 6rem); padding-block: 2rem 2.4rem; border-top: 1px solid rgba(42,74,53,.18); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; font-size: .88rem; color: var(--texte-doux); }
.colophon .marque img { width: 40px; height: 42px; }
.colophon nav { display: flex; gap: 1.2rem; margin-left: auto; flex-wrap: wrap; }
.colophon nav a { text-decoration: none; } .colophon nav a:hover { text-decoration: underline; }
/* V44-05 : la signature de l'auteur a quitté le pied de page pour les mentions légales (pages.css) */
/* téléphone (portrait et paysage) : un pied de page resserré */
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  .colophon { padding-block: 1.25rem 1.4rem; gap: .7rem 1rem; font-size: .84rem; }
  .ch-contact .colophon { margin-top: 2.75rem; }
  .colophon .marque img { width: 36px; height: 38px; }
  .colophon .reseaux + span { margin-left: auto; }      /* le © se range en face des pastilles */
  .colophon nav { gap: .35rem 1rem; }
}
/* portrait : 1. l'école ; 2. les pastilles, le © en face ; 3. les mentions (le lien de l'école garde sa largeur) */
@media (max-width: 760px) {
  .colophon { display: grid; grid-template-columns: auto 1fr; }
  .colophon .marque, .colophon nav { grid-column: 1 / -1; justify-self: start; }
  .colophon .reseaux + span { justify-self: end; }
}
/* très petits écrans : la ligne ne tient pas, le © revient sous les pastilles, aligné à gauche */
@media (max-width: 359px) {
  .colophon .reseaux + span { grid-column: 1 / -1; justify-self: start; margin-left: 0; }
}

/* lightbox */
.visionneuse { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.visionneuse::backdrop { background: rgba(20,16,12,.86); }
.visionneuse img { max-width: 94vw; max-height: 86vh; object-fit: contain; border: 8px solid #F6F1E6; }
.visionneuse button { position: absolute; top: .4rem; right: .4rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: #F6F1E6; color: var(--texte); font-size: 1.2rem; cursor: pointer; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
/* entre 1001 et 1180 px, les sept rubriques restent toutes visibles : on resserre au lieu de masquer */
@media (min-width: 1001px) and (max-width: 1180px) {
  .entete .wrap { gap: 1rem; padding-inline: 1.1rem; }
  .nav { gap: .8rem; }
  .nav a { font-size: .9rem; }
  .marque { gap: .6rem; }
  .marque img { width: 44px; height: 46px; }
  .marque small { display: none; }
  .entete .btn { padding: .6rem .8rem; font-size: .88rem; gap: .4rem; }
}
@media (max-width: 1000px) {
  :root { --marge-x: 2.6rem; }
  .burger { display: none !important; }
  .entete .wrap { flex-wrap: wrap; min-height: 72px; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: flex-start; gap: .2rem; padding: .5rem 0 1rem; }
  .nav.ouvert { display: none; }
  .entete .btn { display: none; }
  .garde .inner, .approche, .contact, .buvard-grille { grid-template-columns: 1fr; }
  .pile { max-width: 40rem; width: 100%; justify-self: center; margin-right: 0; }
  .album { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .p1 { grid-column: 1 / span 4; } .p2 { grid-column: 5 / span 2; margin-top: 2rem; }
  .p3 { grid-column: 1 / span 2; } .p4 { grid-column: 3 / span 4; margin-top: 0; }
  .p5 { grid-column: 1 / span 3; } .p6 { grid-column: 4 / span 3; margin-top: 0; }
  .p7 { grid-column: 1 / span 3; margin-top: 0; } .p8 { grid-column: 4 / span 3; margin-top: 2rem; }
  .trombi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof:nth-child(n) { margin-top: 0; }
  .tableau .grille { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --marge-x: 1.6rem; }
  .chap-num { position: static; display: block; width: auto; text-align: left; margin-bottom: .4rem; font-size: 1.2rem; }
  .chapitre .inner { padding-left: calc(var(--marge-x) + .9rem); padding-right: 1.1rem; }
  .marque small { display: none; }
  .garde h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 2.8rem); }
  .garde h1 em { white-space: normal; }
  .pile .t1 { rotate: 1.4deg; }
  .pile .legende { margin-left: .4rem; }
  .actions .btn { white-space: normal; }
  .album { grid-template-columns: 1fr 1fr; gap: 1.6rem 1rem; }
  .album .photo { grid-column: auto / span 1 !important; margin-top: 0 !important; }
  .album .p1, .album .p4 { grid-column: 1 / -1 !important; }
  .photo figcaption span { font-size: .84rem; }
  .trombi { grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; }
  .prof p { font-size: .9rem; }
  .bp { width: min(17rem, 76vw); }
  .bp-icone { width: 4.6rem; height: 4.6rem; }
  .pochette p span { display: none; }
  .pochette li button { width: 1.55rem; height: 1.55rem; }
  .colophon nav { margin-left: 0; }
  .buvard { rotate: 0deg; }
  .buvard-cadre { outline-offset: -5px; }
  .rainure { margin-bottom: 2rem; }
  .relier { grid-template-columns: 1fr; row-gap: 0; }
  .besoin, .reponse { grid-column: 1; grid-row: auto; }
  .besoin { justify-content: flex-start; text-align: left; margin-top: 1.25rem; gap: .65rem; }
  .besoin .point { order: -1; width: 8px; height: 8px; }
  .reponse { padding: .35rem 0 0 2.2rem; }
  .reponse .point { position: absolute; left: .6rem; top: 1.05rem; width: 7px; height: 7px; }
  .fils path { stroke-width: 1.6; }
  .tableau h2 { font-size: 1.6rem; line-height: 2.1; }

}
.glisser { display: none; font-family: var(--hand); color: #F2E3C6; font-size: .9rem; margin: .6rem 0 0; }


/* carnet 3D : écrans peu hauts (iPad paysage, portables) */
@media (min-width: 761px) and (max-height: 860px) and (orientation: landscape), (min-width: 761px) and (max-width: 1000px) and (orientation: landscape) {
  .page { padding-top: .5rem; padding-bottom: 1.2rem; }
  .page-tete { height: 1.9rem; }
  .mot-famille p { font-size: .98rem; line-height: 1.55rem; margin-bottom: 1rem; }
  .page.long .mot-famille p { font-size: .88rem; line-height: 1.45rem; margin-bottom: .6rem; }
  .page.tres-long .mot-famille p { font-size: .8rem; line-height: 1.32rem; margin-bottom: .35rem; }
  .garde-int .plaque { padding: .7rem .9rem; }
  .garde-int .plaque span { font-size: 1.15rem; margin-top: .2rem; }
  .garde-int h2 { margin-top: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .date-cahier { animation: none; clip-path: none; }
  .souligne path { animation: none; stroke-dashoffset: 0; }
  .case path, .correction path { transition: none; }
  .fils path { transition: none; stroke-dashoffset: 0; }
  .buvard.sc-in .tache.t1 { animation: none; }
  .tampon { transition: none; }
  .vol { display: none; }
}
/* =====================================================================
   NAVIGATION MOBILE : le « Sommaire » du cahier (tablettes et téléphones)
   ===================================================================== */
.regle, .sommaire-voile, .sommaire-panneau, .carnet-barre, .carnet-suite, .paquet-pied, .album-compte { display: none; }
@media (max-width: 1000px) {
  .pochette { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }

  .sommaire-voile { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(28,24,18,.45); opacity: 0; pointer-events: none; transition: opacity 260ms ease-out; }
  .sommaire-panneau {
    display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; max-height: 90svh; overflow: hidden;
    background-color: var(--papier); border-radius: 16px 16px 0 0; box-shadow: 0 -18px 40px -16px rgba(30,25,15,.45);
    background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--seyes) 31px 32px), repeating-linear-gradient(to bottom, transparent 0 7px, var(--seyes-fin) 7px 8px);
    transform: translateY(105%); transition: transform 340ms var(--sc-ease-drawer); visibility: hidden;
  }
  @media (min-width: 640px) { .sommaire-panneau { max-width: 36rem; margin-inline: auto; } }
  .sommaire-panneau::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.6rem; width: 2px; background: var(--marge); pointer-events: none; }
  html.sommaire-ouvert { overflow: hidden; }
  html.sommaire-ouvert .sommaire-voile { opacity: 1; pointer-events: auto; }
  html.sommaire-ouvert .sommaire-panneau { transform: translateY(0); visibility: visible; }
  .sommaire-panneau.glisse { transition: none; }

  .som-tete { flex: none; position: relative; padding: .7rem 1.1rem .4rem 3.4rem; touch-action: none; cursor: grab; }
  .som-poignee { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(42,74,53,.25); margin: 0 auto .6rem; translate: -1.15rem 0; }
  .som-tete h2 { margin: 0; font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; color: var(--vert-fonce); font-weight: 700; }
  .som-fermer { position: absolute; right: .8rem; top: 1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid rgba(42,74,53,.35); background: #FFFEF8; color: var(--vert-fonce); font-size: 1.05rem; cursor: pointer; }
  .som-corps { overflow-y: auto; overscroll-behavior: contain; padding: .2rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom)) 3.4rem; }
  .som-liste { list-style: none; margin: 0 0 1.2rem; padding: 0; counter-reset: som; }
  .som-liste li { counter-increment: som; }
  .som-liste a { position: relative; display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--texte); min-height: 3rem; padding: .7rem 0 .45rem; font-size: 1.12rem; font-weight: 480; }
  .som-liste a::before { content: counter(som) "."; position: absolute; left: -2.35rem; width: 1.6rem; text-align: right; font-style: italic; color: var(--rouge); font-weight: 500; font-size: 1rem; }
  .som-liste .points { flex: 1; border-bottom: 2px dotted rgba(42,74,53,.3); transform: translateY(-.3rem); min-width: 1rem; }
  .som-liste .mot { position: relative; padding: 0 .1rem; }
  .som-liste .entoure { position: absolute; left: -.55rem; right: -.55rem; top: -.5rem; bottom: -.45rem; width: calc(100% + 1.1rem); height: calc(100% + .95rem); overflow: visible; pointer-events: none; }
  .som-liste .entoure path { fill: none; stroke: var(--rouge); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 600ms var(--sc-ease-out) 200ms; }
  html.sommaire-ouvert .som-liste .entoure path { stroke-dashoffset: 0; }
  .som-liste a[aria-current] { color: var(--vert-fonce); font-weight: 620; }
  .som-pied { border-top: 1.5px dashed rgba(42,74,53,.3); padding-top: 1.1rem; display: grid; gap: .9rem; }
  .som-pied .btn { justify-content: center; width: 100%; white-space: normal; }
  .som-tel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
  .som-tel a.tel { font-family: var(--hand); color: var(--encre); font-size: 1.05rem; text-decoration: none; }
  .som-legal { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; }
  .som-legal a { color: var(--texte-doux); }
}
@media (max-width: 1000px) and (prefers-reduced-motion: reduce) {
  .sommaire-panneau, .sommaire-voile { transition: none; }
  .som-liste .entoure path { transition: none; stroke-dashoffset: 0; }
}

/* =====================================================================
   FENÊTRE DE CONTACT : le formulaire s'ouvre sur place
   ===================================================================== */
html.fenetre-ouverte { overflow: hidden; }
.fenetre-lettre { padding: 0; border: 0; background: transparent; width: min(38rem, calc(100vw - 2rem)); max-height: min(92vh, 52rem); overflow: visible; color: var(--texte); }
.fenetre-lettre::backdrop { background: rgba(28,24,18,.55); }
.fenetre-lettre[open] { animation: lettre-arrive 280ms var(--sc-ease-out); }
@keyframes lettre-arrive { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fen-papier { position: relative; display: flex; flex-direction: column; max-height: min(92vh, 52rem); background-color: #FFFEFA; border-radius: 4px; overflow: hidden;
  box-shadow: 0 2px 3px rgba(0,0,0,.15), 0 30px 60px -20px rgba(20,12,4,.65); }
.fen-papier .par-avion { flex: none; height: 10px; }
.fen-tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.2rem, 3vw, 2rem) .4rem; }
.fen-tete h2 { margin: 0; font-family: var(--hand); font-weight: 400; color: var(--encre); font-size: 1.6rem; line-height: 1.7; }
.fen-fermer { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid rgba(42,74,53,.35); background: #FFFEF8; color: var(--vert-fonce); font-size: 1.05rem; cursor: pointer; }
.fen-fermer:hover { background: var(--vert-pale); }
.fen-corps { overflow-y: auto; overscroll-behavior: contain; padding: .4rem clamp(1.2rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem); }
.fen-form .champ { margin-bottom: 1rem; }
.fen-form .btn { margin-top: .3rem; }
@media (max-width: 760px) {
  /* sur téléphone : plein écran, comme une feuille qu'on sort du cartable */
  .fenetre-lettre { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .fenetre-lettre[open] { animation: lettre-monte 300ms var(--sc-ease-drawer); }
  @keyframes lettre-monte { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .fen-papier { height: 100%; max-height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .fen-corps { padding-bottom: calc(1.6rem + env(safe-area-inset-bottom)); }
  .fen-form .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .fenetre-lettre[open] { animation: none; } }

/* =====================================================================
   EN-TÊTE ORDINATEUR : toujours à portée de main
   il s'efface quand on descend pour lire, revient dès qu'on remonte un peu
   ===================================================================== */
@media (min-width: 1001px) {
  html { scroll-padding-top: 5.5rem; }
  .entete { position: sticky; top: 0; z-index: 60; transition: transform 280ms var(--sc-ease-out), box-shadow 200ms ease-out, background-color 200ms ease-out; }
  .entete.compact { background-color: color-mix(in oklab, var(--papier) 94%, transparent); box-shadow: 0 1px 0 rgba(42,74,53,.12), 0 10px 24px -14px rgba(40,30,15,.35); }
  @supports (backdrop-filter: blur(6px)) { .entete.compact { backdrop-filter: blur(6px); } }
  /* V31 : la barre qui réapparaît garde la hauteur, le logo et la mention du haut de page */
  .entete.cache { transform: translateY(-105%); }
  .entete .wrap { transition: min-height 200ms ease-out; }
}
@media (min-width: 1001px) and (prefers-reduced-motion: reduce) { .entete { transition: none; } }

/* =====================================================================
   V43 · L'EN-TÊTE ORDINATEUR, HABILLÉ COMME LE HAUT D'UNE PAGE DE CAHIER
   Même squelette, mêmes liens, même comportement au défilement :
   le filet double du cahier, la rubrique entourée au stylo rouge,
   et les trois réseaux en pastilles à côté du nom de l'école.
   ===================================================================== */
.entete-reseaux { display: none; }
@media (min-width: 1001px) {
  .nav a { white-space: nowrap; }
  /* le filet double, comme sous l'en-tête imprimé d'un cahier */
  .entete { border-bottom-color: rgba(42,74,53,.1); }
  .entete::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: rgba(42,74,53,.2); pointer-events: none; }

  /* les réseaux : trois pastilles discrètes, rattachées au nom de l'école */
  .entete-reseaux { display: flex; align-items: center; gap: .4rem; list-style: none; margin: 0 0 0 .3rem; padding: 0 0 0 1.15rem; position: relative; flex: none; }
  .entete-reseaux::before { content: ""; position: absolute; left: 0; top: .2rem; bottom: .2rem; border-left: 2px dotted rgba(42,74,53,.28); }
  .entete-reseaux a {
    width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%;
    border: 1.3px solid rgba(42,74,53,.5); color: var(--vert-fonce); background: transparent;
    transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out, rotate 220ms var(--sc-ease-out);
  }
  .entete-reseaux svg { width: .95rem; height: .95rem; }
  .entete-reseaux a:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); color: var(--papier); rotate: -8deg; }
  .entete-reseaux a:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

  /* la rubrique où l'on se trouve : entourée au stylo rouge, comme dans le sommaire du téléphone */
  .nav a[aria-current] { position: relative; background-size: 0 2px; }
  .nav a[aria-current]:hover { background-size: 0 2px; }
  .nav a[aria-current]::after {
    content: ""; position: absolute; left: -.5rem; right: -.5rem; top: -.12rem; bottom: -.18rem; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40' preserveAspectRatio='none'%3E%3Cpath d='M8 20 C 8 6, 40 3, 62 4 C 88 5, 97 12, 95 22 C 93 34, 60 38, 38 36 C 14 34, 3 27, 10 13' fill='none' stroke='%23B8332A' stroke-width='1.9' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    animation: entourer-nav 650ms var(--sc-ease-out) 450ms both;
  }
}
@keyframes entourer-nav { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* 1181 à 1340 px : on resserre d'un cran les espacements pour que tout tienne sur une ligne */
@media (min-width: 1181px) and (max-width: 1340px) {
  .entete .wrap { gap: 1rem; }
  .nav { gap: clamp(.7rem, .95vw, 1rem); }
  .nav a { font-size: .95rem; }
  .marque { gap: .65rem; }
  .marque img { width: 46px; height: 48px; }
  .marque small { letter-spacing: .1em; }
  .entete-reseaux { gap: .3rem; padding-left: .85rem; margin-left: 0; }
  .entete-reseaux a { width: 1.8rem; height: 1.8rem; }
  .entete-reseaux svg { width: .85rem; height: .85rem; }
  .entete .btn { padding: .62rem .88rem; }
}
/* 1001 à 1180 px : la mention « École primaire associative » est déjà masquée ;
   les pastilles prennent sa place, sous le nom de l'école */
@media (min-width: 1001px) and (max-width: 1180px) {
  .entete .wrap { position: relative; }
  .marque > span { translate: 0 -.88rem; }
  /* sous « des Champs », entre la boucle du f et celle du p */
  .entete-reseaux { position: absolute; left: calc(1.1rem + 44px + .6rem + 6.15rem); top: calc(50% + .3rem); margin: 0; padding: 0; gap: .28rem; }
  .entete-reseaux::before { display: none; }
  .entete-reseaux a { width: 1.5rem; height: 1.5rem; border-width: 1.2px; }
  .entete-reseaux svg { width: .74rem; height: .74rem; }
  .nav a[aria-current]::after { left: -.4rem; right: -.4rem; }
}
@media (min-width: 1001px) and (prefers-reduced-motion: reduce) {
  .nav a[aria-current]::after { animation: none; }
  .entete-reseaux a { transition: none; }
  .entete-reseaux a:hover { rotate: none; }
}

@media print {
  .fenetre-lettre, .pochette, .folio, .entete .btn, .burger, .regle, .sommaire-panneau, .sommaire-voile, .carnet-barre, .carnet-suite, .paquet-pied { display: none !important; }
}

/* =====================================================================
   V24 · L'ÉCOLE DANS LA POCHE
   Le cahier tenu à une main : une règle d'écolier pour naviguer,
   des gestes du pouce (distribuer les bons points, tourner les pages
   du carnet, feuilleter l'album) et des contenus toujours entiers.
   Rien ici ne s'applique au-delà de 1000 px de large et 520 px de haut,
   sauf le carnet tenu en main quand le livre manque de hauteur.
   ===================================================================== */

/* -------- la règle (tablettes et téléphones) --------------------------- */
@media (max-width: 1000px) {
  body { padding-bottom: calc(3.75rem + env(safe-area-inset-bottom)); }
  html { scroll-padding-bottom: 4.5rem; }
  .regle {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .45rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: .62rem max(.6rem, env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) max(.6rem, env(safe-area-inset-left));
    background-color: #E9C891;
    background-image:
      linear-gradient(to bottom, rgba(255,246,225,.55), rgba(255,246,225,0) 40%, rgba(120,80,30,.12)),
      repeating-linear-gradient(178.6deg, rgba(120,75,25,.07) 0 1px, transparent 1px 5px),
      repeating-linear-gradient(91deg, rgba(120,75,25,.05) 0 2px, transparent 2px 23px);
    border-top: 1px solid rgba(96,62,24,.45);
    box-shadow: 0 1px 0 rgba(255,248,230,.7) inset, 0 -12px 26px -16px rgba(40,25,10,.55);
    transition: transform 260ms var(--sc-ease-out);
    -webkit-tap-highlight-color: transparent;
  }
  .regle.rentree { transform: translateY(115%); }
  .regle-graduations { position: absolute; left: 0; right: 0; top: 0; height: 10px; display: flex; justify-content: space-between; padding-inline: .7rem; pointer-events: none; }
  .regle-graduations i { width: 1px; height: 4px; background: rgba(70,44,16,.55); }
  .regle-graduations i.demi { height: 6px; }
  .regle-graduations i.cm { height: 9px; background: rgba(70,44,16,.8); }
  .regle-crayon { position: absolute; left: 0; top: 0; height: 2.5px; width: calc(var(--p, 0) * 100%); background: var(--rouge); opacity: .8; border-radius: 0 2px 2px 0; pointer-events: none; }
  .regle-crayon::after { content: ""; position: absolute; right: -4px; top: -2.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--rouge); }
  .regle { grid-template-columns: minmax(0, 1fr) auto; }
  .regle .btn-sommaire { justify-self: start; width: 100%; max-width: 23rem; }
  .regle .btn-sommaire {
    min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .6rem; align-items: center;
    min-height: 2.9rem; padding: .2rem 1.1rem .25rem .85rem; text-align: left;
    background: #FFFEF8; color: var(--vert-fonce); border: 1.5px solid var(--vert-fonce); border-radius: 18px / 50%;
    cursor: pointer; box-shadow: 0 2px 0 rgba(70,44,16,.25);
  }
  .regle .btn-sommaire svg { grid-row: 1 / span 2; width: 1.15rem; height: 1.15rem; }
  .regle-titre { font: 400 .92rem/1.55 var(--hand); }
  .regle-ici { min-width: 0; display: flex; align-items: baseline; gap: .3rem; color: #3B2A16; line-height: 1.15; }
  .regle-num { flex: none; font-style: italic; font-weight: 600; color: var(--rouge); font-size: .86rem; }
  .regle-num:empty { display: none; }
  .regle-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 540; font-size: .86rem; }
  .regle-accueil {
    display: grid; place-items: center; height: 2.9rem; padding: 0 .75rem; border-radius: 18px / 50%;
    background: #FFFEF8; border: 1.5px solid var(--vert-fonce); box-shadow: 0 2px 0 rgba(70,44,16,.25);
  }
  .regle-accueil img { width: 2.15rem; height: auto; }
  .regle .btn-sommaire:active, .regle-accueil:active { transform: translateY(1px); }

  /* le sommaire s'enrichit des chapitres de la page en cours */
  .som-page { border-top: 1.5px dashed rgba(42,74,53,.3); padding-top: .9rem; margin: 0 0 1.2rem; }
  .som-page h3 { margin: 0 0 .3rem; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--vert-fonce); font-weight: 700; }
  .som-page h3 span { display: block; letter-spacing: 0; text-transform: none; font: 400 1rem/1.9 var(--hand); color: var(--encre); }
  .som-chap { list-style: none; margin: 0; padding: 0; }
  .som-chap a { position: relative; display: flex; align-items: baseline; gap: .5rem; min-height: 2.75rem; padding: .55rem 0 .35rem; text-decoration: none; color: var(--texte); font-size: 1rem; }
  .som-chap .cnum { position: absolute; left: -2.35rem; width: 1.9rem; text-align: right; font-style: italic; color: var(--rouge); font-size: .92rem; }
  .som-chap li.suite a { padding-left: .9rem; font-size: .95rem; color: var(--texte-doux); }
  .som-chap a.ici { color: var(--vert-fonce); font-weight: 620; }
  .som-chap a.ici::after { content: "vous êtes ici"; margin-left: auto; font: 400 .82rem var(--hand); color: var(--encre); white-space: nowrap; }
}
@media (max-width: 374px) {
  .regle .btn-sommaire { padding-inline: .7rem .8rem; column-gap: .45rem; }
  .regle-accueil { padding: 0 .6rem; }
}
@media (max-width: 1000px) and (prefers-reduced-motion: reduce) { .regle { transition: none; } }

/* =====================================================================
   V42 · LE SOMMAIRE, HABILLÉ COMME UNE PAGE DE CAHIER
   Rien ne change dans son organisation ni dans son fonctionnement :
   seulement l'étiquette, l'encre, la règle rouge et le buvard.
   ===================================================================== */
@media (max-width: 1000px) {
  /* l'étiquette collée en haut de la page, écrite à la main */
  .som-tete { padding: .55rem 4rem .5rem 3.4rem; }
  .som-poignee { margin-bottom: .5rem; }
  .som-tete h2 {
    display: inline-block; padding: .1rem 1.35rem .2rem; font: 400 1.12rem/1.9 var(--hand); letter-spacing: 0; text-transform: none; color: var(--vert-fonce);
    background: #FFFEF9; border: 1.5px solid var(--vert-fonce); border-radius: 18px / 50%; rotate: -1.4deg; transform-origin: 20% 50%;
    box-shadow: 0 0 0 3px #FFFEF9, 0 0 0 4px rgba(42,74,53,.5), 0 6px 12px -8px rgba(0,0,0,.4);
  }
  .som-fermer { top: 1.35rem; background: #FFFEF8; box-shadow: 0 2px 0 rgba(70,44,16,.12); }

  /* la page dont on parle : soulignée deux fois en rouge, à la règle */
  .som-page h3 span {
    width: fit-content; max-width: 100%; padding: 0 .15rem .3rem;
    background:
      linear-gradient(var(--rouge), var(--rouge)) 0 calc(100% - 4px) / 0% 1.5px no-repeat,
      linear-gradient(var(--rouge), var(--rouge)) 0 100% / 0% 1.5px no-repeat;
    transition: background-size 0s linear 380ms;
  }
  html.sommaire-ouvert .som-page h3 span { background-size: 100% 1.5px, 100% 1.5px; transition: background-size 420ms var(--sc-ease-out) 380ms; }

  /* « vous êtes ici », avec la petite flèche du maître */
  .som-chap a.ici::after { padding-left: 1.75rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 16'%3E%3Cpath d='M37 9.5C28 8 18 7.6 6 8.6M11.5 3.2 5.2 8.7l6.6 4.6' fill='none' stroke='%2343328F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left 52% / 1.45rem auto no-repeat; }

  /* les coordonnées, sur le buvard glissé au fond du cahier */
  .som-tel {
    position: relative; padding: .7rem .9rem .75rem 1rem; margin: .2rem .1rem .1rem;
    background-color: #F1C7C0; border: 1.5px solid #7E2E2A; outline: 1px solid rgba(126,46,42,.45); outline-offset: -5px;
    rotate: -.8deg; box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 10px 18px -12px rgba(80,30,20,.45);
  }
  .som-tel a.tel { font-size: 1.12rem; color: #3A2A7E; }
  .som-tel .reseaux a { background: #FCEDEA; }

  /* à l'ouverture, les lignes du sommaire apparaissent l'une après l'autre, comme écrites à la suite */
  .sommaire-panneau .som-liste li, .sommaire-panneau .som-page, .sommaire-panneau .som-pied > * { opacity: 0; translate: -6px 0; transition: opacity 0s linear 380ms, translate 0s linear 380ms; }
  /* (à la fermeture, rien ne s'efface avant que la page soit redescendue) */
  html.sommaire-ouvert .sommaire-panneau .som-liste li, html.sommaire-ouvert .sommaire-panneau .som-page, html.sommaire-ouvert .sommaire-panneau .som-pied > * {
    opacity: 1; translate: 0 0; transition: opacity 240ms ease-out, translate 300ms var(--sc-ease-out); transition-delay: calc(120ms + var(--r, 0) * 35ms);
  }
  .som-liste li:nth-child(2) { --r: 1; } .som-liste li:nth-child(3) { --r: 2; } .som-liste li:nth-child(4) { --r: 3; }
  .som-liste li:nth-child(5) { --r: 4; } .som-liste li:nth-child(6) { --r: 5; } .som-liste li:nth-child(n+7) { --r: 6; }
  .som-page { --r: 7; } .som-pied > * { --r: 8; }
}
/* téléphone couché : l'étiquette se fait plus petite pour laisser la place au sommaire */
@media (max-width: 1000px) and (max-height: 520px) and (orientation: landscape) {
  .som-tete { padding-block: .4rem .3rem; }
  .som-poignee { margin-bottom: .3rem; }
  .som-tete h2 { font-size: 1rem; line-height: 1.8; padding: 0 1.1rem .1rem; }
  .som-fermer { top: .9rem; }
}
@media (max-width: 1000px) and (prefers-reduced-motion: reduce) {
  .sommaire-panneau .som-liste li, .sommaire-panneau .som-page, .sommaire-panneau .som-pied > * { opacity: 1 !important; translate: none !important; transition: none !important; }
  .som-page h3 span { transition: none; background-size: 100% 1.5px, 100% 1.5px; }
}

/* -------- téléphones (portrait, ou couchés) ----------------------------- */
@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  /* A01 : un bouton n'est jamais plus large que son support, le libellé passe à la ligne */
  .btn { white-space: normal; text-align: center; justify-content: center; max-width: 100%; }
  .cta-ligne .btn, .note-essai .btn { width: 100%; }
  .lettre .btn { width: 100%; }

  /* l'album se feuillette en pellicule */
  .album {
    display: flex; gap: 1.1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 2rem -1.1rem 0 calc(-1 * (var(--marge-x) + .9rem)); padding: .9rem 1.1rem 1.1rem calc(var(--marge-x) + .9rem);
    scroll-padding-inline: calc(var(--marge-x) + .9rem) 1.1rem;
  }
  .album::-webkit-scrollbar { display: none; }
  .album:focus-visible { outline-offset: -4px; }
  .album .photo { flex: 0 0 min(76vw, 19rem); scroll-snap-align: start; grid-column: auto !important; margin-top: 0 !important; }
  .album .photo .cadre img { aspect-ratio: 4 / 5; }
  .album .photo figcaption span { font-size: .88rem; }
  .album-compte { display: flex; align-items: baseline; gap: .35rem; margin: .4rem 0 0; color: #CFC4AF; font-size: .9rem; font-variant-numeric: tabular-nums; }
  .album-compte b { font-family: "Fraunces", serif; font-style: italic; color: #F4E7C8; font-weight: 500; font-size: 1.1rem; }
  .album-compte span { margin-left: auto; font-family: var(--hand); color: #E6C79A; font-size: .9rem; }
  .album-compte span::after { content: " →"; }

  /* le trombinoscope devient une pile de fiches : photo épinglée, texte qui l'entoure */
  .trombi { grid-template-columns: 1fr; gap: 2.4rem; }
  .prof { display: flow-root; }
  .prof .tirage { float: left; width: min(8.8rem, 40%); margin: .2rem 1.1rem .5rem 0; padding: 6px 6px 3rem; }
  .prof:nth-child(even) .tirage { float: right; margin: .2rem 0 .5rem 1.1rem; }
  .prof .nom { font-size: 1.05rem; bottom: 1rem; }
  .prof .role { margin: .15rem 0 .45rem; font-size: .7rem; }
  .prof p { font-size: .95rem; }

  /* bons points : le paquet qu'on distribue (classe posée par le script) */
  #bons-points.en-paquet[data-sc-act] { height: auto !important; overflow-x: clip; }
  #bons-points.en-paquet [data-sc-stage] { position: relative !important; top: auto !important; height: auto !important; overflow: visible !important; display: block; }
  #bons-points.en-paquet .rail {
    transform: none !important; width: auto; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0;
    padding: 3.4rem 1.1rem 3.2rem calc(var(--marge-x) + .9rem);
  }
  #bons-points.en-paquet .rail-tete { width: auto; justify-self: stretch; margin-bottom: 2rem; }
  #bons-points.en-paquet .bp, #bons-points.en-paquet .rail-fin { grid-row: 2; grid-column: 1; }
  #bons-points.en-paquet .bp {
    width: min(19rem, 100%); align-self: stretch;
    transform: translate(calc(var(--k, 0) * 5px), calc(var(--k, 0) * 9px)) rotate(calc(var(--k, 0) * 2.4deg));
    transition: transform 220ms cubic-bezier(.2,.8,.3,1), box-shadow 180ms;
    will-change: transform;
  }
  /* le contenu de la carte suivante apparaît en fondu pendant qu'elle remonte */
  #bons-points.en-paquet .bp > *:not(.tampon) { transition: opacity 160ms ease-out 40ms, visibility 0s; }
  #bons-points.en-paquet .bp.dessus { touch-action: pan-y; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 18px 30px -14px rgba(60,40,20,.55); }
  #bons-points.en-paquet .bp:not(.dessus):not(.sort) > *:not(.tampon) { visibility: hidden; opacity: 0; transition: opacity 120ms, visibility 0s 120ms; }
  #bons-points.en-paquet .bp:not(.dessus):not(.sort) > .tampon { visibility: hidden; }
  .paquet-ctrl [hidden] { display: none; }
  #bons-points.en-paquet .bp.tenu { transition: none; cursor: grabbing; box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 26px 40px -16px rgba(60,40,20,.6); }
  #bons-points.en-paquet .bp.range { visibility: hidden; }
  #bons-points.en-paquet .bp.range.sort { visibility: visible; z-index: 30 !important; }
  #bons-points.en-paquet .rail-fin { align-self: center; text-align: center; width: auto; max-width: 17rem; visibility: hidden; }
  #bons-points.en-paquet.paquet-fini .rail-fin { visibility: visible; }
  #bons-points.en-paquet .paquet-pied { grid-row: 3; grid-column: 1; display: grid; justify-items: center; gap: .9rem; width: 100%; margin-top: 2.1rem; }
  .paquet-astuce { margin: 0; font-family: var(--hand); color: var(--encre); font-size: .92rem; text-align: center; line-height: 1.8; }
  .paquet-astuce::before { content: "← "; } .paquet-astuce::after { content: " →"; }
  .paquet-astuce.lue { display: none; }
  .paquet-ctrl { display: grid; justify-items: center; gap: .7rem; width: min(19rem, 100%); }
  .paquet-compte { font-size: .95rem; color: var(--texte-doux); text-align: center; }
  .paquet-compte.pour-lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .paquet-ctrl .btn { width: 100%; }
  /* V44-02 : le pied du paquet garde exactement la même hauteur dans tous les états
     (en cours, terminé, remis à zéro). « Revoir le paquet » prend la place du compteur et déborde
     vers le haut, dans l'espace libéré par les cartes : rien ne bouge dans la page quand le
     paquet se termine ou se remet à zéro en quittant la rubrique. */
  #bons-points.en-paquet .paquet-ctrl { grid-template-areas: "ctrl"; grid-template-rows: calc(.95rem * 1.62); align-items: end; }
  #bons-points.en-paquet .paquet-ctrl > * { grid-area: ctrl; }
  #bons-points.en-paquet .pochette { position: relative; right: auto; bottom: auto; z-index: 1; opacity: 1; translate: none; pointer-events: auto; margin-top: .4rem; padding: .7rem .85rem .75rem; rotate: -1deg; }
  #bons-points.en-paquet .pochette p span { display: inline; }
  #bons-points.en-paquet .pochette p { font-size: .95rem; }
  #bons-points.en-paquet .pochette ol { gap: .4rem; }
  #bons-points.en-paquet .pochette li button { width: 2.35rem; height: 2.35rem; }
}

/* téléphone couché : la place est en largeur, on range les choses côte à côte */
@media (max-height: 520px) and (orientation: landscape) {
  .chapitre { padding-block: 3rem; }
  .garde h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 2.6rem); }
  .album .photo { flex-basis: min(34vw, 14rem); }
  .album .photo .cadre img { aspect-ratio: 1 / 1; }
  /* V38 : le titre au-dessus, puis la carte et la pochette côte à côte,
     pour que les deux tiennent ensemble dans la hauteur d'un téléphone couché */
  #bons-points.en-paquet .rail { grid-template-columns: minmax(0, 1fr) minmax(15.75rem, .85fr); column-gap: 1.6rem; align-items: center; padding-block: 2.4rem; }
  #bons-points.en-paquet .rail-tete { grid-row: 1; grid-column: 1 / -1; margin: 0 0 1.8rem; }
  #bons-points.en-paquet .pochette { padding-inline: .7rem; }
  #bons-points.en-paquet .pochette ol { gap: .3rem; }
  #bons-points.en-paquet .pochette li button { width: 2.1rem; height: 2.1rem; }
  #bons-points.en-paquet .bp, #bons-points.en-paquet .rail-fin { grid-row: 2; grid-column: 1; }
  #bons-points.en-paquet .paquet-pied { grid-row: 2; grid-column: 2; margin-top: 0; align-self: center; }
  #bons-points.en-paquet .bp-icone { width: 3.6rem; height: 3.6rem; margin: .5rem auto .3rem; }
  .prof .tirage { width: 8rem; }
}

/* -------- le carnet tenu en main (classe posée par le script) --------- */
html.carnet-main .ch-familles[data-sc-act] { height: auto !important; }
html.carnet-main .ch-familles [data-sc-stage] { position: relative !important; top: auto !important; height: auto !important; overflow: visible !important; }
html.carnet-main .scene-livre { height: auto; display: block; place-items: normal; padding: 3.4rem 0 2.2rem; }
html.carnet-main .livre { width: auto; height: auto; display: block; perspective: none; max-width: 44rem; margin-inline: auto; padding: 0 1.1rem 0 calc(var(--marge-x) + .9rem); }
html.carnet-main .livre::before, html.carnet-main .livre::after { display: none; }
html.carnet-main .garde-int { margin: 0; border-radius: 6px 6px 0 0; background: #6E3B2A; color: #F2E3C6; padding: 1.2rem 1.2rem 1rem; box-shadow: none; background-image: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.08), transparent 60%); }
html.carnet-main .garde-int .plaque { border-color: rgba(242,227,198,.4); padding: .45rem .8rem .75rem; max-width: none; margin-bottom: .9rem; text-align: left; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 1rem; }
html.carnet-main .garde-int .plaque small { font-size: .62rem; }
html.carnet-main .garde-int .plaque span { font-size: 1.05rem; margin: 0; }
html.carnet-main .garde-int h2 { margin: 0; color: #FBF1DD; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); max-width: 22ch; }
html.carnet-main .glisser { display: block; color: #F2E3C6; line-height: 1.9; }
html.carnet-main .carnet-barre {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; position: sticky; top: 0; z-index: 6;
  background: #5E3122; color: #F2E3C6; padding: .5rem .7rem; border-radius: 0 0 6px 6px;
  box-shadow: inset 0 1px 0 rgba(255,230,200,.12), 0 10px 18px -12px rgba(40,20,10,.65);
}
html.carnet-main .carnet-barre button { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid rgba(242,227,198,.55); background: #FBF1DD; color: #5E3122; font-size: 1.35rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 .15rem; }
html.carnet-main .carnet-barre button[disabled] { opacity: .35; cursor: default; }
html.carnet-main .carnet-barre output { font-variant-numeric: tabular-nums; text-align: center; }
html.carnet-main .carnet-barre output .h-hand { font-size: 1rem; color: #F2E3C6; }
html.carnet-main .carnet-barre output b { font-family: "Fraunces", serif; font-style: italic; font-weight: 500; font-size: 1.25rem; color: #FFF6E4; }
html.carnet-main .carnet-barre output .sur { font-size: .9rem; opacity: .85; }
html.carnet-main .feuillets { display: block; position: relative; padding-top: .9rem; }
html.carnet-main .feuillet { display: contents; }
html.carnet-main .page {
  display: none; position: relative; inset: auto; transform: none; backface-visibility: visible; -webkit-backface-visibility: visible; border-radius: 3px;
  padding: .9rem 1.1rem 2.4rem 2.6rem; box-shadow: 0 14px 28px -18px rgba(50,35,20,.6); transform-origin: left center; touch-action: pan-y;
  background-image: linear-gradient(to right, transparent calc(1.7rem - 1px), var(--marge) calc(1.7rem - 1px) calc(1.7rem + 1px), transparent calc(1.7rem + 1px)),
                    repeating-linear-gradient(to bottom, transparent 0 calc(1.7rem - 1px), rgba(70,104,178,.2) calc(1.7rem - 1px) 1.7rem);
  background-position: 0 0, 0 2.6rem;
}
html.carnet-main .page.ouverte { display: flex; }
html.carnet-main .page.part { display: flex; position: absolute; top: .9rem; left: 0; right: 0; z-index: 3; pointer-events: none; box-shadow: 0 18px 30px -16px rgba(50,35,20,.65); }
html.carnet-main .page.vu { display: none; }
html.carnet-main .page::after { display: none; }
html.carnet-main .page-tete { height: auto; min-height: 1.7rem; flex-wrap: wrap; gap: 0 .8rem; font-size: .64rem; }
html.carnet-main .mot-famille { padding-top: .2rem; }
html.carnet-main .mot-famille p, html.carnet-main .page.long .mot-famille p, html.carnet-main .page.tres-long .mot-famille p { font-size: 1.02rem; line-height: 1.7rem; margin-bottom: 1rem; }
html.carnet-main .verso .folio-page { left: auto; right: 1.1rem; }
html.carnet-main .carnet-suite { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: .4rem; margin: 1.1rem auto 0; min-height: 2.75rem; padding: 0 1rem; font-family: var(--hand); color: #6E3B2A; font-size: 1rem; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em; }
html.carnet-main .carnet-suite:focus-visible { outline: 2.5px solid var(--encre); outline-offset: 2px; border-radius: 4px; }
@media (max-height: 520px) and (orientation: landscape) {
  html.carnet-main .scene-livre { padding-block: 2.4rem; }
}
@media print { .album-compte { display: none !important; } }
@media (max-width: 374px) {
  #bons-points.en-paquet .pochette { padding-inline: .7rem; }
  #bons-points.en-paquet .pochette ol { gap: .28rem; }
  #bons-points.en-paquet .pochette li button { width: 2.05rem; height: 2.05rem; }
}

/* V30 · VF02 : sur tablette, le numéro de chapitre s'aligne sur le bord de la marge
   et s'étend vers la gauche si besoin (« VIII. » mordait sur le titre) */
@media (min-width: 761px) and (max-width: 1000px) {
  .chap-num { left: auto; right: calc(100% + .5rem); width: max-content; }
}

/* =====================================================================
   V35 · L'ACCUSÉ DE RÉCEPTION
   Après un envoi réussi : la lettre glisse dans l'enveloppe, le rabat se ferme,
   l'enveloppe se retourne, la poste de Plonéis oblitère le timbre et tamponne « Reçu ».
   En cas d'échec : un mot à l'encre rouge, épinglé au-dessus du bouton.
   ===================================================================== */
form[hidden] { display: none !important; }

/* pendant l'envoi */
.envoi-en-cours .btn[type="submit"] { opacity: .8; cursor: progress; }
.btn .plume { display: inline-block; width: .95em; height: .95em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; margin-right: .1rem; animation: plume-tourne 800ms linear infinite; }
@keyframes plume-tourne { to { transform: rotate(360deg); } }

/* le mot d'erreur, à l'encre rouge */
.envoi-erreur { position: relative; margin: .4rem 0 1.1rem; padding: 1.15rem 1.1rem .9rem 1.2rem; background: #FFF7F2; border: 1.5px solid rgba(184,51,42,.45); border-radius: 2px; rotate: -.5deg;
  box-shadow: 0 8px 16px -10px rgba(120,40,20,.35); color: var(--texte); font-size: .95rem; line-height: 1.55; }
.envoi-erreur::before { content: ""; position: absolute; top: -.45rem; left: 50%; width: .85rem; height: .85rem; border-radius: 50%; translate: -50% 0;
  background: radial-gradient(circle at 35% 35%, #e8746a, #B8332A 60%, #7d1f19); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.envoi-erreur:focus { outline: none; } .envoi-erreur:focus-visible { outline: 2.5px solid var(--rouge); outline-offset: 3px; }
.envoi-erreur p { margin: 0 0 .45rem; }
.envoi-erreur .err-titre { font-family: var(--hand); color: var(--rouge); font-size: 1.2rem; line-height: 1.9; margin: 0 0 .5rem; }
.envoi-erreur .err-alt { margin: .2rem 0 0; font-size: .88rem; color: var(--texte-doux); }
.envoi-erreur .err-alt a { display: inline-block; }
.envoi-erreur a { color: var(--rouge); }

/* l'accusé de réception */
.accuse { text-align: center; padding: .4rem 0 .6rem; }
.accuse:focus { outline: none; } .accuse:focus-visible .acc-titre { outline: 2.5px solid var(--encre); outline-offset: 4px; border-radius: 3px; }
.contact > .accuse { background-color: #FFFEFA; padding: clamp(1.5rem, 3vw, 2.6rem); border-radius: 2px; rotate: .5deg;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 22px 40px -22px rgba(60,45,25,.5); }
.acc-titre { margin: 0 0 1rem; font-family: var(--hand); font-weight: 400; color: var(--vert-fonce); font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.2rem); line-height: 1.85; }
.acc-sous { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--texte); }

.env-scene { perspective: 1100px; padding-top: 7rem; margin: 0 auto .4rem; width: min(20rem, 100%); animation: scene-remonte 420ms 1.25s var(--sc-ease-out) both; }
@keyframes scene-remonte { from { padding-top: 7rem; } to { padding-top: .9rem; } }
.env { position: relative; width: 100%; aspect-ratio: 1.62; transform-style: preserve-3d; animation: env-retourne 620ms 1.2s cubic-bezier(.45,.05,.3,1) both; }
@keyframes env-retourne { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.env-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px; }
/* côté rabat */
.env-dos { background: #E9D9B8; box-shadow: 0 10px 22px -12px rgba(60,40,15,.55); }
.env-fond { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(#D9C6A0, #E9D9B8 60%); }
.env-feuille { position: absolute; left: 8%; right: 8%; bottom: 7%; height: 80%; z-index: 1; background: #FFFEFA; border-radius: 2px; padding: 12% 9% 0; text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,.18); animation: feuille-glisse 620ms .15s cubic-bezier(.3,.7,.3,1) both; }
@keyframes feuille-glisse { from { transform: translateY(-74%); } to { transform: translateY(0); } }
.env-feuille i { display: block; height: 2px; margin: 0 0 11%; background: rgba(67,50,143,.38); border-radius: 2px; }
.env-feuille i:nth-child(2) { width: 82%; } .env-feuille i:nth-child(3) { width: 90%; } .env-feuille i:nth-child(4) { width: 55%; }
.env-feuille b { position: absolute; right: 10%; bottom: 8%; font: 400 .9rem/1.8 var(--hand); color: var(--encre); }
.env-poche { position: absolute; inset: 0; z-index: 2; border-radius: 3px;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(to top right, #F3E5C6 49.6%, transparent 50%), linear-gradient(to top left, #EEDDBA 49.6%, transparent 50%), #F6EAD0; }
.env-rabat { position: absolute; left: 0; right: 0; top: 0; height: 60%; transform-origin: top center; background: #F1E2C2;
  clip-path: polygon(0 0, 100% 0, 50% 100%); animation: rabat-ferme 380ms .78s cubic-bezier(.4,.1,.3,1) both; }
@keyframes rabat-ferme {
  0% { transform: perspective(700px) rotateX(180deg); z-index: 0; filter: brightness(.92); }
  1% { z-index: 3; }
  100% { transform: perspective(700px) rotateX(0deg); z-index: 3; filter: none; } }
/* côté adresse */
.env-avant { transform: rotateY(180deg); background: #FBF4E2; overflow: hidden;
  box-shadow: 0 10px 22px -12px rgba(60,40,15,.55); }
.env-avant::before { content: ""; position: absolute; inset: 0; border: 7px solid transparent; border-radius: 3px;
  border-image: repeating-linear-gradient(-45deg, #B8332A 0 10px, #FBF4E2 10px 16px, #2F4D8F 16px 26px, #FBF4E2 26px 32px) 7; }
.env-adresse { position: absolute; left: 12%; right: 38%; bottom: 13%; display: grid; text-align: left; font: 400 clamp(.72rem, .6rem + .5vw, .86rem)/1.95 var(--hand); color: var(--encre); }
.env-adresse span { border-bottom: 1px dotted rgba(67,50,143,.35); }
.env-timbre { position: absolute; right: 9%; top: 12%; width: 23%; aspect-ratio: .82; display: grid; place-items: center; align-content: center; gap: 2px; padding: 7% 6%;
  background: linear-gradient(160deg, #E4EEDB, #C9DDBE); box-shadow: 0 1px 2px rgba(0,0,0,.25);
  -webkit-mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px;
  mask: radial-gradient(circle 3px at 3px 3px, transparent 98%, #000) -3px -3px / 8px 8px; }
.env-timbre::before { content: ""; position: absolute; inset: 9%; border: 1.5px solid var(--vert-fonce); background: #FFFDF6; border-radius: 2px; }
.env-timbre img { width: 72%; height: auto; position: relative; }
.env-timbre small { position: relative; font: 700 .42rem/1 "Fraunces", serif; letter-spacing: .2em; text-transform: uppercase; color: var(--vert-fonce); }
.env-oblit { position: absolute; right: 13%; top: 8%; width: 46%; color: rgba(34,28,60,.72); rotate: -8deg; mix-blend-mode: multiply;
  animation: oblitere 300ms 1.95s cubic-bezier(.2,1.4,.4,1) both; }
.env-oblit .arc { font: 700 9.5px "Fraunces", serif; letter-spacing: .14em; fill: currentColor; }
.env-oblit .jour { font: 700 10px "Fraunces", serif; letter-spacing: .04em; fill: currentColor; }
@keyframes oblitere { from { opacity: 0; transform: scale(1.5); } 60% { opacity: .95; } to { opacity: 1; transform: scale(1); } }
.env-recu { position: absolute; left: 10%; top: 16%; padding: .12rem .6rem .1rem; border: 2.5px solid rgba(184,51,42,.85); border-radius: 4px; rotate: -12deg;
  font: 800 1.05rem/1.2 "Fraunces", serif; letter-spacing: .22em; text-transform: uppercase; color: rgba(184,51,42,.88); mix-blend-mode: multiply;
  animation: oblitere 280ms 2.2s cubic-bezier(.2,1.4,.4,1) both; }

/* le talon d'avis de réception */
.talon { width: min(24rem, 100%); margin: .6rem auto 0; padding: .85rem 1rem .5rem; text-align: left; background: #FCE9E4; border: 1px solid rgba(184,51,42,.28); border-radius: 2px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(2.05rem - 1px), rgba(184,51,42,.16) calc(2.05rem - 1px) 2.05rem); background-position: 0 2.1rem;
  animation: apparait 420ms 1s var(--sc-ease-out) both; }
.talon-tete { margin: 0 0 .25rem; font: 700 .7rem/1.4 "Fraunces", serif; letter-spacing: .26em; text-transform: uppercase; color: var(--rouge); }
.talon div { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); align-items: baseline; gap: .6rem; min-height: 2.05rem; }
.talon dt { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-doux); }
.talon dd { margin: 0; font: 400 1rem/2.05 var(--hand); color: var(--encre); overflow-wrap: anywhere; }
.acc-suite { margin: .9rem 0 .4rem; color: var(--texte-doux); animation: apparait 420ms 1.15s var(--sc-ease-out) both; }
.acc-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem 1.2rem; margin-top: .6rem; animation: apparait 420ms 1.25s var(--sc-ease-out) both; }
.acc-encore { all: unset; cursor: pointer; min-height: 2.75rem; display: inline-flex; align-items: center; padding: 0 .4rem; font: 400 1rem/1.8 var(--hand); color: var(--encre);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .35em; }
.acc-encore:focus-visible { outline: 2.5px solid var(--encre); outline-offset: 2px; border-radius: 4px; }
@keyframes apparait { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* mouvements réduits : l'enveloppe arrive déjà retournée, tamponnée */
.accuse.sans-anim *, .accuse.sans-anim { animation: none !important; }
.accuse.sans-anim .env-scene { padding-top: .9rem; }
.accuse.sans-anim .env { transform: rotateY(180deg); }
.accuse.sans-anim .env-rabat { transform: none; z-index: 3; }
@media (prefers-reduced-motion: reduce) { .btn .plume { animation: none; border-right-color: currentColor; opacity: .6; } }
@media (max-width: 760px) {
  .acc-actions .btn { width: 100%; }
  .talon div { grid-template-columns: 5.4rem minmax(0, 1fr); }
}
@media print { .env-scene { display: none; } }


/* =====================================================================
   V44-06 · téléphone en portrait : la lettre de contact de l'accueil (et son accusé
   de réception) en pleine largeur d'écran, bien droite, comme la fenêtre de contact.
   Les marges négatives annulent exactement le retrait de .chapitre .inner sur téléphone
   (gauche : var(--marge-x) + .9rem ; droite : 1.1rem). Paysage et ordinateur inchangés.
   ===================================================================== */
@media (max-width: 760px) and (orientation: portrait) {
  .contact > .lettre, .contact > .accuse {
    rotate: none; border-radius: 0;
    margin-left: calc(-1 * (var(--marge-x) + .9rem)); margin-right: -1.1rem;
    padding: 1.5rem 1.2rem 1.7rem;
    box-shadow: 0 -12px 22px -20px rgba(60,45,25,.35), 0 18px 30px -22px rgba(60,45,25,.45);
  }
}

/* V44-07 · téléphone (≤ 760 px) : le pied de page de l'accueil prend les mêmes marges que celui
   des pages intérieures (.pied .colophon) ; les mentions tiennent alors sur une ligne, comme ailleurs.
   Les marges négatives annulent le retrait de .chapitre .inner (gauche : var(--marge-x) + .9rem ; droite : 1.1rem). */
@media (max-width: 760px) {
  .ch-contact .colophon {
    margin-left: calc(-1 * (var(--marge-x) + .9rem)); margin-right: -1.1rem;
    padding-inline: clamp(1.25rem, 4vw, 3rem);
  }
}
