/* Styles du site, écrits à partir de DESIGN.md. Toutes les valeurs passent par les tokens de css/tokens.css
   (var(--primary), var(--font-heading), var(--radius-md), var(--space-section)…). Aucune couleur en dur.
   Plouf ! : le néo-brutalisme du kit (bordures noires, ombres pleines, effet autocollant) + une palette de jeu saturée. */

/* Palette du jeu : lue aussi par js/app.js pour dessiner le canvas (modifiable dans l'onglet Design). */
:root {
  --jeu-ciel: oklch(84% 0.09 225);
  --jeu-ciel-soir: oklch(78% 0.13 45);
  --jeu-ciel-nuit: oklch(36% 0.09 285);
  --jeu-soleil: oklch(90% 0.16 95);
  --jeu-oiseau: oklch(87% 0.17 92);
  --jeu-bec: oklch(70% 0.19 45);
  --jeu-rose: oklch(72% 0.17 350);
  --jeu-orange: oklch(74% 0.17 55);
  --jeu-bleu: oklch(66% 0.15 245);
  --jeu-colline: oklch(66% 0.15 145);
  --jeu-sol: oklch(80% 0.11 85);
  --jeu-rouge: oklch(62% 0.2 28);
  --jeu-menthe: oklch(84% 0.11 170);
  --jeu-or: oklch(82% 0.15 85);
  --contour: 3px solid var(--foreground);
}

body { background: var(--background); font-family: var(--font-body); }
kbd { display: inline-block; padding: .05em .45em; border: 1.5px solid currentColor; border-radius: var(--radius-sm); font: 600 .85em var(--font-body); box-shadow: 1px 1px 0 currentColor; }

/* ---------- navigation double niveau ---------- */
.barre-utile { background: var(--foreground); color: var(--background); font-size: var(--text-caption); }
.barre-utile__in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.4rem; }
.barre-utile p { display: flex; align-items: center; gap: .5rem; margin: 0; }
.pastille { width: .55rem; height: .55rem; border-radius: 50%; background: var(--jeu-oiseau); box-shadow: 0 0 0 2px var(--jeu-bec); }
@media (prefers-reduced-motion: no-preference) { .pastille { animation: battement 1.6s ease-in-out infinite; } }
.entete { background: var(--background); border-bottom: var(--contour); backdrop-filter: none; }
.entete.defile { border-bottom-color: var(--foreground); }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: 0; }
.logo__oiseau { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--jeu-oiseau); border: 2.5px solid var(--foreground); box-shadow: 2px 2px 0 var(--foreground); position: relative; }
.logo__oiseau::after { content: ""; position: absolute; right: -.45rem; top: .45rem; width: .55rem; height: .4rem; background: var(--jeu-bec); border: 2px solid var(--foreground); border-radius: 0 50% 50% 0; }
.logo:hover .logo__oiseau { animation: battement .5s ease-in-out 2; }
.c-nav__action { --c-btn-bg: var(--jeu-oiseau); --c-btn-fg: var(--foreground); --c-btn-border: var(--foreground); --c-btn-border-w: 2.5px; --c-btn-shadow: var(--shadow-md); }

/* ---------- boutons « autocollants » ---------- */
.c-btn { --c-btn-border: var(--foreground); --c-btn-border-w: 2.5px; --c-btn-shadow: var(--shadow-md); transition: transform .12s, box-shadow .12s, background-color .2s; }
.c-btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-lg); }
.c-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--foreground); }

/* ---------- ouverture : écran coupé en deux ---------- */
.coupe { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - 7rem); border-bottom: var(--contour); }
.coupe__jeu { display: grid; place-items: start center; padding: clamp(1rem, 3vw, 2.5rem); background: var(--jeu-ciel); border-right: var(--contour); background-image: radial-gradient(color-mix(in oklch, var(--foreground) 14%, transparent) 1.5px, transparent 1.6px); background-size: 22px 22px; }
.coupe__infos { display: flex; flex-direction: column; justify-content: center; gap: clamp(1.25rem, 3vw, 2rem); padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 5rem); }

.scene { position: sticky; top: 1.5rem; width: min(100%, 440px, calc((100svh - 10.5rem) * 2 / 3)); aspect-ratio: 2 / 3; border: var(--contour); border-radius: var(--radius-xl); box-shadow: var(--shadow-premium); overflow: hidden; background: var(--jeu-ciel); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.scene__toile { display: block; width: 100%; height: 100%; cursor: pointer; }
.scene__hud { position: absolute; top: .75rem; right: .75rem; display: flex; gap: .5rem; z-index: 3; }
.hud-btn { min-width: 44px; min-height: 44px; padding: 0 .7rem; border: 2.5px solid var(--foreground); border-radius: var(--radius-md); background: var(--surface); color: var(--foreground); font: 800 var(--text-small) var(--font-body); box-shadow: var(--shadow-sm); cursor: pointer; }
.hud-btn[aria-pressed="false"] { background: var(--muted); text-decoration: line-through; }
.hud-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.ecran { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.5rem; text-align: center; }
.ecran--accueil { justify-content: flex-end; padding-bottom: 6.5rem; }
.ecran--pause, .ecran--fin { background: color-mix(in oklch, var(--foreground) 45%, transparent); }
.ecran__surtitre { margin: 0; font: 800 clamp(2.6rem, 9vw, 3.6rem)/1 var(--font-display); color: var(--surface); -webkit-text-stroke: 2px var(--foreground); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--foreground); }
.ecran__titre { margin: 0; padding: .3rem .9rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); font: 700 1.5rem/1.1 var(--font-display); }
.ecran__aide { margin: 0; padding: .3rem .7rem; border-radius: var(--radius-sm); background: var(--foreground); color: var(--background); font-size: var(--text-caption); }
.ecran__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; }
.choix-mode { display: flex; gap: .4rem; padding: .35rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.mode-btn { min-height: 44px; padding: 0 1rem; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--foreground); font: 700 var(--text-small) var(--font-body); cursor: pointer; transition: background-color .2s; }
.mode-btn:hover { background: var(--muted); }
.mode-btn[aria-pressed="true"] { background: var(--jeu-rose); box-shadow: inset 0 0 0 2px var(--foreground); }
.btn-jouer { --c-btn-bg: var(--primary); --c-btn-fg: var(--primary-foreground); --c-btn-size: 1.35rem; --c-btn-pad: .7em 2.2em; font-family: var(--font-display); font-weight: 800; letter-spacing: .02em; }
@media (prefers-reduced-motion: no-preference) { .ecran--accueil .btn-jouer { animation: respire 1.8s ease-in-out infinite; } }
.lien-btn { min-height: 44px; border: 0; background: none; color: var(--surface); font: 600 var(--text-small) var(--font-body); text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }

