/* La Pile — interface v2 « console » : noir chaud, une seule couleur d'accent, coins coupés façon HUD.
   Polices locales : Chakra Petch (titres, libellés) et Barlow (texte), licence OFL (static/polices/). */
:root {
  --fond: #0b0c0f;
  --fond-2: #111318;
  --surface: #16191f;
  --surface-2: #1d2129;
  --ligne: #272c36;
  --ligne-2: #343a46;
  --texte: #eef0f3;
  --doux: #8d939e;
  --pale: #5d6370;
  --accent: #c8ff2e;
  --accent-sombre: #9fd10f;
  --encre: #0b0c0f;
  --ambre: #ffb53b;
  --rouge: #ff5468;
  --titre: "Chakra Petch", "Barlow", sans-serif;
  --corps: "Barlow", "Segoe UI", sans-serif;
  --coupe: 14px;
  --chanfrein: polygon(0 0, calc(100% - var(--coupe)) 0, 100% var(--coupe), 100% 100%, var(--coupe) 100%, 0 calc(100% - var(--coupe)));
  --sortie: cubic-bezier(.16, .84, .24, 1);
  --ressort: cubic-bezier(.34, 1.56, .5, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--fond);
  color: var(--texte);
  font: 500 15.5px/1.5 var(--corps);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* grain très léger sur toute la page : enlève l'aspect « aplat numérique » */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 300; opacity: .055; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.cache { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: var(--encre); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
kbd { font: 600 11px/1 var(--titre); letter-spacing: .06em; color: var(--doux); border: 1px solid var(--ligne-2); padding: 4px 6px; }
.surtitre { font: 600 12px/1 var(--titre); letter-spacing: .22em; text-transform: uppercase; color: var(--doux); margin: 0; display: flex; align-items: center; gap: 10px; }
.surtitre::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }
.erreur { color: var(--rouge); min-height: 1.3em; margin: 12px 0 0; font-weight: 600; }

