/* La Salle d'entraînement : le carnet, les épreuves et les fiches. */
.salle [hidden] { display: none !important; }
.salle button { font: inherit; }
.salle button.bouton { cursor: pointer; }

/* Le grand bandeau */
.salle-heros {
  background-color: var(--nuit);
  background-image: var(--etoiles), linear-gradient(155deg, color-mix(in srgb, var(--niveau) 82%, var(--nuit)) 0%, color-mix(in srgb, var(--niveau) 34%, var(--nuit)) 55%, var(--nuit) 100%);
  background-size: var(--etoiles-taille), 100% 100%;
}
.salle-heros .heros-pile { padding-bottom: clamp(44px, 5vw, 64px); }
.salle-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.salle-tete > div:first-child { flex: 999 1 420px; min-width: 0; }
.heros:not(.heros-ambiance) > .creneaux { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; height: 18px; background: repeating-linear-gradient(90deg, var(--velin) 0 30px, transparent 30px 52px); }

.carnet { flex: 1 1 340px; min-width: 0; max-width: 460px; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: rgba(18, 9, 38, .58); border: 1.5px solid rgba(245, 200, 76, .65); border-radius: 18px; box-shadow: 0 16px 36px rgba(0, 0, 0, .3), inset 0 0 26px rgba(245, 200, 76, .08); backdrop-filter: blur(6px); }
.carnet p { margin: 0; }
.carnet-rang { font-family: var(--titre); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--or); }
.carnet-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.carnet-chiffres p { display: flex; flex-direction: column; text-align: center; }
.carnet-chiffres span { font-family: var(--titre); font-weight: 700; font-size: 32px; line-height: 1.15; }
.carnet-chiffres small { font-size: 15px; line-height: 1.2; opacity: .9; }
.carnet-barre { height: 12px; overflow: hidden; background: rgba(255, 255, 255, .16); border-radius: 8px; }
.carnet-barre > div { width: 0; height: 100%; background: linear-gradient(90deg, #E0AC36, var(--or), #FFF3C9); border-radius: 8px; transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.carnet-suite { font-size: 16px; }

.salle-niveaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.salle-niveau { display: flex; align-items: flex-end; gap: 10px; min-height: 84px; padding: 8px 12px 0; text-align: left; color: #fff; background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .28); border-radius: 14px; cursor: pointer; transition: translate .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.salle-niveau img { flex: none; width: auto; height: 74px; object-fit: contain; }
.salle-niveau span { display: flex; flex-direction: column; padding-bottom: 8px; }
.salle-niveau strong { font-family: var(--titre); font-size: 24px; line-height: 1.1; }
.salle-niveau small { font-size: 15px; }
.salle-niveau:hover { translate: 0 -3px; background-color: rgba(255, 255, 255, .18); }
.salle-niveau[aria-pressed="true"] { color: var(--nuit); background: linear-gradient(180deg, #FFE08A, var(--or)); border-color: #FFF3C9; box-shadow: 0 0 22px rgba(245, 200, 76, .5); }

/* Les épreuves */
.outils { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.outil { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 200px; padding: 22px; text-align: left; color: #fff; background: radial-gradient(110% 90% at 92% 0%, color-mix(in srgb, var(--teinte) 90%, #fff), transparent 62%), linear-gradient(165deg, color-mix(in srgb, var(--teinte) 62%, var(--nuit)), var(--nuit)); border: 2px solid var(--filet); border-radius: 18px; box-shadow: 0 12px 26px rgba(34, 19, 64, .24), inset 0 0 0 1px rgba(255, 255, 255, .14); cursor: pointer; transition: transform .14s ease-out, box-shadow .2s ease, border-color .2s ease; }
.outil::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%); translate: -120% 0; pointer-events: none; }
.outil:hover { border-color: var(--or); box-shadow: 0 18px 34px rgba(34, 19, 64, .34), 0 0 22px color-mix(in srgb, var(--teinte) 70%, transparent); }
.outil:hover::after { translate: 120% 0; transition: translate .7s ease; }
.outil[aria-current] { border-color: var(--or); box-shadow: 0 0 0 3px var(--or), 0 18px 34px rgba(34, 19, 64, .34); }
.outil strong { font-family: var(--titre); font-size: 22px; line-height: 1.2; color: var(--or); }
.outil > span:not(.outil-icone) { font-size: 17px; line-height: 1.4; }
.outil-icone { display: flex; align-items: center; justify-content: center; width: 66px; height: 74px; margin-bottom: 6px; color: var(--nuit); background: linear-gradient(170deg, #FFE9A8, var(--or) 55%, #D9A02E); border-radius: 12px 12px 50% 50% / 12px 12px 46% 46%; box-shadow: 0 4px 12px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .45); }
.outil-icone svg { width: 40px; height: 40px; }
.outil-record { font-size: 15px; font-weight: 700; color: #FFE9A8; }
.outil-record:empty { display: none; }

.outil-large { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 0; }
.outil-large .outil-icone { margin-bottom: 0; }
.outil-large strong { flex: 1 1 260px; font-size: 26px; }
.outil-large > span:not(.outil-icone) { flex: 999 1 320px; }
.a-revoir { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 16px; padding: 14px 20px; background: #FFF4D6; border: 2px solid var(--or); border-radius: 14px; }
.a-revoir[hidden] { display: none; }
.a-revoir p { margin: 0; }
.a-revoir-calme { background: #F4F1EA; border-color: #E2D8C4; }
.jeu-revoir { display: block; margin-top: 4px; font-style: italic; }
.notions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.notion { display: flex; flex-direction: column; gap: 2px; min-height: 76px; padding: 10px 14px; text-align: left; color: var(--texte); background: #fff; border: 1.5px solid var(--filet); border-radius: 12px; cursor: pointer; transition: translate .12s ease, border-color .12s ease; }
.notion:hover { translate: 0 -3px; border-color: var(--niveau); }
.notion strong { line-height: 1.25; }
.notion small { font-size: 15px; color: var(--doux); }
.jeu-fin .bouton-niveau { border: 0; }

/* L'atelier : là où se joue l'épreuve */
.atelier { display: flex; flex-direction: column; gap: 14px; padding: clamp(16px, 3vw, 28px); background: linear-gradient(180deg, #fff, var(--parchemin) 30%); border: 2px solid var(--or); border-radius: 18px; box-shadow: 0 0 0 5px rgba(245, 200, 76, .2), 0 20px 40px rgba(34, 19, 64, .16); scroll-margin-top: 16px; }
.atelier:focus { outline: none; }
.jeu-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1.5px solid var(--filet); }
.jeu-entete h3 { margin: 0; font-family: var(--titre); font-size: clamp(22px, 3vw, 28px); }
.jeu-entete p { margin: 2px 0 0; color: var(--doux); }
.jeu-fermer { flex: none; width: 44px; height: 44px; font-size: 26px !important; line-height: 1; color: var(--texte); background: #F3E9D2; border: 0; border-radius: 50%; cursor: pointer; }
.jeu-fermer:hover { color: #fff; background: var(--rouge); }
.jeu-zone, .jeu-pile, [data-epreuve-zone] { display: flex; flex-direction: column; gap: 14px; }
.jeu-etat { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.jeu-etat p { margin: 0; }
.jeu-compteur { font-weight: 700; color: var(--doux); }
.jeu-coeurs { font-size: 28px; line-height: 1; letter-spacing: 2px; color: var(--rouge); }
.jeu-question { margin: 0; font-size: clamp(20px, 2.6vw, 24px); font-weight: 700; line-height: 1.35; }
.jeu-retour { margin: 0; min-height: 1.5em; }
.jeu-suite { align-self: flex-start; border: 0; cursor: pointer; }
.jeu-fin { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; text-align: center; }
.jeu-fin p { margin: 0; }
.jeu-fin .bouton { margin-top: 10px; }
.jeu-fin-titre { font-family: var(--titre); font-weight: 700; font-size: clamp(24px, 3.4vw, 32px); }
.jeu-fin-note { font-size: 16px; color: var(--doux); }
.jeu-sceau { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; font-family: var(--titre); font-weight: 700; font-size: 32px; color: #FFE9A8; background: radial-gradient(circle at 34% 28%, #DB5A40, var(--rouge) 58%, #6E1D10); border-radius: 47% 53% 50% 50% / 52% 48% 54% 46%; box-shadow: 0 8px 18px rgba(110, 29, 16, .4), inset 0 0 0 5px rgba(255, 255, 255, .12), inset 0 0 0 7px rgba(0, 0, 0, .14); }
.jeu-sceau-gris { color: #fff; background: radial-gradient(circle at 34% 28%, #8C8399, #5D5470 60%, #3A3348); box-shadow: 0 8px 18px rgba(58, 51, 72, .35); }

/* La Forge */
.forge-chaleur { height: 18px; overflow: hidden; background: #33241A; border-radius: 10px; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); }
.forge-chaleur > div { height: 100%; background: linear-gradient(90deg, #7A1E0F, #E0571A 45%, var(--or) 80%, #FFF3C9); border-radius: 10px; box-shadow: 0 0 14px rgba(224, 87, 26, .8); transition: width .4s cubic-bezier(.2, .7, .2, 1); }
.forge-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.forge-sujet { font-family: var(--titre); font-weight: 700; font-size: 22px; }
.forge-ligne input { flex: 1 1 180px; min-width: 0; min-height: 52px; padding: 0 12px; font: inherit; font-size: 20px; color: var(--texte); background: #fff; border: 2px solid var(--brun); border-radius: 10px; }
.forge-ligne input[data-etat="juste"] { color: #fff; background: #0F7A5C; border-color: #0F7A5C; }
.forge-ligne input[data-etat="faux"] { color: #fff; background: var(--rouge); border-color: var(--rouge); }
.forge-ligne .bouton { border: 0; }
.forge-serie { font-weight: 700; color: #B45309; }

/* La Dictée */
.dictee-ecouter { align-self: flex-start; gap: 8px; color: #fff; background: #0F766E; border: 0; cursor: pointer; }
.dictee-ecouter:hover { color: #fff; }
.jeu-zone textarea { width: 100%; padding: 10px 12px; font: inherit; font-size: 20px; color: var(--texte); background: #fff; border: 2px solid var(--brun); border-radius: 10px; resize: vertical; }
.jeu-zone textarea:disabled { color: var(--doux); background: #F3E9D2; }
.jeu-zone .fiche-actions .bouton { border: 0; }
.dictee-resultat { display: flex; flex-direction: column; gap: 8px; }
.dictee-corrigee { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; font-size: 20px; }
.dictee-corrigee span { padding: 1px 6px; border-radius: 6px; }
.dictee-corrigee span[data-etat="juste"] { background: #DCF2EA; }
.dictee-corrigee span[data-etat="faux"] { font-weight: 700; color: #fff; background: var(--rouge); }
.dictee-eclair { margin: 0; padding: 12px 16px; font-size: 20px; font-weight: 700; color: var(--or); background: var(--nuit); border-radius: 10px; }

/* La Chasse */
.chasse-phrase { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chasse-segment { min-height: 54px; padding: 6px 14px; font-size: 21px !important; color: var(--texte); background: #fff; border: 2px dashed var(--filet); border-radius: 10px; cursor: pointer; transition: translate .12s ease, border-color .12s ease; }
.chasse-segment:hover:not(:disabled) { translate: 0 -3px; border-color: #1D4ED8; border-style: solid; }
.chasse-segment:disabled { cursor: default; color: var(--texte); }
.chasse-segment[data-etat="juste"] { color: #fff; background: #0F7A5C; border: 2px solid #0F7A5C; }
.chasse-segment[data-etat="faux"] { color: #fff; background: var(--rouge); border: 2px solid var(--rouge); }

/* Le Mémory */
.memoire-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44%), 1fr)); gap: 12px; }
.memoire-carte { position: relative; min-height: 132px; padding: 0; background: none; border: 0; border-radius: 12px; cursor: pointer; perspective: 800px; }
.memoire-dos, .memoire-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; backface-visibility: hidden; transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.memoire-dos { font-size: 38px; color: var(--or); background: var(--etoiles), linear-gradient(160deg, #7C3AED, var(--nuit)); background-size: var(--etoiles-taille), 100% 100%; border: 2px solid var(--filet); }
.memoire-face { padding: 8px; font-size: 16px; font-weight: 700; line-height: 1.25; text-align: center; color: var(--texte); background: var(--parchemin); border: 2px solid var(--filet); transform: rotateY(180deg); }
.memoire-carte[data-sorte="exemple"] .memoire-face { font-weight: 400; background: #fff; }
.memoire-carte[data-ouverte="1"] .memoire-dos { transform: rotateY(-180deg); }
.memoire-carte[data-ouverte="1"] .memoire-face { transform: rotateY(0); }
.memoire-carte[data-trouvee="1"] .memoire-face { color: #fff; background: #0F7A5C; border-color: var(--or); box-shadow: 0 0 16px rgba(245, 200, 76, .6); }

/* La Frise */
.frise-cartes { display: flex; flex-wrap: wrap; gap: 10px; }
.frise-carte { min-height: 54px; padding: 8px 14px; font-weight: 700; text-align: left; color: var(--texte); background: #fff; border: 2px solid var(--nuit); border-radius: 10px; cursor: pointer; transition: translate .12s ease; }
.frise-carte:hover { translate: 0 -3px; }
.frise-carte[data-etat="faux"] { color: #fff; background: var(--rouge); border-color: var(--rouge); }
.frise-ligne { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0 0 0 26px; list-style: none; border-left: 4px solid var(--or); }
.frise-ligne:empty { display: none; }
.frise-ligne li { position: relative; }
.frise-ligne li::before { content: ""; position: absolute; left: -36px; top: .35em; width: 16px; height: 16px; background: var(--brun); border: 3px solid var(--or); border-radius: 50%; }

/* Les trophées */
.trophees { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 44%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.trophees li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; text-align: center; color: var(--doux); background: var(--parchemin); border: 1.5px dashed var(--filet); border-radius: 14px; }
.trophees strong { font-family: var(--titre); font-size: 17px; line-height: 1.2; }
.trophees small { font-size: 15px; line-height: 1.25; }
.trophee-signe { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-size: 26px; color: var(--doux); background: #E8DFCB; border-radius: 50%; }
.trophees li[data-gagne] { color: var(--texte); background: linear-gradient(180deg, #FFF8DF, var(--parchemin)); border-style: solid; border-color: var(--or); box-shadow: 0 6px 16px rgba(201, 163, 90, .3); }
.trophees li[data-gagne] .trophee-signe { color: var(--nuit); background: linear-gradient(170deg, #FFE9A8, var(--or) 55%, #D9A02E); box-shadow: 0 0 16px rgba(245, 200, 76, .6); }
.trophee-annonce { margin: 0; font-weight: 700; color: var(--brun); }
.trophee-annonce:empty { display: none; }

/* Les fiches */
.fiches-tete { display: flex; flex-direction: column; gap: 14px; }
.fiches-filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.fiches-filtres button { min-height: 44px; padding: 0 16px; font-size: 16px; font-weight: 700; color: var(--texte); background: var(--parchemin); border: 1.5px solid var(--filet); border-radius: 999px; cursor: pointer; transition: translate .12s ease, background-color .12s ease; }
.fiches-filtres button:hover { translate: 0 -2px; }
.fiches-filtres button[aria-pressed="true"] { color: #fff; background: var(--niveau); border-color: var(--niveau); }
.fiches-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.fiche-carte { --domaine: var(--brun); position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; min-height: 176px; padding: 18px 58px 18px 26px; color: var(--texte); text-decoration: none; background: radial-gradient(120% 90% at 50% 0%, #fff, var(--parchemin) 70%); border: 1.5px solid var(--filet); border-radius: 14px; box-shadow: 0 8px 18px rgba(34, 19, 64, .08); transition: transform .14s ease-out, border-color .2s ease, box-shadow .2s ease; }
.fiche-carte[data-fiche-domaine="grammaire"] { --domaine: #2F62D9; }
.fiche-carte[data-fiche-domaine="conjugaison"] { --domaine: #B45309; }
.fiche-carte[data-fiche-domaine="orthographe"] { --domaine: #0F7A5C; }
.fiche-carte[data-fiche-domaine="lexique"] { --domaine: #7C3AED; }
.fiche-carte[data-fiche-domaine="litterature"] { --domaine: #BE185D; }
.fiche-carte[data-fiche-domaine="methode"] { --domaine: #A8321F; }
.fiche-carte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--domaine); }
.fiche-carte:hover { color: var(--texte); border-color: var(--domaine); box-shadow: 0 14px 28px rgba(34, 19, 64, .16); }
.fiche-pastille { font-size: 15px; font-weight: 700; color: var(--domaine); }
.fiche-carte strong { font-family: var(--titre); font-size: 20px; line-height: 1.22; }
.fiche-accroche { font-size: 16px; line-height: 1.35; color: var(--doux); }
.fiche-sceau { position: absolute; right: 10px; bottom: 10px; display: none; align-items: center; justify-content: center; width: 42px; height: 42px; font-size: 20px; color: #FFE9A8; background: radial-gradient(circle at 34% 28%, #DB5A40, var(--rouge) 58%, #6E1D10); border-radius: 47% 53% 50% 50% / 52% 48% 54% 46%; box-shadow: 0 3px 8px rgba(110, 29, 16, .4); }
.fiche-sceau::before { content: "✦"; }
.fiche-carte.maitrisee .fiche-sceau { display: flex; }
.fiches-vide { margin: 0; padding: 16px; font-weight: 700; color: var(--doux); }

.grimoires { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.grimoires a { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 18px; font-weight: 700; color: #fff; text-decoration: none; background: var(--etoiles), linear-gradient(120deg, var(--nuit-claire), var(--nuit)); background-size: var(--etoiles-taille), 100% 100%; border: 1.5px solid var(--filet); border-radius: 14px; transition: transform .14s ease-out, border-color .2s ease; }
.grimoires a:hover { color: var(--or); border-color: var(--or); }
.grimoires svg { flex: none; width: 38px; height: 38px; color: var(--or); }

/* Une fiche */
.salle-fiche .bloc { align-items: center; }
.salle-fiche .fiche, .salle-fiche .fiche-epreuve, .fiche-voisines { width: 100%; max-width: 900px; }
.fiche { display: flex; flex-direction: column; gap: 16px; padding: clamp(18px, 3vw, 32px); }
.fiche-bloc h2 { margin: 0 0 6px; font-family: var(--titre); font-size: 22px; }
.fiche-bloc ul { margin: 0; padding-left: 22px; }
.fiche-bloc li + li { margin-top: 6px; }
.fiche-bloc p { margin: 0; }
.fiche-bloc li::marker { color: var(--niveau); }
.fiche-exemples, .fiche-piege, .fiche-astuce { padding: 12px 16px; border-left: 6px solid; border-radius: 0 12px 12px 0; }
.fiche-exemples { background: #fff; border-left-color: var(--niveau); }
.fiche-piege { background: var(--essentiel-fond); border-left-color: var(--essentiel); }
.fiche-piege h2 { color: var(--essentiel); }
.fiche-astuce { background: #FFF6D8; border-left-color: var(--or); }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.fiche-actions .bouton { border: 0; }
.fiche-epreuve { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 3vw, 28px); }
.fiche-epreuve > h2 { margin: 0; font-family: var(--titre); font-size: 24px; }
.fiche-epreuve > p { margin: 0; color: var(--doux); }
.salle-fiche.maitrisee .fiche::after { content: "✦"; position: absolute; top: 14px; right: 14px; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-size: 24px; color: #FFE9A8; background: radial-gradient(circle at 34% 28%, #DB5A40, var(--rouge) 58%, #6E1D10); border-radius: 47% 53% 50% 50% / 52% 48% 54% 46%; rotate: 8deg; }
.fiche-voisines { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.fiche-voisines a { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 72px; padding: 10px 16px; font-weight: 700; color: var(--texte); text-decoration: none; background: #fff; border: 1px solid #E2D8C4; border-radius: 12px; }
.fiche-voisines a:hover { color: var(--texte); border-color: var(--niveau); }
.fiche-voisines small { font-size: 15px; font-weight: 400; color: var(--doux); }
.fiche-suivante { text-align: right; }

@media (prefers-reduced-motion: no-preference) {
  .salle-niveau[aria-pressed="true"] img { animation: respirer 3.4s ease-in-out infinite; }
  .carnet-barre > div { background-size: 200% 100%; animation: reflet-barre 3.2s linear infinite; }
  .outil:hover .outil-icone { animation: salut .55s ease; }
  .outil-icone { transition: scale .2s ease; }
  .atelier { animation: derouler .4s cubic-bezier(.2, .7, .2, 1) both; transform-origin: top; }
  .jeu-pile, .jeu-question, .memoire-grille, .frise-cartes { animation: monter .3s ease both; }
  .jeu-sceau { animation: tampon .5s cubic-bezier(.2, 1.4, .4, 1) both; }
  .fiche-carte { animation: monter .35s ease both; }
  .fiche-carte.maitrisee .fiche-sceau, .salle-fiche.maitrisee .fiche::after { animation: tampon .5s .1s cubic-bezier(.2, 1.4, .4, 1) both; }
  .chasse-segment[data-etat="juste"], .forge-ligne input[data-etat="juste"] { animation: bondir .35s; }
  .chasse-segment[data-etat="faux"], .forge-ligne input[data-etat="faux"], .frise-carte[data-etat="faux"] { animation: secouer .35s; }
  .frise-ligne li { animation: monter .3s ease both; }
  .trophees li[data-gagne] .trophee-signe { animation: halo-or 3s ease-in-out infinite; }
  .forge-serie:not(:empty) { animation: bondir .4s; }
}
@keyframes salut { 30% { rotate: -8deg; scale: 1.1; } 65% { rotate: 6deg; } }
@keyframes reflet-barre { to { background-position: -200% 0; } }
@keyframes halo-or { 50% { box-shadow: 0 0 26px rgba(245, 200, 76, .9); } }

/* À l'impression, une fiche tient en noir et blanc. */
@media print {
  .salle-fiche .heros { padding: 0; }
  .salle-fiche .heros .titre-grand, .salle-fiche .heros .devise { color: #000; background: none; -webkit-text-fill-color: #000; }
  .fiche-actions, .fiche-epreuve, .fiche-voisines { display: none; }
  .fiche { padding: 0; background: none; border: 0; box-shadow: none; }
  .salle-fiche.maitrisee .fiche::after { display: none; }
  .fiche-bloc { color: #000; background: none !important; border-color: #000 !important; break-inside: avoid; }
  .fiche-bloc h2 { color: #000; }
}

/* La carte dans la Salle */
.bilan-carte { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 16px 20px; color: #fff; text-decoration: none; background: linear-gradient(120deg, var(--nuit), #4B2E8F); border: 2px solid var(--or); border-radius: 16px; box-shadow: 0 10px 24px rgba(34, 19, 64, .22); transition: translate .16s ease; }
.bilan-carte:hover { translate: 0 -2px; }
.bilan-carte .icone { flex: 0 0 auto; width: 56px; height: 56px; color: var(--or); }
.bilan-carte strong { display: block; font-family: var(--titre); font-size: 22px; color: var(--or); }
.bilan-carte span { display: block; }
