/* =========================================================
   CAP SUR LA 6ᵉ — Design System (Semaine 1 pilote)
   Palette Village de la mémoire : terracotta / sable / brun
   ========================================================= */

:root {
  /* ——— Couleurs papier (crème verdâtre, propre au cahier maths) ——— */
  --paper: #f7f3e2;
  --paper-2: #f0ecd3;
  --paper-3: #e6e0be;
  --paper-shadow: #d8d3b3;

  /* ——— Palette Semaine 1 · Village des nombres (vert olive/sauge) ——— */
  --s1: #6b7d3e;          /* accent principal olive/sauge profond */
  --s1-soft: #94a566;     /* bandeaux ruban olive tendre */
  --s1-light: #e0e6c8;    /* fond très pâle sauge */
  --s1-line: #a3b078;
  --s1-dark: #556432;
  --s1-ribbon-notch: #4a5628;
  --s1-shadow: rgba(107,125,62,.35);

  /* ——— Kaya bleu (accent invariant, comme dans le français) ——— */
  --kaya: #3a7ba8;
  --kaya-soft: #7fb0cf;
  --kaya-tint: #eaf3f7;
  --kaya-line: #b7d4e3;

  /* ——— Neutres encre (identiques : chaleur maintenue) ——— */
  --ink: #3d2f1e;
  --ink-2: #5c4a2f;
  --ink-3: #7a6647;
  --ink-soft: #a08a6a;

  /* ——— Sémantique ——— */
  --success: #4f7c3a;
  --success-soft: #d5e2b8;
  --error: #b8493e;
  --error-soft: #f3d6ce;
  --gold: #c99a3a;
  --gold-soft: #f2debf;

  /* ——— Semaines maths (identités distinctes) ——— */
  --w1: #6b7d3e;   /* olive/sauge   · Village des nombres */
  --w2: #3d5a92;   /* indigo        · Traversée des calculs */
  --w3: #b58326;   /* ocre profond  · Partage juste */
  --w4: #2d7d78;   /* teal doux     · Mesurer le monde autour de moi */
  --w5: #7a4a78;   /* prune doux    · Observer les formes */
  --w6: #8a5a26;   /* or bronze     · Grande porte de la 6ᵉ */

  /* ——— Typographie ——— */
  --font-title: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-body:  "Nunito", -apple-system, "Segoe UI", sans-serif;
  --font-hand:  "Caveat", "Playfair Display", cursive;

  /* ——— Rayons / ombres ——— */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shadow-1: 0 1px 2px rgba(75,46,25,.05), 0 6px 22px rgba(75,46,25,.06);
  --shadow-2: 0 2px 6px rgba(75,46,25,.08), 0 14px 40px rgba(75,46,25,.10);

  --nav-h: 64px;
  --foot-h: 68px;
}

/* ——— Reset léger ——— */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: var(--font-body);
  background: #eee6d0;
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font: inherit; color: inherit; }

/* =========================================================
   SHELL — bandeau haut + zone stage + pied nav
   ========================================================= */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--nav-h) 1fr var(--foot-h);
  background:
    radial-gradient(1200px 700px at 50% -100px, #f7ead0 0%, transparent 60%),
    linear-gradient(180deg, #efe5cb 0%, #e6d9ba 100%);
}

/* ——— Bandeau haut ——— */
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(250,243,227,.92), rgba(250,243,227,.72));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(75,46,25,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
  z-index: 10;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-title);
  color: var(--ink);
  font-size: 22px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: .2px;
}
.brand .sup { font-size: 14px; color: var(--s1); font-family: var(--font-body); font-weight: 800; font-style: normal; letter-spacing: 1px; }
.brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--s1); display: inline-block; }

.top-progress {
  margin-left: 12px; display: flex; gap: 6px; align-items: center;
  color: var(--ink-3); font-size: 13px;
}
.top-progress .plumes { display: flex; gap: 3px; }
.top-progress .plumes .p {
  width: 12px; height: 20px;
  clip-path: polygon(50% 0, 100% 30%, 90% 100%, 10% 100%, 0 30%);
  background: #d5c9a8;
  transition: background .3s;
}
.top-progress .plumes .p.done { background: var(--gold); box-shadow: 0 0 8px rgba(212,162,74,.5); }

