/* =========================================================
   Kiko CE1 - Feuille de style
   Pensée pour une tablette en mode paysage, doigts d'enfant.
   ========================================================= */

:root {
  --teal: #3FA796;
  --teal-light: #58C9B9;
  --amber: #F6B93B;
  --amber-dark: #E58E26;
  --coral: #FF8A65;
  --pink: #F59CA9;
  --purple: #9B8BE0;
  --cream: #FFF8EC;
  --cream-card: #FFFDF8;
  --ink: #2D3A3A;
  --ink-soft: #5B6A6A;
  --green: #5BBF8A;
  --sky: #6EC6FF;
  --soft-shadow: 0 8px 20px rgba(45, 58, 58, 0.14);
  --radius: 26px;
  --radius-lg: 36px;
  --tap: 72px; /* taille mini des cibles tactiles */
  font-size: clamp(16px, 2.4vmin, 26px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Segoe UI Rounded", "Baloo 2", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #eafaf6 0%, #fef6e4 100%);
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Boutons génériques ---------- */
button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  border-radius: var(--radius);
  min-height: var(--tap);
  padding: 0 1.1em;
  box-shadow: var(--soft-shadow);
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.15s ease;
  font-weight: 700;
}
button:active { transform: scale(0.95); }
button:disabled { opacity: 0.5; cursor: default; }

.btn-primary { background: var(--teal); color: #fff; }
.btn-accent { background: var(--amber); color: var(--ink); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.75); }

.big-btn {
  font-size: 1.3rem;
  min-height: calc(var(--tap) + 14px);
  padding: 0 1.6em;
  border-radius: var(--radius-lg);
}

/* ---------- Barre du haut ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 12px rgba(45,58,58,0.08);
  z-index: 5;
}
.topbar .title { font-size: 1.15rem; font-weight: 800; color: var(--teal); }
.topbar .spacer { flex: 1; }
.icon-btn {
  min-width: var(--tap); min-height: var(--tap);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; padding: 0;
  background: #fff;
}
.stars-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 999px; padding: 8px 16px;
  font-weight: 800; box-shadow: var(--soft-shadow); font-size: 1.1rem;
}

/* ---------- Zone d'écran ---------- */
.screen {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px clamp(16px, 4vw, 48px) 28px;
}
.screen-center {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 18px; min-height: 100%;
}

/* ---------- Mascotte Kiko ---------- */
.mascot {
  width: clamp(90px, 16vmin, 180px);
  flex: none;
  transform-origin: bottom center;
}
.mascot.talk { animation: kiko-talk 0.5s ease-in-out infinite alternate; }
.mascot.dance { animation: kiko-dance 0.6s ease-in-out infinite; }
.mascot.bounce { animation: kiko-bounce 1.6s ease-in-out infinite; }
@keyframes kiko-talk { from { transform: translateY(0) scale(1);} to { transform: translateY(-4px) scale(1.02);} }
@keyframes kiko-bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes kiko-dance {
  0%{transform:rotate(-6deg) translateY(0)}
  25%{transform:rotate(6deg) translateY(-8px)}
  50%{transform:rotate(-6deg) translateY(0)}
  75%{transform:rotate(6deg) translateY(-8px)}
  100%{transform:rotate(-6deg) translateY(0)}
}

/* Bulle de dialogue */
.speech {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 16px 22px;
  box-shadow: var(--soft-shadow);
  font-size: 1.2rem;
  font-weight: 700;
  max-width: 640px;
  line-height: 1.35;
}
.speech::after {
  content: "";
  position: absolute; left: -14px; bottom: 26px;
  border: 12px solid transparent;
  border-right-color: #fff;
}
.mascot-row { display: flex; align-items: flex-end; gap: 16px; max-width: 900px; }

/* ---------- Accueil ---------- */
.home-hero { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 6px 0 14px; }
.home-hero h1 { font-size: 1.6rem; margin: 0; color: var(--teal); }

.period-pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; }
.period-pill {
  border-radius: 999px; padding: 10px 18px; font-weight: 800;
  background: #fff; min-height: 56px;
}
.period-pill.active { background: var(--teal); color: #fff; }
.period-pill.locked { opacity: 0.55; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
.tile {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--soft-shadow);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 150px; justify-content: center;
  border: 4px solid transparent;
}
.tile .emoji { font-size: 3rem; line-height: 1; }
.tile .tile-title { font-weight: 800; font-size: 1.2rem; }
.tile .tile-sub { color: var(--ink-soft); font-size: 0.9rem; }
.tile.fr { border-color: var(--pink); }
.tile.ma { border-color: var(--sky); }
.tile.special { border-color: var(--amber); }
.tile.locked { opacity: 0.5; }

.section-label {
  font-weight: 800; color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: 1px; font-size: 0.85rem; margin: 20px auto 8px; max-width: 1100px;
}

/* ---------- Liste des notions ---------- */
.module-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.module-card {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--soft-shadow);
}
.module-card .m-emoji { font-size: 2.4rem; }
.module-card .m-main { flex: 1; text-align: left; }
.module-card .m-title { font-weight: 800; font-size: 1.15rem; }
.module-card .m-stars { font-size: 1.3rem; letter-spacing: 2px; }

