/* ================================================================
   Clé de Sol – Les Sonimaux
   ================================================================ */
:root {
  --fond: #EFE9FF;
  --carte: #FFFFFF;
  --ombre: #D5C9F5;
  --texte: #2B1B5A;
  --doux: #5A4A8A;
  --violet: #6A3FE0;
  --violet-fonce: #3E1FA0;
  --violet-clair: #E2D9FF;
  --lavande: #EEE8FF;
  --peche: #FFE3C7;
  --peche-ombre: #F0B98A;
  --peche-texte: #6B3A10;
  --orange-vif: #E07B1A;
  --jaune: #FFC83D;
  --jaune-fonce: #C9951A;
  --vert: #1E7A60;
  --vert-fonce: #11523F;
  --baie: #E8456B;
  --orange-texte: #9A3412;
  --orange-clair: #FFEDD5;
  --orange-bord: #F59E0B;
  --nuit: #2B1B5A;
  --titre: "Fredoka", "Nunito", sans-serif;
  --ecriture: "Andika", "Nunito", sans-serif;
  --haut: max(20px, env(safe-area-inset-top));
  --bas: env(safe-area-inset-bottom);
}

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

html, body { margin: 0; background: var(--fond); }
body {
  min-height: 100dvh;
  color: var(--texte);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 16px;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--jaune);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
h1, h2 { font-family: var(--titre); font-weight: 600; margin: 0; }

/* ----- Écrans ----- */
.ecran {
  display: none;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: var(--haut) 16px calc(24px + var(--bas));
}
.ecran.actif { display: flex; }
.ecran.avec-nav { padding-bottom: calc(104px + var(--bas)); }
.ressort { flex: 1; }
.centre { text-align: center; align-items: center; }
.zone { display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* ----- Boutons ----- */
.btn {
  min-height: 60px;
  border: none;
  border-radius: 20px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--titre);
  font-size: 22px;
  font-weight: 600;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translateY(3px); }