/* fin de partie */
.bilan { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; background: var(--jeu-sol); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.bilan__chiffres { display: grid; gap: .4rem; margin: 0; text-align: right; }
.bilan__chiffres dt { font-size: var(--text-caption); font-weight: 700; color: var(--foreground); }
.bilan__chiffres dd { margin: 0; font: 800 2.2rem/1 var(--font-display); }
.medaille { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 50%; border: var(--contour); box-shadow: var(--shadow-sm); font: 800 .95rem var(--font-display); background: var(--muted); color: var(--muted-foreground); }
.medaille[data-niveau="bronze"] { background: var(--jeu-orange); color: var(--foreground); }
.medaille[data-niveau="argent"] { background: var(--surface); color: var(--foreground); }
.medaille[data-niveau="or"] { background: var(--jeu-oiseau); color: var(--foreground); }
.medaille[data-niveau="platine"] { background: var(--accent); color: var(--accent-foreground); }
@media (prefers-reduced-motion: no-preference) {
  .ecran--fin:not([hidden]) .bilan { animation: tombe .55s var(--ease) both; }
  .ecran--fin:not([hidden]) .medaille:not([data-niveau="aucune"]) { animation: tampon .5s .35s cubic-bezier(.3,1.6,.5,1) both; }
  .ecran--fin:not([hidden]) .ecran__surtitre { animation: tombe .5s var(--ease) both; }
}
.nouveau-record { margin: 0; padding: .25rem .8rem; background: var(--jeu-rose); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); font-weight: 800; transform: rotate(2deg); }
.form-score { display: grid; gap: .4rem; width: min(100%, 20rem); padding: .9rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-lg); text-align: left; }
.form-score label { font-size: var(--text-small); font-weight: 700; }
.form-score__ligne { display: flex; gap: .5rem; }
.form-score input { flex: 1; min-width: 0; min-height: 44px; padding: 0 .3rem; border: 0; border-bottom: 2.5px solid var(--foreground); background: transparent; font: 600 1rem var(--font-body); color: var(--foreground); }
.form-score input:focus-visible { outline: none; border-bottom-color: var(--primary); }
.btn-petit { --c-btn-pad: .5em 1em; --c-btn-shadow: var(--shadow-sm); }
.form-score__msg { margin: 0; min-height: 1.2em; font-size: var(--text-caption); font-weight: 600; }
.form-score__msg[data-type="erreur"] { color: var(--error); }
.form-score__msg[data-type="succes"] { color: var(--success); }

/* colonne d'infos */
.titre-geant { margin: 0; font-family: var(--font-display); font-size: var(--text-display); font-weight: 800; line-height: .86; letter-spacing: -.01em; }
.titre-geant span { display: inline-block; }
.titre-geant__plouf { padding: 0 .12em; background: var(--jeu-oiseau); border: var(--contour); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); transform: rotate(-3deg); margin-top: .08em; }
@media (prefers-reduced-motion: no-preference) {
  .titre-geant span { animation: tombe .7s var(--ease) both; }
  .titre-geant span:nth-child(2) { animation-delay: .12s; }
  .titre-geant span:nth-child(3) { animation: tombe-penche .8s .26s var(--ease) both; }
}
.chapo { max-width: 34rem; margin: 0; font-size: var(--text-body-lg); color: var(--muted-foreground); }

.records { padding: clamp(1rem, 2.5vw, 1.5rem); background: var(--surface); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); max-width: 34rem; }
.records__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.records h2 { margin: 0; font-size: var(--text-h3); font-weight: 800; }
.onglets { display: flex; gap: .25rem; }
.onglets button { min-height: 44px; padding: 0 .7rem; border: 2px solid var(--foreground); border-radius: var(--radius-sm); background: var(--surface); color: var(--foreground); font: 700 var(--text-caption) var(--font-body); cursor: pointer; }
.onglets button[aria-pressed="true"] { background: var(--foreground); color: var(--background); }
.records__liste { list-style: none; margin: 0; padding: 0; min-height: 10rem; transition: opacity .2s; }
.records__liste[aria-busy="true"] { opacity: .4; }
.records__liste li { display: grid; grid-template-columns: 2.2rem 1fr auto; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1.5px dashed var(--border); }
.records__liste li:last-child { border-bottom: 0; }
.records__rang { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 2px solid var(--foreground); border-radius: 50%; font: 800 .85rem var(--font-display); }
.records__liste li:nth-child(1) .records__rang { background: var(--jeu-oiseau); }
.records__liste li:nth-child(2) .records__rang { background: var(--muted); }
.records__liste li:nth-child(3) .records__rang { background: var(--jeu-orange); }
.records__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.records__score { font: 800 1.35rem var(--font-display); }
.records__liste li.moi { background: color-mix(in oklch, var(--jeu-rose) 35%, transparent); border-radius: var(--radius-sm); }
.records__vide { display: block !important; color: var(--muted-foreground); padding: 1rem 0 !important; }
.records__perso { margin: .75rem 0 0; font-size: var(--text-small); color: var(--muted-foreground); }
.records__perso strong { color: var(--foreground); font: 800 1.2rem var(--font-display); }