/* ---------- Étapes leçon / exercice ---------- */
.stage {
  max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px;
}
.card {
  background: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--soft-shadow);
}
.prompt {
  font-size: 1.4rem; font-weight: 800; text-align: center; margin: 4px 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}

.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.opt {
  background: #fff; border: 4px solid #eee; border-radius: var(--radius);
  padding: 18px; font-size: 1.5rem; font-weight: 800; min-height: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.opt .opt-emoji { font-size: 2.6rem; }
.opt.selected { border-color: var(--teal); }
.opt.correct { border-color: var(--green); background: #e7f8ef; animation: celebrate 0.55s cubic-bezier(.2,.85,.25,1.2); }
.opt.wrong { border-color: var(--coral); background: #fff0ec; animation: shake 0.4s; }
@keyframes pop { 0%{transform:scale(0.9)} 60%{transform:scale(1.08)} 100%{transform:scale(1)} }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }

/* feedback */
.feedback {
  text-align: center; font-size: 1.3rem; font-weight: 800; min-height: 1.6em;
  padding: 8px; border-radius: 18px;
}
.feedback.good { color: #2a8f5f; }
.feedback.try { color: var(--amber-dark); }
.hint-bubble {
  background: #fff6df; border-radius: 18px; padding: 14px 18px; font-weight: 700;
  color: var(--amber-dark); text-align: center; border: 3px dashed var(--amber);
}

/* barre de progression des exercices */
.exo-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 6px; }
.exo-dot { width: 16px; height: 16px; border-radius: 50%; background: #e0e0e0; }
.exo-dot.done { background: var(--green); }
.exo-dot.current { background: var(--amber); transform: scale(1.25); }

/* pavé numérique */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 0 auto; }
.keypad button { font-size: 1.7rem; min-height: 72px; }
.answer-display {
  text-align: center; font-size: 2.6rem; font-weight: 900; min-height: 1.4em;
  background: #fff; border-radius: 20px; padding: 10px 18px; margin: 0 auto 14px;
  max-width: 330px; letter-spacing: 3px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

/* blocs base-10 (dizaines / unités) */
.base10 { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.b10-col { display:flex; flex-direction: column; align-items: center; gap: 10px; }
.b10-col h4 { margin: 0; color: var(--ink-soft); }
.dizaines, .unites { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 260px; min-height: 70px; }
.dizaine { width: 20px; height: 68px; background: var(--teal); border-radius: 6px; box-shadow: var(--soft-shadow);
  background-image: repeating-linear-gradient(#ffffff55 0 2px, transparent 2px 9px); animation: pop 0.25s ease; }
.unite { width: 22px; height: 22px; background: var(--amber); border-radius: 5px; box-shadow: var(--soft-shadow); animation: pop 0.25s ease; }
.counter-controls { display: flex; align-items: center; gap: 12px; justify-content: center; }
.counter-controls button { font-size: 1.6rem; min-width: 72px; }

/* objets à compter / manipuler */
.objects { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; }
.obj {
  font-size: 2.6rem; line-height: 1; transition: transform 0.1s; padding: 4px;
}
.obj.tapped { transform: scale(1.25); filter: drop-shadow(0 4px 4px rgba(0,0,0,0.2)); }
.obj.crossed { opacity: 0.3; position: relative; }
.obj.crossed::after { content:"✖"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--coral); font-size:2rem; }

/* clic sur les mots (sons) */
.word-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  background: #fff; border: 4px solid #eee; border-radius: 999px;
  padding: 12px 20px; font-size: 1.4rem; font-weight: 800;
  display:flex; align-items:center; gap:8px;
}
.chip.selected { border-color: var(--teal); background: #e7f6f3; }
.chip.correct { border-color: var(--green); background:#e7f8ef; }
.chip.wrong { border-color: var(--coral); background:#fff0ec; }

/* syllabes */
.syllable-word { display:flex; justify-content:center; align-items:center; gap:0; font-size:2.4rem; font-weight:900; margin: 10px 0; flex-wrap: wrap;}
.syl-letter { padding: 4px 2px; }
.syl-gap {
  width: 26px; height: 54px; border-radius: 10px; background: transparent; margin: 0 1px;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.syl-gap.cut { background: var(--amber); }
.syl-gap.cut::after { content:"✂"; font-size: 1.1rem; }

/* association (relier) */
.assoc { display:flex; gap: 40px; justify-content: center; }
.assoc-col { display:flex; flex-direction:column; gap:14px; }
.assoc-item {
  background:#fff; border:4px solid #eee; border-radius:20px; padding:14px 18px;
  font-size:1.5rem; font-weight:800; min-width:120px; text-align:center; min-height:70px;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
.assoc-item.selected { border-color: var(--purple); }
.assoc-item.matched { border-color: var(--green); background:#e7f8ef; opacity:0.85; }

/* tracé / écriture */
.trace-wrap { position: relative; margin: 0 auto; max-width: 760px; }
.trace-model {
  font-family: "Segoe Script", "Comic Sans MS", cursive;
  font-size: clamp(2.6rem, 9vmin, 4.5rem);
  color: #d9cdb6; text-align:center; letter-spacing: 2px;
  position: absolute; inset: 0; display:flex; align-items:center; justify-content:center;
  pointer-events:none;
}
canvas.trace {
  width: 100%; height: 180px; background:#fff; border-radius: var(--radius);
  box-shadow: var(--soft-shadow); display:block; touch-action: none;
  background-image: linear-gradient(#f0f0f0 1px, transparent 1px);
  background-size: 100% 44px; background-position: 0 56px;
}

/* formes géométriques */
.shape-svg { width: 110px; height: 110px; }

/* ---------- Écran récompense ---------- */
.reward {
  display:flex; flex-direction:column; align-items:center; gap:18px; text-align:center;
}
.reward .big-star { font-size: 6rem; animation: pop 0.5s ease, kiko-bounce 1.6s ease-in-out 0.5s infinite; }
.reward h2 { font-size: 2rem; margin: 0; color: var(--teal); }

/* confettis */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- Rituel calcul mental ---------- */
.timer-bar { height: 16px; background:#fff; border-radius:999px; overflow:hidden; max-width:500px; margin: 0 auto 10px; box-shadow: var(--soft-shadow);}
.timer-fill { height:100%; background: linear-gradient(90deg, var(--green), var(--amber)); width:100%; transition: width 0.2s linear; }

/* ---------- Espace parents ---------- */
.parent { max-width: 820px; margin: 0 auto; display:flex; flex-direction:column; gap: 16px; }
.parent h2 { color: var(--teal); }
.pin-pad { max-width: 300px; margin: 0 auto; }
.pin-display { font-size: 2.4rem; letter-spacing: 12px; text-align:center; min-height: 1.4em; font-weight:900; }
.stat-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
.stat-card { background:#fff; border-radius:20px; padding:16px; box-shadow:var(--soft-shadow); }
.stat-card .num { font-size:1.9rem; font-weight:900; color:var(--teal); }
.stat-card .lbl { color: var(--ink-soft); font-size:0.9rem; }
.bar-row { display:flex; align-items:center; gap:10px; margin:8px 0; }
.bar-row .name { width: 120px; font-weight:700; }
.bar-track { flex:1; height:22px; background:#eee; border-radius:999px; overflow:hidden; }
.bar-fill { height:100%; background: var(--teal); border-radius:999px; }
.parent-table { width:100%; border-collapse: collapse; background:#fff; border-radius:16px; overflow:hidden; box-shadow:var(--soft-shadow); }
.parent-table th, .parent-table td { padding:10px 12px; text-align:left; border-bottom:1px solid #f0f0f0; font-size:0.95rem; }
.parent-table th { background:#f6f6f6; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; background:#fff; border-radius:16px; padding:12px 16px; box-shadow:var(--soft-shadow); }
.switch { width:64px; height:36px; border-radius:999px; background:#ccc; position:relative; cursor:pointer; flex:none; }
.switch.on { background: var(--green); }
.switch .knob { width:30px; height:30px; background:#fff; border-radius:50%; position:absolute; top:3px; left:3px; transition:left 0.15s; }
.switch.on .knob { left:31px; }
.field-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.field-row input[type=number] { font-size:1.3rem; padding:10px; border-radius:14px; border:3px solid #ddd; width:120px; font-family:inherit; }

/* badges */
.badge-grid { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; }
.badge {
  width: 110px; text-align:center; background:#fff; border-radius:20px; padding:12px 8px;
  box-shadow: var(--soft-shadow);
}
.badge .b-icon { font-size:2.6rem; }
.badge .b-name { font-size:0.8rem; font-weight:700; }
.badge.locked { opacity:0.4; filter: grayscale(1); }

/* pause / temps écran */
.pause-overlay {
  position: fixed; inset:0; background: rgba(63,167,150,0.96); color:#fff;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:20px; text-align:center; z-index:100; padding: 20px;
}
.pause-overlay h2 { font-size:2.2rem; margin:0; }

/* petits utilitaires */
.row { display:flex; gap:14px; align-items:center; flex-wrap:wrap; justify-content:center; }
.stack { display:flex; flex-direction:column; gap:12px; }
.center { text-align:center; }
.hidden { display:none !important; }
.muted { color: var(--ink-soft); }
.pill-info { background:#fff; border-radius:999px; padding:8px 16px; font-weight:800; box-shadow:var(--soft-shadow); }
.big-num { font-size: 3rem; font-weight: 900; }

/* toast sauvegarde/info */
.toast {
  position: fixed; left:50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color:#fff; padding:12px 22px; border-radius:999px;
  font-weight:700; z-index:80; box-shadow: var(--soft-shadow); opacity:0; transition:opacity 0.25s;
}
.toast.show { opacity: 1; }

/* scrollbar discrète */
.screen::-webkit-scrollbar { width: 10px; }
.screen::-webkit-scrollbar-thumb { background: #cfd8d6; border-radius: 999px; }

/* ===== Animations pédagogiques (principes : easing, cascade, squash & stretch, retour "juteux") ===== */
/* Entrée en douceur avec léger rebond (ease-out) */
@keyframes enter-pop { from { opacity:0; transform: translateY(16px) scale(0.95); } to { opacity:1; transform: none; } }
.enter { animation: enter-pop 0.42s cubic-bezier(.2,.8,.25,1) both; }

/* Bonne réponse : squash puis stretch puis retour */
@keyframes celebrate { 0%{transform:scale(1)} 25%{transform:scale(0.9)} 55%{transform:scale(1.14)} 100%{transform:scale(1)} }

/* Étoile/emoji qui s'envole pour féliciter (feedback positif immédiat) */
@keyframes float-up { 0%{opacity:0; transform:translateY(0) scale(0.5) rotate(-10deg)} 15%{opacity:1} 100%{opacity:0; transform:translateY(-130px) scale(1.5) rotate(10deg)} }
.float-emoji { position:fixed; z-index:60; pointer-events:none; font-size:2.6rem; animation: float-up 1s ease-out forwards; }

/* Respecte la préférence système "moins d'animations" */
@media (prefers-reduced-motion: reduce) {
  .enter, .opt.correct, .mascot.talk, .mascot.dance, .mascot.bounce, .float-emoji { animation: none !important; }
}

/* ===== Éléments ajoutés pour les leçons enrichies et la Période 2 ===== */
/* Encadré "À retenir" */
.retenir { background:#fff6df; border:3px solid var(--amber); border-radius:20px; padding:14px 20px; text-align:left; }
.retenir-title { font-weight:800; color:var(--amber-dark); margin-bottom:8px; font-size:1.15rem; }
.lesson-visual { font-size:1.2rem; line-height:1.6; }
.ex-son { display:inline-flex; align-items:center; gap:8px; background:#fff; border-radius:999px; padding:8px 16px; margin:6px; font-weight:800; box-shadow:var(--soft-shadow); }
.ex-son b { color:var(--teal); font-size:1.3rem; }

/* Centaine (plaque de 100) pour les nombres jusqu'à 1000 */
.centaines { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; max-width:240px; min-height:70px; }
.centaine { width:62px; height:62px; background:var(--purple); border-radius:8px; box-shadow:var(--soft-shadow);
  background-image: repeating-linear-gradient(#ffffff55 0 2px, transparent 2px 8px), repeating-linear-gradient(90deg,#ffffff55 0 2px, transparent 2px 8px);
  animation:pop .25s ease; }

/* Droite graduée */
.numline-wrap { padding: 10px 6px 24px; overflow-x:auto; }
.numline { position:relative; height:96px; margin:0 auto; }
.numline .axis { position:absolute; top:46px; left:0; right:0; height:6px; background:var(--ink-soft); border-radius:3px; }
.numline .tick { position:absolute; top:34px; width:4px; height:28px; background:var(--ink-soft); transform:translateX(-2px); }
.numline .tickbtn { position:absolute; top:58px; transform:translateX(-50%); min-height:46px; padding:6px 12px; font-size:1rem; }
.numline .ticklbl { position:absolute; top:6px; transform:translateX(-50%); font-weight:800; font-size:1rem; color:var(--ink-soft); }
.numline .marker { position:absolute; top:2px; transform:translateX(-50%); font-size:1.8rem; animation:pop .4s ease; }

/* Dictée : mot tapé + clavier de lettres */
.dictee-word { font-size:2.4rem; font-weight:900; letter-spacing:4px; text-align:center; min-height:1.4em;
  background:#fff; border-radius:16px; padding:12px; margin:0 auto 14px; max-width:520px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.06); }
.letterpad { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; max-width:680px; margin:0 auto; }
.letterpad button { min-width:54px; min-height:56px; font-size:1.3rem; padding:0 6px; }

/* Ranger dans l'ordre */
.ranger-seq { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; min-height:72px; align-items:center;
  background:#fff; border-radius:16px; padding:12px; margin:0 auto 14px; max-width:640px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.06); }
.ranger-pool { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }
.ranger-slot { font-size:1.6rem; font-weight:800; padding:10px 18px; border-radius:14px; background:#e7f6f3; color:var(--teal); }

/* Carte de lecture (compréhension de texte) */
.passage { background:#fff; border-radius:20px; padding:16px 20px; box-shadow:var(--soft-shadow); margin-bottom:14px;
  font-size:1.3rem; line-height:1.7; text-align:left; }
.passage .passage-head { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.passage .passage-head b { color:var(--teal); }

/* ===== Période 3 : horloge, règle, monnaie, groupes, fluence ===== */
.clock-svg { width: 160px; height: 160px; }
.ruler-svg { width: 100%; max-width: 440px; height: auto; }

/* Monnaie franc CFA */
.coin-palette, .purse { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.purse { min-height:76px; background:#fff; border-radius:16px; padding:12px; margin:8px auto 8px; max-width:660px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.06); align-items:center; }
.coin { width:74px; height:74px; border-radius:50%; color:#fff; display:flex; flex-direction:column;
  align-items:center; justify-content:center; font-weight:900; border:3px solid rgba(255,255,255,0.65);
  box-shadow:var(--soft-shadow); padding:0; }
.coin.bill { width:96px; height:62px; border-radius:12px; }
.coin .coin-val { font-size:1.25rem; line-height:1; }
.coin .coin-f { font-size:0.8rem; opacity:0.9; }

/* Groupes (sens de la multiplication) */
.groupes { display:flex; flex-wrap:wrap; gap:14px; justify-content:center; margin:14px 0; }
.groupe { border:3px dashed var(--teal); border-radius:16px; padding:10px 12px; display:flex; gap:4px; background:#fff; }

/* Fluence : texte à lire */
.fluence-text { font-size:1.5rem; line-height:1.85; background:#fff; border-radius:20px; padding:18px 24px;
  box-shadow:var(--soft-shadow); margin:10px auto; max-width:740px; text-align:left; }

/* ===== Période 4 : fractions + symétrie ===== */
.frac-svg { width:120px; height:120px; margin:6px; }

/* Quadrillage de symétrie */
.symgrid { display:grid; gap:4px; width:min(88vw,320px); margin:14px auto; background:#e8efed; padding:6px; border-radius:14px; }
.symcell { aspect-ratio:1/1; background:#fff; border-radius:8px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.06); }
.symcell.model { background:var(--ink-soft); }
.symcell.tappable { cursor:pointer; background:#fdfdfd; }
.symcell.tappable:active { transform:scale(0.92); }
.symcell.on { background:var(--teal); animation:pop .2s ease; }
.symcell.axis { box-shadow: inset 3px 0 0 var(--amber), inset 0 1px 3px rgba(0,0,0,0.06); }

/* ===== Période 5 : graphiques + diplôme ===== */
.chart-svg { width:min(90vw,340px); height:auto; }
.diploma {
  background: linear-gradient(160deg,#FFF8EC,#FFE9BE);
  border:4px solid var(--amber); border-radius:24px; padding:22px; max-width:560px; margin:0 auto;
  box-shadow: var(--soft-shadow);
}
.diploma h2 { color: var(--amber-dark); margin:6px 0; font-size:1.8rem; }
.diploma .seal { font-size:3.4rem; }