/* ------------------------------------------------------------------ boutons */
.btn {
  --c: var(--surface-2);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border: 0; background: var(--c); color: var(--texte); text-decoration: none;
  font: 700 13.5px/1 var(--titre); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  --coupe: 9px; clip-path: var(--chanfrein); overflow: hidden;
  transition: background .18s, color .18s, transform .18s var(--ressort);
}
.btn::after { /* reflet qui balaie le bouton au survol */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); transition: transform .5s var(--sortie);
}
.btn:hover::after { transform: translateX(120%) skewX(-20deg); }
.btn:hover { --c: var(--ligne-2); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-accent { --c: var(--accent); color: var(--encre); }
.btn-accent:hover { --c: #d9ff6b; }
.btn-fantome { --c: transparent; color: var(--doux); }
.btn-fantome:hover { --c: var(--surface-2); color: var(--texte); }
.btn-danger:hover { color: var(--rouge); }
.btn-petit { height: 36px; padding: 0 16px; font-size: 12.5px; }
.btn.actif { --c: rgba(255, 84, 104, .16); color: #ff8b99; }

.btn-icone {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid transparent; background: none;
  color: var(--doux); font: 600 13px/1 var(--titre); letter-spacing: .08em; text-transform: uppercase; transition: color .15s, border-color .15s, background .15s;
}
.btn-icone:hover { color: var(--texte); border-color: var(--ligne-2); background: var(--surface); }
.btn-icone.moi span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ accès */
#acces { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 520px) 1fr; align-items: end; padding: clamp(24px, 6vw, 90px);
  background: radial-gradient(900px 600px at 80% 30%, rgba(200, 255, 46, .07), transparent 60%), var(--fond); overflow: hidden; }
.acces-bloc { position: relative; z-index: 1; animation: monte .7s var(--sortie) both; }
.marque-grande { font: 700 clamp(64px, 10vw, 132px)/.85 var(--titre); text-transform: uppercase; letter-spacing: -.02em; margin: 14px 0 18px; }
.acces-texte { color: var(--doux); max-width: 38ch; margin: 0 0 22px; }
#form-acces { display: grid; gap: 10px; max-width: 360px; }
input, select, textarea { background: var(--fond-2); border: 1px solid var(--ligne); border-radius: 0; padding: 12px 14px; outline: none; transition: border-color .15s, background .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
.acces-pile { position: absolute; right: clamp(-40px, 4vw, 120px); top: 50%; transform: translateY(-50%) rotate(-8deg); display: grid; gap: 22px; width: min(46vw, 620px); opacity: .9; }
.acces-pile i { display: block; height: 74px; background: var(--surface); clip-path: var(--chanfrein); --coupe: 22px; animation: respire 6s ease-in-out infinite; }
.acces-pile i:nth-child(1) { background: var(--accent); margin-left: 18%; animation-delay: -1s; }
.acces-pile i:nth-child(2) { margin-left: 6%; background: var(--surface-2); animation-delay: -2s; }
.acces-pile i:nth-child(3) { margin-left: 26%; animation-delay: -3s; }
.acces-pile i:nth-child(4) { margin-left: 0; background: var(--fond-2); animation-delay: -4s; }
.acces-pile i:nth-child(5) { margin-left: 14%; background: var(--fond-2); opacity: .6; animation-delay: -5s; }
@keyframes respire { 50% { transform: translateX(-18px); } }
@media (max-width: 800px) { #acces { grid-template-columns: 1fr; } .acces-pile { width: 90vw; top: 22%; opacity: .35; } }

/* ------------------------------------------------------------------ barre du haut */
#appli { min-height: 100vh; }
.barre {
  position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(12px, 2.5vw, 32px);
  padding: 12px clamp(14px, 3vw, 44px); background: linear-gradient(var(--fond) 30%, rgba(11, 12, 15, .82)); border-bottom: 1px solid rgba(39, 44, 54, .7);
  backdrop-filter: blur(12px);
}
.marque { display: flex; align-items: center; gap: 12px; color: var(--texte); text-decoration: none; }
.marque-nom { font: 700 22px/1 var(--titre); text-transform: uppercase; letter-spacing: .04em; }
.marque-pile { display: grid; gap: 3px; width: 28px; }
.marque-pile i { display: block; height: 6px; background: var(--ligne-2); transition: transform .3s var(--ressort); }
.marque-pile i:first-child { background: var(--accent); width: 78%; margin-left: 22%; }
.marque-pile i:nth-child(2) { width: 90%; }
.marque:hover .marque-pile i:first-child { transform: translateX(-6px); }
.marque:hover .marque-pile i:nth-child(3) { transform: translateX(4px); }

.ajout { position: relative; max-width: 680px; width: 100%; justify-self: center; }
#form-ajout { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; background: var(--fond-2); border: 1px solid var(--ligne);
  --coupe: 10px; clip-path: var(--chanfrein); transition: border-color .15s, background .15s; }
#form-ajout:focus-within { border-color: var(--accent); background: var(--surface); }
#form-ajout .ic { color: var(--accent); }
#form-ajout input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0; font-size: 15px; }
.resultats { position: absolute; left: 0; right: 0; top: 54px; z-index: 50; background: var(--surface); border: 1px solid var(--ligne-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: monte .2s var(--sortie); }
.resultat { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 12px; border: 0; background: none; text-align: left; transition: background .12s; }
.resultat:hover, .resultat:focus { background: var(--surface-2); outline: none; }
.resultat img { width: 116px; height: 43px; object-fit: cover; flex-shrink: 0; }
.resultat .nom { font-weight: 600; }
.resultat .etat { font: 600 11px/1 var(--titre); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-top: 4px; display: block; }
.resultat .prix { margin-left: auto; color: var(--doux); font: 600 13px/1 var(--titre); }
.resultat.deja { opacity: .6; }
.actions { display: flex; gap: 2px; }
@media (max-width: 1100px) { .actions .btn-icone span { display: none; } .raccourci { display: none; } }
@media (max-width: 720px) {
  .barre { grid-template-columns: auto 1fr; grid-template-areas: "marque actions" "ajout ajout"; row-gap: 10px; }
  .marque { grid-area: marque; } .actions { grid-area: actions; justify-self: end; } .ajout { grid-area: ajout; }
  .barre { position: relative; }
}

/* ------------------------------------------------------------------ scène (jeu mis en avant) */
.scene { position: relative; min-height: clamp(360px, 54vh, 580px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.scene-art { position: absolute; inset: 0; z-index: -1; }
.calque { position: absolute; inset: -2%; background-size: cover; background-position: center 25%; opacity: 0; transition: opacity .9s ease;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, #000 55%), linear-gradient(#000 55%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, rgba(0, 0, 0, .35) 0%, #000 55%), linear-gradient(#000 55%, transparent); mask-composite: intersect; }
.calque.visible { opacity: 1; animation: derive 24s ease-in-out infinite alternate; }
@keyframes derive { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
.scene::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 12, 15, .94) 0%, rgba(11, 12, 15, .78) 32%, rgba(11, 12, 15, .3) 58%, transparent 80%), linear-gradient(transparent 55%, rgba(11, 12, 15, .7)); }
.scene .surtitre { color: #b9bfc9; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.scene-contenu { width: 100%; padding: 40px clamp(14px, 3vw, 44px) 34px; }
.scene-contenu > * { max-width: 680px; }
.scene-contenu.entre > * { animation: monte .55s var(--sortie) both; }
.scene-contenu.entre > *:nth-child(2) { animation-delay: .05s; }
.scene-contenu.entre > *:nth-child(3) { animation-delay: .1s; }
.scene-contenu.entre > *:nth-child(4) { animation-delay: .15s; }
.scene-contenu.entre > *:nth-child(5) { animation-delay: .2s; }
@keyframes monte { from { opacity: 0; transform: translateY(16px); } }
.scene h2 { font: 700 clamp(36px, 5.4vw, 80px)/.92 var(--titre); text-transform: uppercase; letter-spacing: -.015em; margin: 14px 0 14px; text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.scene .ligne-infos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: #c7ccd4; font-weight: 600; margin-bottom: 18px; }
.scene .ligne-infos .sep { width: 4px; height: 4px; background: var(--pale); }
.note-avis { display: inline-flex; align-items: center; gap: 8px; }
.note-avis b { font: 700 15px/1 var(--titre); color: var(--accent); }
.note-avis.moyen b { color: var(--ambre); }
.note-avis.bas b { color: var(--rouge); }
.prix-bloc { display: inline-flex; align-items: stretch; font: 700 15px/1 var(--titre); }
.prix-bloc .remise { background: var(--accent); color: var(--encre); padding: 6px 8px; }
.prix-bloc .avant { padding: 6px 8px; background: rgba(11, 12, 15, .6); color: var(--doux); text-decoration: line-through; font-weight: 500; }
.prix-bloc .maintenant { padding: 6px 10px; background: rgba(11, 12, 15, .72); }
.scene-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.envies { display: inline-flex; align-items: center; gap: 6px; color: #ff8b99; font-weight: 600; }
.envies .ic { width: 16px; height: 16px; fill: currentColor; }
.scene-vide { padding-bottom: 20px; }
.scene-vide h2 { color: var(--texte); }
.scene-vide p { color: var(--doux); max-width: 46ch; font-size: 17px; }
@media (max-width: 720px) {
  .scene { min-height: 330px; }
  .scene::before { background: linear-gradient(transparent 10%, rgba(11, 12, 15, .9) 75%); }
  .scene-contenu { padding-top: 120px; }
}

/* ------------------------------------------------------------------ onglets et filtres */
.commandes { position: sticky; top: 73px; z-index: 30; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap;
  padding: 0 clamp(14px, 3vw, 44px); background: linear-gradient(var(--fond) 70%, rgba(11, 12, 15, 0)); border-bottom: 1px solid var(--ligne); }
.onglets { position: relative; display: flex; gap: clamp(14px, 3vw, 36px); }
.onglet { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0; border: 0; background: none; color: var(--pale);
  font: 700 clamp(15px, 1.6vw, 19px)/1 var(--titre); letter-spacing: .1em; text-transform: uppercase; transition: color .2s; }
.onglet:hover { color: var(--doux); }
.onglet.actif { color: var(--texte); }
.onglet b { font: 700 12px/1 var(--titre); padding: 4px 6px; min-width: 26px; text-align: center; background: var(--surface-2); color: var(--doux); transition: background .2s, color .2s, transform .3s var(--ressort); }
.onglet.actif b { background: var(--accent); color: var(--encre); }
.onglet b.saut { transform: scale(1.45); }
.onglet-trait { position: absolute; bottom: -1px; left: 0; height: 3px; width: 0; background: var(--accent); transition: transform .35s var(--sortie), width .35s var(--sortie); }
.filtres { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; flex-wrap: wrap; }
.recherche { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border: 1px solid var(--ligne); background: var(--fond-2); color: var(--pale); }
.recherche:focus-within { border-color: var(--accent); color: var(--accent); }
.recherche input { border: 0; background: none; padding: 0; width: 120px; height: 100%; }
.puce { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--ligne); background: none; color: var(--doux);
  font: 600 12px/1 var(--titre); letter-spacing: .1em; text-transform: uppercase; transition: all .15s; }
.puce .ic { width: 15px; height: 15px; }
.puce:hover { color: var(--texte); border-color: var(--ligne-2); }
.puce.actif { background: var(--accent); border-color: var(--accent); color: var(--encre); }
#tri { height: 36px; padding: 0 10px; font: 600 12px/1 var(--titre); letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
@media (max-width: 720px) {
  .commandes { position: static; }
  .onglets { width: 100%; justify-content: space-between; }
  .onglet { height: 50px; font-size: 14px; gap: 6px; }
  .filtres { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .filtres > * { flex-shrink: 0; }
}

/* ------------------------------------------------------------------ grille de jaquettes */
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 26px 20px; padding: 28px clamp(14px, 3vw, 44px) 80px; }
@media (max-width: 520px) { .grille { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; } }
.jeu { position: relative; aspect-ratio: 2 / 3; cursor: pointer; outline: none; --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s var(--sortie);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); animation: arrive .5s var(--sortie) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes arrive { from { opacity: 0; transform: translateY(26px) scale(.94); } }
.jeu.survol { transition: transform .08s linear; }
.cadre { position: absolute; inset: 0; clip-path: var(--chanfrein); background: var(--ligne); padding: 1px; transition: background .2s, padding .2s; }
.jeu:hover .cadre, .jeu:focus-visible .cadre, .jeu.choisi .cadre { background: var(--accent); padding: 2px; }
.corps { position: relative; width: 100%; height: 100%; clip-path: var(--chanfrein); background: var(--surface); overflow: hidden; }
.corps img.couv { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--sortie), filter .3s; }
.jeu:hover img.couv { transform: scale(1.05); }
.corps.paysage .flou { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(22px) brightness(.55) saturate(1.3); }
.corps.paysage img.couv { position: absolute; inset: 30% 0 auto; height: auto; }
.sans-image { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font: 700 18px/1.1 var(--titre); text-transform: uppercase; background: var(--surface-2); }
.lustre { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .22), transparent 42%); mix-blend-mode: soft-light; }
.jeu:hover .lustre { opacity: 1; }
.voile-bas { position: absolute; inset: auto 0 0 0; padding: 46px 12px 12px; background: linear-gradient(transparent, rgba(8, 9, 11, .95) 60%); transform: translateY(101%); transition: transform .3s var(--sortie); }
.jeu:hover .voile-bas, .jeu:focus-within .voile-bas, .corps.paysage .voile-bas, .corps.sans .voile-bas { transform: none; }
.voile-bas .titre { font: 700 14px/1.15 var(--titre); text-transform: uppercase; letter-spacing: .02em; }
.voile-bas .infos { display: flex; gap: 8px; margin-top: 5px; font-size: 12.5px; color: #c7ccd4; font-weight: 600; }
.rapide { display: flex; gap: 6px; margin-top: 10px; }
.rapide button { flex: 1; height: 34px; display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .12); color: var(--texte); --coupe: 7px; clip-path: var(--chanfrein); transition: background .15s, color .15s, transform .15s var(--ressort); }
.rapide button .ic { width: 17px; height: 17px; }
.rapide button:hover { background: var(--texte); color: var(--encre); transform: translateY(-2px); }
.rapide button.ok { background: var(--accent); color: var(--encre); }
.rapide button.ok:hover { background: #d9ff6b; }
@media (hover: none) { .voile-bas { display: none; } .corps.paysage .voile-bas, .corps.sans .voile-bas { display: block; transform: none; } .rapide { display: none; } }
.etiquette { position: absolute; top: 10px; left: 0; padding: 5px 9px 5px 8px; font: 700 13px/1 var(--titre); letter-spacing: .03em; color: var(--encre); background: var(--accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%); }
.etiquette.gratuit { background: var(--texte); }
.pastille { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; background: rgba(8, 9, 11, .78); font: 700 12px/1 var(--titre); }
.pastille .ic { width: 14px; height: 14px; }
.pastille.envie { top: 10px; right: 10px; color: #ff8b99; }
.pastille.envie .ic { fill: currentColor; }
.pastille.coop { left: 10px; bottom: 10px; color: var(--accent); transition: opacity .2s; }
.jeu:hover .pastille.coop, .corps.paysage .pastille.coop { opacity: 0; }
.jeu.est-fait img.couv { filter: grayscale(.85) brightness(.62); }
.tampon { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) rotate(-14deg); padding: 6px 14px; border: 3px solid var(--accent); color: var(--accent);
  font: 700 19px/1 var(--titre); letter-spacing: .18em; background: rgba(11, 12, 15, .55); white-space: nowrap; }
.jeu.tamponne .tampon { animation: tampon .42s var(--ressort) both; }
@keyframes tampon { from { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.4); } 70% { opacity: 1; } }
.jeu.part { animation: part .42s var(--sortie) forwards; pointer-events: none; }
@keyframes part { to { opacity: 0; transform: perspective(900px) translateY(-30px) scale(.82) rotate(-3deg); } }
.vide { margin: 0; padding: 30px clamp(14px, 3vw, 44px) 90px; color: var(--doux); font-size: 17px; }

/* ------------------------------------------------------------------ fiche */
.voile { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; overflow-y: auto; background: rgba(5, 6, 8, .78); backdrop-filter: blur(6px); animation: fondu .2s; }
@keyframes fondu { from { opacity: 0; } }
.fiche { position: relative; width: min(1040px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; background: var(--fond-2); border: 1px solid var(--ligne);
  --coupe: 22px; clip-path: var(--chanfrein); animation: ouvre .4s var(--sortie); scrollbar-width: thin; }
@keyframes ouvre { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.fiche-art { position: absolute; inset: 0 0 auto; height: 380px; background-size: cover; background-position: center 25%;
  -webkit-mask-image: linear-gradient(#000 25%, transparent); mask-image: linear-gradient(#000 25%, transparent); opacity: .7; }
.fermer { position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: rgba(8, 9, 11, .7); color: var(--texte); transition: background .15s, transform .2s var(--ressort); }
.fermer:hover { background: var(--accent); color: var(--encre); transform: rotate(90deg); }
.fiche-tete { position: relative; display: flex; gap: 28px; align-items: flex-end; padding: 170px 34px 8px; }
.fiche-couv { flex-shrink: 0; width: 176px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .7)); }
.fiche-couv img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; clip-path: var(--chanfrein); background: var(--surface); }
.fiche-couv img.paysage { aspect-ratio: auto; }
.fiche-titre { min-width: 0; padding-bottom: 6px; }
.fiche-titre h2 { font: 700 clamp(30px, 4vw, 52px)/.95 var(--titre); text-transform: uppercase; margin: 12px 0 10px; text-wrap: balance; text-shadow: 0 3px 24px rgba(0, 0, 0, .6); }
.meta { color: #c7ccd4; margin: 0 0 12px; font-weight: 600; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puces span { padding: 5px 9px; font: 600 12px/1 var(--titre); letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .08); color: #d5d9df; }
.puces span.multi { background: rgba(200, 255, 46, .13); color: var(--accent); }
.fiche-corps { position: relative; padding: 20px 34px 32px; }
.segment { display: inline-flex; gap: 4px; padding: 4px; background: var(--fond); border: 1px solid var(--ligne); margin-bottom: 20px; flex-wrap: wrap; }
.segment button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 0; background: none; color: var(--doux);
  font: 700 13px/1 var(--titre); letter-spacing: .1em; text-transform: uppercase; transition: background .2s, color .2s; }
.segment button:hover { color: var(--texte); }
.segment button.actif { background: var(--surface-2); color: var(--texte); }
.segment button[data-statut="fait"].actif { background: var(--accent); color: var(--encre); }
.segment button[data-statut="peutetre"].actif { background: var(--ambre); color: var(--encre); }
.desc { font-size: 16.5px; line-height: 1.6; color: #d5d9df; max-width: 72ch; margin: 0 0 18px; }
.captures { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.captures img { height: 150px; flex-shrink: 0; scroll-snap-align: start; cursor: zoom-in; transition: transform .25s var(--sortie), filter .2s; filter: brightness(.88); }
.captures img:hover { filter: none; transform: translateY(-3px); }
.captures img.zoom { height: auto; width: min(900px, 86vw); cursor: zoom-out; filter: none; }
.note-label { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--titre); letter-spacing: .12em; text-transform: uppercase; color: var(--doux); margin-bottom: 8px; }
.note-label .ic { width: 15px; height: 15px; }
textarea { width: 100%; resize: vertical; }
.origine { color: var(--doux); font-size: 14px; margin: 10px 0 0; }
.fiche-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.espace { flex: 1; }
#f-envie.actif .ic { fill: currentColor; }
@media (max-width: 720px) {
  .voile { padding: 0; }
  .fiche { max-height: 100vh; min-height: 100vh; --coupe: 0px; }
  .fiche-tete { flex-direction: column; align-items: flex-start; padding: 110px 18px 4px; gap: 16px; }
  .fiche-couv { width: 120px; }
  .fiche-corps { padding: 16px 18px 28px; }
  .espace { display: none; }
}

/* ------------------------------------------------------------------ tirage au sort */
.tirage { text-align: center; display: grid; justify-items: center; gap: 16px; }
.rouleau-halo { transition: filter .4s; }
.rouleau-halo.gagne { filter: drop-shadow(0 0 34px rgba(200, 255, 46, .45)); animation: gagne .7s var(--ressort); }
.rouleau-cadre { padding: 3px; background: var(--accent); --coupe: 20px; clip-path: var(--chanfrein); }
.rouleau { position: relative; width: 230px; height: 345px; overflow: hidden; --coupe: 18px; clip-path: var(--chanfrein); background: var(--surface); }
.bande { display: flex; flex-direction: column; will-change: transform; }
.bande img, .bande .sans-image { position: relative; width: 230px; height: 345px; object-fit: cover; flex-shrink: 0; display: grid; }
.viseur { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(11, 12, 15, .55), transparent 18%, transparent 82%, rgba(11, 12, 15, .55)); }
@keyframes gagne { 40% { transform: scale(1.07); } }
.tirage h2 { font: 700 clamp(26px, 4vw, 40px)/1 var(--titre); text-transform: uppercase; margin: 6px 0 0; min-height: 1em; }
.tirage-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ------------------------------------------------------------------ panneau activité */
.panneau { position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(400px, 94vw); display: flex; flex-direction: column; background: var(--fond-2);
  border-left: 1px solid var(--ligne); box-shadow: -30px 0 60px rgba(0, 0, 0, .5); animation: glisse .3s var(--sortie); }
@keyframes glisse { from { transform: translateX(60px); opacity: 0; } }
.panneau header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--ligne); }
.panneau h3 { margin: 0; font: 700 18px/1 var(--titre); letter-spacing: .14em; text-transform: uppercase; }
.panneau .fermer { position: static; }
.panneau ol { list-style: none; margin: 0; padding: 6px 22px 30px; overflow-y: auto; }
.panneau li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ligne); font-size: 14.5px; cursor: pointer; }
.panneau li:hover { color: var(--accent); }
.panneau li time { font: 600 11.5px/1.5 var(--titre); letter-spacing: .04em; color: var(--pale); text-transform: uppercase; }

/* ------------------------------------------------------------------ dialogue */
.petite-carte { width: min(440px, 100%); padding: 28px; background: var(--fond-2); border: 1px solid var(--ligne); --coupe: 18px; clip-path: var(--chanfrein); animation: ouvre .3s var(--sortie); }
.petite-carte h3 { margin: 0 0 14px; font: 700 22px/1 var(--titre); letter-spacing: .06em; text-transform: uppercase; }
.petite-carte p { color: var(--doux); margin: 0 0 12px; }
.petite-carte input { width: 100%; margin-bottom: 10px; }
.choix-noms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.dialogue-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.favori-zone { margin: 4px 0 20px; }
.favori { cursor: grab; }
.trait-sep { height: 1px; background: var(--ligne); margin: 4px 0 18px; }

/* ------------------------------------------------------------------ notifications */
#toasts { position: fixed; left: clamp(12px, 3vw, 44px); bottom: 22px; z-index: 200; display: grid; gap: 10px; max-width: min(440px, 92vw); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; background: var(--surface); border: 1px solid var(--ligne-2); --coupe: 10px; clip-path: var(--chanfrein);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5); animation: toast-entre .35s var(--sortie); font-weight: 600; }
.toast .ic { color: var(--accent); }
.toast.err .ic { color: var(--rouge); }
.toast.sort { animation: toast-sort .3s ease-in forwards; }
@keyframes toast-entre { from { opacity: 0; transform: translateX(-30px); } }
@keyframes toast-sort { to { opacity: 0; transform: translateX(-30px); } }
/* « succès débloqué » quand un jeu est terminé */
.succes { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; min-width: 320px; background: #12150c; border: 1px solid rgba(200, 255, 46, .5);
  --coupe: 12px; clip-path: var(--chanfrein); box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(200, 255, 46, .12); animation: succes .6s var(--ressort); overflow: hidden; }
.succes .medaille { width: 52px; height: 52px; display: grid; place-items: center; background: var(--accent); color: var(--encre); flex-shrink: 0; --coupe: 9px; clip-path: var(--chanfrein); }
.succes .medaille .ic { width: 28px; height: 28px; }
.succes small { display: block; font: 700 11px/1 var(--titre); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.succes strong { font: 700 17px/1.1 var(--titre); text-transform: uppercase; }
.succes img { width: 38px; height: 57px; object-fit: cover; margin-left: auto; }
.succes::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); animation: jauge 4.6s linear forwards; }
@keyframes succes { from { opacity: 0; transform: translateY(40px) scale(.9); } }
@keyframes jauge { from { width: 100%; } to { width: 0; } }

/* confettis carrés aux couleurs de l'interface */
.eclat { position: fixed; z-index: 250; width: 7px; height: 7px; pointer-events: none; animation: eclat .8s var(--sortie) forwards; }
@keyframes eclat { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .jeu { transform: none !important; }
}
