/* Jeux : « Les mots qui ne changent jamais de costume » (#mots-costume)
   et « Les mots en -amment ou -emment » (#adverbes-amment) — Pédagogie explicite (14/11/2026) */

.mots-costume__jeu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espace-3);
  width: 100%;
}

/* ---------- Repères d'étape (2 temps limpides) ---------- */

.mots-costume__etapes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--espace-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mots-costume__etape-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--encre-2);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--trait);
}

.mots-costume__etape-pill.est-active {
  background: var(--accent);
  color: var(--sur-accent);
  box-shadow: none;
}

.mots-costume__etape-pill.est-faite {
  background: var(--fn-juste);
  color: var(--fn-juste-texte);
  box-shadow: inset 0 0 0 2px var(--fn-juste-texte);
}

.mots-costume__etape-num {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  font-size: 0.85rem;
  font-weight: 800;
}

.mots-costume__aide {
  max-width: 36rem;
  min-height: 1.5em;
  margin: 0;
  color: var(--encre-2);
  font-weight: 700;
  text-align: center;
}

.mots-costume__carte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espace-4);
  width: 100%;
  max-width: 40rem;
  padding: var(--espace-5) var(--espace-4);
  border-radius: var(--rayon-grand);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--ombre), inset 0 0 0 2px var(--trait);
}

/* ---------- Temps 1 : Le mot modèle en grandes tuiles et son explication ---------- */

.mots-costume__entete-mot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--espace-3);
  max-width: 100%;
}

.mots-costume__vitrine {
  position: relative;
  max-width: 100%;
  padding: var(--espace-3);
  border-radius: var(--rayon);
}

.mots-costume__mot {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(0.15rem, 0.8vw, 0.4rem);
}

.mots-costume__lettre {
  --taille: clamp(2.1rem, 1.3rem + 3vw, 3.4rem);
  min-width: calc(var(--taille) * 0.85);
  padding: 0 0.2em;
}

/* Les lettres particulières ou muettes, allumées dès l'arrivée : jaune surligné */
.mots-costume__lettre.tuile--allumee {
  background: var(--fn-piege);
  color: var(--fn-piege-texte);
  box-shadow: inset 0 -6px 0 var(--bois-flanc), 0 0 0 4px var(--fn-piege), 0 0 0 6px var(--fn-piege-texte);
}

.mots-costume__espace {
  width: 0.9rem;
}

.mots-costume__rideau {
  position: absolute;
  inset: 0;
  border-radius: var(--rayon);
  background: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--encre) 18px 22px);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 360ms ease;
}

.mots-costume__vitrine.est-cache .mots-costume__rideau {
  transform: scaleY(1);
}

.mots-costume__raisons {
  display: grid;
  gap: var(--espace-2);
  width: 100%;
  padding: var(--espace-3) var(--espace-4);
  border-radius: var(--rayon);
  background: var(--surface-2);
  text-align: center;
}

.mots-costume__formule {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 auto 0.2rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #fbf6ec;
  border: 2px solid #f59e0b;
  color: #78350f;
  font-size: 0.96rem;
}

.mots-costume__formule .bouton-voix {
  background: #ebe0c9;
  color: #1e293b;
  box-shadow: inset 0 0 0 2px #cbbba0;
}

.mots-costume__formule-badge {
  font-weight: 700;
}

.mots-costume__formule-texte {
  font-weight: 800;
  color: #78350f;
}

.mots-costume__cintre.est-actuel {
  box-shadow: 0 0 0 3px var(--accent);
}

.mots-costume__raison {
  margin: 0;
  font-size: var(--t-texte);
  font-weight: 700;
}

.mots-costume__raison .bouton-voix {
  vertical-align: middle;
  margin-block: -0.5rem;
}

.mots-costume__note {
  color: var(--encre-2);
}

/* ---------- Encart comparatif des 2 phrases affichées ensemble ---------- */