.btn:disabled { opacity: 0.55; box-shadow: none; transform: none; cursor: default; }
.btn-violet { background: var(--violet); color: #fff; box-shadow: 0 5px 0 var(--violet-fonce); }
.btn-violet:active { box-shadow: 0 2px 0 var(--violet-fonce); }
.btn-jaune { background: var(--jaune); color: var(--texte); box-shadow: 0 5px 0 var(--jaune-fonce); }
.btn-jaune:active { box-shadow: 0 2px 0 var(--jaune-fonce); }
.btn-vert { background: var(--vert); color: #fff; box-shadow: 0 5px 0 var(--vert-fonce); }
.btn-vert:active { box-shadow: 0 2px 0 var(--vert-fonce); }
.btn-contour {
  min-height: 48px;
  background: var(--carte);
  box-shadow: 0 4px 0 var(--ombre);
  border-radius: 16px;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 800;
}
.btn-contour svg { color: var(--violet); }
.btn-carre {
  width: 48px; height: 48px; flex: none;
  border-radius: 16px;
  border: none;
  background: var(--carte);
  display: flex; align-items: center; justify-content: center;
}
.btn-carre.grand { width: 64px; height: 64px; border-radius: 22px; box-shadow: 0 5px 0 var(--ombre); }
.btn-lien { background: none; border: none; color: var(--doux); text-decoration: underline; font-weight: 700; padding: 12px 0; min-height: 44px; }

/* ----- Textes communs ----- */
.titre-page { font-size: 28px; line-height: 1.1; }
.sous-titre { margin: -6px 0 0; color: var(--doux); font-weight: 700; line-height: 1.4; }
.sous-titre-libre { margin: 4px 0 0; color: var(--doux); font-weight: 700; line-height: 1.4; }
.titre-section { font-size: 20px; }
.titre-ligne { display: flex; align-items: baseline; justify-content: space-between; }
.titre-ligne span { font-size: 14px; font-weight: 800; color: var(--doux); }
.note { margin: 0; color: var(--doux); font-weight: 700; font-size: 15px; }
.texte-fort { font-size: 15px; font-weight: 700; }
.surtitre { display: block; font-size: 13px; font-weight: 800; color: var(--vert); text-transform: uppercase; letter-spacing: 0.06em; }

.carte-blanche {
  background: var(--carte);
  border-radius: 24px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 5px 0 var(--ombre);
}
.carte-blanche h2 { font-size: 20px; }

/* ----- Ménagerie (accueil) ----- */
.entete { display: flex; align-items: center; gap: 10px; }
.entete-texte { display: flex; flex-direction: column; flex: 1; }
.entete-texte .petit { font-size: 14px; font-weight: 700; color: var(--doux); }
.entete-texte h1 { font-size: 28px; line-height: 1.05; }
.compteur-baies {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border-radius: 999px; padding: 6px 12px 6px 8px;
}
.compteur-baies b { font-family: var(--titre); font-size: 18px; }

.carte-vedette {
  background: var(--peche);
  border-radius: 30px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 6px 0 var(--peche-ombre);
}
.vedette-haut { display: flex; align-items: center; gap: 12px; }
.vedette-rond {
  width: 132px; height: 132px; flex: none; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.vedette-texte { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pastille-son {
  align-self: flex-start;
  background: #fff; border-radius: 999px; padding: 3px 10px;
  font-family: var(--titre); font-weight: 700; font-size: 16px;
}
.vedette-titre { font-family: var(--titre); font-size: 24px; font-weight: 600; line-height: 1.1; }
.vedette-info { font-size: 15px; font-weight: 700; color: var(--peche-texte); }
.croissance { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--peche-texte); }
.croissance-barre { flex: 1; height: 14px; border-radius: 7px; background: #fff; position: relative; }
.croissance-plein { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; background: var(--orange-vif); transition: width 0.6s; }
.croissance-repere { position: absolute; top: -3px; width: 4px; height: 20px; border-radius: 2px; background: var(--peche-texte); }

.grille-sonimaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sonimal {
  border: 3px solid transparent;
  background: #fff;
  border-radius: 22px;
  padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 4px 0 var(--ombre);
  min-height: 112px;
}
.sonimal:active { transform: translateY(2px); }
.sonimal.vedette { border-color: var(--orange-vif); }
.sonimal.inconnu { background: transparent; border: 2px dashed #B3A4E0; box-shadow: none; }
.sonimal-nom { font-family: var(--titre); font-weight: 600; font-size: 16px; }
.sonimal-info { font-size: 12px; font-weight: 800; color: var(--doux); text-align: center; }

/* Tuiles des autres dictées (thèmes, dictées des parents) et du premier lancement */
.grille-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#autres-dictees { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.theme {
  border: 3px solid transparent;
  background: var(--carte);
  border-radius: 22px;
  padding: 12px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-align: left;
  min-height: 104px;
  box-shadow: 0 4px 0 var(--ombre);
  position: relative;
}
.theme:active { transform: translateY(2px); }
.theme-ico {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.theme-nom { font-family: var(--titre); font-size: 18px; font-weight: 600; line-height: 1.15; }
.theme-bas { display: flex; align-items: center; gap: 4px; }
.theme-bas svg { fill: var(--ombre); }
.theme-bas svg.pleine { fill: var(--jaune); stroke: #B7791F; stroke-width: 1.6; }

.alerte { background: var(--orange-clair); color: var(--orange-texte); border-radius: 16px; padding: 12px 16px; font-weight: 700; margin: 0; }

/* ----- Barre du bas ----- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(84px + var(--bas));
  padding: 8px 4px var(--bas);
  background: #fff;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -4px 20px rgba(43, 27, 90, 0.08);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center;
  z-index: 10;
}
.nav button {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 60px;
  color: var(--doux); font-size: 13px; font-weight: 700;
}
.nav-ico { width: 52px; height: 34px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.nav button.actif { color: var(--texte); font-weight: 800; }
.nav button.actif .nav-ico { background: var(--violet-clair); }

/* ----- Mes mots ----- */
.liste-mots { display: flex; flex-direction: column; gap: 8px; }
.ligne-mot {
  display: flex; align-items: center; gap: 10px;
  background: var(--lavande);
  border-radius: 16px;
  padding: 8px 8px 8px 12px;
}
#ecran-mots .ligne-mot { background: var(--carte); box-shadow: 0 4px 0 var(--ombre); }
.ligne-mot .mot { flex: 1; font-family: var(--ecriture); font-size: 21px; font-weight: 700; }
.ligne-mot .info { font-size: 13px; font-weight: 700; color: var(--doux); text-decoration: line-through; }
.ligne-mot .btn-carre { width: 44px; height: 44px; border-radius: 12px; color: var(--violet); background: var(--lavande); }
#ecran-mots .ligne-mot .btn-carre, .recap .ligne-mot .btn-carre { background: #fff; }
.vide { color: var(--doux); font-weight: 700; text-align: center; padding: 24px 0; margin: 0; }

/* ----- Bulles de dialogue ----- */
.bulle-dialogue {
  position: absolute; left: 16px; top: 16px;
  max-width: 60%;
  background: #fff;
  border-radius: 20px 20px 20px 6px;
  padding: 10px 14px;
  box-shadow: 0 3px 0 var(--peche-ombre);
  display: flex; flex-direction: column;
  z-index: 2;
}
.bulle-dialogue b { font-family: var(--titre); font-size: 24px; font-weight: 700; line-height: 1.1; }
.bulle-dialogue span { font-size: 14px; font-weight: 700; color: var(--peche-texte); }
.bulle-droite { left: auto; right: 14px; top: 14px; max-width: 150px; border-radius: 20px 20px 6px 20px; box-shadow: none; }
.bulle-droite b { font-size: 20px; }
.bulle-droite span { color: var(--doux); font-size: 13px; }

/* ----- Dictée ----- */
.barre-haut { display: flex; align-items: center; gap: 12px; }
.progres { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.progres span { font-size: 13px; font-weight: 800; }
.segments { display: flex; gap: 4px; }
.segments i { flex: 1; height: 16px; border-radius: 8px; background: #fff; }
.segments i.juste { background: var(--baie); }
.segments i.rate { background: var(--ombre); }
.segments i.encours { background: #fff; box-shadow: inset 0 0 0 3px var(--jaune); }

.scene {
  position: relative;
  height: 172px;
  border-radius: 30px;
  background: var(--peche);
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding-right: 18px;
  overflow: hidden;
  flex: none;
  transition: height 0.3s;
}
.scene.correction { height: 230px; justify-content: center; padding-right: 0; }
.scene-creature svg { display: block; width: 148px; height: 148px; transition: width 0.3s, height 0.3s; }
.scene.correction .scene-creature svg { width: 196px; height: 196px; }
.scene-creature.content { animation: saute 0.6s ease-out; }
.scene-creature.triste { animation: secoue 0.5s ease-in-out; }
.scene-creature.evolue { animation: evolue 0.9s ease-out; }
@keyframes saute { 30% { transform: translateY(-18px) scale(1.04, 0.96); } 60% { transform: translateY(0) scale(0.96, 1.04); } }
@keyframes secoue { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes evolue { 0% { transform: scale(0.6); filter: brightness(1.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

.baie-vole { position: absolute; right: 56px; top: 40px; opacity: 0; pointer-events: none; }
.baie-vole.vole { animation: vole 0.9s ease-in forwards; }
@keyframes vole {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  70% { opacity: 1; transform: translate(-60px, 90px) scale(0.8); }
  100% { opacity: 0; transform: translate(-70px, 110px) scale(0.3); }
}

.ecoute-ligne { display: flex; align-items: center; gap: 14px; }
.btn-ecouter {
  width: 104px; height: 104px; flex: none; border-radius: 50%;
  border: 8px solid var(--violet-clair);
  background: var(--violet); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 var(--violet-fonce);
  transition: transform 0.08s;
}
.btn-ecouter:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--violet-fonce); }
.btn-ecouter.parle { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { border-color: var(--jaune); } }
.ecoute-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ecoute-texte { font-family: var(--titre); font-size: 22px; font-weight: 600; }

.cahier {
  background: var(--carte);
  border-radius: 24px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 5px 0 var(--ombre);
}
.consigne { font-size: 15px; font-weight: 800; color: var(--doux); display: flex; align-items: center; gap: 8px; }
#saisie {
  width: 100%; height: 88px;
  border: none; border-radius: 12px;
  padding: 0 16px 6px;
  font-family: var(--ecriture); font-size: 42px; font-weight: 700;
  text-align: center;
  background-color: #fff;
  /* Grands carreaux : une ligne d'écriture plus marquée */
  background-image:
    linear-gradient(to bottom, transparent 63px, #B3A4E0 63px, #B3A4E0 65px, transparent 65px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 21px, var(--lavande) 21px, var(--lavande) 22px);
}

.accents { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.accents button {
  height: 46px;
  border-radius: 14px;
  border: none;
  background: #fff;
  box-shadow: 0 4px 0 var(--ombre);
  font-family: var(--ecriture); font-size: 22px; font-weight: 700;
}
.accents button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ombre); }

/* ----- Correction ----- */
.tu-as-ecrit { margin: 0; font-size: 16px; font-weight: 700; color: var(--doux); }
.tu-as-ecrit s { font-family: var(--ecriture); font-size: 22px; color: var(--orange-texte); margin-left: 6px; }
.lettres { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-bottom: 4px; }
.lettre {
  flex: 0 1 46px; min-width: 26px; height: 58px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ecriture); font-size: 32px; font-weight: 700;
  animation: pop 0.3s backwards;
}
.lettre.ok { background: var(--lavande); box-shadow: 0 4px 0 #B3A4E0; }
.lettre.son { background: var(--peche); box-shadow: 0 4px 0 var(--orange-vif); }
.lettre.faux { background: var(--orange-clair); color: var(--orange-texte); border: 2px dashed var(--orange-bord); box-shadow: none; }
.lettre.espace { flex-basis: 14px; min-width: 14px; background: none; box-shadow: none; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.15); } }
.note-son { margin: 0; font-size: 15px; font-weight: 700; color: var(--doux); }
.note-son b { color: var(--peche-texte); background: var(--peche); border-radius: 6px; padding: 0 5px; }

.astuce { background: var(--violet-clair); border-radius: 22px; padding: 14px; display: flex; gap: 12px; }
.astuce-ico {
  width: 44px; height: 44px; flex: none; border-radius: 14px;
  background: var(--violet); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.astuce b { font-family: var(--titre); font-size: 19px; font-weight: 600; }
.astuce p { margin: 4px 0 0; font-size: 16px; line-height: 1.45; font-weight: 600; }
.astuce em { font-style: normal; font-weight: 800; color: var(--orange-texte); }

.bande-baies {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 20px; padding: 12px 14px;
  font-size: 15px; font-weight: 700;
}
.bande-baies svg { flex: none; }

.ligne-boutons { display: flex; gap: 12px; }
.ligne-boutons .btn { flex: 1; min-height: 64px; }

/* ----- Résultat ----- */
.resultat-haut { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 12px; }
.resultat-rond {
  width: 176px; height: 176px; border-radius: 50%;
  background: var(--peche);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 0 var(--peche-ombre);
  overflow: hidden;
}
.resultat-rond > svg { width: 150px; height: 150px; }
.resultat-rond.nuit { background: var(--nuit); box-shadow: 0 6px 0 #170C38; }
.resultat-rond.nuit > svg { width: 168px; height: 140px; margin-top: 20px; }
.etoiles-fin { display: flex; gap: 4px; margin-top: 8px; }
.etoiles-fin svg { width: 40px; height: 40px; fill: var(--ombre); animation: pop 0.5s backwards; }
.etoiles-fin svg:nth-child(2) { animation-delay: 0.2s; }
.etoiles-fin svg:nth-child(3) { animation-delay: 0.4s; }
.etoiles-fin svg.pleine { fill: var(--jaune); stroke: var(--jaune-fonce); stroke-width: 1.2; }
.resultat-haut h1 { font-size: 34px; line-height: 1.05; }
.resultat-haut p { margin: 0; font-size: 17px; font-weight: 700; color: var(--doux); }

.stats-fin { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats-fin div {
  background: #fff; border-radius: 20px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 4px 0 var(--ombre);
}
.stats-fin b { font-family: var(--titre); font-size: 28px; font-weight: 600; }
.stats-fin span { font-size: 13px; font-weight: 700; color: var(--doux); text-align: center; }
.c-vert { color: var(--vert); }
.c-orange { color: #C2410C; }
.c-baie { color: #B0244A; }
.recap-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.recap-tete span { font-size: 13px; font-weight: 700; color: var(--doux); }
.boutons-fin { display: flex; flex-direction: column; gap: 12px; }

/* ----- Le Dictéerosaure ----- */
.scene-nuit {
  position: relative;
  height: 300px;
  border-radius: 30px;
  background: var(--nuit);
  overflow: hidden;
  flex: none;
}
.nuit-decor { position: absolute; inset: 0; width: 100%; height: 100%; }
.dino {
  position: absolute; left: 8px; bottom: 18px;
  width: 300px; height: 250px;
  transform-origin: 15% 100%;
  transition: transform 0.8s;
}
.dino svg { width: 100%; height: 100%; display: block; }
.badge-taille {
  position: absolute; left: 14px; top: 14px;
  background: var(--jaune); color: var(--texte);
  border-radius: 999px; padding: 4px 12px;
  font-family: var(--titre); font-size: 16px; font-weight: 700;
}
.semaine { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.jour { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--doux); }
.jour i { width: 38px; height: 38px; border-radius: 50%; background: var(--lavande); display: flex; align-items: center; justify-content: center; color: #fff; }
.jour.fait i { background: #38C9A0; }
.jour.aujourdhui { color: var(--vert); }
.jour.aujourdhui:not(.fait) i { background: transparent; border: 3px dashed #38C9A0; }
.carte-grande .note { display: block; margin-top: 2px; }

/* ----- Bienvenue (premier lancement) ----- */
.etape { gap: 18px; }
.bienvenue-haut { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-top: 24px; }
.bienvenue-oeuf {
  width: 140px; height: 140px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 0 var(--ombre);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
  animation: berce 2.4s ease-in-out infinite;
}
@keyframes berce { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.bienvenue-haut h1 { font-size: 36px; }
.bienvenue-haut p { margin: 0; font-size: 18px; font-weight: 700; color: var(--doux); }
.champ-prenom {
  width: 100%; height: 72px;
  border: 2px solid var(--ombre); border-radius: 16px;
  padding: 0 16px;
  font-family: var(--ecriture); font-size: 32px; font-weight: 700; text-align: center;
  background: #fff;
}
.champ-prenom::placeholder { color: #A99DCB; font-weight: 400; }
.etape-num { font-size: 14px; font-weight: 800; color: var(--doux); }
#choix-themes { display: flex; flex-direction: column; gap: 12px; }
.theme[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-clair); }
.theme .coche {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--ombre); background: #fff; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.theme[aria-pressed="true"] .coche { background: var(--violet); border-color: var(--violet); }
.bas-collant {
  position: sticky; bottom: 0;
  padding: 12px 0 calc(4px + var(--bas));
  background: linear-gradient(to bottom, rgba(239, 233, 255, 0), var(--fond) 30%);
}
.bas-collant .btn { width: 100%; }

/* ----- Parents ----- */
.reglage { display: flex; align-items: center; gap: 12px; font-weight: 700; flex-wrap: wrap; }
.reglage input[type=range] { flex: 1; accent-color: var(--violet); min-height: 44px; }
.reglage-col { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.reglage-col input, .reglage-col select, #form-dictee input, #form-dictee textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--ombre);
  border-radius: 14px;
  background: #fff;
  font-size: 17px;
}
#form-dictee { display: flex; flex-direction: column; gap: 10px; }
.ligne-form { display: flex; gap: 8px; }
#form-dictee .champ-emoji { width: 64px; flex: none; text-align: center; }
#form-dictee textarea { resize: vertical; font-family: var(--ecriture); }
.ligne-perso { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-weight: 700; }
.ligne-perso .btn-carre { color: #C2410C; background: var(--lavande); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ----- Réinitialisation (espace parents) ----- */
.btn-danger { color: #B42318; }
.btn-rouge { background: #B42318; color: #fff; box-shadow: 0 5px 0 #7A1A12; flex: 1; }
.btn-rouge:active { box-shadow: 0 2px 0 #7A1A12; }
.form-reinit { display: flex; flex-direction: column; gap: 10px; }
.form-reinit .ligne-form .btn { flex: 1; min-height: 52px; font-size: 18px; }
.champ-code { font-size: 28px !important; letter-spacing: 0.4em; text-align: center; font-family: var(--ecriture); }
.erreur { margin: 0; color: #B42318; font-weight: 800; }

/* ----- Le Dictéerosaure dans la scène de dictée ----- */
.scene.avec-dino, .scene.avec-dino.correction { background: var(--nuit); justify-content: flex-start; padding: 0 0 0 6px; }
.scene.avec-dino .scene-creature svg { width: 200px; height: 166px; }
.scene.avec-dino.correction .scene-creature svg { width: 250px; height: 208px; }
.scene.avec-dino .bulle-dialogue { left: auto; right: 14px; max-width: 46%; border-radius: 20px 20px 6px 20px; box-shadow: none; }
.scene.avec-dino .bulle-dialogue span { color: var(--doux); }