.top-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(75,46,25,.12);
  color: var(--ink-2); font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.icon-btn:hover { background: #fff; border-color: rgba(75,46,25,.22); color: var(--ink); }
.icon-btn.primary { background: var(--s1); color: #fff; border-color: transparent; }
.icon-btn.primary:hover { background: #b3491a; color: #fff; }

/* ——— Zone principale (stage) ——— */
.stage {
  overflow: auto;
  padding: 26px 22px 30px;
  display: flex;
  justify-content: center;
}
.artboard {
  width: min(1180px, 100%);
  background: var(--paper);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-2);
  padding: 42px 52px 50px;
  position: relative;
  min-height: calc(100vh - var(--nav-h) - var(--foot-h) - 60px);
  /* motif ethnique bord latéral */
  background-image:
    radial-gradient(ellipse 300px 60px at 50% 100%, rgba(75,46,25,.05), transparent 70%),
    var(--paper-texture, none);
}
.artboard::before, .artboard::after {
  content: "";
  position: absolute; top: 30px; bottom: 30px; width: 14px;
  background-image:
    linear-gradient(180deg, transparent 20%, rgba(201,84,31,.16) 20% 22%, transparent 22% 44%,
      rgba(107,124,58,.16) 44% 46%, transparent 46% 66%,
      rgba(58,123,168,.16) 66% 68%, transparent 68% 90%,
      rgba(212,162,74,.20) 90% 92%, transparent 92%);
  background-size: 14px 60px;
  background-repeat: repeat-y;
  opacity: .8;
  border-radius: 6px;
}
.artboard::before { left: 14px; }
.artboard::after { right: 14px; transform: scaleX(-1); }

/* ——— Pied de nav ——— */
.footnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(0deg, rgba(250,243,227,.92), rgba(250,243,227,.62));
  border-top: 1px solid rgba(75,46,25,.08);
  backdrop-filter: blur(6px);
}
.footnav .center { font-family: var(--font-title); font-style: italic; color: var(--ink-2); font-size: 15px; }
.nav-btn {
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid rgba(75,46,25,.16);
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 2px rgba(75,46,25,.06);
}
.nav-btn:hover:not(:disabled) { border-color: var(--s1); color: var(--s1); }
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.nav-btn.primary { background: var(--s1); color: #fff; border-color: transparent; box-shadow: 0 3px 12px rgba(201,84,31,.35); }
.nav-btn.primary:hover:not(:disabled) { background: #b3491a; color: #fff; }

/* =========================================================
   COMPOSANTS ÉDITORIAUX
   ========================================================= */

/* ——— Bandeau ruban (JOUR n / SEMAINE) ——— */
.ribbon {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 210px;
  padding: 10px 40px;
  color: #fff; font-weight: 800; letter-spacing: 3px; font-size: 15px;
  background: var(--s1-soft);
  clip-path: polygon(
    12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%,
    12px 100%, 0 50%
  );
  position: relative;
  box-shadow: 0 3px 6px rgba(75,46,25,.15);
}
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 100%; width: 22px; height: 12px;
  background: #a56242;
}
.ribbon::before { left: -2px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.ribbon::after  { right: -2px; clip-path: polygon(0 0, 100% 0, 0 100%); }

.ribbon.large {
  min-width: 320px; padding: 14px 60px; font-size: 20px; letter-spacing: 4px;
  background: var(--s1);
}

/* ——— Titre H1 script ——— */
.h-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  font-size: 58px;
  line-height: 1.05;
  color: var(--ink);
  margin: 14px 0 6px;
  text-wrap: pretty;
}
.h-title.small { font-size: 40px; }
.h-sub {
  font-family: var(--font-body); font-size: 17px; color: var(--ink-2);
  font-weight: 500;
  margin: 0 0 6px;
}
.h-obj {
  font-family: var(--font-title); font-style: italic;
  font-size: 20px; color: var(--ink-2); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.h-obj .target { color: var(--s1); font-size: 22px; }

/* ——— Section header type "🔎 J'observe" ——— */
.section-h {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-title); font-style: italic; font-weight: 700;
  font-size: 26px; color: var(--ink);
  margin: 32px 0 8px;
}
.section-h:first-child { margin-top: 20px; }
.section-h .ic { font-size: 24px; }
.section-h.blue { color: var(--kaya); }

/* ——— Encadré Kaya explique ——— */
.card-kaya {
  background: var(--kaya-tint);
  border: 1.5px solid var(--kaya-line);
  border-radius: var(--r-lg);
  padding: 22px 26px 22px 26px;
  position: relative;
  box-shadow: 0 1px 0 #fff inset;
}
.card-kaya .head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.card-kaya .head .bulb { font-size: 22px; }
.card-kaya .body { color: var(--ink); font-size: 17px; line-height: 1.55; }
.card-kaya .body b { color: var(--s1); }
.card-kaya .kaya-portrait {
  width: 90px; height: 90px; border-radius: 50%;
  background: #fff center/cover no-repeat;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(58,123,168,.25);
  position: absolute; left: -30px; top: -20px;
}

/* ——— Encadré défi ——— */
.card-defi {
  background: linear-gradient(180deg, #fbeed0 0%, #f6e0a8 100%);
  border: 1.5px solid #dcb56d;
  border-radius: var(--r-lg);
  padding: 22px 26px;
  position: relative;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset;
}
.card-defi .head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 24px;
  color: var(--ink); margin-bottom: 10px;
}
.card-defi .head .star { color: var(--gold); font-size: 26px; }
.card-defi .body { font-size: 16px; color: var(--ink); line-height: 1.5; }

/* ——— Encadré simple ——— */
.card {
  background: #fff;
  border: 1px solid rgba(75,46,25,.10);
  border-radius: var(--r-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-1);
}
.card.tint-s1 { background: #fdf3ea; border-color: var(--s1-line); }
.card.tint-kaya { background: var(--kaya-tint); border-color: var(--kaya-line); }
.card.tint-gold { background: #fbf1d8; border-color: #dcb56d; }
.card.tint-green { background: #edf1dc; border-color: #a0af6f; }

/* ——— Bulle de dialogue ——— */
.bubble {
  display: inline-block; position: relative;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.16);
  padding: 12px 18px;
  border-radius: 22px;
  font-family: var(--font-title); font-style: italic; font-size: 17px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  max-width: 320px;
}
.bubble.correct { border-color: var(--success); background: #f2f7dd; }
.bubble.correct::before { content: "✓"; color: var(--success); font-weight: 900; margin-right: 8px; }
.bubble.wrong { border-color: var(--error); background: #fbeae4; }
.bubble.wrong::before { content: "✗"; color: var(--error); font-weight: 900; margin-right: 8px; }

/* Queue de bulle latérale */
.bubble.tail-l::after {
  content: ""; position: absolute; left: -14px; top: 50%; margin-top: -6px;
  border: 8px solid transparent; border-right-color: #fff;
}


/* ——— Champ input cahier ——— */
.field {
  display: block; width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px dotted rgba(75,46,25,.35);
  padding: 6px 4px;
  font-family: var(--font-title); font-style: italic;
  font-size: 20px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.field:focus { border-bottom-color: var(--s1); border-bottom-style: solid; }
.field.correct { border-bottom-color: var(--success); border-bottom-style: solid; }
.field.wrong { border-bottom-color: var(--error); border-bottom-style: solid; }
textarea.field {
  border: 1.5px dashed rgba(75,46,25,.25);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  min-height: 70px;
  font-size: 18px;
  resize: vertical;
}
textarea.field:focus { border-color: var(--s1); border-style: solid; }

/* ——— Boutons "chip" (choix, ordre) ——— */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.15);
  border-radius: 999px;
  font-weight: 700; color: var(--ink-2);
  font-size: 16px;
  cursor: pointer;
  user-select: none;
  transition: all .12s;
  box-shadow: 0 1px 2px rgba(75,46,25,.06);
  font-family: var(--font-title); font-style: italic; font-weight: 500;
}
.chip:hover { border-color: var(--s1); color: var(--s1); }
.chip.selected { background: var(--s1); color: #fff; border-color: var(--s1); box-shadow: 0 3px 10px rgba(201,84,31,.35); }
.chip.placed { background: var(--kaya-tint); border-color: var(--kaya); color: var(--kaya); border-style: solid; }
.chip.correct { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.chip.wrong { background: var(--error-soft); border-color: var(--error); color: var(--error); }
.chip.big { padding: 12px 22px; font-size: 20px; }

.chip.tag-sujet { background: #fadfd2; border-color: var(--s1); color: var(--s1); }
.chip.tag-verbe { background: #d9e6ef; border-color: var(--kaya); color: var(--kaya); }
.chip.tag-cmpt { background: #dfe6c8; border-color: var(--success); color: var(--success); }

/* ——— Bouton "Je vérifie" ——— */
.btn-verify {
  padding: 10px 22px; border-radius: 999px;
  background: var(--s1); color: #fff;
  font-weight: 800; font-size: 15px;
  letter-spacing: .3px;
  box-shadow: 0 3px 10px rgba(201,84,31,.35);
  transition: all .15s;
}
.btn-verify:hover { background: #b3491a; transform: translateY(-1px); }
.btn-verify:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  padding: 10px 20px; border-radius: 999px;
  border: 1.5px solid rgba(75,46,25,.20);
  color: var(--ink-2); background: transparent;
  font-weight: 700; font-size: 14px;
}
.btn-ghost:hover { border-color: var(--s1); color: var(--s1); }

/* ——— Bouton TTS 🔊 ——— */
.btn-tts {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(75,46,25,.12);
  color: var(--ink-2); font-size: 15px;
  vertical-align: middle; margin-left: 6px;
  transition: all .15s;
}
.btn-tts:hover { background: var(--kaya); color: #fff; border-color: var(--kaya); }
.btn-tts.speaking { background: var(--kaya); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(58,123,168,.2); } }

/* ——— Plume du jour ——— */
.plume {
  width: 68px; height: 100px;
  clip-path: polygon(50% 0, 92% 22%, 100% 60%, 85% 96%, 50% 100%, 15% 96%, 0 60%, 8% 22%);
  background:
    linear-gradient(160deg, #d5c9a8 0%, #b8a678 100%);
  position: relative;
  transition: all .4s;
}
.plume::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0,0,0,.15) 49%, rgba(0,0,0,.15) 51%, transparent 52%),
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,.4), transparent 60%);
  clip-path: inherit;
}
.plume.done {
  background:
    linear-gradient(160deg, #f4d066 0%, #d4a24a 60%, #a97923 100%);
  filter: drop-shadow(0 4px 12px rgba(212,162,74,.4));
}
.plume-btn {
  width: 96px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  background: rgba(255,255,255,.4);
  border: 1.5px dashed rgba(75,46,25,.15);
  transition: all .2s;
}
.plume-btn:hover { background: rgba(255,255,255,.7); border-color: var(--s1); }
.plume-btn.done { background: #fdf3d8; border-color: var(--gold); border-style: solid; }
.plume-caption { font-family: var(--font-title); font-style: italic; color: var(--ink-2); font-size: 14px; text-align: center; margin-top: 6px; }

/* ——— Grands boutons de couverture ——— */
.btn-cover {
  padding: 16px 36px;
  border-radius: 999px;
  font-family: var(--font-title); font-style: italic; font-weight: 700;
  font-size: 22px;
  transition: all .2s;
}
.btn-cover.primary {
  background: var(--s1); color: #fff;
  box-shadow: 0 8px 24px rgba(201,84,31,.45);
}
.btn-cover.primary:hover { background: #b3491a; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,84,31,.55); }
.btn-cover.ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-cover.ghost:hover { background: var(--ink); color: var(--paper); }

/* ——— Séparateur décoratif ——— */
.sep {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--s1); margin: 22px 0;
}
.sep::before, .sep::after {
  content: ""; height: 1px; background: rgba(75,46,25,.15); flex: 1; max-width: 200px;
}
.sep .diamond { width: 6px; height: 6px; background: var(--s1); transform: rotate(45deg); }

/* ——— Liste "Comment utiliser" sobre ——— */
.howto-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 40px;
  padding: 8px 4px;
}
.howto-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 4px;
  align-items: start;
  border-top: 1px solid rgba(75,46,25,.08);
}
.howto-item:nth-child(1),
.howto-item:nth-child(2) { border-top: none; }
.howto-item svg { margin-top: 2px; }
.howto-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 2px;
}
.howto-body {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
@media (max-width: 780px) {
  .howto-list { grid-template-columns: 1fr; }
  .howto-item:nth-child(2) { border-top: 1px solid rgba(75,46,25,.08); }
}

/* ——— Frise ethnique horizontale ——— */
.frieze {
  height: 14px; margin: 8px 0;
  background:
    linear-gradient(90deg,
      var(--s1) 0 5%, transparent 5% 8%,
      var(--gold) 8% 13%, transparent 13% 16%,
      var(--kaya) 16% 20%, transparent 20% 23%,
      var(--success) 23% 28%, transparent 28% 31%,
      var(--s1) 31% 36%, transparent 36% 39%,
      var(--gold) 39% 44%, transparent 44% 47%,
      var(--kaya) 47% 51%, transparent 51% 54%,
      var(--success) 54% 59%, transparent 59% 62%,
      var(--s1) 62% 67%, transparent 67% 70%,
      var(--gold) 70% 75%, transparent 75% 78%,
      var(--kaya) 78% 82%, transparent 82% 85%,
      var(--success) 85% 90%, transparent 90% 93%,
      var(--s1) 93% 98%, transparent 98% 100%);
  opacity: .35;
  clip-path: polygon(0 30%, 5% 30%, 5% 0, 10% 0, 10% 30%, 100% 30%, 100% 70%, 10% 70%, 10% 100%, 5% 100%, 5% 70%, 0 70%);
  clip-path: none;
  border-radius: 2px;
}

/* =========================================================
   MOTIFS DÉCORATIFS D'ANGLES (coins de page)
   ========================================================= */
.corner-motif {
  position: absolute;
  width: 40px; height: 60px;
  color: var(--s1); opacity: .55;
  pointer-events: none;
}
.corner-motif.tl { top: 30px; left: 32px; }
.corner-motif.tr { top: 30px; right: 32px; transform: scaleX(-1); }
.corner-motif.bl { bottom: 30px; left: 32px; transform: scaleY(-1); }
.corner-motif.br { bottom: 30px; right: 32px; transform: scale(-1,-1); }

/* =========================================================
   COUVERTURE
   ========================================================= */
.cover {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px;
  align-items: center;
  min-height: 640px;
  padding: 20px 10px;
}
.cover-title {
  font-family: var(--font-title);
  color: var(--s1);
  font-weight: 800;
  font-size: 82px;
  line-height: 1;
  letter-spacing: -1px;
  margin: 0;
}
.cover-sub {
  font-family: var(--font-title); font-style: italic;
  color: var(--ink);
  font-size: 26px; line-height: 1.35;
  margin: 16px 0 8px;
}
.cover-tag {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  background: var(--paper-2); color: var(--ink-2);
  font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  margin-top: 6px;
}
.cover-illus {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(75,46,25,.25);
  aspect-ratio: 3/4;
  background: center/cover no-repeat;
}
.cover-cta { display: flex; gap: 16px; margin-top: 30px; }

/* =========================================================
   SOMMAIRE (carte du voyage)
   ========================================================= */
.travel-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fbf1d5 center/cover no-repeat;
  aspect-ratio: 20/9;
  position: relative;
  border: 1px solid rgba(75,46,25,.10);
  box-shadow: var(--shadow-1);
}
.step-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 24px;
}
.step-card {
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start;
  transition: all .15s;
  cursor: pointer;
  position: relative;
}
.step-card:hover:not(.locked) { border-color: var(--stepc); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.step-card .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--stepc, var(--s1)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 800; font-size: 22px;
}
.step-card .title { font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 20px; color: var(--ink); margin: 0 0 4px; }
.step-card .desc { font-size: 13px; color: var(--ink-3); margin: 0; line-height: 1.4; }
.step-card.current { border-color: var(--stepc); background: linear-gradient(180deg, #fdf3ea, #fff); box-shadow: 0 6px 20px rgba(201,84,31,.15); }
.step-card.locked { opacity: .55; cursor: default; background: rgba(255,255,255,.4); }
.step-card.locked::after {
  content: "🔒"; position: absolute; top: 12px; right: 14px; font-size: 14px; opacity: .5;
}
.step-card .num-badge {
  position: absolute; top: -8px; right: -6px;
  background: var(--gold); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(75,46,25,.25);
  white-space: nowrap;
}

.days-focus {
  margin-top: 28px;
  padding: 24px;
  background: linear-gradient(180deg, #fdf3ea, #f9e6d3);
  border-radius: var(--r-lg);
  border: 1.5px solid var(--s1-line);
}
.days-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 14px;
}
.day-chip {
  background: #fff; border-radius: var(--r-md);
  padding: 14px 16px;
  border: 1.5px solid rgba(75,46,25,.12);
  transition: all .15s;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.day-chip:hover { border-color: var(--s1); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.day-chip .d-num { font-family: var(--font-body); font-weight: 800; font-size: 11px; letter-spacing: 2px; color: var(--s1); }
.day-chip .d-title { font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 18px; color: var(--ink); margin-top: 2px; }
.day-chip .d-time { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.day-chip.done { background: #f9eecf; border-color: var(--gold); }
.day-chip.done::after { content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--gold); font-weight: 900; font-size: 18px; }

/* =========================================================
   OUVERTURE DE SEMAINE
   ========================================================= */
.week-open {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px;
  align-items: stretch;
}
/* Base : utilisable sur toute page (ouverture semaine, jours, missions).
   Le scope .week-open ci-dessous n'affine que la hauteur. */
.cover-scene {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  min-height: 220px;
  background: center/cover no-repeat;
  box-shadow: var(--shadow-1);
}
.week-open .cover-scene {
  border-radius: var(--r-md);
  aspect-ratio: auto;
  min-height: 280px;
}
.week-open .mot-kaya {
  background: var(--kaya-tint);
  border: 1.5px solid var(--kaya-line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.week-open .mot-kaya h4 {
  margin: 0 0 8px; font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 20px; color: var(--kaya);
  display: flex; align-items: center; gap: 8px;
}
.week-open .mot-kaya p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink); }

.program-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 8px;
}
.program-card {
  background: #fff; border-radius: 999px;
  padding: 14px 18px;
  border: 1.5px solid rgba(75,46,25,.10);
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: all .15s;
}
.program-card:hover { border-color: var(--s1); transform: translateY(-1px); }
.program-card .n {
  width: 32px; height: 32px; border-radius: 50%; background: var(--pc, var(--s1)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.program-card .lbl { font-family: var(--font-title); font-style: italic; font-weight: 500; font-size: 16px; color: var(--ink); }

.mission-strip {
  margin-top: 20px;
  padding: 18px 24px;
  background: linear-gradient(180deg, #fdf3d8, #f6e0a8);
  border: 1.5px solid #dcb56d;
  border-radius: var(--r-lg);
  text-align: center;
}
.mission-strip h4 {
  margin: 0 0 6px; font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 22px; color: var(--ink);
}
.mission-strip p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* =========================================================
   LAYOUT JOUR
   ========================================================= */
.day-header {
  text-align: center;
  margin-bottom: 24px;
}
.day-header .meta {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin-top: 12px;
  color: var(--ink-3); font-size: 14px;
}
.day-header .meta .chip-meta {
  background: var(--paper-2); padding: 4px 12px; border-radius: 999px;
  color: var(--ink-2); font-weight: 700; font-size: 13px;
}
.day-motivation {
  text-align: center; font-family: var(--font-title); font-style: italic; color: var(--ink-2);
  font-size: 17px; margin: 8px 0 18px;
}
.day-motivation .b { color: var(--s1); }

/* Structure "J'observe" en 2 colonnes */
.observe-grid {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: center;
  margin: 16px 0;
}
.observe-illus {
  border-radius: var(--r-md); overflow: hidden;
  aspect-ratio: 4/5; background: #fbeed0 center/cover no-repeat;
  box-shadow: var(--shadow-1);
}
.observe-illus.wide { aspect-ratio: 5/3; }

/* Nouvelle structure "J'observe" sobre : 2 cartes phrases côte à côte */
.observe-intro {
  color: var(--ink-2);
  font-size: 16px;
  margin: 6px 0 0;
  font-family: var(--font-body);
}
.observe-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.observe-card {
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-1);
  transition: transform .15s;
}
.observe-card.ok { border-color: var(--success); background: linear-gradient(180deg, #f5f8e6, #fff); }
.observe-card.ko { border-color: var(--error); background: linear-gradient(180deg, #fbe9e2, #fff); }
.observe-tag {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.observe-card.ok .observe-tag { color: var(--success); }
.observe-card.ko .observe-tag { color: var(--error); }
.observe-sent {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.35;
}
.observe-card.ko .observe-sent { color: var(--ink-3); }

@media (max-width: 780px) {
  .observe-two { grid-template-columns: 1fr; }
}

/* Section "J'observe" avec bulles de dialogue seules (pas d'image) */
.observe-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 24px;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-lg);
  justify-content: center;
  align-items: center;
}
.observe-bubbles .bubble { margin: 0; }
.observe-caption {
  text-align: center;
  color: var(--ink-3);
  font-family: var(--font-title);
  font-style: italic;
  font-size: 15px;
  margin: 10px 0 0;
}

/* Scène "J'observe" avec grande image + tags par-dessus */
.observe-scene {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  background: #f6ecd4;
}
.observe-scene-img {
  height: 260px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.observe-scene-img::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250,243,227,0) 40%, rgba(250,243,227,.92) 100%);
}
.observe-scene-tags {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 20px 20px;
  background: #fff;
  border-top: 1px solid rgba(75,46,25,.08);
  margin-top: -20px;
  position: relative;
  z-index: 1;
}
.gn-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fbf1d5;
  border: 1.5px solid var(--gold);
  color: var(--ink);
  font-family: var(--font-title);
  font-style: italic;
  font-size: 18px;
  font-weight: 500;
}
.gn-chip b { color: var(--s1); font-weight: 700; }

/* Vitrine 3 cartes "groupes nominaux" — Jour 3 */
.gn-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gn-card {
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.gn-card .gn-det,
.gn-card .gn-adj,
.gn-card .gn-nom {
  font-family: var(--font-title);
  font-style: italic;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid;
  font-size: 18px;
}
.gn-card .gn-det { background: #eaf3f7; border-color: var(--kaya-line); color: var(--kaya); }
.gn-card .gn-adj { background: #dfe6c8; border-color: var(--success); color: var(--success); }
.gn-card .gn-nom { background: #fadfd2; border-color: var(--s1); color: var(--s1); font-weight: 700; font-size: 20px; }
.gn-caption {
  margin-top: 6px;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
}
@media (max-width: 780px) {
  .gn-showcase { grid-template-columns: 1fr; }
}

/* Grille "sujet · verbe" du Jour 4 */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.sv-item {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}
.sv-arrow {
  color: var(--ink-3);
  font-size: 24px;
  font-family: var(--font-title);
}
@media (max-width: 780px) {
  .sv-grid { grid-template-columns: 1fr; }
}

/* Cartes singulier / pluriel Jour 5 */
.sp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.sp-card {
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.sp-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--s1);
}
.sp-illus {
  height: 140px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 12px 0;
}
.sp-sent {
  font-family: var(--font-title);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  margin: 4px 0 0;
  line-height: 1.4;
}
.sp-sent b { color: var(--s1); font-weight: 700; }
@media (max-width: 780px) {
  .sp-grid { grid-template-columns: 1fr; }
}

/* Mission — étapes numérotées avec picto */
.mission-step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 22px;
  padding: 22px 26px;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-left: 4px solid var(--step-color);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.mission-step-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--step-color);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(75,46,25,.15);
}
.mission-step-head {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 4px;
}
.mission-step-n {
  font-family: var(--font-body);
  font-weight: 800; font-size: 11px; letter-spacing: 2px;
  color: var(--step-color);
}
.mission-step-title {
  font-family: var(--font-title);
  font-style: italic; font-weight: 700; font-size: 22px;
  color: var(--ink);
  margin: 0;
}
.mission-step-say {
  color: var(--ink-3);
  font-family: var(--font-title); font-style: italic;
  margin: 0 0 10px;
  font-size: 15px;
}

/* Exercices */
.ex-block { margin: 22px 0; }
.ex-head {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 22px;
  color: var(--s1);
  margin: 0 0 6px;
}
.ex-head .num {
  background: var(--s1); color: #fff;
  border-radius: 50%; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.ex-consigne {
  color: var(--ink); font-size: 16px; margin: 0 0 14px;
  line-height: 1.5;
}
.ex-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.ex-item {
  display: grid; grid-template-columns: 34px 1fr 120px; gap: 12px; align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,.5);
  border-radius: var(--r-sm);
  border: 1px solid rgba(75,46,25,.06);
}
.ex-item.simple { grid-template-columns: 34px 1fr; }
.ex-item .n {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--s1-light); color: var(--s1);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}

/* Mots cliquables (souligne au clic) */
.sent {
  font-family: var(--font-title); font-style: italic;
  font-size: 21px; color: var(--ink); line-height: 1.6;
}
.sent .w {
  display: inline-block;
  padding: 2px 4px; margin: 0 -2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .12s;
  border-bottom: 2px solid transparent;
}
.sent .w:hover { background: rgba(58,123,168,.06); }
.sent .w.underline { border-bottom-color: var(--kaya); background: rgba(58,123,168,.08); color: var(--kaya); font-weight: 700; }
.sent .w.circle { background: #fadfd2; border-radius: 999px; padding: 2px 10px; color: var(--s1); font-weight: 700; border-bottom: none; }
.sent .w.correct { background: var(--success-soft); color: var(--success); border-bottom-color: var(--success); }
.sent .w.wrong { background: var(--error-soft); color: var(--error); border-bottom-color: var(--error); }

/* Rangée de chips (remettre en ordre) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chip-row.dropzone {
  min-height: 46px;
  padding: 6px 10px;
  background: rgba(255,255,255,.6);
  border: 1.5px dashed rgba(75,46,25,.20);
  border-radius: var(--r-sm);
}

/* Rétroaction douce */
.feedback {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.feedback.ok { background: var(--success-soft); color: var(--success); }
.feedback.ko { background: var(--error-soft); color: var(--error); }
.feedback.info { background: var(--kaya-tint); color: var(--kaya); }

.actions-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* Aide dépliable */
.helper {
  margin-top: 10px;
  background: var(--paper-2);
  border: 1px dashed rgba(75,46,25,.20);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 14px; color: var(--ink-2);
  line-height: 1.5;
}
.helper.hidden { display: none; }
.link-help {
  color: var(--kaya); text-decoration: underline dotted; font-size: 13px; cursor: pointer;
  font-weight: 700;
}

/* Micro-clôture jour */
.day-close {
  margin-top: 26px;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(246,236,212,.7));
  border-radius: var(--r-md);
  border: 1px solid rgba(75,46,25,.10);
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
}
.day-close .txt { color: var(--ink-2); font-size: 15px; }
.day-close .txt b { color: var(--s1); }

/* =========================================================
   CLÔTURE SEMAINE
   ========================================================= */
.plumes-row {
  display: flex; justify-content: space-around; align-items: flex-end;
  padding: 20px 10px;
}
.plumes-row .col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.plumes-row .col .n { font-family: var(--font-title); font-weight: 800; font-size: 22px; color: var(--s1); font-style: italic; }
.plumes-row .col .l { font-size: 12px; color: var(--ink-3); text-align: center; }

.retiens-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 16px;
}
.retiens-item {
  background: #fff; border-radius: var(--r-md);
  padding: 16px; border: 1.5px solid rgba(75,46,25,.10);
}
.retiens-item h5 { margin: 0 0 8px; font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 18px; color: var(--s1); }
.retiens-item p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* Checklist réussite */
.checkl { list-style: none; padding: 0; margin: 8px 0 0; }
.checkl li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(75,46,25,.08);
  background: rgba(255,255,255,.5);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .15s;
}
.checkl li:hover { background: #fff; border-color: var(--s1-line); }
.checkl li .box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid rgba(75,46,25,.3);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; flex-shrink: 0;
}
.checkl li.on .box { background: var(--success); border-color: var(--success); }
.checkl li.on .box::before { content: "✓"; }
.checkl li .lbl { color: var(--ink); font-size: 15px; }

/* Encadré dépliable (Coin des parents) */
.disclose {
  border: 1px solid rgba(75,46,25,.14);
  border-radius: var(--r-md);
  margin-top: 20px;
  background: rgba(255,255,255,.4);
  overflow: hidden;
}
.disclose > summary {
  padding: 14px 18px;
  font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 18px;
  color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  list-style: none;
}
.disclose > summary::-webkit-details-marker { display: none; }
.disclose > summary::after {
  content: "▾"; margin-left: auto; transition: transform .2s; color: var(--ink-3);
}
.disclose[open] > summary::after { transform: rotate(180deg); }
.disclose .body {
  padding: 4px 22px 20px;
  font-size: 15px; color: var(--ink-2); line-height: 1.55;
}
.disclose .body ul { margin: 0; padding-left: 18px; }
.disclose .body li { margin: 6px 0; }

/* Conseil du prof */
.card-conseil {
  background: #fdf3d8;
  border: 1.5px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 26px 30px;
  position: relative;
  box-shadow: var(--shadow-1);
}
.card-conseil h4 {
  margin: 0 0 12px;
  font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 24px;
  color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.card-conseil .body { font-size: 16px; line-height: 1.6; color: var(--ink); }
.card-conseil .body p { margin: 0 0 10px; }

/* =========================================================
   BILAN / RECOMMENCER
   ========================================================= */
.reset-modal {
  position: fixed; inset: 0; background: rgba(75,46,25,.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.reset-modal .box {
  background: var(--paper); border-radius: var(--r-lg);
  padding: 30px 34px; max-width: 460px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  border: 1px solid rgba(75,46,25,.15);
}
.reset-modal h3 { margin: 0 0 10px; font-family: var(--font-title); font-style: italic; font-size: 26px; color: var(--ink); }
.reset-modal p { margin: 0 0 20px; color: var(--ink-2); }
.reset-modal .row { display: flex; gap: 10px; justify-content: flex-end; }

/* =========================================================
   RESPONSIVE (tablette / laptop)
   ========================================================= */
@media (max-width: 900px) {
  .cover { grid-template-columns: 1fr; }
  .observe-grid { grid-template-columns: 1fr; }
  .week-open { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: 1fr 1fr; }
  .days-grid { grid-template-columns: 1fr 1fr; }
  .cover-title { font-size: 58px; }
  .h-title { font-size: 42px; }
  .artboard { padding: 30px 24px; }
}

/* =========================================================
   MODE IMPRESSION
   ========================================================= */
@media print {
  body { background: #fff; }
  .topbar, .footnav, .btn-tts, .link-help, .actions-row, .reset-modal, .icon-btn { display: none !important; }
  .stage { overflow: visible; padding: 0; }
  .artboard {
    box-shadow: none; border-radius: 0; background: #fff;
    page-break-after: always; min-height: 0; padding: 30mm 20mm;
  }
  .artboard::before, .artboard::after { display: none; }
  .app { display: block; }
  .print-hide { display: none !important; }
  .helper { display: block !important; }
  .disclose > .body, .disclose { display: block !important; }
  .disclose > summary::after { display: none; }
}

/* Utilitaires */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-c { text-align: center; }
.text-r { text-align: right; }
.text-muted { color: var(--ink-3); }
.text-s1 { color: var(--s1); }
.text-kaya { color: var(--kaya); }
.italic { font-style: italic; }
.script { font-family: var(--font-title); font-style: italic; }
.grow { flex: 1; }
.small { font-size: 13px; }
.tiny { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 800; }

/* =========================================================
   BASCULE DE PALETTE PAR SEMAINE (maths)
   ========================================================= */
.app[data-week="2"] {
  --s1: #3d5a92;
  --s1-soft: #7086b5;
  --s1-light: #dbe1ee;
  --s1-line: #93a5c9;
  --s1-dark: #2e4576;
  --s1-ribbon-notch: #263a5e;
  --s1-shadow: rgba(61,90,146,.35);
  --paper: #f6f1e2;
  --paper-2: #ede8d0;
  --paper-3: #e2dcb8;
}
.app[data-week="3"] {
  --s1: #b58326;
  --s1-soft: #d3a556;
  --s1-light: #f2e4c0;
  --s1-line: #d1b26a;
  --s1-dark: #8a621b;
  --s1-ribbon-notch: #654712;
  --s1-shadow: rgba(181,131,38,.35);
  --paper: #f9f2df;
  --paper-2: #f2eacb;
  --paper-3: #e8ddb2;
}
.app[data-week="4"] {
  /* Semaine 4 · Mesurer le monde autour de moi (teal doux + cuivre chaud) */
  --s1: #2d7d78;
  --s1-soft: #5fa39e;
  --s1-light: #d4e6e4;
  --s1-line: #83b3af;
  --s1-dark: #205e5a;
  --s1-ribbon-notch: #143d3a;
  --s1-shadow: rgba(45,125,120,.35);
  --paper: #f4f0e2;
  --paper-2: #ebe7d2;
  --paper-3: #dfdcbe;
  /* Accent secondaire (cuivre chaud) réutilisable via var(--gold) */
  --gold: #b8823b;
  --gold-soft: #ecd6ae;
}
.app[data-week="5"] {
  /* Semaine 5 · Observer les formes (prune doux + rose argile + bronze) */
  --s1: #7a4a78;
  --s1-soft: #a37ba0;
  --s1-light: #eadce6;
  --s1-line: #b898b2;
  --s1-dark: #593559;
  --s1-ribbon-notch: #3b1f3c;
  --s1-shadow: rgba(122,74,120,.35);
  --paper: #f7f0e8;
  --paper-2: #efe6d9;
  --paper-3: #e5d9c2;
  /* Accent secondaire : bronze clair (assiette / bord de cuivre) */
  --gold: #a67a3f;
  --gold-soft: #ecd8b4;
}
.app[data-week="6"] {
  /* Semaine 6 · La grande porte de la 6ᵉ (or lumineux + ambre + parchemin) */
  --s1: #b8842a;
  --s1-soft: #d4a24a;
  --s1-light: #f5e3b3;
  --s1-line: #d4b676;
  --s1-dark: #8a5f14;
  --s1-ribbon-notch: #5c3d08;
  --s1-shadow: rgba(184,132,42,.35);
  --paper: #faf1d8;
  --paper-2: #f2e5b8;
  --paper-3: #e6d492;
  /* Accent secondaire : bronze profond pour les sceaux et signature */
  --gold: #a06818;
  --gold-soft: #f0dda1;
}

/* =========================================================
   COMPOSANTS MATHS spécifiques
   ========================================================= */

/* ——— Champ de saisie numérique (une case chiffre) ——— */
.num-field {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 62px; height: 62px; padding: 0 12px;
  background: #fff;
  border: 2px solid rgba(75,46,25,.14);
  border-radius: 12px;
  font-family: var(--font-title); font-weight: 700;
  font-size: 30px; color: var(--ink);
  text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 4px rgba(75,46,25,.06);
  transition: all .15s;
}
.num-field:focus { outline: none; border-color: var(--s1); box-shadow: 0 0 0 3px var(--s1-light); }
.num-field.correct { border-color: var(--success); background: #f2f8e4; color: var(--success); }
.num-field.wrong { border-color: var(--error); background: #fbe9e2; color: var(--error); }
.num-field.small { min-width: 48px; height: 48px; font-size: 22px; }
.num-field.large { min-width: 84px; height: 74px; font-size: 36px; }

/* ——— Ligne d'énoncé de calcul (2 654 + 3 128 = ▢) ——— */
.calc-line {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-title); font-weight: 700;
  font-size: 32px; color: var(--ink);
  padding: 14px 22px;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.calc-line .op { color: var(--s1); font-size: 34px; }
.calc-line .eq { color: var(--ink-3); }

/* ——— Bloc de pose colonne (opération posée) ——— */
.pose {
  display: inline-block;
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.10);
  border-radius: 14px;
  padding: 22px 26px 20px;
  box-shadow: var(--shadow-1);
  font-family: 'Courier New', 'JetBrains Mono', monospace;
}
.pose-row {
  display: flex; justify-content: flex-end; gap: 6px;
  font-size: 34px; font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.pose-row.retenue {
  font-size: 14px; color: var(--error);
  min-height: 18px; margin-bottom: 4px;
  font-family: var(--font-body); font-weight: 700;
}
.pose-row.retenue .r-slot {
  width: 40px; text-align: center; min-height: 18px;
}
.pose-row .col {
  width: 40px; text-align: center;
  font-family: inherit;
}
.pose-row .op {
  width: 30px; text-align: right; color: var(--s1);
}
.pose-bar {
  height: 3px; background: var(--ink);
  margin: 6px 0 10px;
}
.pose-input {
  width: 40px; height: 44px;
  border: 2px dashed var(--s1-line);
  border-radius: 6px;
  background: #fafafa;
  text-align: center;
  font: inherit; font-size: 30px; font-weight: 700;
  color: var(--s1);
  padding: 0;
}
.pose-input:focus { outline: none; border-color: var(--s1); background: #fff; }
.pose-input.correct { border-color: var(--success); border-style: solid; background: #f2f8e4; color: var(--success); }
.pose-input.wrong { border-color: var(--error); border-style: solid; background: #fbe9e2; color: var(--error); }

/* ——— Clavier numérique intégré ——— */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7f0dd);
  border: 1.5px solid rgba(75,46,25,.14);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  max-width: 260px;
}
.numpad button {
  padding: 14px 0;
  background: #fff;
  border: 1px solid rgba(75,46,25,.12);
  border-radius: 10px;
  font-family: var(--font-title); font-weight: 700;
  font-size: 22px; color: var(--ink);
  transition: all .1s;
  box-shadow: 0 1px 2px rgba(75,46,25,.06);
}
.numpad button:hover { border-color: var(--s1); color: var(--s1); }
.numpad button:active { transform: translateY(1px); }
.numpad button.wide { grid-column: span 2; }
.numpad button.action { background: var(--s1-light); color: var(--s1-dark); font-size: 16px; }
.numpad button.erase { background: #fbeae4; color: var(--error); font-size: 16px; }
.numpad-target {
  padding: 12px 14px; margin-bottom: 10px;
  background: #fff;
  border: 2px solid var(--s1);
  border-radius: 10px;
  font-family: var(--font-title); font-weight: 700;
  font-size: 30px; color: var(--ink);
  text-align: center;
  min-height: 44px;
}

/* ——— Tuile draggable (ordre croissant/décroissant) ——— */
.dtile {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 96px; height: 76px;
  padding: 0 14px;
  background: #fff;
  border: 2px solid rgba(75,46,25,.14);
  border-radius: 14px;
  font-family: var(--font-title); font-weight: 700;
  font-size: 28px; color: var(--ink);
  cursor: grab;
  user-select: none;
  transition: all .15s;
  box-shadow: 0 2px 4px rgba(75,46,25,.06);
}
.dtile:hover { border-color: var(--s1); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(75,46,25,.12); }
.dtile:active, .dtile.dragging { cursor: grabbing; opacity: .5; }
.dtile.slot { background: #f4efd9; border-style: dashed; color: var(--ink-3); font-size: 20px; font-style: italic; font-weight: 500; }
.dtile.correct { border-color: var(--success); background: #f2f8e4; color: var(--success); }
.dtile.wrong { border-color: var(--error); background: #fbe9e2; }

.drop-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7f0dd);
  border: 1.5px dashed rgba(75,46,25,.18);
  border-radius: 14px;
  min-height: 100px;
  align-items: center;
}
.drop-row.correct { border-color: var(--success); background: #f5faea; border-style: solid; }

/* ——— Cartes appariement (nombre ↔ lettres) ——— */
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0;
}
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-card {
  padding: 14px 18px;
  background: #fff;
  border: 2px solid rgba(75,46,25,.14);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 1px 3px rgba(75,46,25,.06);
}
.match-card.digit { font-weight: 700; font-size: 24px; }
.match-card.words { font-style: italic; font-size: 18px; line-height: 1.35; }
.match-card:hover { border-color: var(--s1); }
.match-card.selected { border-color: var(--s1); background: var(--s1-light); box-shadow: 0 0 0 3px var(--s1-light); }
.match-card.matched { background: #f2f8e4; border-color: var(--success); color: var(--success); cursor: default; }
.match-card.matched::after { content: " ✓"; }
.match-card.wrong { border-color: var(--error); background: #fbe9e2; animation: shakeX .3s; }
@keyframes shakeX { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

/* ——— Sélection par clic (choix multiples cliquables) ——— */
.pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.pick-card {
  padding: 14px 12px;
  background: #fff;
  border: 2px solid rgba(75,46,25,.14);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-title); font-weight: 700;
  font-size: 22px; color: var(--ink);
  box-shadow: 0 1px 3px rgba(75,46,25,.06);
}
.pick-card:hover { border-color: var(--s1); transform: translateY(-1px); }
.pick-card.selected { border-color: var(--s1); background: var(--s1-light); box-shadow: 0 0 0 3px var(--s1-light); }
.pick-card.correct { border-color: var(--success); background: #f2f8e4; color: var(--success); }
.pick-card.wrong { border-color: var(--error); background: #fbe9e2; color: var(--error); }
.pick-card.missed { border-color: var(--gold); background: #fdf3d8; color: var(--gold); }

/* ——— Rang / classe (tableau valeur de position) ——— */
.rank-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
  border: 1.5px solid rgba(75,46,25,.10);
}
.rank-cell {
  padding: 10px 6px;
  background: #fff;
  text-align: center;
  font-family: var(--font-title);
}
.rank-cell.head {
  background: var(--s1-light); color: var(--s1-dark);
  font-size: 12px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; font-style: normal;
  padding: 12px 4px;
}
.rank-cell.digit {
  font-size: 34px; font-weight: 700; color: var(--ink);
  padding: 18px 6px;
}
.rank-cell.digit.big { font-size: 40px; }

/* ——— Problème (énoncé + calcul + réponse) ——— */
.probleme {
  background: linear-gradient(180deg, #fff, #f7f0dd);
  border: 1.5px solid var(--s1-line);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  margin: 16px 0;
  box-shadow: var(--shadow-1);
}
.probleme .p-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-title); font-style: italic; font-weight: 700; font-size: 20px;
  color: var(--s1); margin-bottom: 8px;
}
.probleme .p-body {
  font-size: 17px; line-height: 1.55; color: var(--ink);
  margin-bottom: 12px;
}
.probleme .p-body b { color: var(--s1-dark); }
.probleme .p-answer-row {
  display: flex; gap: 10px; align-items: baseline;
  font-family: var(--font-title); font-size: 20px;
  color: var(--ink-2); margin-top: 12px;
  flex-wrap: wrap;
}

/* ——— Ruban FCFA / unité ——— */
.unit-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: var(--gold-soft);
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 700;
  font-size: 13px; letter-spacing: .5px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ——— Cartes fiche-article (mission petit marchand) ——— */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.article-card {
  background: #fff;
  border: 1.5px solid rgba(75,46,25,.12);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.article-card .a-emoji { font-size: 34px; margin-bottom: 6px; }
.article-card .a-name { font-family: var(--font-title); font-style: italic; font-size: 17px; color: var(--ink); }
.article-card .a-price { margin-top: 8px; font-family: var(--font-title); font-weight: 700; font-size: 22px; color: var(--s1); }

/* ——— Grille numérique (comptage / boulier) ——— */
.count-grid {
  display: grid;
  gap: 4px;
  margin: 12px 0;
}
.count-grid.g10 { grid-template-columns: repeat(10, 1fr); max-width: 400px; }
.count-grid .dot {
  aspect-ratio: 1;
  background: var(--s1-light);
  border: 1.5px solid var(--s1-line);
  border-radius: 50%;
  cursor: pointer;
  transition: all .1s;
}
.count-grid .dot.on { background: var(--s1); border-color: var(--s1-dark); box-shadow: 0 0 0 2px var(--s1-light); }
.count-grid .dot:hover { transform: scale(1.1); }

/* ——— Impression (idem français) ——— */
@media print {
  .print-hide { display: none !important; }
  .stage { overflow: visible; padding: 0; }
  .artboard { box-shadow: none; page-break-inside: avoid; margin-bottom: 20px; }
}


/* =========================================================
   FRACTIONS · Parts cliquables (SVG-based, sobre)
   Utilisé par ExParts : colorier N parts sur K.
   ========================================================= */
.parts-shape {
  display: inline-block;
  vertical-align: middle;
  margin: 8px 6px;
  cursor: pointer;
  user-select: none;
}
.parts-shape svg { display: block; }
.parts-shape .p-part {
  fill: #fff;
  stroke: var(--ink-3);
  stroke-width: 1.5;
  transition: fill .12s ease;
}
.parts-shape .p-part:hover { fill: var(--s1-light); }
.parts-shape .p-part.on {
  fill: var(--s1);
  stroke: var(--s1-dark);
}
.parts-shape.disabled { cursor: default; }
.parts-shape.disabled .p-part:hover { fill: #fff; }
.parts-shape.disabled .p-part.on:hover { fill: var(--s1); }
.parts-shape.correct .p-part.on { fill: var(--success); stroke: #4a6a25; }
.parts-shape.wrong   .p-part.on { fill: var(--error);   stroke: #8a3730; }

.parts-legend {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 4px; margin: 4px 8px; font-family: var(--font-title); font-style: italic;
  color: var(--ink-2); font-size: 15px; text-align: center;
}
.parts-legend .lg-frac {
  font-family: var(--font-title); font-weight: 700; font-size: 22px;
  color: var(--s1); line-height: 1;
}

.parts-row {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: center;
  margin: 10px 0 4px;
}

/* Fraction typographique inline (½, ¼, 1/2, 1/4) */
.frac {
  display: inline-flex; flex-direction: column;
  vertical-align: middle;
  font-family: var(--font-title); font-weight: 700;
  color: var(--s1); line-height: 1;
  margin: 0 3px; text-align: center;
  font-size: .8em;
}
.frac .num { border-bottom: 2px solid currentColor; padding: 0 4px 1px; }
.frac .den { padding: 1px 4px 0; }


/* =========================================================
   SEMAINE 6 · Diplôme (impression + écran)
   ========================================================= */
.diploma {
  position: relative;
  background:
    radial-gradient(ellipse 800px 300px at 50% 0%, rgba(212,162,74,.14), transparent 70%),
    radial-gradient(ellipse 800px 300px at 50% 100%, rgba(212,162,74,.14), transparent 70%),
    linear-gradient(180deg, #faf1d8 0%, #f2e5b8 100%);
  border: 3px double var(--gold, #a06818);
  border-radius: var(--r-lg);
  padding: 44px 48px 40px;
  box-shadow: 0 4px 14px rgba(138,95,20,.15), inset 0 0 40px rgba(212,162,74,.10);
  margin: 20px 0;
  font-family: var(--font-title);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
}
.diploma::before, .diploma::after {
  content: "";
  position: absolute;
  width: 60px; height: 60px;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-soft, #f0dda1), var(--gold, #a06818) 65%, var(--s1-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(75,46,25,.25);
}
.diploma::before { top: -18px; left: -18px; }
.diploma::after  { bottom: -18px; right: -18px; }

.diploma .d-crest {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 4px;
  font-size: 12px;
  color: var(--gold, #a06818);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.diploma .d-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.1;
  color: var(--ink);
  margin: 6px 0 4px;
}
.diploma .d-sub {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.diploma .d-para {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 620px;
  margin: 6px auto;
}
.diploma .d-name {
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--s1-dark);
  margin: 14px 0 6px;
  padding: 4px 20px;
  display: inline-block;
  border-bottom: 2px solid var(--gold, #a06818);
  min-width: 240px;
}
.diploma .d-name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold, #a06818);
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--s1-dark);
  text-align: center;
  padding: 4px 20px 2px;
  min-width: 240px;
  outline: none;
  transition: background .15s;
}
.diploma .d-name-input:focus { background: rgba(255,255,255,.4); }
.diploma .d-name-input::placeholder { color: var(--ink-soft); font-style: italic; }

.diploma-seals {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}
.diploma-seal {
  width: 68px; height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, var(--gold-soft, #f0dda1), var(--gold, #a06818) 65%, var(--s1-dark) 100%);
  border: 2px solid var(--gold, #a06818);
  box-shadow: 0 2px 6px rgba(75,46,25,.2), inset 0 0 8px rgba(255,255,255,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  position: relative;
  flex-shrink: 0;
}
.diploma-seal .s-week {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 1.5px;
  opacity: 0.85;
  text-transform: uppercase;
}
.diploma-seal .s-num {
  font-size: 24px;
  line-height: 1;
  margin-top: 2px;
}

.diploma .d-signature {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-2);
}
.diploma .d-signature .sig-col {
  text-align: left;
  flex: 1;
}
.diploma .d-signature .sig-col.right { text-align: right; }
.diploma .d-signature .sig-name {
  font-family: var(--font-hand);
  font-size: 30px;
  color: var(--s1-dark);
  line-height: 1;
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.diploma .d-signature .sig-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
}

/* Impression : le diplôme prend une pleine page proprement */
@media print {
  .diploma {
    page-break-inside: avoid;
    box-shadow: none;
    border-color: #a06818;
  }
}


/* =========================================================
   SEMAINE 6 · Diplôme (impression + écran)
   ========================================================= */
.diploma {
  position: relative;
  background:
    radial-gradient(ellipse 800px 300px at 50% 0%, rgba(212,162,74,.14), transparent 70%),
    radial-gradient(ellipse 800px 300px at 50% 100%, rgba(212,162,74,.14), transparent 70%),
    linear-gradient(180deg, #faf1d8 0%, #f2e5b8 100%);
  border: 3px double var(--gold, #a06818);
  border-radius: var(--r-lg);
  padding: 44px 48px 40px;
  box-shadow: 0 4px 14px rgba(138,95,20,.15), inset 0 0 40px rgba(212,162,74,.10);
  margin: 20px 0;
  font-family: var(--font-title);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
}
.diploma::before, .diploma::after {
  content: "";
  position: absolute;
  width: 60px; height: 60px;
  background:
    radial-gradient(circle at 30% 30%, var(--gold-soft, #f0dda1), var(--gold, #a06818) 65%, var(--s1-dark) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(75,46,25,.25);
}
.diploma::before { top: -18px; left: -18px; }
.diploma::after  { bottom: -18px; right: -18px; }

.diploma .d-crest {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 4px;
  font-size: 12px;
  color: var(--gold, #a06818);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.diploma .d-title {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.1;
  color: var(--ink);
  margin: 6px 0 4px;
}
.diploma .d-sub {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 22px;
}
.diploma .d-para {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 620px;
  margin: 6px auto;
}
.diploma .d-name {
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--s1-dark);
  margin: 14px 0 6px;
  padding: 4px 20px;
  display: inline-block;
  border-bottom: 2px solid var(--gold, #a06818);
  min-width: 240px;
}
.diploma .d-name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold, #a06818);
  font-family: var(--font-hand);
  font-size: 44px;
  color: var(--s1-dark);
  text-align: center;
  padding: 4px 20px 2px;
  min-width: 240px;
  outline: none;
  transition: background .15s;
}
.diploma .d-name-input:focus { background: rgba(255,255,255,.4); }
.diploma .d-name-input::placeholder { color: var(--ink-soft); font-style: italic; }

.diploma-seals {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 22px 0 14px;
  flex-wrap: wrap;
}
.diploma-seal {
  width: 68px; height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, var(--gold-soft, #f0dda1), var(--gold, #a06818) 65%, var(--s1-dark) 100%);
  border: 2px solid var(--gold, #a06818);
  box-shadow: 0 2px 6px rgba(75,46,25,.2), inset 0 0 8px rgba(255,255,255,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  position: relative;
  flex-shrink: 0;
}
.diploma-seal .s-week {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 1.5px;
  opacity: 0.85;
  text-transform: uppercase;
}
.diploma-seal .s-num {
  font-size: 24px;
  line-height: 1;
  margin-top: 2px;
}

.diploma .d-signature {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-2);
}
.diploma .d-signature .sig-col {
  text-align: left;
  flex: 1;
}
.diploma .d-signature .sig-col.right { text-align: right; }
.diploma .d-signature .sig-name {
  font-family: var(--font-hand);
  font-size: 30px;
  color: var(--s1-dark);
  line-height: 1;
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.diploma .d-signature .sig-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
}

/* Impression : le diplôme prend une pleine page proprement */
@media print {
  .diploma {
    page-break-inside: avoid;
    box-shadow: none;
    border-color: #a06818;
  }
}