.mots-costume__comparatif {
  display: grid;
  gap: var(--espace-3);
  width: 100%;
  padding: var(--espace-4);
  border-radius: var(--rayon);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--trait);
}

.mots-costume__comparatif-intro {
  margin: 0;
  color: var(--encre-2);
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
}

.mots-costume__ligne-comparative {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--espace-3);
  padding: var(--espace-2) var(--espace-3);
  border-radius: var(--rayon);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--trait);
}

.mots-costume__etiquette-comparative {
  min-width: 5.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--encre-2);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.mots-costume__phrase {
  margin: 0;
  min-width: 0;
  font-size: var(--t-grand);
  font-weight: 700;
  line-height: 1.55;
}

.mots-costume__phrase--comparative {
  text-align: left;
}

.mots-costume__mot-fixe {
  display: inline-block;
  padding: 0.05em 0.35em;
  border-radius: 6px;
  background: var(--fn-piege);
  color: var(--fn-piege-texte);
  box-shadow: inset 0 0 0 2px var(--fn-piege-texte);
  font-weight: 800;
}

.mots-costume__mot-change {
  display: inline-block;
  padding: 0.02em 0.28em;
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--fn-change);
}

.mots-costume__actions .est-indique {
  animation: mots-costume-appel 1100ms ease-in-out infinite;
}

@keyframes mots-costume-appel {
  0%, 100% { transform: none; }
  50% { transform: scale(1.04); }
}

/* ---------- Illustration mnémotechnique (ex. la montgolfière de TOUJOURS) & Récompense d'envol ---------- */

.mots-costume__illustration {
  margin: 0;
  width: 100%;
  max-width: 28rem;
  padding: 0.75rem;
  border-radius: 18px;
  background: #f5ebd8;
  color: #1e293b;
  box-shadow: inset 0 0 0 2px #d8cbb3, 0 4px 12px rgba(0, 0, 0, 0.12);
  text-align: center;
  overflow: hidden;
  transition: background 500ms ease, box-shadow 500ms ease;
}

.mots-costume__illustration .bouton-voix {
  color: #1e293b;
  background: #ebe0c9;
  border: 1.5px solid #cbbba0;
}

.mots-costume__ciel-scene {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.mots-costume__nuage,
.mots-costume__oiseaux {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  font-size: 1.5rem;
}

.mots-costume__nuage--1 { top: 10%; left: -15%; }
.mots-costume__nuage--2 { top: 24%; right: -15%; font-size: 1.8rem; }
.mots-costume__oiseaux { top: 8%; left: 50%; transform: translateX(-50%); font-size: 1.25rem; }

.mots-costume__illustration-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  transform-origin: center bottom;
}

.mots-costume__illustration-legende {
  margin-top: 0.5rem;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.38;
  color: #1e293b;
}