/* ---------- bandeau ---------- */
.bandeau { background: var(--jeu-rose); border-block: 0; border-bottom: var(--contour); }
.bandeau li { font-weight: 800 !important; font-size: clamp(1.6rem, 4vw, 2.8rem) !important; }
.bandeau li::after { background: var(--foreground) !important; width: .45em !important; height: .45em !important; }

/* ---------- modes ---------- */
.modes { padding-block: var(--space-section); }
.univers + .modes { padding-top: 0; } /* deux sections claires qui se suivent : pas de double marge */
.modes h2 { margin: 0 0 clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: .95; }
.modes__grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2.5vw, 2rem); align-items: start; }
.carte-mode { grid-column: span 4; padding: clamp(1.25rem, 3vw, 2rem); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.carte-mode:hover { transform: translate(-3px, -3px) rotate(-.5deg); box-shadow: 11px 11px 0 var(--foreground); }
.carte-mode h3 { margin: .25rem 0 .75rem; font-size: clamp(2.5rem, 5vw, 3.8rem); font-weight: 800; line-height: 1; }
.carte-mode p { margin: 0 0 1rem; }
.carte-mode__etiquette { display: inline-block; padding: .15rem .6rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: 99px; font-size: var(--text-caption); font-weight: 700; }
.carte-mode--zen { background: var(--jeu-ciel); }
.carte-mode--normal { background: var(--jeu-oiseau); margin-top: 3rem; }
.carte-mode--tempete { background: var(--secondary); color: var(--secondary-foreground); margin-top: 1.5rem; }
.carte-mode--tempete .carte-mode__etiquette { color: var(--foreground); }
.jauges { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; font-size: var(--text-small); font-weight: 700; }
.jauges li { display: flex; justify-content: space-between; align-items: center; }
.jauge { position: relative; width: 4.5rem; height: .8rem; border: 2px solid currentColor; border-radius: 99px; overflow: hidden; }
.jauge::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--n, 1) * 33.34%); background: currentColor; }
.jauge[data-n="1"] { --n: 1; } .jauge[data-n="2"] { --n: 2; } .jauge[data-n="3"] { --n: 3; }

/* ---------- astuces ---------- */
.astuces { padding-block: var(--space-section); background: var(--secondary); color: var(--secondary-foreground); border-block: var(--contour); }
.astuces__grille { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.astuces h2 { margin: 0; font-weight: 800; line-height: .95; position: sticky; top: 7rem; }
.astuces__liste { list-style: none; margin: 0; padding: 0; counter-reset: astuce; display: grid; gap: 1.25rem; }
.astuces__liste li { counter-increment: astuce; position: relative; padding: 1.25rem 1.25rem 1.25rem 4.5rem; background: var(--surface); color: var(--foreground); border: var(--contour); border-radius: var(--radius-lg); box-shadow: 6px 6px 0 var(--jeu-oiseau); }
.astuces__liste li::before { content: counter(astuce); position: absolute; left: 1rem; top: 1rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--accent-foreground); border: 2.5px solid var(--foreground); font: 800 1.2rem var(--font-display); }
.astuces__liste li:nth-child(even) { margin-left: clamp(0rem, 4vw, 3rem); }
.astuces__liste strong { display: block; font-size: 1.1rem; }

/* ---------- appel final ---------- */
.final { padding-block: var(--space-section); background: var(--jeu-orange); border-bottom: var(--contour); }
.final__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.final h2 { margin: 0; font-size: var(--text-display); font-weight: 800; line-height: .9; }

/* ---------- 404 ---------- */
.perdu { padding-block: var(--space-section); background: var(--jeu-ciel); border-bottom: var(--contour); }
.perdu__in { display: grid; justify-items: start; gap: 1.25rem; }
.perdu__code { margin: 0; font: 800 clamp(7rem, 26vw, 16rem)/.8 var(--font-display); color: var(--surface); -webkit-text-stroke: 4px var(--foreground); paint-order: stroke fill; text-shadow: 8px 8px 0 var(--foreground); }
.perdu h1 { margin: 0; font-weight: 800; }
.perdu .chapo { color: var(--foreground); }

/* ---------- pied signature ---------- */
.pied { background: var(--foreground); color: var(--background); }
.pied .c-pied-sig__nom { font-size: clamp(6rem, 33vw, 34rem); font-weight: 800; color: var(--jeu-oiseau); letter-spacing: -.02em; }
.pied .c-pied-sig__legal { border-top-color: color-mix(in oklch, var(--background) 25%, transparent); color: color-mix(in oklch, var(--background) 75%, transparent); position: relative; background: var(--foreground); }

