/* Ludothèque — feuille unique.
   Vert tapis de jeu pour l'habillage, jaune meeple pour les actions, rouge étiquette
   UNIQUEMENT pour l'argent et la vente. Les couvertures sont le contenu : tout le reste
   se tait autour d'elles. */

:root {
  --feutre: #1f3a2e;          /* habillage : rail, en-têtes de panneau */
  --feutre-clair: #2c5141;
  --fond: #eef0ec;            /* pierre, légèrement verte */
  --surface: #ffffff;
  --encre: #1c2321;
  --discret: #5d6b65;
  --ligne: #d5dbd6;
  --meeple: #f2b705;          /* action principale, note perso */
  --meeple-encre: #2a2000;
  --etiquette: #c8372d;       /* prix, vente */
  --ok: #2f7d4f;
  --alerte: #b25d00;
  --ombre-boite: 0 1px 0 rgba(0, 0, 0, .18), 0 6px 14px -8px rgba(15, 30, 22, .55);
  --r-petit: 6px;
  --r: 10px;
  --police-titre: "Bricolage Grotesque", system-ui, sans-serif;
  --police: "Atkinson Hyperlegible", system-ui, sans-serif;
  --haut-boite: 172px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #121815; --surface: #1b2420; --encre: #e6ebe8; --discret: #95a39c;
    --ligne: #2c3832; --feutre: #0d1f17; --feutre-clair: #183427;
    --ombre-boite: 0 1px 0 rgba(0, 0, 0, .5), 0 8px 16px -8px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #121815; --surface: #1b2420; --encre: #e6ebe8; --discret: #95a39c;
  --ligne: #2c3832; --feutre: #0d1f17; --feutre-clair: #183427;
  --ombre-boite: 0 1px 0 rgba(0, 0, 0, .5), 0 8px 16px -8px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 16px/1.5 var(--police);
}
h1, h2, h3 { font-family: var(--police-titre); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: 1.9rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--meeple); outline-offset: 2px; }
.discret { color: var(--discret); }
.erreur { color: var(--etiquette); font-weight: 700; }
.nombre { font-family: var(--police-titre); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ── Boutons, champs ─────────────────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; gap: .4em; border: 1px solid var(--ligne);
  background: var(--surface); border-radius: 999px; padding: .45em 1em; cursor: pointer;
  font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.bouton:hover { border-color: var(--discret); }
.bouton.principal { background: var(--meeple); color: var(--meeple-encre); border-color: transparent; }
.bouton.principal:hover { filter: brightness(1.05); }
.bouton.danger { color: var(--etiquette); }
.bouton.petit { padding: .25em .7em; font-size: .82rem; }
.bouton:disabled { opacity: .5; cursor: default; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=password],
input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--ligne); border-radius: var(--r-petit);
  background: var(--surface); padding: .5em .65em;
}
textarea { min-height: 7em; resize: vertical; line-height: 1.45; }
label { display: grid; gap: .25em; font-size: .88rem; color: var(--discret); }
label > input, label > select, label > textarea { color: var(--encre); font-size: 1rem; }