/* Récompense quand l'enfant a réussi à écrire le mot : la montgolfière décolle et part en voyage ! */
.mots-costume__illustration.est-en-voyage {
  background: linear-gradient(180deg, #e0f2fe 0%, #fef9c3 60%, #f5ebd8 100%);
  color: #1e293b;
  box-shadow: 0 0 0 3px #10b981, 0 0 0 6px rgba(250, 204, 21, 0.55), 0 12px 28px rgba(16, 185, 129, 0.22);
}

.mots-costume__illustration.est-en-voyage .mots-costume__illustration-img {
  animation: mots-costume-envol-nacelle 3.6s ease-in-out infinite;
}

.mots-costume__illustration.est-en-voyage .mots-costume__nuage--1 {
  animation: mots-costume-nuage-droite 5.5s linear infinite;
}

.mots-costume__illustration.est-en-voyage .mots-costume__nuage--2 {
  animation: mots-costume-nuage-gauche 6.5s linear infinite;
}

.mots-costume__illustration.est-en-voyage .mots-costume__oiseaux {
  opacity: 1;
  animation: mots-costume-scintille 1.8s ease-in-out infinite;
}

.mots-costume__illustration.est-en-voyage .mots-costume__illustration-legende {
  color: #065f46;
  background: #ecfdf5;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1.5px solid #10b981;
}

@keyframes mots-costume-envol-nacelle {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25% { transform: translateY(-9px) rotate(-1.6deg) scale(1.02); }
  55% { transform: translateY(-14px) rotate(1.4deg) scale(1.03); }
  80% { transform: translateY(-6px) rotate(-0.8deg) scale(1.01); }
}

@keyframes mots-costume-nuage-droite {
  0% { left: -12%; opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { left: 105%; opacity: 0; }
}

@keyframes mots-costume-nuage-gauche {
  0% { right: -12%; opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { right: 105%; opacity: 0; }
}

@keyframes mots-costume-scintille {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.14); }
}

/* ---------- Temps 2 : Écrire de mémoire ---------- */

/* Pendant qu'on écrit, le mot ne se lit nulle part : ni dans les phrases, ni dans les raisons, ni dans l'illustration */
.mots-costume__carte.est-en-ecriture .mots-costume__costume,
.mots-costume__carte.est-en-ecriture .mots-costume__raisons,
.mots-costume__carte.est-en-ecriture .mots-costume__illustration {
  display: none;
}

.mots-costume__carte.est-bravo {
  box-shadow: 0 0 0 4px #1f9d55, 0 8px 24px rgba(31, 157, 85, 0.25);
}

.mots-costume__ecrire {
  display: grid;
  justify-items: center;
  gap: var(--espace-4);
  width: 100%;
}

.mots-costume__cases-ecrire {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: clamp(0.15rem, 0.8vw, 0.35rem);
  max-width: 100%;
  transition: gap 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.mots-costume__cases-ecrire.est-complet {
  gap: 0;
  padding: 0.35rem;
  border-radius: 14px;
  background: #ecfdf3;
  color: #0f3d23;
  box-shadow: 0 0 0 4px #1f9d55, 0 0 0 7px rgba(250, 204, 21, 0.65);
  animation: mots-costume-victoire 560ms cubic-bezier(0.2, 0.9, 0.3, 1.35);
}

@keyframes mots-costume-victoire {
  0% { transform: scale(0.88); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.mots-costume__cases-ecrire.est-complet .mots-costume__case {
  border-radius: 0;
}

.mots-costume__cases-ecrire.est-complet .mots-costume__case:first-child {
  border-radius: 8px 0 0 8px;
}

.mots-costume__cases-ecrire.est-complet .mots-costume__case:last-child {
  border-radius: 0 8px 8px 0;
}

.mots-costume__case {
  display: grid;
  place-items: center;
  width: clamp(1.9rem, 1.2rem + 2.6vw, 2.8rem);
  height: clamp(2.3rem, 1.5rem + 3vw, 3.2rem);
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--trait);
  font-size: clamp(1.3rem, 0.9rem + 1.8vw, 2rem);
  font-weight: 700;
}

.mots-costume__case--espace {
  width: 0.9rem;
  box-shadow: none;
}

.mots-costume__case.est-remplie {
  background: var(--bois);
  color: var(--bois-encre);
  box-shadow: inset 0 -4px 0 var(--bois-flanc);
}

.mots-costume__case.est-piege {
  background: var(--fn-piege);
  color: var(--fn-piege-texte);
  box-shadow: inset 0 -4px 0 var(--bois-flanc), inset 0 0 0 2px var(--fn-piege-texte);
}

.mots-costume__reserve {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--espace-2);
}

.mots-costume__piece {
  --taille: 3rem;
  position: relative;
  cursor: pointer;
}

.mots-costume__piece.tuile--allumee {
  background: var(--fn-juste);
  color: var(--fn-juste-texte);
  box-shadow: inset 0 -6px 0 var(--bois-flanc), 0 0 0 2px var(--fn-juste-texte);
}

.mots-costume__piece.tuile--allumee::after {
  content: '\2713';
  position: absolute;
  top: -0.6rem;
  right: -0.5rem;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--fn-juste);
  color: var(--fn-juste-texte);
  box-shadow: 0 0 0 2px var(--fn-juste-texte);
  font-family: var(--police-texte);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.mots-costume__piece.est-posee {
  visibility: hidden;
}

.mots-costume__reserve.est-finie {
  display: none;
}

/* ---------- Jeu indépendant #adverbes-amment : -amment ou -emment ---------- */

.mots-costume__niveaux-echafaudage {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: var(--espace-1);
}

.mots-costume__onglet-niveau {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 2px solid var(--trait);
  background: var(--surface);
  color: var(--encre-2);
  font-family: var(--police-texte);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.mots-costume__onglet-niveau.est-actif {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--sur-accent, #ffffff);
}

.mots-costume__duo-amment {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.35fr);
  align-items: center;
  gap: var(--espace-3);
  width: 100%;
}

.mots-costume__origine--explicite,
.mots-costume__cible-amment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--espace-2);
  min-height: 5.5rem;
  padding: var(--espace-3) var(--espace-4);
  border-radius: var(--rayon);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--trait);
  text-align: center;
}