/* ---------- animations ---------- */
@keyframes battement { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.08, .92); } }
@keyframes respire { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes tombe { from { opacity: 0; transform: translateY(-40px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes tombe-penche { from { opacity: 0; transform: translateY(-60px) rotate(12deg); } to { opacity: 1; transform: rotate(-3deg); } }
@keyframes tampon { from { opacity: 0; transform: scale(2.2) rotate(-20deg); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .coupe { grid-template-columns: 1fr; min-height: 0; }
  .coupe__jeu { border-right: 0; border-bottom: var(--contour); }
  .coupe__jeu { place-items: center; }
  .scene { position: relative; top: 0; width: min(100%, 440px, calc((100svh - 8rem) * 2 / 3)); }
  .carte-mode { grid-column: span 12; margin-top: 0; }
  .astuces__grille { grid-template-columns: 1fr; }
  .astuces h2 { position: static; }
}
@media (max-width: 560px) {
  .barre-utile .barre-utile__touches { display: none; }
  .coupe__jeu { padding: .75rem; }
  .scene { width: min(100%, calc((100svh - 6rem) * 2 / 3)); }
  .ecran--accueil { padding-bottom: 5rem; }
  .mode-btn { padding: 0 .7rem; }
  .astuces__liste li { padding-left: 4rem; }
  .astuces__liste li:nth-child(even) { margin-left: 0; }
}

/* =====================================================================================================
   Comptes, atelier, boutique, cartes, classements, plein écran
   ===================================================================================================== */

/* messages flash */
.message { width: min(var(--space-container), 100% - 2 * var(--space-gutter)); margin: 1rem auto 0; padding: .8rem 1.1rem; background: var(--jeu-menthe); border: var(--contour); border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-weight: 700; }
.message-erreur { background: var(--jeu-rose); }
@media (prefers-reduced-motion: no-preference) { .message { animation: tombe .5s var(--ease) both; } }

/* pièce (icône CSS) et solde */
.piece { display: inline-block; flex: none; width: .95em; height: .95em; border-radius: 50%; background: var(--jeu-or); border: 2px solid var(--foreground); box-shadow: inset -.18em -.12em 0 color-mix(in oklch, var(--jeu-or) 60%, var(--foreground)); vertical-align: -.12em; }
.solde { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: 99px; font: 800 1rem var(--font-display); }
.nav-compte a { gap: .45rem; font-weight: 700 !important; opacity: 1 !important; }
.nav-compte__niv { padding: .05rem .4rem; background: var(--accent); color: var(--accent-foreground); border: 2px solid var(--foreground); border-radius: var(--radius-sm); font: 800 .8rem var(--font-display); }
@media (min-width: 901px) and (max-width: 1180px) { .c-nav__action { display: none; } }

/* plein écran */
.hud-btn--icone { display: grid; place-items: center; padding: 0; }
.coupe__jeu:fullscreen, .coupe__jeu.est-plein { place-items: center; padding: 0; border: 0; }
.coupe__jeu.est-plein { position: fixed; inset: 0; z-index: 200; }
.coupe__jeu:fullscreen, .coupe__jeu.est-plein { width: 100vw; height: 100dvh; background: var(--jeu-ciel); }
.coupe__jeu:fullscreen .scene, .coupe__jeu.est-plein .scene { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.coupe__jeu:fullscreen .scene__hud, .coupe__jeu.est-plein .scene__hud { top: max(.75rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); }
.jeu-plein body { overflow: hidden; }

/* écrans du jeu */
.ecran { overflow-y: auto; }
.ecran--fin { justify-content: flex-start; padding-top: 3.75rem; gap: .7rem; }
.ecran--fin .ecran__surtitre { font-size: clamp(2.2rem, 7vw, 3rem); }
.ecran__tenue { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem; background: var(--surface); color: var(--foreground); border: 2.5px solid var(--foreground); border-radius: 99px; box-shadow: var(--shadow-sm); font-size: var(--text-caption); font-weight: 700; text-decoration: none; }
.ecran__tenue:hover { background: var(--jeu-oiseau); }
.bilan { padding: .75rem 1rem; }
.bilan__chiffres dd { font-size: 1.7rem; }
.gains { display: grid; gap: .35rem; width: min(100%, 20rem); padding: .75rem .9rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); text-align: left; }
.gains p { margin: 0; }
.gains__pieces { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: var(--text-small); }
.gains__pieces .piece { font-size: 1.4rem; }
.gains__pieces strong { font: 800 1.8rem/1 var(--font-display); }
.gains__xp { font-size: var(--text-caption); font-weight: 700; color: var(--muted-foreground); }
.gains__barre { display: block; height: .7rem; border: 2px solid var(--foreground); border-radius: 99px; overflow: hidden; background: var(--muted); }
.gains__barre span { display: block; height: 100%; width: 0; background: var(--accent); }
.gains__niveau { padding: .3rem .6rem; background: var(--jeu-oiseau); border: 2px solid var(--foreground); border-radius: var(--radius-sm); font-weight: 800; font-size: var(--text-small); }
.gains__erreur { color: var(--error); font-weight: 700; font-size: var(--text-small); }
@media (prefers-reduced-motion: no-preference) { .gains:not([hidden]) { animation: tombe .5s var(--ease) both; } .gains--monte .gains__niveau { animation: tampon .5s .6s cubic-bezier(.3,1.6,.5,1) both; } }
.ecran__invite { margin: 0; padding: .35rem .75rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: var(--radius-md); font-size: var(--text-caption); font-weight: 600; }
.ecran__invite a { color: var(--primary); font-weight: 800; }

/* section univers (accueil) */
.univers { padding-block: var(--space-section); }
.univers h2 { margin: 0 0 clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: .95; }
.univers__grille { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.univers__bloc { grid-column: span 4; display: grid; gap: .6rem; align-content: start; padding: clamp(1.25rem, 3vw, 2rem); color: var(--foreground); text-decoration: none; border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.univers__bloc:hover { transform: translate(-3px, -3px) rotate(.4deg); box-shadow: 11px 11px 0 var(--foreground); }
.univers__bloc--atelier { background: var(--jeu-menthe); }
.univers__bloc--cartes { background: var(--accent); margin-top: 2.5rem; }
.univers__bloc--classements { background: var(--jeu-oiseau); margin-top: 1.25rem; }
.univers__oiseau { width: 9rem; height: 9rem; margin: -.5rem 0 0 -.5rem; }
.univers__etiquette { justify-self: start; padding: .15rem .6rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: 99px; font-size: var(--text-caption); font-weight: 700; }
.univers__bloc strong { font: 800 clamp(1.6rem, 2.6vw, 2.1rem)/1.02 var(--font-display); }
.univers__appel { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: clamp(2rem, 5vw, 3.5rem) 0 0; color: var(--muted-foreground); font-weight: 600; }

/* pages du jeu (compte, atelier, cartes, classements) */
.page-jeu { padding-block: clamp(2.5rem, 6vw, 5rem) var(--space-section); }
.page-jeu__titre { margin: .4rem 0 1rem; font-size: var(--text-h1); font-weight: 800; line-height: .9; }

/* compte */
.auth { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.auth__atouts { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .6rem; }
.auth__atouts li { padding: .6rem .9rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.auth__atouts li:nth-child(odd) { margin-left: clamp(0rem, 3vw, 2rem); }
.auth__formulaires { display: grid; gap: 1rem; }
.onglets--auth a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; border: 2px solid var(--foreground); border-radius: var(--radius-sm); background: var(--surface); color: var(--foreground); font-weight: 700; font-size: var(--text-small); text-decoration: none; }
.onglets--auth a[aria-selected="true"] { background: var(--foreground); color: var(--background); }
.carte-form { display: grid; gap: 1.1rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); }
.carte-form h2 { margin: 0; font-size: var(--text-h3); font-weight: 800; }
.carte-form h2 small { font: 600 var(--text-small) var(--font-body); color: var(--muted-foreground); }
.carte-form p { margin: 0; }
.carte-form .c-btn { justify-self: start; }
.champ-ligne { display: grid; gap: .3rem; }
.champ-ligne label { font-size: var(--text-small); font-weight: 700; }
.champ-ligne label small { font-weight: 500; color: var(--muted-foreground); }
.champ-ligne input { min-height: 48px; padding: 0 .2rem; border: 0; border-bottom: 2.5px solid var(--foreground); background: transparent; color: var(--foreground); font: 600 1.05rem var(--font-body); }
.champ-ligne input:focus-visible { outline: none; border-bottom-color: var(--primary); box-shadow: 0 2px 0 var(--primary); }
.champ-ligne input[aria-invalid="true"] { border-bottom-color: var(--error); }
.champ-erreur { margin: 0; color: var(--error); font-size: var(--text-small); font-weight: 700; }
.champ-erreur--bloc { padding: .7rem 1rem; background: var(--surface); border: 2.5px solid var(--error); border-radius: var(--radius-md); }
.case { display: flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; }
.case input { width: 1.25rem; height: 1.25rem; accent-color: var(--error); }
.btn-danger { --c-btn-bg: var(--error); --c-btn-fg: var(--surface); }
.profil { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.profil__oiseau { display: grid; place-items: center; width: clamp(10rem, 22vw, 15rem); aspect-ratio: 1; background: var(--jeu-ciel); border: var(--contour); border-radius: 50%; box-shadow: var(--shadow-premium); }
.mini-oiseau { width: 80%; height: 80%; }
.niveau-barre { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; max-width: 34rem; margin-bottom: 1.25rem; font-weight: 700; font-size: var(--text-small); }
.niveau-barre__n { padding: .1rem .5rem; background: var(--accent); color: var(--accent-foreground); border: 2px solid var(--foreground); border-radius: var(--radius-sm); font: 800 1.1rem var(--font-display); }
.niveau-barre__piste { height: .9rem; border: 2px solid var(--foreground); border-radius: 99px; background: var(--muted); overflow: hidden; }
.niveau-barre__rempli { display: block; height: 100%; background: var(--primary); }
.stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 0 1.5rem; }
.stats div { padding: .5rem .9rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.stats dt { font-size: var(--text-caption); font-weight: 700; color: var(--muted-foreground); }
.stats dd { display: flex; align-items: center; gap: .35rem; margin: 0; font: 800 1.7rem/1.1 var(--font-display); }
.compte-reglages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: clamp(1rem, 3vw, 2rem); align-items: start; }
.carte-form--danger { box-shadow: 8px 8px 0 var(--error); }

/* atelier */
.atelier__grille { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.atelier__apercu { position: sticky; top: 6.5rem; display: grid; gap: 1rem; }
.vitrine { position: relative; aspect-ratio: 1; background: var(--jeu-ciel); background-image: radial-gradient(color-mix(in oklch, var(--foreground) 14%, transparent) 1.5px, transparent 1.6px); background-size: 22px 22px; border: var(--contour); border-radius: var(--radius-xl); box-shadow: var(--shadow-premium); overflow: hidden; }
.vitrine::after { content: ""; position: absolute; inset: auto 0 0; height: 14%; background: var(--jeu-colline); border-top: var(--contour); }
.vitrine__toile { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.vitrine__statut { position: absolute; z-index: 2; left: 1rem; bottom: .9rem; right: 1rem; margin: 0; font-weight: 700; font-size: var(--text-small); color: var(--foreground); }
.achat { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .25rem 1rem; padding: 1rem 1.1rem; background: var(--jeu-oiseau); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.achat p { margin: 0; }
.achat__nom { font: 800 1.4rem/1.05 var(--font-display); }
.achat__info { grid-column: 1; font-size: var(--text-small); font-weight: 600; }
.achat .c-btn { grid-column: 2; grid-row: 1 / span 2; }
.achat .c-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.atelier__actions { margin: 0; }
.note-invite { margin: 0; padding: .8rem 1rem; background: var(--surface); border: 2px dashed var(--foreground); border-radius: var(--radius-md); font-size: var(--text-small); }
.onglets--rayons { flex-wrap: wrap; margin-bottom: 1rem; }
.onglets--rayons button[aria-selected="true"] { background: var(--foreground); color: var(--background); }
.sous-rayon { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; font-size: var(--text-small); font-weight: 700; }
.sous-rayon button[aria-pressed="true"] { background: var(--jeu-rose); }
.rayon { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; }
.objet { position: relative; display: grid; justify-items: center; gap: .2rem; padding: .6rem .5rem .75rem; background: var(--surface); color: var(--foreground); border: 2.5px solid var(--foreground); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); font: inherit; cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s; }
.objet:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.objet:active { transform: translate(2px, 2px); box-shadow: var(--shadow-sm); }
.objet[aria-pressed="true"] { background: var(--jeu-menthe); box-shadow: 6px 6px 0 var(--primary); }
.objet__apercu { width: 5.5rem; height: 5.5rem; }
.objet__nom { font-weight: 700; font-size: var(--text-small); text-align: center; line-height: 1.2; }
.objet__prix { padding: .05rem .5rem; border: 1.5px solid var(--foreground); border-radius: 99px; font-size: var(--text-caption); font-weight: 700; }
.objet--verrouille .objet__prix { background: var(--jeu-oiseau); }
.objet:not(.objet--verrouille) .objet__prix { background: var(--muted); }
.objet__teinte { position: absolute; top: .5rem; left: .5rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--teinte); border: 2px solid var(--foreground); }
@media (prefers-reduced-motion: no-preference) { .vient-dacheter .vitrine { animation: tampon .5s cubic-bezier(.3,1.6,.5,1); } }

/* cartes */
.cartes-page__tete { display: grid; grid-template-columns: 7fr 4fr; gap: clamp(2rem, 5vw, 4rem); align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.booster-boite { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.booster { display: grid; place-content: center; gap: .2rem; width: 10rem; aspect-ratio: 5 / 7; background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, var(--jeu-rose) 14px 28px); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); transform: rotate(-4deg); }
.booster span { padding: .1rem .6rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); font: 800 2rem/1 var(--font-display); }
.booster small { padding: .1rem .4rem; background: var(--foreground); color: var(--background); border-radius: var(--radius-sm); font-size: var(--text-caption); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .booster { animation: flotte 3.5s ease-in-out infinite; } .booster--secoue { animation: secoue .12s linear infinite; } }
.booster-boite__msg { margin: 0; min-height: 1.3em; font-weight: 700; }
.booster-boite__msg[data-type="erreur"] { color: var(--error); }
.booster-boite__msg[data-type="succes"] { color: var(--success); }
.progression-collection { margin: 0; font-weight: 600; color: var(--muted-foreground); }
.progression-collection strong { color: var(--foreground); font: 800 1.6rem var(--font-display); }
.btn-jouer:disabled { opacity: .6; cursor: wait; }

.tirage { display: grid; justify-items: center; gap: 1.5rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); padding: clamp(1.5rem, 4vw, 3rem); background: var(--secondary); border: var(--contour); border-radius: var(--radius-xl); box-shadow: var(--shadow-premium); }
.tirage--legende { background: var(--jeu-or); }
.tirage__cartes { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 3vw, 2rem); }
.tirage .carte-jeu { width: 13rem; }

.album { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.carte-jeu { --rarete: var(--muted); position: relative; perspective: 900px; }
.carte-jeu--rare { --rarete: var(--jeu-bleu); }
.carte-jeu--epique { --rarete: var(--accent); }
.carte-jeu--legendaire { --rarete: var(--jeu-or); }
.carte-jeu__cadre { position: relative; display: grid; gap: .35rem; height: 100%; padding: .7rem .7rem 1rem; background: var(--surface); border: var(--contour); border-radius: var(--radius-lg); box-shadow: 6px 6px 0 var(--foreground); }
.carte-jeu__cadre::before { content: ""; position: absolute; inset: .45rem; border: 2px solid var(--rarete); border-radius: var(--radius-md); pointer-events: none; }
.carte-jeu__oiseau { width: 100%; height: auto; aspect-ratio: 5 / 4; background: var(--rarete); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); }
.carte-jeu--legendaire .carte-jeu__oiseau { background: repeating-conic-gradient(from 0deg at 50% 60%, var(--jeu-or) 0 15deg, var(--jeu-oiseau) 15deg 30deg); }
.carte-jeu__num { position: absolute; top: 1.05rem; left: 1.05rem; z-index: 1; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: 50%; font: 800 .85rem var(--font-display); }
.carte-jeu__rarete { position: absolute; top: 1.05rem; right: 1.05rem; z-index: 1; padding: .05rem .5rem; background: var(--surface); border: 2px solid var(--foreground); border-radius: 99px; font-size: var(--text-caption); font-weight: 800; }
.carte-jeu__nom { margin: .25rem .3rem 0; font-size: 1.55rem; font-weight: 800; line-height: 1; }
.carte-jeu__texte { margin: 0 .3rem; font-size: var(--text-small); line-height: 1.4; color: var(--muted-foreground); }
.carte-jeu__nombre { position: absolute; right: -.6rem; bottom: -.6rem; padding: .1rem .5rem; background: var(--jeu-rose); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); font: 800 1.1rem var(--font-display); transform: rotate(6deg); }
.carte-jeu--cachee .carte-jeu__cadre { background: var(--muted); box-shadow: 6px 6px 0 color-mix(in oklch, var(--foreground) 35%, transparent); }
.carte-jeu--cachee .carte-jeu__oiseau { background: var(--background); }
.carte-jeu:not(.carte-jeu--cachee) .carte-jeu__cadre { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.album .carte-jeu:not(.carte-jeu--cachee):hover .carte-jeu__cadre { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 10px 10px 0 var(--foreground); }
.carte-jeu__nouvelle { position: absolute; top: -.8rem; left: 50%; z-index: 3; padding: .15rem .6rem; background: var(--jeu-rose); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); font: 800 1rem var(--font-display); transform: translateX(-50%) rotate(-4deg); opacity: 0; transition: opacity .2s .5s; }
.est-retournee .carte-jeu__nouvelle { opacity: 1; }
/* retournement */
.carte-jeu--retournable { display: grid; }
.carte-jeu--retournable > * { grid-area: 1 / 1; backface-visibility: hidden; transition: transform .6s var(--ease); }
.carte-jeu--retournable .carte-jeu__cadre { transform: rotateY(180deg); }
.carte-jeu__dos { display: grid; place-items: center; min-height: 18rem; background: repeating-linear-gradient(45deg, var(--accent) 0 12px, var(--jeu-rose) 12px 24px); border: var(--contour); border-radius: var(--radius-lg); box-shadow: 6px 6px 0 var(--foreground); }
.carte-jeu__dos span { padding: .1rem .6rem; background: var(--surface); border: 2.5px solid var(--foreground); border-radius: var(--radius-md); font: 800 1.8rem var(--font-display); }
.est-retournee .carte-jeu__dos { transform: rotateY(-180deg); }
.est-retournee .carte-jeu__cadre { transform: rotateY(0); }
.carte-jeu--retournable .carte-jeu__nouvelle { grid-area: auto; backface-visibility: visible; }
@media (prefers-reduced-motion: reduce) { .carte-jeu--retournable > * { transition: none; } }

/* classements */
.podiums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); margin-top: clamp(2rem, 5vw, 3rem); }
.podium { background: var(--surface); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-premium); overflow: hidden; }
.podium:nth-child(even) { margin-top: 2rem; }
.podium__tete { padding: 1rem 1.25rem; border-bottom: var(--contour); background: var(--jeu-oiseau); }
.podium--1 .podium__tete { background: var(--accent); }
.podium--2 .podium__tete { background: var(--jeu-menthe); }
.podium--objets .podium__tete { background: var(--jeu-rose); }
.podium__tete h2 { margin: 0; font-size: var(--text-h3); font-weight: 800; }
.podium__tete p { margin: 0; font-size: var(--text-small); font-weight: 600; }
.podium__liste { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.podium__liste li { display: grid; grid-template-columns: 2.2rem 3rem 1fr auto; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1.5px dashed var(--border); }
.podium__liste li:last-child { border-bottom: 0; }
.podium__liste li:nth-child(1) .records__rang { background: var(--jeu-oiseau); }
.podium__liste li:nth-child(2) .records__rang { background: var(--muted); }
.podium__liste li:nth-child(3) .records__rang { background: var(--jeu-orange); }
.podium__oiseau { width: 3rem; height: 3rem; }
.podium__nom { display: grid; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__nom small { font-weight: 600; font-size: var(--text-caption); color: var(--muted-foreground); }
.podium__valeur { font: 800 1.35rem var(--font-display); text-align: right; }
.podium__valeur small { font: 600 var(--text-caption) var(--font-body); color: var(--muted-foreground); }

/* bonus (légende de l'accueil) */
.bonus { padding-block: var(--space-section); background: var(--jeu-menthe); border-block: var(--contour); }
.bonus h2 { margin: 0 0 1rem; font-weight: 800; line-height: .95; }
.bonus .chapo { margin-bottom: clamp(2rem, 5vw, 3.5rem); color: var(--foreground); }
.bonus__grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.bonus__carte { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface); border: var(--contour); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.bonus__carte:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 9px 9px 0 var(--foreground); }
.bonus__carte canvas { width: 4.5rem; height: 4.5rem; }
.bonus__carte h3 { margin: 0 0 .2rem; font-size: 1.6rem; font-weight: 800; line-height: 1; }
.bonus__carte p { margin: 0; font-size: 1rem; color: var(--muted-foreground); }
@media (max-width: 960px) { .bonus__carte:nth-child(3n + 2) { transform: none; } }

/* mode Hardcore */
.choix-mode { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.onglets { flex-wrap: wrap; }
.mode-btn--hardcore { background: var(--foreground); color: var(--background); }
.mode-btn--hardcore:hover { background: color-mix(in oklch, var(--foreground) 80%, var(--accent)); }
.mode-btn--hardcore[aria-pressed="true"] { background: var(--accent); color: var(--accent-foreground); }
.ecran__alerte { margin: 0; max-width: 18rem; padding: .3rem .7rem; background: var(--jeu-oiseau); border: 2px solid var(--foreground); border-radius: var(--radius-sm); font-size: var(--text-caption); font-weight: 700; }
.carte-mode--hardcore { grid-column: span 12; display: grid; grid-template-columns: 4fr 6fr 3fr; gap: 1rem 2.5rem; align-items: center; background: var(--foreground); color: var(--background); box-shadow: 8px 8px 0 var(--accent); }
.carte-mode--hardcore .carte-mode__etiquette { color: var(--foreground); }
.carte-mode--hardcore h3 { margin-bottom: 0; color: var(--jeu-oiseau); }
.carte-mode--hardcore p { margin: 0; }
.carte-mode--hardcore:hover { box-shadow: 11px 11px 0 var(--jeu-rose); }
@media (prefers-reduced-motion: no-preference) {
  .carte-mode--hardcore { animation: disco-ombre 3s linear infinite; }
  .carte-mode--hardcore h3 { animation: disco-texte 3s linear infinite; }
}
@keyframes disco-ombre { 0%, 100% { box-shadow: 8px 8px 0 var(--accent); } 25% { box-shadow: 8px 8px 0 var(--jeu-rose); } 50% { box-shadow: 8px 8px 0 var(--jeu-menthe); } 75% { box-shadow: 8px 8px 0 var(--jeu-orange); } }
@keyframes disco-texte { 0%, 100% { color: var(--jeu-oiseau); } 25% { color: var(--jeu-menthe); } 50% { color: var(--jeu-rose); } 75% { color: var(--accent); } }
@media (max-width: 960px) { .carte-mode--hardcore { grid-template-columns: 1fr; } }

@keyframes flotte { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-8px); } }
@keyframes secoue { 0% { transform: rotate(-6deg); } 50% { transform: rotate(4deg) scale(1.03); } 100% { transform: rotate(-6deg); } }

@media (max-width: 960px) {
  .univers__bloc { grid-column: span 12; margin-top: 0; }
  .auth, .atelier__grille, .cartes-page__tete { grid-template-columns: 1fr; }
  .atelier__apercu { position: static; }
  .vitrine { max-width: 26rem; width: 100%; justify-self: center; }
  .podiums { grid-template-columns: 1fr; }
  .podium:nth-child(even) { margin-top: 0; }
}
@media (max-width: 560px) {
  .profil { grid-template-columns: 1fr; justify-items: start; }
  .rayon { grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr)); gap: .75rem; }
  .album { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
  .carte-jeu__nom { font-size: 1.3rem; }
  .achat { grid-template-columns: 1fr; }
  .achat .c-btn { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* Finitions : micro-interactions et focus visibles (pas de changement de contenu) */
.mode-btn { transition: background-color .2s, transform .2s var(--ease, ease); }
.mode-btn:hover { transform: translateY(-2px); }
.mode-btn:active { transform: translateY(1px); }
.records__liste li { transition: background-color .2s, padding-inline .25s var(--ease, ease); }
.records__liste li:hover { background: color-mix(in oklch, var(--jeu-rose, var(--muted)) 35%, transparent); padding-inline: .4rem; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .mode-btn, .records__liste li { transition: none; } .mode-btn:hover { transform: none; } }

/* ---------- Refonte : fêtes de couleurs sur tout le site (toutes animations coupées en reduced-motion) ---------- */
.coupe__jeu { background-color: var(--jeu-ciel); background-image: radial-gradient(color-mix(in oklch, var(--foreground) 16%, transparent) 1.5px, transparent 1.6px), linear-gradient(135deg, var(--jeu-ciel), var(--jeu-menthe) 45%, var(--jeu-rose)); background-size: 22px 22px, 200% 200%; }
.coupe__infos { background: linear-gradient(160deg, var(--background) 55%, color-mix(in oklch, var(--jeu-oiseau) 45%, var(--background))); }
.coupe__infos h1 { text-shadow: 4px 4px 0 var(--jeu-rose), 8px 8px 0 var(--foreground); }
.bandeau { background: linear-gradient(90deg, var(--jeu-rose), var(--jeu-orange), var(--jeu-oiseau), var(--jeu-menthe), var(--jeu-bleu), var(--jeu-rose)); background-size: 200% 100%; }
.carte-mode { position: relative; overflow: hidden; }
.carte-mode--zen { background: linear-gradient(150deg, var(--jeu-ciel), var(--jeu-menthe) 60%, var(--jeu-oiseau)); }
.carte-mode--normal { background: linear-gradient(150deg, var(--jeu-oiseau), var(--jeu-orange) 60%, var(--jeu-rose)); }
.carte-mode--tempete { background: linear-gradient(150deg, var(--secondary), var(--jeu-ciel-nuit) 55%, var(--accent)); box-shadow: 8px 8px 0 var(--jeu-bleu); }
.carte-mode--hardcore { background: linear-gradient(120deg, var(--foreground), var(--jeu-ciel-nuit) 50%, var(--foreground)); background-size: 200% 100%; }
.astuces { background: linear-gradient(160deg, var(--secondary), var(--jeu-ciel-nuit)); }
.astuces__liste li:nth-child(4n+1) { box-shadow: 6px 6px 0 var(--jeu-rose); }
.astuces__liste li:nth-child(4n+2) { box-shadow: 6px 6px 0 var(--jeu-menthe); }
.astuces__liste li:nth-child(4n+3) { box-shadow: 6px 6px 0 var(--jeu-bleu); }
.final { background: linear-gradient(120deg, var(--jeu-orange), var(--jeu-rose) 50%, var(--accent)); background-size: 200% 100%; }
.btn-jouer { box-shadow: 6px 6px 0 var(--foreground), 0 0 0 4px color-mix(in oklch, var(--jeu-oiseau) 70%, transparent); }
.mode-btn[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--foreground), 0 0 14px color-mix(in oklch, var(--jeu-rose) 80%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .coupe__jeu { animation: fete-fond 14s ease-in-out infinite alternate; }
  .bandeau, .final, .carte-mode--hardcore { animation: fete-fond 9s ease-in-out infinite alternate; }
  .btn-jouer { animation: respire 1.8s ease-in-out infinite; }
  .carte-mode--tempete { animation: orage-ombre 4s linear infinite; }
}
@keyframes fete-fond { to { background-position: 100% 100%, 100% 50%; } }
@keyframes orage-ombre { 0%, 100% { box-shadow: 8px 8px 0 var(--jeu-bleu); } 50% { box-shadow: 8px 8px 0 var(--accent); } }

/* ---------- mode dev (comptes dev) ---------- */
.dev-panneau { position: absolute; left: .5rem; bottom: .5rem; z-index: 5; display: flex; flex-wrap: wrap; gap: .25rem; max-width: 15rem; padding: .5rem; background: color-mix(in oklch, var(--foreground) 82%, transparent); color: var(--background); border: 2px solid var(--jeu-oiseau); border-radius: var(--radius-md); font: 700 .7rem var(--font-body); }
.dev-panneau strong, .dev-panneau small { flex: 1 1 100%; }
.dev-btn { padding: .2rem .45rem; border: 1.5px solid var(--background); border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.dev-btn:hover, .dev-btn[aria-pressed="true"] { background: var(--jeu-oiseau); color: var(--foreground); }