/* Puces de filtre : la « question » à gauche, les réponses en pastilles */
.puces { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.puce {
  border: 1px solid var(--ligne); background: var(--surface); border-radius: 999px;
  padding: .28em .8em; font-size: .88rem; cursor: pointer; white-space: nowrap;
}
.puce[aria-pressed="true"] { background: var(--feutre); color: #fff; border-color: var(--feutre); }
.puce .n { color: var(--discret); font-size: .8em; margin-left: .25em; }
.puce[aria-pressed="true"] .n { color: #cfe0d6; }

/* ── Structure : rail + vue + panneau ────────────────────────────────────── */
.appli { min-height: 100vh; display: grid; grid-template-columns: 84px 1fr; }
.rail {
  background: var(--feutre); color: #dfe9e3; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; align-items: stretch; gap: .2rem; padding: .8rem .4rem;
}
.rail a {
  position: relative; display: grid; justify-items: center; gap: .15rem; text-decoration: none;
  padding: .55rem .2rem; border-radius: var(--r); font-size: .74rem; color: #c3d4ca;
}
.rail a svg { width: 24px; height: 24px; fill: currentColor; }
.rail a:hover { background: var(--feutre-clair); color: #fff; }
.rail a[aria-current="page"] { background: var(--feutre-clair); color: #fff; }
.rail a[aria-current="page"]::before {
  content: ""; position: absolute; left: -.4rem; top: 25%; bottom: 25%; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--meeple);
}
.rail-logo { margin-bottom: .8rem; }
.pastille {
  position: absolute; top: .3rem; right: .9rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem;
  border-radius: 999px; background: var(--etiquette); color: #fff; font-size: .7rem;
  display: grid; place-items: center; font-family: var(--police-titre);
}
.vue { padding: 1.4rem clamp(1rem, 3vw, 2.5rem) 6rem; min-width: 0; outline: none; }
.entete { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; margin-bottom: 1rem; }
.entete h1 { margin: 0; }
.entete .outils { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.entete .outils select { width: auto; border-radius: 999px; padding: .45em .9em; }

/* ── Étagère : la pièce maîtresse ────────────────────────────────────────── */
.barre-recherche { position: relative; max-width: 640px; flex: 1 1 320px; }
.barre-recherche input { padding: .7em 1em .7em 2.6em; font-size: 1.05rem; border-radius: 999px; }
.barre-recherche svg { position: absolute; left: .95em; top: 50%; translate: 0 -50%; width: 18px; fill: var(--discret); }
.filtres { display: grid; gap: .55rem; margin: 1rem 0 1.2rem; }
.filtres .rangee { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }
.filtres .question { font-family: var(--police-titre); font-weight: 600; font-size: .95rem; min-width: 7.5rem; }
.resume-filtre { color: var(--discret); font-size: .92rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.resume-filtre .nombre { color: var(--encre); font-size: 1.15rem; }

.etagere { display: flex; flex-wrap: wrap; gap: 1.1rem .9rem; align-items: flex-end; }
.boite {
  position: relative; height: var(--haut-boite); flex: 0 0 auto; padding: 0; border: 0;
  background: var(--feutre-clair); border-radius: 3px; cursor: pointer; box-shadow: var(--ombre-boite);
  transition: transform .15s ease; display: block; margin-bottom: 1.9rem;
}
/* La tablette : chaque boîte porte son bout de planche, qui déborde sur l'espace entre
   deux boîtes — mis bout à bout, les morceaux forment une étagère continue par rangée. */
.boite::before {
  content: ""; position: absolute; left: -.5rem; right: -.5rem; bottom: -7px; height: 5px;
  background: color-mix(in srgb, var(--feutre) 22%, var(--ligne)); border-radius: 1px;
}
.boite:hover::before, .boite:focus-visible::before { translate: 0 4px; }
.boite img { height: 100%; width: 100%; object-fit: cover; border-radius: 3px; display: block; }
.boite:hover, .boite:focus-visible { transform: translateY(-4px); }
.boite .titre-boite {
  position: absolute; left: 0; right: 0; top: calc(100% + .7rem); font-size: .78rem; line-height: 1.2;
  color: var(--discret); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left;
}
.boite .sans-image {
  height: 100%; display: grid; place-items: center; padding: .6rem; color: #fff; text-align: center;
  font-family: var(--police-titre); font-size: .9rem;
}
.boite .note {
  position: absolute; left: -6px; top: -6px; width: 30px; height: 30px; border-radius: 8px;
  background: var(--meeple); color: var(--meeple-encre); font-family: var(--police-titre);
  font-weight: 800; font-size: .85rem; display: grid; place-items: center; rotate: -6deg;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.boite .prix {
  position: absolute; right: -8px; bottom: 14px; background: var(--etiquette); color: #fff;
  font-family: var(--police-titre); font-weight: 700; font-size: .82rem; padding: .1em .55em .1em .7em;
  border-radius: 3px 999px 999px 3px; rotate: -4deg; box-shadow: 0 2px 4px rgba(0, 0, 0, .3);
}
.boite .marques { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; }
.marque {
  background: rgba(15, 25, 20, .78); color: #fff; font-size: .68rem; border-radius: 4px; padding: .05em .35em;
}
.boite .synchro {
  position: absolute; left: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--meeple); border: 2px solid #fff;
}
.boite .synchro.erreur, .boite .synchro.conflit { background: var(--etiquette); }

/* Liste dense (alternative à l'étagère) */
.liste { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r); overflow: hidden; }
.liste th, .liste td { padding: .45rem .6rem; border-bottom: 1px solid var(--ligne); text-align: left; font-size: .92rem; }
.liste th { font-family: var(--police-titre); font-weight: 600; color: var(--discret); cursor: pointer; white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.liste td.num, .liste th.num { text-align: right; font-variant-numeric: tabular-nums; }
.liste tr { cursor: pointer; }
.liste tr:hover td { background: color-mix(in srgb, var(--meeple) 10%, var(--surface)); }
.liste img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; vertical-align: middle; }
.defile { overflow-x: auto; }

/* ── Panneau latéral (fiche) ─────────────────────────────────────────────── */
.panneau {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(560px, 100vw); background: var(--surface);
  box-shadow: -10px 0 40px rgba(0, 0, 0, .25); z-index: 30; overflow-y: auto;
  translate: 100% 0; transition: translate .22s ease, visibility 0s linear .22s; overscroll-behavior: contain;
  visibility: hidden;   /* sinon son ombre déborde sur le bord droit de l'écran */
}
.panneau.ouvert { translate: 0 0; visibility: visible; transition: translate .22s ease; }
.voile { position: fixed; inset: 0; background: rgba(10, 20, 15, .45); z-index: 25; }
.fiche-tete { position: relative; background: var(--feutre); color: #fff; padding: 1.2rem 1.3rem 1.1rem; display: grid; grid-template-columns: 118px 1fr; gap: 1.1rem; }
.fiche-tete img { width: 118px; border-radius: 4px; box-shadow: var(--ombre-boite); align-self: start; }
.fiche-tete h2 { font-size: 1.5rem; margin: 0 2rem .25rem 0; }
.fiche-tete .faits { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .9rem; color: #cfe0d6; margin-top: .4rem; }
.fiche-tete .faits b { color: #fff; font-family: var(--police-titre); }
.fermer {
  position: absolute; right: .7rem; top: .7rem; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.fiche-corps { padding: 1.1rem 1.3rem 3rem; display: grid; gap: 1.4rem; }
.bloc h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.bloc h3 .discret { font-family: var(--police); font-weight: 400; font-size: .85rem; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }

/* Note : dix cases, la note BGG se donne d'un geste */
.note-cases { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.note-cases button {
  aspect-ratio: 1; border: 1px solid var(--ligne); background: var(--surface); border-radius: 5px;
  font-family: var(--police-titre); font-weight: 700; cursor: pointer; font-size: .9rem;
}
.note-cases button.plein { background: var(--meeple); border-color: var(--meeple); color: var(--meeple-encre); }
.statuts { display: flex; flex-wrap: wrap; gap: .35rem; }
.etat-sync { font-size: .82rem; display: inline-flex; align-items: center; gap: .35rem; }
.etat-sync::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.etat-sync.attente::before { background: var(--meeple); }
.etat-sync.erreur::before, .etat-sync.conflit::before { background: var(--etiquette); }

.cote { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.cote > div { border: 1px solid var(--ligne); border-radius: var(--r); padding: .6rem .3rem; }
.cote .valeur { font-family: var(--police-titre); font-size: 1.45rem; font-weight: 700; }
.cote .marche-prix { border-color: var(--etiquette); }
.cote .marche-prix .valeur { color: var(--etiquette); }
.explication { font-size: .86rem; color: var(--discret); margin: .6rem 0 0; padding-left: 1.1rem; }
.annonces-mini { font-size: .86rem; display: grid; gap: .2rem; margin-top: .6rem; }
.annonces-mini a { display: flex; justify-content: space-between; gap: .6rem; text-decoration: none; padding: .15rem 0; border-bottom: 1px dashed var(--ligne); }

/* ── Parties ─────────────────────────────────────────────────────────────── */
.journal { display: grid; gap: .55rem; max-width: 860px; }
.mois { font-family: var(--police-titre); font-weight: 700; margin: 1.1rem 0 .2rem; color: var(--discret); }
.partie {
  display: grid; grid-template-columns: 52px 1fr auto; gap: .8rem; align-items: center;
  background: var(--surface); border-radius: var(--r); padding: .55rem .8rem .55rem .55rem;
  border: 1px solid var(--ligne); cursor: pointer;
}
.partie img, .partie .vide { width: 52px; height: 52px; object-fit: cover; border-radius: 4px; background: var(--feutre-clair); }
.partie .qui { font-size: .86rem; color: var(--discret); }
.partie .qui b { color: var(--encre); }
.partie .gagnant::after { content: " ★"; color: var(--meeple); }
.partie .date { font-family: var(--police-titre); text-align: right; font-size: .9rem; }

/* ── Ventes : colonnes par statut ────────────────────────────────────────── */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .9rem; overflow-x: auto; padding-bottom: .6rem; align-items: start; }
.colonne { background: color-mix(in srgb, var(--feutre) 7%, var(--fond)); border-radius: var(--r); padding: .7rem; min-height: 8rem; }
.colonne h3 { display: flex; justify-content: space-between; font-size: .98rem; }
.carte-vente {
  background: var(--surface); border-radius: var(--r-petit); padding: .55rem; margin-top: .55rem;
  display: grid; grid-template-columns: 48px 1fr; gap: .6rem; cursor: pointer; border: 1px solid var(--ligne);
}
.carte-vente img { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; }
.carte-vente .prix-v { font-family: var(--police-titre); font-weight: 700; color: var(--etiquette); }
.bilan { display: flex; flex-wrap: wrap; gap: 1.6rem; margin: .3rem 0 1.2rem; }
.bilan div { display: grid; }
.bilan .nombre { font-size: 1.6rem; font-weight: 700; }

/* ── Achats ─────────────────────────────────────────────────────────────── */
.souhaits { display: grid; gap: .6rem; max-width: 980px; }
.souhait {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: .6rem;
}
.souhait img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.souhait.alerte { border-color: var(--etiquette); box-shadow: inset 4px 0 0 var(--etiquette); }
.souhait .cible { display: flex; gap: .4rem; align-items: center; }
.souhait .cible input { width: 6em; }

/* ── Stats ──────────────────────────────────────────────────────────────── */
.chiffres { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; margin-bottom: 1.6rem; }
.chiffres div { display: grid; }
.chiffres .nombre { font-size: 2.1rem; font-weight: 800; line-height: 1.1; }
.panneaux-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem; }
.carte { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--r); padding: 1rem 1.1rem; }
.histo { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: .5rem; }
.histo div { flex: 1; background: var(--feutre-clair); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.histo div:hover { background: var(--meeple); }
.histo-legende { display: flex; justify-content: space-between; font-size: .75rem; color: var(--discret); margin-top: .3rem; }
.rangs { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .92rem; }
.rangs li { display: flex; justify-content: space-between; gap: .6rem; border-bottom: 1px dashed var(--ligne); padding-bottom: .2rem; }
.barre-h { height: 6px; background: var(--ligne); border-radius: 3px; overflow: hidden; margin-top: .15rem; }
.barre-h span { display: block; height: 100%; background: var(--feutre-clair); }

/* ── Synchro ────────────────────────────────────────────────────────────── */
.sync-ligne { display: grid; grid-template-columns: 1fr auto; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--ligne); align-items: center; }
.sync-ligne .detail { font-size: .85rem; color: var(--discret); }
.favori-capture {
  display: inline-block; background: var(--meeple); color: var(--meeple-encre); padding: .5em 1em;
  border-radius: 999px; font-weight: 700; text-decoration: none; cursor: grab;
}
code { background: color-mix(in srgb, var(--feutre) 8%, var(--surface)); padding: .1em .35em; border-radius: 4px; font-size: .88em; }

/* ── Bouton flottant, dialogue, toasts ──────────────────────────────────── */
.fab {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 20; border: 0; cursor: pointer;
  background: var(--meeple); color: var(--meeple-encre); border-radius: 999px; padding: .85rem 1.3rem .85rem 1rem;
  display: flex; align-items: center; gap: .4rem; font-weight: 700; font-family: var(--police-titre);
  box-shadow: 0 6px 18px rgba(30, 25, 0, .35); font-size: 1rem;
}
.fab svg { width: 22px; fill: currentColor; }
.dialogue {
  border: 0; border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 2rem); background: var(--surface); color: var(--encre);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.dialogue::backdrop { background: rgba(10, 20, 15, .5); }
.dialogue form { display: grid; gap: 1rem; padding: 1.2rem 1.3rem; }
.dialogue h2 { margin: 0; }
.dialogue .actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.choix-jeu { display: grid; gap: .3rem; max-height: 220px; overflow-y: auto; }
.choix-jeu button {
  display: flex; align-items: center; gap: .6rem; border: 1px solid var(--ligne); background: var(--surface);
  border-radius: var(--r-petit); padding: .3rem; text-align: left; cursor: pointer;
}
.choix-jeu button img { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; }
.choix-jeu button[aria-pressed="true"] { border-color: var(--feutre); box-shadow: inset 0 0 0 2px var(--feutre); }
.joueurs-saisie { display: grid; gap: .4rem; }
.joueur-ligne { display: grid; grid-template-columns: 1fr 5.5rem auto auto; gap: .4rem; align-items: center; }
.joueur-ligne .victoire { border: 1px solid var(--ligne); background: var(--surface); border-radius: 6px; padding: .35rem .5rem; cursor: pointer; }
.joueur-ligne .victoire[aria-pressed="true"] { background: var(--meeple); border-color: var(--meeple); }
.toasts { position: fixed; left: 50%; translate: -50% 0; bottom: 1.5rem; display: grid; gap: .4rem; z-index: 50; }
.toast {
  background: var(--encre); color: var(--fond); padding: .6rem 1rem; border-radius: 999px; font-size: .92rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: monter .2s ease;
}
.toast.erreur { background: var(--etiquette); color: #fff; }
@keyframes monter { from { opacity: 0; translate: 0 8px; } }
.vide-etat { padding: 2.5rem 1rem; text-align: center; color: var(--discret); max-width: 520px; margin: 0 auto; }
.chargement { padding: 3rem; text-align: center; color: var(--discret); }

/* ── Connexion, capture, page publique ──────────────────────────────────── */
.connexion { min-height: 100vh; display: grid; place-items: center; background: var(--feutre); padding: 1rem; }
.connexion-carte { background: var(--surface); border-radius: 16px; padding: 2rem; width: min(380px, 100%); display: grid; gap: .8rem; }
.connexion-carte h1 { margin: 0; }
.connexion form { display: grid; gap: .8rem; margin-top: .4rem; }
.capture { max-width: 760px; margin: 0 auto; padding: 1.4rem 1rem 4rem; display: grid; gap: 1rem; }
.capture table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.capture td { padding: .3rem .4rem; border-bottom: 1px solid var(--ligne); }
.public { max-width: 1400px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 3rem; }
.public-tete { margin-bottom: 1.4rem; }
.public-outils { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .8rem; }
.public-outils input { max-width: 340px; border-radius: 999px; }
.public-pied { margin-top: 2.5rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--ligne); padding-top: 1rem; }
.bgg-attribution { font-weight: 700; }

/* ── Mobile : rail en barre d'onglets, étagère plus basse ───────────────── */
@media (max-width: 760px) {
  :root { --haut-boite: 128px; }
  .appli { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 22;
    flex-direction: row; justify-content: space-around; padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .rail .rail-logo { display: none; }
  .rail a { padding: .35rem .3rem; font-size: .68rem; flex: 1; }
  .rail a[aria-current="page"]::before { left: 25%; right: 25%; top: -.3rem; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .pastille { right: 22%; }
  .vue { padding: 1rem 1rem 8rem; }
  h1 { font-size: 1.5rem; }
  .fab { bottom: calc(4.6rem + env(safe-area-inset-bottom)); right: 1rem; padding: .8rem; }
  .fab span { display: none; }
  .etagere { gap: .9rem .65rem; }
  /* Une question par ligne, les réponses défilent au doigt : l'étagère reste visible */
  .filtres { gap: .45rem; margin: .7rem -1rem 1rem; }
  .filtres .rangee { flex-wrap: nowrap; overflow-x: auto; padding: 0 1rem; scrollbar-width: none; }
  .filtres .rangee::-webkit-scrollbar { display: none; }
  .filtres .question { min-width: auto; white-space: nowrap; font-size: .88rem; }
  .entete .outils { margin-left: 0; width: 100%; }
  .entete .outils select { flex: 1; }
  .fiche-tete { grid-template-columns: 88px 1fr; }
  .fiche-tete img { width: 88px; }
  .grille-3 { grid-template-columns: 1fr 1fr; }
  .partie { grid-template-columns: 44px 1fr auto; }
  .partie img, .partie .vide { width: 44px; height: 44px; }
  .souhait { grid-template-columns: 52px 1fr; }
  .souhait .cible { grid-column: 1 / -1; }
}

@media print {
  .rail, .fab, .filtres, .barre-recherche, .entete .outils, .panneau, .voile { display: none !important; }
  .appli { display: block; }
  body { background: #fff; }
  .boite { box-shadow: none; break-inside: avoid; }
}

/* Boutons posés sur le vert de l'en-tête de fiche */
.fiche-tete .bouton { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.fiche-tete .bouton:hover { border-color: #fff; }