.mots-costume__adjectif-ligne {
  display: inline-flex;
  align-items: center;
  gap: var(--espace-2);
}

.mots-costume__adjectif {
  margin: 0;
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
}

.mots-costume__voyelle-source {
  display: inline-block;
  padding: 0 0.08em;
  border-radius: 4px;
  transition: transform 240ms ease, background 240ms ease, color 240ms ease;
}

.mots-costume__voyelle-source.est-source-active {
  background: var(--accent);
  color: var(--sur-accent);
  transform: scale(1.16);
}

.mots-costume__fleche-amment {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.85rem;
  font-weight: 800;
  transition: transform 280ms ease;
}

.mots-costume__fleche-amment.est-active {
  transform: scale(1.25) translateX(3px);
}

/* Jeton de lettre qui se déplace physiquement de l'adjectif vers l'adverbe */
.mots-costume__jeton-volant {
  position: fixed;
  z-index: 9999;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-left: -1.15rem;
  margin-top: -1.15rem;
  border-radius: 50%;
  background: var(--accent, #5a2fc2);
  color: var(--sur-accent, #ffffff);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  font-family: var(--police-texte);
  font-size: 1.35rem;
  font-weight: 800;
  pointer-events: none;
  animation: mots-costume-vol 540ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes mots-costume-vol {
  0% {
    transform: translate(0, 0) scale(0.95);
    opacity: 1;
  }
  50% {
    transform: translate(calc(var(--dx) * 0.5), calc(var(--dy) * 0.5 - 26px)) scale(1.25);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(1);
    opacity: 0.95;
  }
}

.mots-costume__ligne-phrase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--espace-2);
  width: 100%;
}

.mots-costume__phrase--adverbe {
  font-size: clamp(1.2rem, 1rem + 1.2vw, 1.55rem);
  text-align: center;
}

.mots-costume__adverbe {
  white-space: nowrap;
  color: var(--accent);
  padding: 0 0.2em;
  border-radius: 6px;
  transition: background 320ms ease, box-shadow 320ms ease;
}

.mots-costume__adverbe.est-complet {
  background: var(--fn-juste);
  color: var(--fn-juste-texte);
  box-shadow: inset 0 0 0 2px var(--fn-juste-texte);
}

.mots-costume__trou {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: 1.3em;
  margin: 0 0.08em;
  padding: 0 0.2em;
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
  font-weight: 800;
}

.mots-costume__pose {
  display: inline-block;
  padding: 0 0.12em;
  border-radius: 4px;
  background: var(--fn-piege);
  color: var(--fn-piege-texte);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.mots-costume__fin {
  padding: 0 0.2em;
  border-radius: 5px;
  background: var(--fn-piege);
  color: var(--fn-piege-texte);
}

.mots-costume__reserve--amment {
  gap: var(--espace-3);
  width: 100%;
}

.mots-costume__piece--choix {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 12.5rem;
  height: auto;
  min-height: 4.4rem;
  padding: 0.55rem 1rem;
}

.mots-costume__choix-lettre {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
}

.mots-costume__choix-detail {
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0.9;
}

.mots-costume__bande {
  display: grid;
  gap: var(--espace-1);
  padding: var(--espace-3) var(--espace-4);
  border-radius: var(--rayon);
  background: var(--surface-2);
}

.mots-costume__bande p {
  margin: 0;
}

.mots-costume__bande-titre {
  color: var(--encre-2);
  font-weight: 700;
}

/* ---------- Bilan et vestiaire étoilé ---------- */

.mots-costume__message {
  display: grid;
  gap: var(--espace-3);
  width: 100%;
  max-width: 36rem;
  min-height: 1.5rem;
  text-align: center;
}

.mots-costume__bilan {
  margin: 0;
  font-size: var(--t-grand);
  font-weight: 700;
}

.mots-costume__bilan-carte {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  padding: 0.9rem 1.15rem;
  border-radius: 20px;
  background: #ecfdf3;
  color: #0f3d23;
  box-shadow: inset 0 0 0 3px #1f9d55, 0 6px 0 rgba(31, 157, 85, 0.22);
  animation: entrer 420ms cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

.mots-costume__bilan-etoile {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 16px;
  background: #fbf6ec;
  color: #0f3d23;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.45), 0 3px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.mots-costume__bilan-carte .bouton-voix {
  background: #d1fae5;
  color: #0f3d23;
  box-shadow: inset 0 0 0 2px #146c38;
}

.mots-costume__bilan-etoile > .icone {
  width: 2.3rem;
  height: 2.3rem;
}

.mots-costume__bilan-corps {
  flex: 1 1 13rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
}

.mots-costume__bilan-titre {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: #0f3d23;
}

.mots-costume__bilan-sous {
  margin: 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: #146c38;
}

.mots-costume__bilan-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.mots-costume__vestiaire {
  width: 100%;
  max-width: 38rem;
}

.mots-costume__vestiaire-titre {
  margin-bottom: var(--espace-2);
  color: var(--encre-2);
  font-weight: 700;
}

.mots-costume__cintres {
  display: flex;
  flex-wrap: wrap;
  gap: var(--espace-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mots-costume__cintre {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--accent);
  font-weight: 700;
}

.mots-costume__etoile {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
}

.mots-costume__etoile .icone {
  width: 100%;
  height: 100%;
}

.mots-costume__truc {
  display: flex;
  flex-direction: column;
  gap: var(--espace-4);
  width: 100%;
  max-width: 36rem;
}

/* ---------- Phrase-récompense de la semaine & Affiche à imprimer ---------- */

.mots-costume__recompense-box {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  padding: 1.15rem 1.25rem;
  border-radius: var(--rayon);
  background: #f4ead7;
  color: #1e293b;
  border: 2px solid #d97706;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
  text-align: left;
}

.mots-costume__recompense-box.est-en-vedette {
  border-width: 3px;
  background: #f5ebd8;
  color: #1e293b;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.16);
}

.mots-costume__recompense-titre {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  color: #78350f;
}

.mots-costume__recompense-sous {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: #1e293b;
}

.mots-costume__recompense-liste {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mots-costume__recompense-ligne {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.mots-costume__recompense-ligne .bouton-voix {
  color: #1e293b;
  background: #e9dec7;
  border: 1.5px solid #c8b99e;
}

.mots-costume__recompense-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 2px solid #d4c5aa;
  background: #fbf6ec;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.mots-costume__recompense-option:hover {
  border-color: #d97706;
  background: #fef3c7;
  color: #0f172a;
}

.mots-costume__recompense-option.est-choisie {
  border-color: #059669;
  background: #d1fae5;
  color: #064e3b;
  font-weight: 800;
}

.mots-costume__recompense-input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1.5px dashed #b45309;
  background: #fbf6ec;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
}

.mots-costume__recompense-input::placeholder {
  color: #57534e;
}

.mots-costume__recompense-apercu {
  margin: 0.15rem 0 0;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: #fef3c7;
  color: #78350f;
  font-size: 1rem;
  text-align: center;
}

.mots-costume__recompense-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.mots-costume__print-only {
  display: none;
}

@media print {
  body.impression-affiche-mot-costume > *:not(#mots-costume-print-affiche) {
    display: none !important;
  }
  body.impression-affiche-mot-costume #mots-costume-print-affiche {
    display: block !important;
    width: 100%;
    padding: 0;
    margin: 0;
  }
  .mc-affiche {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    padding: 8mm 10mm;
    border: 2.5px solid #f59e0b;
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
  }
  .mc-affiche__parent {
    text-align: left;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 10pt;
    line-height: 1.35;
  }
  .mc-affiche__parent p {
    margin: 4px 0 0;
  }
  .mc-affiche__surtitre {
    display: inline-block;
    font-size: 10pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
  }
  .mc-affiche__mot {
    margin: 4px 0 6px;
    font-size: 34pt;
    letter-spacing: 0.12em;
    color: #1e3a8a;
  }
  .mc-affiche__formule {
    display: inline-block;
    margin: 0 0 10px;
    padding: 4px 14px;
    border-radius: 999px;
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    color: #92400e;
    font-weight: 800;
    font-size: 11pt;
  }
  .mc-affiche__illus-wrap {
    margin: 6px auto 10px;
  }
  .mc-affiche__illus {
    max-width: 145mm;
    max-height: 75mm;
    border-radius: 12px;
    border: 1.5px solid #e2dacb;
  }
  .mc-affiche__legende {
    margin: 4px 0 0;
    font-size: 10pt;
    font-style: italic;
    color: #475569;
  }
  .mc-affiche__explication {
    margin: 8px auto 12px;
    max-width: 160mm;
    font-size: 12pt;
    font-weight: 700;
    color: #0f172a;
  }
  .mc-affiche__recompense {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 2px solid #10b981;
    background: #ecfdf5;
  }
  .mc-affiche__recompense-titre {
    margin: 0 0 6px;
    font-size: 11pt;
    font-weight: 800;
    color: #065f46;
  }
  .mc-affiche__recompense-phrase {
    margin: 0 0 10px;
    font-size: 15pt;
    font-weight: 800;
    color: #064e3b;
  }
  .mc-affiche__jours {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .mc-affiche__jour {
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid #10b981;
    background: #ffffff;
    font-size: 9.5pt;
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mots-costume__actions .est-indique {
    animation: none;
  }
  .mots-costume__rideau {
    transition: none;
  }
}

@media (max-width: 680px) {
  .mots-costume__duo-amment {
    grid-template-columns: 1fr;
  }
  .mots-costume__fleche-amment {
    transform: rotate(90deg);
  }
  .mots-costume__ligne-comparative {
    grid-template-columns: 1fr auto;
  }
  .mots-costume__etiquette-comparative {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .mots-costume__carte {
    padding: var(--espace-4) var(--espace-2);
  }
  .mots-costume__case {
    width: 1.75rem;
    height: 2.3rem;
    font-size: 1.3rem;
  }
  .mots-costume__case--espace {
    width: 0.6rem;
  }
  .mots-costume__vitrine {
    padding: var(--espace-1);
  }
  .mots-costume__mot {
    gap: 0.12rem;
  }
  .mots-costume__lettre {
    --taille: 1.9rem;
    min-width: 1.65rem;
    padding: 0 0.05em;
  }
  .mots-costume__piece {
    --taille: 2.6rem;
    padding: 0 0.3em;
  }
  .mots-costume__piece--choix {
    min-width: 100%;
    padding: 0.5rem 0.75rem;
  }
}
