:root {
  /* Couleurs de la marque Plumaris : vert profond #11331c et crème #f4e6d1 (logo) */
  --police: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --marque-vert: #11331c; --marque-creme: #f4e6d1;
  --fond: #0a1b10; --papier: #10261a; --surface: #173222; --encre: #f4e6d1; --doux: #b3b8a7; --pale: #6f7e71;
  --trait: #1d3a28; --vert: #f4e6d1; --vert-clair: #173222; --accent: #f08a50; --sur-vert: #11331c; --sable: #ecd3a6;
  color-scheme: dark;
  --tabs: 64px; --rayon: 20px;
  --r-commun: #a49d8a; --r-peu_commun: #4f9a42; --r-rare: #2f74c8; --r-tres_rare: #9a55d6; --r-legendaire: #d6a21e;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--police); overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;  }
body { min-height: 100dvh; padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--police); font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 17px; }
button { font: inherit; color: inherit; cursor: pointer; }

.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 20px 10px; background: var(--fond); }
.topbar h1 { margin: 0; line-height: 0; color: var(--encre); }
.topbar h1 .logo { height: 40px; width: calc(40px * 544 / 140); display: block; }
.plumes { background: var(--surface); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.ico-plume { width: 19px; height: 19px; }
main { padding: 22px 22px 28px; max-width: 720px; margin: 0 auto; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #0c1f13;
  border-top: .5px solid var(--trait); }
.tabs button { background: none; border: 0; font-size: 11px; font-weight: 600; color: var(--pale); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; transition: color .2s; }
.tabs svg { width: 25px; height: 25px; }
.tabs button.actif { color: var(--encre); }

/* Boutons en gélule : principal noir (ou blanc en mode sombre), secondaire en surface douce */
.btn { background: var(--encre); color: var(--fond); border: 0; border-radius: 99px; padding: 15px 20px; font-weight: 600; font-size: 16px; width: 100%; letter-spacing: -.01em; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.second { background: var(--surface); color: var(--encre); }
.btn.clair { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); }
.btn.or { background: linear-gradient(180deg, #f6d36b, #d6a21e); color: #3a2a00; }
.btn:disabled { opacity: .35; }
.bloc { background: var(--papier); border-radius: var(--rayon); padding: 22px; margin-bottom: 20px; }
.muted { color: var(--doux); }
.petit { font-size: 13px; }
.centre { text-align: center; }

/* ---------- Carte à collectionner ---------- */
/* La photo occupe toute la carte ; le cadre de rareté est dessiné PAR-DESSUS, au bord exact de la carte
   (::after avec un masque), si bien que la photo et le cadre ont exactement le même arrondi. */
.tcg { container-type: inline-size; position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; border: 0; padding: 0;
  --rayon-carte: 11px; border-radius: var(--rayon-carte); background: #1c241c; box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 6px 18px rgba(0,0,0,.18); text-align: left; color: #fff; }
.tcg-in { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #1c241c; }
.tcg::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.8cqw; background: var(--cadre); pointer-events: none; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.tcg { --cadre: linear-gradient(150deg, #d4cdb9, #8f8875 45%, #c9c2ad 70%, #7c7563); --rar: #d9d3c2; --rar-txt: #2b2a24; }
.tcg[data-r="peu_commun"] { --cadre: linear-gradient(150deg, #b7e09c, #3f8434 45%, #9ed283 70%, #2f6a27); --rar: #8fd46f; --rar-txt: #10300a; }
.tcg[data-r="rare"] { --cadre: linear-gradient(150deg, #cfe5fb, #2c69b8 40%, #9cc8f2 65%, #1f4f8f); --rar: #7db8f5; --rar-txt: #0b2747; }
.tcg[data-r="tres_rare"] { --cadre: linear-gradient(120deg, #d6a6ff, #63d4ff, #ff9fe0, #9a55d6, #7fe3c4, #d6a6ff); --rar: linear-gradient(100deg, #e0b6ff, #8fe3ff, #ffb3e8); --rar-txt: #34104f;
  box-shadow: 0 0 0 1px rgba(200,150,255,.4), 0 6px 22px rgba(154,85,214,.4); }
.tcg[data-r="legendaire"] { --cadre: linear-gradient(120deg, #fff4c2, #d6a21e, #fff8dc, #a8740e, #ffe28a, #fff4c2); --rar: linear-gradient(100deg, #fff1b0, #f2c23e, #fff6cf); --rar-txt: #3d2a00;
  box-shadow: 0 0 0 1px rgba(255,220,120,.5), 0 6px 26px rgba(214,162,30,.5); }
.tcg[data-r="tres_rare"]::after, .tcg[data-r="legendaire"]::after { padding: 2.2cqw; background-size: 300% 300%; animation: irise 5s linear infinite; }
@keyframes irise { from { background-position: 0% 50%; } to { background-position: 300% 50%; } }
.tcg-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcg-haut { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 2cqw; padding: 5.5cqw 5.5cqw 8cqw; background: linear-gradient(rgba(0,0,0,.42), transparent); z-index: 1; }
.tcg-num { font-size: 4.4cqw; font-weight: 700; letter-spacing: .02em; background: rgba(0,0,0,.45); padding: 1.4cqw 2.2cqw; border-radius: 1.2cqw; }
/* Rareté écrite en toutes lettres, couleur de son cadre */
.tcg-rar { font-size: 4.2cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 1.4cqw 2.4cqw; border-radius: 1.2cqw;
  background: var(--rar); color: var(--rar-txt); box-shadow: 0 1px 4px rgba(0,0,0,.35); white-space: nowrap; }
.tcg[data-r="tres_rare"] .tcg-rar, .tcg[data-r="legendaire"] .tcg-rar { background-size: 200% 100%; animation: irise 4s linear infinite; }
.tcg-bas { position: absolute; left: 0; right: 0; bottom: 0; padding: 16cqw 6.5cqw 6.5cqw; background: linear-gradient(to top, rgba(6,10,6,.9) 0%, rgba(6,10,6,.7) 42%, rgba(6,10,6,0) 100%); z-index: 1; }
.tcg-var { display: inline-block; font-size: 3.8cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.18); padding: 1.3cqw 2cqw; border-radius: 1.2cqw; margin-bottom: 1.5cqw; }
.tcg-nom { font-family: var(--police); font-weight: 600; letter-spacing: -.015em; font-size: 8.4cqw; line-height: 1.08; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.tcg-latin { font-style: italic; font-size: 4.6cqw; opacity: .8; margin-top: .8cqw; }
.tcg-tags { display: flex; flex-wrap: wrap; gap: 1.2cqw; margin-top: 2.6cqw; }
.tcg-tags span { display: inline-flex; align-items: center; gap: 1cqw; font-size: 3.8cqw; font-weight: 700; padding: .6cqw 2.2cqw .6cqw 1.6cqw; border-radius: 99px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); }
.tcg-tags span.alim { background: rgba(232,138,82,.28); border-color: rgba(232,138,82,.5); }
/* Effets de rareté : reflet qui passe (rare), holographique (très rare), feuille d'or + étincelles (légendaire) */
.tcg-reflet { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1; }
.tcg[data-r="rare"] .tcg-reflet { opacity: 1; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.7) 48%, transparent 60%); background-size: 300% 100%; animation: reflet 6s ease-in-out infinite; }
.tcg[data-r="tres_rare"] .tcg-reflet { opacity: .9; mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 20%, rgba(255,160,230,.55) 35%, rgba(140,230,255,.6) 45%, rgba(200,255,170,.5) 55%, transparent 70%); background-size: 260% 100%; animation: reflet 4s ease-in-out infinite; }
.tcg[data-r="legendaire"] .tcg-reflet { opacity: 1; mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 25%, rgba(255,240,180,.75) 42%, rgba(255,210,90,.5) 50%, transparent 62%); background-size: 260% 100%; animation: reflet 3.2s ease-in-out infinite; }
@keyframes reflet { 0% { background-position: 140% 0; } 60%, 100% { background-position: -60% 0; } }
.tcg-eclats { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.tcg-eclats i { position: absolute; width: 5cqw; height: 5cqw; background: #fff; opacity: 0;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: scintille 2.6s ease-in-out infinite; }
.tcg[data-r="legendaire"] .tcg-eclats i { background: #fff3c4; }
.tcg-eclats i:nth-child(1) { left: 14%; top: 22%; } .tcg-eclats i:nth-child(2) { left: 78%; top: 30%; animation-delay: .7s; width: 3.6cqw; height: 3.6cqw; }
.tcg-eclats i:nth-child(3) { left: 64%; top: 12%; animation-delay: 1.4s; } .tcg-eclats i:nth-child(4) { left: 30%; top: 46%; animation-delay: 2s; width: 3.2cqw; height: 3.2cqw; }
@keyframes scintille { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: .95; transform: scale(1) rotate(45deg); } }
.tcg .pts { display: flex; gap: 1.2cqw; margin-top: 2cqw; }
.tcg .pts i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: rgba(255,255,255,.25); }
.tcg .pts i.ok { background: #fff; }
.mini .tcg-tags, .mini .tcg-latin { display: none; }
.mini .tcg-nom { font-size: 9.6cqw; line-height: 1.08; }
.mini .tcg-num { font-size: 6cqw; }
/* petites cartes : arrondi concentrique à celui de la carte (rayon de la carte moins l'écart de la pastille au bord) */
.mini .tcg-rar { font-size: 6cqw; padding: 1.8cqw 2.6cqw; letter-spacing: .03em; border-radius: max(1.5cqw, calc(var(--rayon-carte) - 5cqw)); }
.mini .tcg-num { padding: 1.8cqw 2.4cqw; border-radius: max(1.5cqw, calc(var(--rayon-carte) - 5cqw)); }
/* petites cartes : texte et pastilles bien à l'intérieur du cadre et des coins arrondis */
.mini .tcg-haut { padding: 5cqw 5cqw 9cqw; }
.mini .tcg-bas { padding: 20cqw 8cqw 8.5cqw; }
.mini .pts { margin-top: 2.5cqw; }
.mini .tcg-var { font-size: 5.6cqw; }
.mini .pts i { width: 4cqw; height: 4cqw; }

/* Dos de carte et carte manquante */
/* Dos neutre (vert et crème) : la couleur de rareté n'apparaît qu'au recto, pour ne pas tromper */
.dos { --cadre: linear-gradient(150deg, #fbf3e4, #d8c7a6 50%, #fbf3e4); }
.dos .tcg-in { background: #f3e5cc; }
.dos .dos-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dos .motif { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 6px, transparent 6px 14px), repeating-linear-gradient(-45deg, rgba(255,255,255,.035) 0 6px, transparent 6px 14px); }

.dos .embleme { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 58cqw; height: 50cqw; color: #f4e6d1; }

.dos .marque { position: absolute; left: 0; right: 0; bottom: 13cqw; text-align: center; font-family: var(--police); font-weight: 600; letter-spacing: -.02em; color: #e8e2cf; font-size: 6.4cqw; letter-spacing: .04em; }
.dos .sous { position: absolute; left: 0; right: 0; bottom: 8cqw; text-align: center; color: rgba(230,197,106,.7); font-size: 3.8cqw; text-transform: uppercase; letter-spacing: .2em; }
.manquante { background: none; box-shadow: none; border: 0; }
.manquante::after { content: none; }
.manquante .tcg-in { inset: 0; border-radius: inherit; background: var(--surface); }
.manquante .motif { display: none; }
.manquante .silhouette { position: absolute; left: 50%; top: 50%; width: 58%; height: 58%; transform: translate(-50%, -46%); color: var(--pale); opacity: .45; }
.manquante .q { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--police); font-weight: 300; font-size: 30cqw; color: var(--pale); opacity: .45; }
.manquante .tcg-num { position: absolute; top: 5cqw; left: 5cqw; color: var(--doux); background: none; padding: 0; }
.manquante.mini .tcg-num { font-size: 6cqw; }

/* ---------- Booster ---------- */
.pack-zone { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px; }
.pack { position: relative; width: min(62vw, 250px); aspect-ratio: 250 / 360; border: 0; background: none; padding: 0; animation: flotte 4s ease-in-out infinite; filter: drop-shadow(0 18px 24px rgba(0,0,0,.28)); }
.pack svg { width: 100%; height: 100%; display: block; }
.brillance { position: absolute; inset: 4% 0; pointer-events: none; mix-blend-mode: soft-light; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.85) 45%, transparent 60%); background-size: 250% 100%; animation: reflet 3.2s ease-in-out infinite; }
.pack:disabled { animation: none; filter: grayscale(.8) opacity(.5); }
@keyframes flotte { 50% { transform: translateY(-8px) rotate(-1deg); } }
.indice-geste { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--doux); font-size: 14px; margin: 14px 0 10px; }
.indice-geste svg { width: 18px; height: 18px; animation: monter 1.6s ease-in-out infinite; }
@keyframes monter { 50% { transform: translateY(-5px); } }
.compteur { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; flex-wrap: wrap; }
.compteur i { width: 26px; height: 8px; border-radius: 9px; background: var(--trait); }
.compteur i.on { background: var(--accent); }
.compteur i.bonus.on { background: var(--r-legendaire); }

/* ---------- Scène d'ouverture ---------- */
.scene { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2b4033 0%, #101812 70%); color: #fff; padding: calc(56px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); touch-action: none; user-select: none; -webkit-user-select: none; animation: fondu .3s; }
.scene[hidden] { display: none; }
.scene .haut { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 3; }
.scene .points { display: flex; gap: 6px; }
.scene .points i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transition: .3s; }
.scene .points i.vu { background: rgba(255,255,255,.75); }
.scene .points i.actuel { background: #fff; width: 22px; border-radius: 9px; }
.scene .fermer-scene { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 99px; padding: 7px 13px; font-size: 14px; font-weight: 700; }
.scene .scene-carte { position: relative; width: min(80vw, 50dvh, 380px); z-index: 2; }
.scene .aide { min-height: 22px; margin: 16px 0 12px; font-weight: 700; font-size: 15px; opacity: .85; display: flex; align-items: center; justify-content: center; gap: 8px; z-index: 2; text-align: center; }
.scene .aide svg { width: 22px; height: 22px; animation: glisse 1.6s ease-in-out infinite; }
@keyframes glisse { 50% { transform: translateX(8px); } }
.scene .actions { width: min(80vw, 380px); display: grid; gap: 10px; z-index: 2; }
.scene .info-tirage { min-height: 30px; display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 12px; z-index: 2; flex-wrap: wrap; }
.badge.nouveau { background: var(--accent); color: #fff; }
.badge.doublon { background: rgba(255,255,255,.14); color: #ffd7b8; }
.badge.rar { color: #111; animation-delay: .1s; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes fondu { from { opacity: 0; } }










@keyframes tremble { 25% { transform: rotate(-1.2deg); } 75% { transform: rotate(1.2deg); } }
@keyframes lueur-v { to { box-shadow: 0 0 40px 6px rgba(178,108,255,.8); } }
@keyframes lueur-o { to { box-shadow: 0 0 55px 12px rgba(255,205,80,.9); } }
.entree { animation: entree .6s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes entree { from { transform: translateY(70vh) rotate(-8deg) scale(.6); } }
.depart { transition: transform .35s ease-in, opacity .35s; opacity: 0; }
.halo { position: absolute; left: 50%; top: 45%; width: 170vmax; height: 170vmax; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; opacity: 0; transition: opacity .6s; }
.halo.commun { opacity: .35; background: radial-gradient(circle, rgba(255,250,235,.35) 0%, transparent 22%); }
.halo.peu_commun { opacity: .55; background: radial-gradient(circle, rgba(140,220,110,.45) 0%, transparent 27%); }
.halo.rare { opacity: .6; background: radial-gradient(circle, rgba(70,150,255,.55) 0%, transparent 30%); }
.halo.tres_rare { opacity: .9; background: radial-gradient(circle, rgba(178,108,255,.65) 0%, transparent 34%); }
.halo.legendaire { opacity: 1; background: repeating-conic-gradient(from 0deg, rgba(255,214,92,.28) 0deg 8deg, rgba(255,214,92,0) 8deg 22deg), radial-gradient(circle, rgba(255,214,92,.65) 0%, transparent 38%);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 45%); mask-image: radial-gradient(circle, #000 0%, transparent 45%); animation: tourne 18s linear infinite; }
@keyframes tourne { to { transform: translate(-50%, -50%) rotate(360deg); } }
.flash { position: fixed; inset: 0; background: #fff; pointer-events: none; z-index: 50; animation: flash .8s ease-out forwards; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.particule { position: absolute; left: 50%; top: 45%; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 3; }

/* Paquet dans la scène */
.pack-scene { position: relative; width: min(64vw, 44dvh, 300px); aspect-ratio: 250 / 360; z-index: 2; touch-action: none; animation: flotte 4s ease-in-out infinite; }
.pack-scene .moitie { position: absolute; inset: 0; }
.pack-scene .moitie svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 20px 30px rgba(0,0,0,.45)); }
.pack-scene .haut-pack { clip-path: inset(0 0 91% 0); transition: transform .1s; }
.pack-scene .bas-pack { clip-path: inset(9% 0 0 0); }
.pack-scene.secoue { animation: secoue .45s ease-in-out; }
@keyframes secoue { 20% { transform: rotate(-4deg) scale(1.03); } 40% { transform: rotate(4deg) scale(1.05); } 60% { transform: rotate(-3deg) scale(1.05); } 80% { transform: rotate(2deg); } }
.pack-scene.ouvert { animation: none; }
.pack-scene.ouvert .haut-pack { transition: transform .6s cubic-bezier(.4,0,.6,1), opacity .6s; transform: translate(60px, -160px) rotate(32deg) !important; opacity: 0; }
.pack-scene.ouvert .bas-pack { transition: transform .7s .3s cubic-bezier(.5,0,.8,.4), opacity .5s .45s; transform: translateY(80vh); opacity: 0; }
.pack-scene.ouvert .ligne-dechirure { opacity: 0; }
.ligne-dechirure { position: absolute; left: 4%; right: 4%; top: 9%; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.85) 0 6px, transparent 6px 11px); }

/* Résumé */
.resume { width: 100%; max-width: 520px; z-index: 2; padding: 0 16px; }
.resume h2 { text-align: center; margin: 0 0 4px; }
.grille-r { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }

/* ---------- Volière ---------- */
.barre { height: 10px; background: var(--vert-clair); border-radius: 99px; overflow: hidden; }
.barre > div { height: 100%; background: linear-gradient(90deg, var(--vert), var(--accent)); border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 0; background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.chips button.on { background: var(--encre); color: var(--fond); }
.filtres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.filtres select { width: 100%; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--trait); background: var(--papier); color: var(--encre); font: inherit; font-size: 14px; }
.filtres select.actif { border-color: var(--vert); box-shadow: 0 0 0 1px var(--vert); }
.prog-ligne { display: grid; grid-template-columns: 1fr 90px 44px 14px; gap: 8px; align-items: center; font-size: 13px; width: 100%; margin: 2px 0;
  background: none; border: 0; border-radius: 9px; padding: 6px 6px; text-align: left; }
.prog-ligne:active { background: var(--vert-clair); }
.prog-ligne.on { background: var(--vert-clair); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--vert); }
.prog-ligne svg { width: 14px; height: 14px; color: var(--pale); transform: rotate(90deg); }
.prog-titre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pale); margin: 12px 0 2px 6px; }
.grille { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 600px) { .grille { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Feuille ---------- */
.feuille { position: fixed; inset: 0; z-index: 30; background: rgba(10,14,10,.6); display: flex; align-items: flex-end; justify-content: center; animation: fondu .2s; }
.feuille[hidden] { display: none; }
.feuille .contenu { background: var(--fond); width: 100%; max-width: 560px; max-height: 94dvh; overflow-y: auto; border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); animation: monte .3s cubic-bezier(.2,1,.4,1); }
@keyframes monte { from { transform: translateY(60px); opacity: 0; } }
.fermer { position: sticky; top: 0; float: right; z-index: 3; background: var(--surface); border: 0; border-radius: 99px; width: 34px; height: 34px; font-size: 15px; color: var(--doux); }
.poignee { width: 42px; height: 5px; border-radius: 9px; background: var(--trait); margin: 0 auto 8px; }
.fiche-carte { width: min(78vw, 340px); margin: 6px auto 18px; }
.section h3 { font-size: 17px; margin: 0 0 6px; }
.section p { margin: 0; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { font-size: 13px; padding: 5px 11px; border-radius: 99px; background: var(--vert-clair); color: var(--vert); font-weight: 600; }
.tag.alim { background: #f6e3d3; color: #8a3f12; }
.tag.alim { background: #4a3020; color: #f3c7a6; }
.mois { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; text-align: center; font-size: 11px; font-weight: 700; }
.mois div { padding: 5px 0; border-radius: 5px; background: var(--trait); color: var(--pale); }
.mois div.on { background: var(--r-peu_commun); color: #fff; }
.mois div.maint { outline: 2px solid var(--accent); outline-offset: 1px; }
.table { width: 100%; font-size: 14px; border-collapse: collapse; }
.table td { padding: 7px 0; border-bottom: 1px solid var(--trait); vertical-align: top; }
.table td:last-child { text-align: right; padding-left: 10px; }
.variantes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.variantes .lib { font-size: 12px; text-align: center; margin-top: 4px; font-weight: 700; }
.credit { font-size: 11px; color: var(--pale); margin-top: 10px; }
.credit a { color: inherit; }
.mystere { width: min(46vw, 200px); margin: 4px auto 12px; }

/* ---------- Quiz ---------- */
.quiz-entete { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 700; }
.quiz-entete > span { white-space: nowrap; }
.quiz-prog { display: flex; gap: 4px; flex: 0 1 140px; min-width: 0; justify-content: flex-end; }
.quiz-prog i { flex: 0 1 22px; min-width: 3px; height: 6px; border-radius: 9px; background: var(--trait); }
.quiz-prog i.ok { background: var(--r-peu_commun); } .quiz-prog i.ko { background: #c4473a; } .quiz-prog i.cur { background: var(--accent); }
.quiz-type { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; }
.quiz-q { font-family: var(--police); font-weight: 300; font-size: 20px; font-weight: 700; margin: 0 0 10px; line-height: 1.25; }
.quiz-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--rayon); position: relative; overflow: hidden; background: #0e130e; }
.quiz-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.quiz-desc { background: var(--papier); border: 1px solid var(--trait); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.5; }
.choix { display: grid; gap: 8px; margin-top: 12px; }
.choix button { background: var(--papier); border: 1.5px solid transparent; border-radius: 16px; padding: 13px 16px; font-weight: 600; text-align: left; transition: .15s; }
.choix.photos { grid-template-columns: 1fr 1fr; }
.choix.photos button { padding: 0; overflow: hidden; aspect-ratio: 1; position: relative; background: #0e130e; }
.choix.photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.choix.photos .tcg-fond { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(14px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.choix.photos button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; z-index: 1; }
.choix button.bon { border-color: var(--r-peu_commun); background: #e2f0d9; color: #234a17; }
.choix button.faux { border-color: #c4473a; background: #f7dcd8; color: #6e1c13; }
.choix button.estompe { opacity: .45; }
.choix.photos button.bon { box-shadow: 0 0 0 4px var(--r-peu_commun); }
.choix.photos button.faux { box-shadow: 0 0 0 4px #c4473a; }
.retour-quiz { margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.retour-quiz.ok { background: #e2f0d9; color: #234a17; } .retour-quiz.ko { background: #f7dcd8; color: #6e1c13; }
.score-final { font-family: var(--police); font-weight: 300; font-size: 56px; font-weight: 700; color: var(--vert); line-height: 1; margin: 6px 0; }

/* ---------- Saisons ---------- */



.mois-ligne { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--trait); font-size: 13px; }
.mois-ligne b { font-weight: 700; }
.mois-ligne.courant b { color: var(--accent); }
.plus { color: var(--r-peu_commun); font-weight: 700; }
.moins { color: #c4473a; font-weight: 700; }
.banniere { border-radius: var(--rayon); overflow: hidden; margin-bottom: 14px; position: relative; color: #fff; min-height: 130px; }
.banniere text, .banniere use, .banniere path[stroke] { display: none; }
.banniere svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.banniere .txt { position: relative; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 130px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.banniere h2 { margin: 0; font-size: 26px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs) + 16px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--encre); color: var(--fond); padding: 10px 16px; border-radius: 12px; font-weight: 700; max-width: calc(100% - 32px); text-align: center; }
.toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Marque : écran de démarrage et en-tête de l'accueil ---------- */


.demarrage { position: fixed; inset: 0; z-index: 100; background: var(--marque-vert); color: var(--marque-creme); display: grid; place-items: center; transition: transform .8s cubic-bezier(.7,0,.25,1); }
.demarrage.fini { transform: translateY(-100%); }
body.arrivee #vue { animation: arrivee .9s cubic-bezier(.2,.8,.3,1) both; }
@keyframes arrivee { from { transform: translateY(60px); opacity: 0; } }
.demarrage-in { text-align: center; padding: 16px; margin-bottom: 9dvh; /* remonté : centre optique, un peu au-dessus du centre géométrique */ animation: monte .7s cubic-bezier(.2,.9,.3,1) both; }
.demarrage .logo { width: min(82vw, 380px); aspect-ratio: 544 / 140; display: block; }

/* ---------- Nouvelle coche ! ---------- */
.coche-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--r-peu_commun); display: grid; place-items: center;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--r-peu_commun) 30%, transparent); animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; }
.coche-ico .trace { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 22; stroke-dashoffset: 22; animation: trace .35s .25s ease-out forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }

/* dans la scène d'ouverture (fond sombre) */
.coche-carte { flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; text-align: left; line-height: 1.2;
  animation: fondu .4s .1s both; }
.coche-carte b { font-size: 17px; }
/* bulle hors booster (achat, échange) */
.coche-pop { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 70; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); line-height: 1.25;
  background: var(--papier); color: var(--encre); border: 1px solid var(--trait); border-radius: 16px; padding: 10px 16px 10px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.coche-pop[hidden] { display: none; }
.coche-pop.entre { animation: descend .45s cubic-bezier(.2,1.4,.4,1) both; }
.coche-pop.sort { animation: remonte .3s ease-in forwards; }
@keyframes descend { from { transform: translate(-50%, -24px); opacity: 0; } }
@keyframes remonte { to { transform: translate(-50%, -24px); opacity: 0; } }
/* récapitulatif du booster : une coche sur chaque nouvelle espèce */
.r-item { position: relative; }
.r-item > .tcg { width: 100%; }
.coche-ico.mini { position: absolute; top: -9px; left: 50%; margin-left: -12px; width: 24px; height: 24px; z-index: 2; }
.coche-ico.mini .trace { width: 14px; height: 14px; }

/* ---------- Accueil ---------- */
.appel { text-align: center; font-size: 28px; margin: 4px 0 10px; }
.carnet-tete { display: flex; align-items: baseline; gap: 8px; }
.carnet-tete h2 { margin: 0; font-size: 20px; }
.filtres select { text-overflow: ellipsis; }
.quiz-photo .tcg-fond { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(16px) brightness(.5) saturate(1.3); transform: scale(1.1); }

/* ---------- Appel vers la fiche et lecteur de chant ---------- */


.scene .info-tirage { margin-top: 30px; }
.fiche-sous { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: -4px 0 6px; }
.ecouter { display: flex; align-items: center; gap: 10px; background: var(--vert); color: var(--sur-vert); border: 0; border-radius: 99px; padding: 7px 18px 7px 7px; font-weight: 700; font-size: 15px; }
.ecouter-ico { width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--sur-vert) 22%, transparent); display: grid; place-items: center; }
.ecouter-ico svg { width: 16px; height: 16px; fill: currentColor; }
.ecouter.joue .ecouter-ico { animation: pulse-son 1.2s ease-in-out infinite; }
@keyframes pulse-son { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--sur-vert) 18%, transparent); } }
.exemplaires { font-size: 13px; color: var(--doux); font-weight: 700; }
.defiler { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12.5px; color: var(--pale); margin: 4px 0 14px; }
.defiler svg { width: 18px; height: 18px; transform: rotate(180deg); animation: descendre 1.6s ease-in-out infinite; }
@keyframes descendre { 50% { transform: rotate(180deg) translateY(-4px); } }
.appel-quiz .btn { display: flex; align-items: center; justify-content: center; gap: 8px; }
.appel-quiz .btn svg { width: 20px; height: 20px; }

/* ---------- Écrans sans défilement (accueil, quiz) ---------- */
main.ecran { position: relative; height: calc(100dvh - var(--h-top, 72px) - var(--tabs) - env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: hidden; padding-top: 18px; padding-bottom: 18px; }
.ecran .appel { margin: 4px 0 0; font-size: clamp(22px, 3.4dvh, 30px); font-weight: 600; }
.ecran .pack-zone { flex: 1 1 0; min-height: 0; padding: 0; justify-content: center; gap: 0; container-type: size; }
/* Le paquet se cale sur la place réellement libre (hauteur de la zone moins la consigne et un peu d'air), sans calcul en JavaScript :
   toujours juste, même quand le téléphone mesure l'écran en retard au lancement de l'appli */
.ecran .pack { flex: none; width: auto; will-change: transform; height: max(160px, min(calc(100cqh - 64px), 560px, calc(78cqw * 360 / 250))); }
.ecran .indice-geste { margin: 22px 0 0; }
.indice-geste.attente { display: flex; align-items: center; gap: 8px; }
.indice-geste.attente b { font-variant-numeric: tabular-nums; }
.indice-geste.attente svg { animation: none; }
.ecran .compteur { margin: 0 0 8px; }
.ecran .appel-quiz { margin: 0; padding: 12px; }
.ecran .appel-quiz p { font-size: 14px; }
/* quiz */
.ecran .quiz-entete { margin-bottom: 6px; }
.ecran .quiz-q { font-size: clamp(16px, 2.5dvh, 20px); margin-bottom: 8px; }
.ecran .quiz-photo { flex: 1 1 0; min-height: 80px; aspect-ratio: auto; }
.ecran .quiz-desc { flex: none; font-size: 14px; line-height: 1.45; padding: 10px 12px; }
.ecran .choix { margin-top: 8px; gap: 6px; flex: none; }
.ecran .choix button { padding: clamp(8px, 1.4dvh, 13px) 12px; }
.ecran .choix.photos { flex: 1 1 0; min-height: 0; grid-template-rows: 1fr 1fr; }
.ecran .choix.photos button { aspect-ratio: auto; }
.ecran > .bloc { margin: auto 0; }

.tcg-tags svg { width: 3.6cqw; height: 3.6cqw; flex: none; opacity: .9; }
/* Peu commun : le cadre vert miroite doucement (le commun reste mat) */
.tcg[data-r="peu_commun"]::after { background-size: 250% 250%; animation: irise 7s linear infinite; }
/* Fiche : lignes d'informations avec icônes */
.info-ligne { display: grid; grid-template-columns: 128px 1fr; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--trait); font-size: 14px; }
.info-ligne:last-of-type { border-bottom: 0; }
.info-lib { display: flex; align-items: center; gap: 6px; color: var(--doux); font-weight: 700; font-size: 13px; padding-top: 3px; }
.info-lib svg { width: 16px; height: 16px; flex: none; }
.info-ligne .tags { margin: 0; }
.tag { display: inline-flex; align-items: center; }
/* Bouton chant : largeur fixe, seule l'icône change */
.ecouter { min-width: 220px; justify-content: flex-start; }
.rond-charge { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tourne-seul .8s linear infinite; }
@keyframes tourne-seul { to { transform: rotate(360deg); } }
/* Fiche qui monte sous la carte dans la scène d'ouverture */
.detail { position: absolute; left: 0; right: 0; bottom: 0; top: 50%; z-index: 4; background: var(--fond); color: var(--encre); border-radius: 22px 22px 0 0;
  overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); transform: translateY(102%); box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
.detail .fiche-sous { margin-top: 4px; }

/* Feuille : glisser vers le bas pour fermer */
.feuille .contenu { touch-action: pan-y; }
.feuille.ferme { animation: fondu-sortie .28s ease-in forwards; }
.feuille.ferme .contenu { transition: transform .28s ease-in; transform: translateY(100%) !important; }
@keyframes fondu-sortie { to { background: rgba(10,14,10,0); } }
/* Mon Carnet : filtres actifs et retour en haut */




.haut-page { position: fixed; right: 16px; bottom: calc(var(--tabs) + 16px + env(safe-area-inset-bottom)); z-index: 7; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--trait); background: var(--papier); color: var(--encre); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); animation: pop .3s both; }
.haut-page[hidden] { display: none; }
.haut-page svg { width: 22px; height: 22px; }
.coche-pop b { white-space: nowrap; }


.ecran .compteur + p { margin-bottom: 10px !important; }

/* ---------- Scène d'ouverture : pile, carte, fiche en défilement naturel ---------- */
.flux { position: absolute; inset: 0; overflow: hidden; overscroll-behavior: contain; z-index: 2; scrollbar-width: none; }
.flux::-webkit-scrollbar { display: none; }
.flux.ouvert { overflow-y: auto; }
.etage { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(56px + env(safe-area-inset-top)) 20px calc(8px + env(safe-area-inset-bottom)); }
.pile-zone { position: relative; width: min(70vw, 42dvh, 360px); margin-top: auto; }
.scene .pile-zone .scene-carte { width: 100%; }
.pile { position: absolute; inset: 0; }
.pile-dos { position: absolute; inset: 0; transform: translate(calc(var(--k) * 6px), calc(var(--k) * 7px)) rotate(calc(var(--k) * 1.8deg)); filter: brightness(calc(1 - var(--k) * .12)); transition: transform .4s; }
.pile-dos .tcg { height: 100%; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.pile-compte { margin-top: 40px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.55); letter-spacing: .01em; }
.scene .etage .info-tirage { margin-top: 10px; min-height: 32px; }
.scene .etage .actions { margin-top: 8px; }
.scene .etage .aide { margin: 6px 0 0; }

.decouvrir { margin-top: auto; background: none; border: 0; color: #fff; font-weight: 600; font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .85; padding: 8px 16px; }
.decouvrir[hidden] { display: block; visibility: hidden; }
.decouvrir svg { width: 20px; height: 20px; animation: monter-fleche 1.4s ease-in-out infinite; }
@keyframes monter-fleche { 0% { transform: translateY(6px); opacity: 0; } 30%, 70% { opacity: 1; } 100% { transform: translateY(-6px); opacity: 0; } }
.fiche-flux { background: var(--fond); color: var(--encre); border-radius: 26px 26px 0 0; padding: 20px 16px calc(30px + env(safe-area-inset-bottom)); min-height: 70dvh; }
.flux:not(.ouvert) .fiche-flux { display: none; }
.depuis-pile { animation: depuis-pile .45s cubic-bezier(.2,.8,.3,1) both; }
@keyframes depuis-pile { from { transform: translate(6px, 7px) rotate(1.8deg) scale(.98); filter: brightness(.88); } }
.depuis-gauche { animation: depuis-gauche .4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes depuis-gauche { from { transform: translateX(-110vw); } }
/* Le recto n'apparaît qu'à mi-retournement (et le dos disparaît) : aucune couleur ne « transpire » d'une face à l'autre */





/* Récapitulatif : les cartes du paquet en éventail */
/* l'éventail occupe 90 % de la largeur : même les cartes inclinées des bords restent entièrement visibles */
.grille-r.eventail { display: flex; justify-content: center; align-items: flex-end; gap: 0; margin: 34px 0 48px; padding: 0; }
.eventail .r-item { flex: 0 0 27%; margin: 0 -4.5%; transform-origin: 50% 120%; transform: translateY(var(--y)) rotate(var(--r));
  animation: distribue .5s calc(var(--i) * 80ms) cubic-bezier(.2,.8,.3,1) both; transition: transform .2s; }
.eventail .r-item:active { transform: translateY(calc(var(--y) - 14px)) rotate(var(--r)) scale(1.04); z-index: 5; }
@keyframes distribue { from { transform: translateY(60px) rotate(0) scale(.8); opacity: 0; } }
/* Mon Carnet : gélule Filtres, panneau de filtres, barre flottante */
.chip-filtres { display: inline-flex; align-items: center; gap: 6px; }
.chip-filtres svg { width: 16px; height: 16px; }
.feuille-titre { margin: 4px 0 14px; font-size: 24px; }


.filtres-pied { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin: 22px -16px 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--fond) 30%); }
.barre-flottante { position: fixed; right: 16px; left: 16px; bottom: calc(var(--tabs) + 14px + env(safe-area-inset-bottom)); z-index: 7; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.barre-flottante[hidden] { display: none; }
.barre-flottante > * { pointer-events: auto; animation: pop .3s both; }
.barre-filtre { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 99px; padding: 10px 12px 10px 15px; background: var(--encre); color: var(--fond); font-weight: 600; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.barre-filtre span { font-size: 11px; opacity: .7; }
.barre-filtre.effacer { background: var(--papier); color: var(--encre); padding: 10px 15px; }
.barre-haut { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--papier); color: var(--encre); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
.barre-haut svg { width: 22px; height: 22px; }

/* Navigation par gestes dans le paquet */







/* La première carte esquisse le glissement vers la gauche, deux fois */
.scene-carte.invite { animation: invite 1.4s .6s ease-in-out 2; }
@keyframes invite { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-44px); } 60% { transform: translateX(0); } }

/* Panneau de filtres : un critère par ligne, replié ; on l'ouvre pour choisir */
.critere { border-bottom: 1px solid var(--trait); }
.critere > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 2px; cursor: pointer; }
.critere > summary::-webkit-details-marker { display: none; }
.critere-nom { font-weight: 600; font-size: 16px; }
.critere-val { font-size: 14px; color: var(--pale); display: flex; align-items: center; gap: 6px; }
.critere-val.on { color: var(--vert); font-weight: 600; }
.critere-val svg { width: 16px; height: 16px; transform: rotate(180deg); transition: transform .2s; }
.critere[open] .critere-val svg { transform: rotate(0); }
.critere .chips { padding: 0 0 18px; margin: 0; }

/* ---------- Révélation par glissement (plus de retournement) ---------- */
.scene .scene-carte { touch-action: none; -webkit-user-select: none; user-select: none; }
.carte-face .tcg, .carte-dos .tcg { height: auto; }
.carte-dos { position: absolute; inset: 0; z-index: 2; will-change: transform; }
.carte-dos .tcg { box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.carte-dos.attente-tr .tcg { animation: tremble .5s ease-in-out infinite, lueur-v 1.2s ease-in-out infinite alternate; }
.carte-dos.attente-l .tcg { animation: tremble .3s ease-in-out infinite, lueur-o 1s ease-in-out infinite alternate; }
/* le dos esquisse le geste : il glisse un peu vers la gauche et laisse entrevoir l'oiseau */
.carte-dos.invite { animation: invite-dos 1.6s .7s cubic-bezier(.4,0,.3,1) 2; }
@keyframes invite-dos { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(-26%); } 70% { transform: translateX(0); } }
/* Aide au geste : flèche + main qui partent vers la gauche ; flèche du retour qui part vers la droite */
.aide-geste { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,.9); text-align: left; }
.geste-gauche { position: relative; width: 52px; height: 26px; flex: none; }
.geste-gauche svg { position: absolute; top: 2px; width: 22px; height: 22px; animation: vers-gauche 1.5s cubic-bezier(.4,0,.2,1) infinite; }
.geste-gauche .fleche-g { left: 0; transform: rotate(-90deg); animation-name: vers-gauche-fleche; }
.geste-gauche .main-g { left: 26px; }
@keyframes vers-gauche { 0% { transform: translateX(14px); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateX(-14px); opacity: 0; } }
@keyframes vers-gauche-fleche { 0% { transform: translateX(14px) rotate(-90deg); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateX(-14px) rotate(-90deg); opacity: 0; } }




.btn-fin { background: #fff; color: #11331c; }

/* Écran de démarrage : des pas d'oiseau montent en zigzag pendant le chargement (du bas vers le haut, en boucle) */
.pas-chargement { position: relative; width: 60px; height: 132px; margin: 76px auto 0; }
.pas-chargement svg { position: absolute; width: 18px; height: 20px; color: var(--marque-creme); opacity: 0;
  bottom: calc(var(--i) * 21px); animation: pas 2.4s calc(var(--i) * .25s) ease-out infinite; }
.pas-chargement svg.gauche { left: 12px; transform: rotate(-14deg); }
.pas-chargement svg.droite { left: 30px; transform: rotate(14deg); }
@keyframes pas { 0% { opacity: 0; } 8% { opacity: .9; } 55% { opacity: .9; } 80%, 100% { opacity: 0; } }

/* Quiz : panneau d'explication qui monte par-dessus le bas de l'écran (la mise en page dessous ne bouge pas) */
.quiz-voile { position: absolute; inset: 0; background: color-mix(in srgb, var(--fond) 35%, transparent); animation: fondu .3s .45s both; pointer-events: none; }
.quiz-retour { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; max-height: calc(100% - 24px); display: flex; flex-direction: column; gap: 12px;
  background: var(--papier); border-radius: 22px; padding: 18px 18px 16px; box-shadow: 0 -6px 30px rgba(0,0,0,.25); animation: monte-retour .4s .45s cubic-bezier(.2,.9,.3,1) both; }
@keyframes monte-retour { from { transform: translateY(110%); } }
.quiz-retour-in { overflow-y: auto; min-height: 0; }
.quiz-retour .btn { flex: none; }
.quiz-retour-titre { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.quiz-retour.ok .quiz-retour-titre { color: var(--r-peu_commun); } .quiz-retour.ko .quiz-retour-titre { color: #d0533f; }
.quiz-retour-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.quiz-retour.ok .quiz-retour-ico { background: var(--r-peu_commun); } .quiz-retour.ko .quiz-retour-ico { background: #d0533f; }
.quiz-retour-ico .trace { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 30; stroke-dashoffset: 0; }
.quiz-retour p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.quiz-retour-info { color: var(--doux); }

/* Affût : encart saison (couleurs de la saison, touche = onglet Saisons) */
.saison-carte { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; color: #fff; font: inherit;
  background: linear-gradient(120deg, var(--c2), color-mix(in srgb, var(--c2) 55%, var(--c1))); border-radius: var(--rayon); padding: 12px 12px 12px 14px; flex: none; cursor: pointer; }
.saison-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--c1) 85%, #fff); display: grid; place-items: center; }
.saison-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--c2); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.saison-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.saison-nom, .saison-nb, .saison-mvt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saison-nom { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.saison-nb { font-size: 15px; } .saison-nb b { font-size: 21px; font-weight: 800; margin-right: 2px; }
.saison-mvt { font-size: 13px; font-weight: 700; }
.saison-mvt .muet { opacity: .75; font-weight: 500; }
.saison-voir { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(255,255,255,.2); border-radius: 50%; }
.saison-voir svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Mon Carnet : collections (France ouverte, les suivantes verrouillées) */
.collections { display: flex; gap: 8px; overflow-x: auto; margin: 0 -22px 14px; padding: 2px 22px 4px; scrollbar-width: none; }
.collections::-webkit-scrollbar { display: none; }
.coll { flex: none; display: flex; align-items: center; gap: 7px; height: 40px; border: 0; border-radius: 12px; padding: 0 12px 0 10px; font: inherit; color: var(--encre); background: var(--papier); cursor: pointer; }
.coll .coll-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.coll b { font-size: 14px; font-weight: 650; }
.coll span { font-size: 12px; font-weight: 600; opacity: .7; }
.coll.on { background: var(--sable); color: var(--marque-vert); }
.coll.verrou { background: var(--surface); color: var(--doux); }
.coll.verrou .coll-ico, .coll.verrou b { opacity: .6; }
.coll .cadenas { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.coll-complete { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--doux); }
.coll-complete svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--r-peu_commun); fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.voir-prog { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; margin-top: 14px; padding: 11px 12px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 650; }
.voir-prog::-webkit-details-marker { display: none; }
.voir-prog svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--sable); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.voir-prog span { flex: 1; }
.voir-prog .chevron { stroke: var(--doux); transition: transform .25s; }
details[open] > .voir-prog .chevron { transform: rotate(180deg); }

/* Invasions : badge qui pulse, carte de l'onglet Saisons, alerte à l'ouverture (une nuée d'oiseaux traverse) */
.inv-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: var(--r-tres_rare); color: #2b1140; border-radius: 99px; padding: 5px 11px 5px 9px; }
.inv-badge i, .saison-inv i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse-inv 1.4s ease-in-out infinite; flex: none; }
@keyframes pulse-inv { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 60% { box-shadow: 0 0 0 7px transparent; } }
.saison-inv { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; color: #f1dcff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saison-carte.invasion { box-shadow: 0 0 0 2px var(--r-tres_rare), 0 0 16px color-mix(in srgb, var(--r-tres_rare) 40%, transparent); }
.inv-carte { background: var(--papier); border-radius: var(--rayon); overflow: hidden; margin-bottom: 20px; box-shadow: 0 0 0 2px var(--r-tres_rare); }
.inv-photo { height: 210px; background-size: cover; position: relative; }
.inv-photo .inv-badge { position: absolute; left: 14px; top: 14px; }
.inv-corps { padding: 16px 18px 18px; }
.inv-corps h3 { margin: 0 0 6px; font-size: 20px; }
.inv-meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--doux); margin-bottom: 10px; }
.inv-corps p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.inv-effet { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  background: color-mix(in srgb, var(--r-tres_rare) 20%, transparent); }
.inv-effet.ok { background: color-mix(in srgb, var(--r-peu_commun) 18%, transparent); }
.inv-effet svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.alerte-inv { position: fixed; inset: 0; z-index: 90; background: rgba(6, 14, 9, .72); display: grid; place-items: center; padding: 20px; animation: fondu .3s both; }
.alerte-inv.fin { opacity: 0; transition: opacity .3s; }
.alerte-inv-in { position: relative; width: min(100%, 380px); background: var(--papier); color: var(--encre); border-radius: 26px; padding: 22px 20px 18px; text-align: center; overflow: hidden;
  box-shadow: 0 0 0 2px var(--r-tres_rare), 0 20px 50px rgba(0,0,0,.4); animation: monte .5s .1s cubic-bezier(.2,.9,.3,1) both; }
.alerte-inv-in h2 { margin: 14px 0 6px; font-size: 22px; } .alerte-inv-in p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.alerte-photo { width: 132px; height: 132px; margin: 14px auto 0; border-radius: 50%; background-size: cover; box-shadow: 0 0 0 4px var(--r-tres_rare); animation: pulse-photo 2.2s ease-in-out infinite; }
@keyframes pulse-photo { 50% { box-shadow: 0 0 0 4px var(--r-tres_rare), 0 0 0 12px color-mix(in srgb, var(--r-tres_rare) 25%, transparent); } }
.alerte-vol { position: absolute; inset: 0; pointer-events: none; }
.alerte-vol svg { position: absolute; width: 22px; height: 11px; fill: none; stroke: var(--doux); stroke-width: 1.6; stroke-linecap: round; opacity: 0;
  left: -30px; top: calc(14% + var(--k) * 4% + (var(--k) * 37) % 5 * 1%); animation: nuee 3.2s calc(var(--k) * .18s) ease-in-out infinite; }
@keyframes nuee { 0% { transform: translate(0, 0) scale(.8); opacity: 0; } 15% { opacity: .7; } 85% { opacity: .7; } 100% { transform: translate(440px, -40px) scale(1.05); opacity: 0; } }

/* ---------- Animations ---------- */
/* Changement d'onglet : la page glisse depuis le côté de l'onglet touché */
#vue.trans-d { animation: page-d .32s cubic-bezier(.2,.8,.3,1); }
#vue.trans-g { animation: page-g .32s cubic-bezier(.2,.8,.3,1); }
#vue.trans-0 { animation: fondu .25s; }
@keyframes page-d { from { opacity: 0; transform: translateX(28px); } }
@keyframes page-g { from { opacity: 0; transform: translateX(-28px); } }
/* Barre d'onglets : pastille qui glisse et icône qui rebondit */
.tabs-pastille { position: absolute; top: 0; left: calc(var(--onglet, 0) * 25% + 12.5%); width: 25%; height: 100%; transform: translateX(-50%); pointer-events: none;
  transition: left .4s cubic-bezier(.3,1.3,.5,1); background: radial-gradient(60% 75% at 50% 0%, color-mix(in srgb, var(--sable) 26%, transparent), transparent 70%); }
.tabs-pastille::before { content: ''; position: absolute; top: 0; left: 50%; width: 34px; height: 3px; margin-left: -17px; border-radius: 0 0 4px 4px; background: var(--sable);
  box-shadow: 0 0 10px color-mix(in srgb, var(--sable) 70%, transparent); }
.tabs button.actif { color: var(--sable); }
.tabs button.actif svg { animation: rebond .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes rebond { 0% { transform: scale(.8) translateY(2px); } 60% { transform: scale(1.12) translateY(-2px); } 100% { transform: none; } }
/* Mon Carnet : les cartes arrivent en cascade */
.grille > .cascade { animation: carte-in .38s calc(var(--n) * 28ms) cubic-bezier(.2,.9,.3,1) both; }
@keyframes carte-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
/* Quiz : les réponses arrivent l'une après l'autre ; éclat de plumes sur une bonne réponse */
.choix.entree > button { animation: carte-in .32s cubic-bezier(.2,.9,.3,1) both; }
.choix.entree > button:nth-child(2) { animation-delay: .06s; } .choix.entree > button:nth-child(3) { animation-delay: .12s; } .choix.entree > button:nth-child(4) { animation-delay: .18s; }
.choix button.bon { animation: bonne .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bonne { 40% { transform: scale(1.04); } }
.plume-eclat { position: fixed; z-index: 80; width: 7px; height: 14px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; pointer-events: none; }
/* Affût : le paquet frétille de temps en temps pour inviter à l'ouvrir ; la pastille du paquet ouvert se vide */
.pack:not(:disabled) { animation: flotte 4s ease-in-out infinite, invite 7s 2s ease-in-out infinite; }
@keyframes invite { 0%, 86%, 100% { rotate: 0deg; } 88% { rotate: -3deg; } 90% { rotate: 3deg; } 92% { rotate: -2deg; } 94% { rotate: 1deg; } }
.compteur i.videe { animation: videe .7s ease-out; }
@keyframes videe { 0% { background: var(--accent); transform: scaleX(1.25); } 100% { background: var(--trait); transform: none; } }
.tabs button { position: relative; z-index: 1; }

/* Pastilles des cartes : texte centré au pixel (la boîte suit la hauteur des capitales et des chiffres) */
.tcg-num, .tcg-rar, .tcg-var { display: inline-flex; align-items: center; line-height: 1; }
@supports (text-box: trim-both cap alphabetic) { .tcg-num, .tcg-rar, .tcg-var { text-box: trim-both cap alphabetic; } }
/* sans text-box : avec Poppins et une hauteur de ligne de 1, les capitales sont déjà centrées */

/* Quiz : accueil graphique */
.qz-accueil { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; justify-content: center; }
.qz-tete { text-align: center; }
.qz-logo { width: 62px; height: 62px; border-radius: 50%; background: var(--sable); color: var(--marque-vert); display: inline-grid; place-items: center; margin-bottom: 8px; }
.qz-logo svg { width: 32px; height: 32px; }
.qz-tete h2 { margin: 0; font-size: clamp(22px, 3.2dvh, 27px); }
.qz-tete p { margin: 2px 0 0; color: var(--doux); font-size: 14px; }
.qz-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-type { background: var(--papier); border-radius: 14px; padding: 10px 10px; display: flex; align-items: center; gap: 9px; }
.qz-type span { display: flex; flex-direction: column; min-width: 0; } .qz-type b { font-size: 13.5px; } .qz-type small { font-size: 11.5px; color: var(--doux); line-height: 1.3; }
.qz-type svg { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--sable); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qz-gains { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-gain { background: var(--papier); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.qz-gain b { font-size: 22px; font-weight: 800; color: var(--sable); }
.qz-gain span { font-size: 13px; font-weight: 600; }
.qz-gain small { font-size: 11.5px; color: var(--doux); }
.qz-gain .barre { margin: 6px 0 2px; }
.qz-pips { display: flex; gap: 5px; margin: 6px 0 2px; } .qz-pips i { flex: 1; height: 8px; border-radius: 9px; background: var(--trait); } .qz-pips i.on { background: var(--r-legendaire); }
.qz-piege { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 13px; color: var(--doux); }
.qz-piege svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Saisons : rails de cartes, pastilles de titre, année en barres */
.ban-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ban-stats span { background: rgba(0,0,0,.32); border-radius: 10px; padding: 5px 10px; font-size: 13px; font-weight: 650; text-shadow: none; }
.ban-stats b { font-weight: 800; }
.sz-bloc { padding: 18px; }
.sz-titre { display: flex; align-items: center; gap: 10px; }
.sz-titre h3 { margin: 0; font-size: 17px; }
.sz-pastille { flex: none; font-size: 13px; font-weight: 800; border-radius: 10px; padding: 5px 9px; }
.sz-pastille.plus { background: color-mix(in srgb, var(--r-peu_commun) 22%, transparent); color: var(--r-peu_commun); }
.sz-pastille.moins { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.sz-pastille.inv { background: color-mix(in srgb, var(--r-tres_rare) 22%, transparent); color: var(--r-tres_rare); }
.rail { display: flex; gap: 10px; overflow-x: auto; margin: 12px -18px 0; padding: 2px 18px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > .tcg { flex: none; width: 96px; scroll-snap-align: start; }
.annee { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 150px; align-items: end; }
.annee-barre { position: relative; height: 100%; border: 0; background: none; padding: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font: inherit; color: var(--doux); cursor: pointer; }
.annee-barre i { width: 100%; height: var(--h); border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--c) 45%, var(--surface)); transition: background .2s, transform .2s; transform-origin: bottom; animation: barre-monte .6s cubic-bezier(.2,.9,.3,1) both; }
.annee-barre:nth-child(n) i { animation-delay: calc(var(--d, 0) * 1s); }
@keyframes barre-monte { from { transform: scaleY(0); } }
.annee-barre.choisi i { background: var(--c); box-shadow: 0 0 0 2px var(--sable); }
.annee-n { font-size: 10.5px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.annee-barre.choisi .annee-n, .annee-barre.courant .annee-n { opacity: 1; color: var(--encre); }
.annee-m { font-size: 11px; font-weight: 700; }
.annee-barre.courant .annee-m { color: var(--sable); }
.annee-detail { margin: 12px 0 0; font-size: 14px; }
.annee-detail .plus { color: var(--r-peu_commun); font-weight: 700; margin-left: 6px; } .annee-detail .moins { color: var(--accent); font-weight: 700; margin-left: 6px; }
.sz-ban { background: linear-gradient(120deg, var(--c2), color-mix(in srgb, var(--c2) 50%, var(--c1))); }
.sz-ban .sz-ban-ico { position: absolute; inset: auto -18px -26px auto; width: 150px; height: 150px; fill: none; stroke: var(--c1); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }

.qz-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-boutons .btn { padding: 14px 10px; }
/* Mode libre */
.qz-libre { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; justify-content: center; }
.qz-libre-tete { display: flex; align-items: center; gap: 12px; }
.qz-libre-tete h2 { margin: 0; font-size: 24px; } .qz-libre-tete p { margin: 2px 0 0; font-size: 13.5px; color: var(--doux); }
.qz-retour { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--papier); color: var(--encre); display: grid; place-items: center; }
.qz-retour svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.qz-lib { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--doux); margin-bottom: 8px; }
.qz-choix-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qz-choix-types button, .qz-niveaux button, .qz-segment button { border: 1.5px solid transparent; background: var(--papier); color: var(--encre); font: inherit; border-radius: 12px; cursor: pointer; }
.qz-choix-types button { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 14px; font-weight: 650; }
.qz-choix-types svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qz-choix-types button.on, .qz-niveaux button.on, .qz-segment button.on { border-color: var(--sable); background: color-mix(in srgb, var(--sable) 16%, var(--papier)); }
.qz-choix-types button.on svg { stroke: var(--sable); }
.qz-niveaux { display: grid; gap: 6px; }
.qz-niveaux button { text-align: left; padding: 9px 12px; display: flex; flex-direction: column; gap: 1px; }
.qz-niveaux b { font-size: 14px; } .qz-niveaux small { font-size: 12px; color: var(--doux); }
.qz-segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.qz-segment button { padding: 10px; font-size: 15px; font-weight: 700; }
.qz-alerte { margin: 8px 0 0; font-size: 13px; color: var(--accent); }
.btn:disabled { opacity: .4; }
/* Saisons : carte manquante avec indice (rareté + type d'oiseau) */
.indice .tcg-in { background: color-mix(in srgb, var(--rc, var(--r-commun)) 14%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--rc, var(--r-commun)) 55%, transparent); border-radius: inherit; }
.indice[data-r="peu_commun"] { --rc: var(--r-peu_commun); } .indice[data-r="rare"] { --rc: var(--r-rare); } .indice[data-r="tres_rare"] { --rc: var(--r-tres_rare); } .indice[data-r="legendaire"] { --rc: var(--r-legendaire); }
.indice .silhouette { top: 42%; color: var(--rc, var(--pale)); opacity: .55; }
.indice-bas { position: absolute; left: 6cqw; right: 6cqw; bottom: 6cqw; display: flex; flex-direction: column; gap: 1cqw; font-size: 8.5cqw; line-height: 1.15; color: var(--doux); text-align: left; }
.indice-bas b { font-size: 7.5cqw; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--rc, var(--doux)); }
.sz-ok { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.sz-ok svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--r-peu_commun); fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Fluidité : les petites cartes (Carnet, rangées) restent fixes. Les reflets et cadres animés sont réservés aux grandes cartes. */
.mini::after, .mini .tcg-rar { animation: none !important; }
.mini .tcg-reflet, .mini .tcg-eclats { display: none; }
.tcg.mini { box-shadow: 0 2px 6px rgba(0,0,0,.28); }
.grille > .tcg { content-visibility: auto; contain-intrinsic-size: auto 10px auto 150px; }
/* Quiz : bascule Défi du jour / Mode libre (le contenu glisse d'un côté ou de l'autre) */
.qz-ecran { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.qz-titre { margin: 0; text-align: center; font-size: clamp(21px, 3dvh, 26px); }
.qz-bascule { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--papier); border-radius: 14px; padding: 4px; flex: none; }
.qz-bascule i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--sable); transition: transform .35s cubic-bezier(.3,1.2,.5,1); }
.qz-bascule.libre i { transform: translateX(100%); }
.qz-bascule button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 700; padding: 10px 6px; color: var(--doux); transition: color .25s; }
.qz-bascule button.on { color: var(--marque-vert); }
.qz-panneau { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qz-panneau.de-droite { animation: page-d .32s cubic-bezier(.2,.8,.3,1); }
.qz-panneau.de-gauche { animation: page-g .32s cubic-bezier(.2,.8,.3,1); }
.qz-sous { margin: 0; text-align: center; font-size: 13.5px; color: var(--doux); }
.qz-tete p { margin: 0; }
.qz-logo { width: 48px; height: 48px; margin-bottom: 4px; } .qz-logo svg { width: 26px; height: 26px; }
.qz-accueil, .qz-libre { gap: 12px; }

/* Barre du haut : plumes + bouton profil */
.topbar-droite { display: flex; align-items: center; gap: 8px; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); color: var(--encre); display: grid; place-items: center; transition: background .2s, color .2s; }
.avatar-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.avatar-btn.actif { background: var(--sable); color: var(--marque-vert); }
.tabs.sans-onglet .tabs-pastille { opacity: 0; }
/* Fiche : bouton vitrine */
.coeur { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--surface); color: var(--encre); border-radius: 99px; padding: 8px 14px; font: inherit; font-size: 13.5px; font-weight: 650; }
.coeur svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.coeur.on { background: color-mix(in srgb, #e5566e 22%, var(--surface)); }
.coeur.on svg { fill: #e5566e; stroke: #e5566e; animation: rebond .45s cubic-bezier(.3,1.6,.5,1); }
/* Profil */
.pf-tete { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 18px 18px; }
.pf-avatar { position: relative; width: 80px; height: 80px; border: 0; padding: 0; border-radius: 50%; background: var(--sable); color: var(--marque-vert); display: grid; place-items: center; font: inherit; font-size: 34px; font-weight: 800;
  box-shadow: 0 0 0 4px var(--papier), 0 0 0 6px color-mix(in srgb, var(--sable) 50%, transparent); }
.pf-nom { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--encre); font: inherit; font-size: 21px; font-weight: 700; margin-top: 6px; padding: 0; }
.pf-nom svg { width: 16px; height: 16px; fill: none; stroke: var(--doux); stroke-width: 2; stroke-linejoin: round; }
.pf-saisie { margin-top: 6px; width: 100%; max-width: 260px; font: inherit; font-size: 18px; font-weight: 700; text-align: center; color: var(--encre); background: var(--surface); border: 1.5px solid var(--sable); border-radius: 12px; padding: 8px 12px; }
.pf-titre { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--marque-vert); background: var(--sable); border-radius: 8px; padding: 5px 10px; }
.pf-prochain { width: 100%; margin-top: 8px; } .pf-prochain small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--doux); }
.pf-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.pf-chips span { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; }
.pf-chips svg { width: 15px; height: 15px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.sz-pastille.vitr { background: color-mix(in srgb, #e5566e 22%, transparent); color: #f08a9b; }
.vitrine { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.vitrine-vide svg { width: 26px; height: 26px; fill: none; stroke: var(--pale); stroke-width: 1.6; stroke-linejoin: round; }
.pf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-stats div { background: var(--surface); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.pf-stats b { font-size: 24px; font-weight: 800; color: var(--sable); } .pf-stats span { font-size: 12.5px; color: var(--doux); }
.pf-rars { display: grid; gap: 7px; margin-top: 14px; }
.pf-rar { display: grid; grid-template-columns: 84px 1fr 52px; align-items: center; gap: 8px; font-size: 12.5px; }
.pf-rar span { color: var(--c); font-weight: 700; } .pf-rar b { text-align: right; font-variant-numeric: tabular-nums; }
.pf-trouvs { display: grid; gap: 6px; margin-top: 14px; }
.pf-trouv { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding: 9px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); font-size: 13px; }
.pf-trouv span { color: var(--c); font-weight: 700; } .pf-trouv small { color: var(--doux); }

/* Quiz : même squelette pour les deux modes → le bouton principal est toujours au même endroit, en bas */
.qz-accueil, .qz-libre { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 12px; }
.qz-corps { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; justify-content: center; scrollbar-width: none; }
.qz-corps::-webkit-scrollbar { display: none; }
.qz-action { flex: none; }
.qz-niveaux { grid-template-columns: repeat(3, 1fr); }
.qz-niveaux button { align-items: center; text-align: center; padding: 9px 4px; }
.qz-niv-expl { margin: 6px 0 0; font-size: 12.5px; color: var(--doux); text-align: center; }
.qz-choix-types button { padding: 9px 12px; }
.qz-corps { justify-content: flex-start; }
.qz-corps > :first-child { margin-top: auto; } .qz-corps > :last-child { margin-bottom: auto; } /* centré quand ça tient, défile sans rien couper sinon */
/* Téléphone à l'horizontale : on demande de le remettre droit (l'appli est pensée pour la verticale) */
.paysage { display: none; }
@media (orientation: landscape) and (max-height: 520px) {
  .paysage { position: fixed; inset: 0; z-index: 200; background: var(--fond); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
  .paysage svg { width: 64px; height: 64px; fill: none; stroke: var(--sable); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: pivote 2.4s ease-in-out infinite; }
  .paysage b { font-size: 19px; } .paysage span { color: var(--doux); font-size: 14px; }
}
@keyframes pivote { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0); } }

/* Avatars */
.pf-avatar-crayon { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--papier); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--fond); }
.pf-avatar-crayon svg { width: 14px; height: 14px; fill: none; stroke: var(--sable); stroke-width: 2.2; stroke-linejoin: round; }
.avatars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; padding-bottom: 10px; }
.avatar-choix { border: 0; background: none; color: var(--encre); font: inherit; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; }
.avatar-choix span { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; }
/* Badges (insignes) */
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; margin-top: 14px; }
.badge { border: 0; background: none; color: var(--encre); font: inherit; padding: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.badge b { font-size: 12px; line-height: 1.2; } .badge small { font-size: 10.5px; color: var(--doux); line-height: 1.25; }
.badge:not(.ok) b { color: var(--doux); }
/* Badge en grand, en 3D : tranches empilées pour l'épaisseur, face avant et dos (date) */
.badge-voile { position: fixed; inset: 0; z-index: 95; background: rgba(5,12,8,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; animation: fondu .25s both; }
.badge-voile.fin { opacity: 0; transition: opacity .25s; }
.badge-scene { width: min(68vw, 280px); aspect-ratio: 1; perspective: 900px; touch-action: none; cursor: grab; }
.b3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.b3d > div { position: absolute; inset: 0; }
.b3d-tranche { filter: brightness(.55); }
.b3d-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.b3d-face.avant { transform: translateZ(5px); }
.b3d-face.arriere { transform: rotateY(180deg) translateZ(5px); }
.b3d-dos { position: absolute; inset: 22%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.b3d-dos b { font-size: 17px; line-height: 1.15; } .b3d-dos span { font-size: 13px; font-weight: 600; opacity: .9; }
.badge-info { text-align: center; max-width: 320px; } .badge-info h2 { margin: 0 0 4px; font-size: 22px; } .badge-info p { margin: 0 0 8px; color: var(--doux); }
.badge-info .btn { margin-top: 8px; }

/* Silhouettes (masque) : la couleur vient de currentColor */
.silh { display: block; background: currentColor; -webkit-mask: var(--s) center / contain no-repeat; mask: var(--s) center / contain no-repeat; }
/* Avatars : silhouette crème sur disque coloré, filet sable */
.avatar { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--fond) 70%, #fff 12%), var(--fond)); color: var(--marque-creme); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sable) 45%, transparent); overflow: hidden; }
.avatar .silh { width: 76%; height: 76%; }
.avatar-btn:has(.avatar) { background: none; padding: 0; overflow: hidden; }
.avatar-btn .avatar { width: 38px; height: 38px; }
.avatar-btn.actif:has(.avatar) { box-shadow: 0 0 0 2px var(--sable); }
.pf-avatar:has(.avatar) { background: none; }
.pf-avatar .avatar { width: 80px; height: 80px; }
.avatar-choix .avatar { width: 76px; height: 76px; transition: transform .2s; }
.avatar-choix.on .avatar { box-shadow: 0 0 0 3px var(--fond), 0 0 0 5px var(--sable); }
.avatar-choix:active .avatar { transform: scale(.94); }
/* Badges émaillés */
.badge-art { position: relative; display: block; width: 62px; height: 62px; margin-bottom: 6px; color: var(--marque-creme); }
.badge-art svg { width: 100%; height: 100%; display: block; }
.badge-art.ok { filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.badge-art .badge-silh { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; }
.badge-art:not(.ok) { color: #4a6152; }
.badge-texte { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.badge:active .badge-art { transform: scale(.94); }
.b3d .badge-art { width: 100%; height: 100%; margin: 0; }
.b3d .badge-texte { font-size: 54px; }
.b3d-face.avant .badge-art.ok { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
/* Défi du jour : tient sans défiler */
.qz-intro { margin: 0; text-align: center; font-size: 14.5px; color: var(--doux); } .qz-intro b { color: var(--encre); }
.qz-accueil .qz-corps { gap: 8px; }
.qz-type { padding: 9px 10px; }
.qz-type small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qz-gain { padding: 10px 12px; gap: 2px; } .qz-gain b { font-size: 20px; }
.qz-piege { font-size: 12.5px; }
/* Mode libre : bandeau « Pour le plaisir » */
.qz-plaisir { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--sable) 16%, var(--papier)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sable) 45%, transparent); }
.qz-plaisir svg { flex: none; width: 26px; height: 26px; fill: var(--sable); }
.qz-plaisir span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--doux); } .qz-plaisir b { font-size: 15px; color: var(--sable); }
#titre { cursor: pointer; }

/* Quiz : titres des deux modes identiques ; tuiles qui ne débordent jamais */
.qz-entete { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.qz-entete b { font-size: 16px; color: var(--sable); } .qz-entete span { font-size: 12.5px; color: var(--doux); }
.qz-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qz-type { min-width: 0; } .qz-type span { min-width: 0; }
/* Pas de largeur de page qui bouge pendant les glissements et les compteurs */
html, body { overflow-x: clip; }
[data-compte] { font-variant-numeric: tabular-nums; }

.badge-art .badge-ico { position: absolute; left: 31%; top: 31%; width: 38%; height: 38%; }

.sz-pastille.neutre { background: var(--surface); color: var(--doux); }
.pf-rar { grid-template-columns: 100px minmax(0, 1fr) 56px; } .pf-rar span, .pf-rar b { white-space: nowrap; }
/* Quiz : les titres des deux modes en haut, au même endroit ; le contenu suit, le bouton reste en bas */
.qz-corps > :first-child { margin-top: 0; } .qz-corps > :last-child { margin-bottom: 0; }
.qz-accueil .qz-lib { margin: 6px 0 -2px; text-align: left; }
/* Choix d'avatar : aperçu, couleurs, oiseaux à débloquer */
.av-apercu { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.av-apercu .avatar { width: 72px; height: 72px; flex: none; box-shadow: 0 0 0 3px var(--fond), 0 0 0 5px var(--sable); }
.av-apercu b { display: block; font-size: 18px; } .av-apercu span { font-size: 13px; color: var(--doux); }
.avatar { background: var(--fond); }
.av-couleurs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.av-coul { position: relative; aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--c); display: grid; place-items: center; padding: 0; color: #fff; }
.av-coul.on { box-shadow: 0 0 0 3px var(--fond), 0 0 0 5px var(--sable); }
.av-coul i { width: 18px; height: 18px; display: block; } .av-coul i svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: .85; }
.av-coul small { position: absolute; bottom: -16px; font-size: 10.5px; font-weight: 700; color: var(--doux); }
.av-couleurs { margin-bottom: 26px; }
.avatar-choix { position: relative; }
.avatar-choix.verrou .avatar { opacity: .5; }
.avatar-choix em { position: absolute; top: 66px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; white-space: nowrap; background: var(--papier); color: var(--sable); border-radius: 99px; padding: 2px 7px; box-shadow: 0 0 0 1.5px var(--trait); display: inline-flex; align-items: center; gap: 3px; }
.av-action { position: sticky; bottom: 0; background: var(--fond); padding: 12px 0 4px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.av-action small { font-size: 12.5px; color: var(--doux); min-height: 1em; }
/* Profil : liste des rangs (les rangs secrets restent masqués) */
.pf-rangs { width: 100%; margin-top: 6px; text-align: left; }
.pf-rangs summary { list-style: none; cursor: pointer; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--sable); padding: 4px; }
.pf-rangs summary::-webkit-details-marker { display: none; }
.pf-rangs > div { display: grid; gap: 2px; margin-top: 6px; }
.pf-rang { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--pale); }
.pf-rang.ok { color: var(--encre); } .pf-rang.actuel { background: color-mix(in srgb, var(--sable) 16%, transparent); color: var(--sable); font-weight: 700; }
.pf-rang b { font-variant-numeric: tabular-nums; font-weight: 600; }
.rail { scroll-padding-inline: 18px; } /* la première carte s'aligne sur le texte du bloc */

/* Choix d'avatar : même présentation pour les couleurs et les oiseaux (pastille ronde, nom, prix en dessous) */
.av-couleurs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 6px; margin-bottom: 18px; }
.avatars { gap: 16px 10px; }
.av-choix { border: 0; background: none; color: var(--encre); font: inherit; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.av-choix .av-rond { width: 76px; height: 76px; border-radius: 50%; display: grid; transition: transform .2s; }
.av-couleurs .av-rond { width: 48px; height: 48px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12); }
.av-choix.on .av-rond { box-shadow: 0 0 0 3px var(--fond), 0 0 0 5px var(--sable); }
.av-choix:active .av-rond { transform: scale(.94); }
.av-choix.verrou .av-rond { opacity: .5; }
.av-nom { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-couleurs .av-nom { font-size: 11px; }
.av-prix { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--sable); }
.av-prix .ico-plume { width: 12px !important; height: 12px !important; }


/* Bouton du choix d'avatar : collé tout en bas du panneau, il recouvre aussi la marge du bas (plus de bande où l'on voit la liste) */
.av-action { bottom: calc(-24px - env(safe-area-inset-bottom)); margin-bottom: calc(-24px - env(safe-area-inset-bottom)); padding-bottom: calc(14px + 24px + env(safe-area-inset-bottom)); box-shadow: 0 -14px 14px -4px var(--fond); }
/* Nom bien détaché du cercle, même quand il est entouré (sélection) ; prix posé sur la pastille */
.av-choix { gap: 10px; }
.av-pastille { position: relative; display: grid; place-items: center; }
.av-pastille > * { grid-area: 1 / 1; }
.av-prix { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px 3px 6px; border-radius: 99px; background: rgba(8,20,12,.78); color: var(--sable); font-size: 12px; font-weight: 800; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sable) 35%, transparent); }
.av-couleurs .av-prix { padding: 2px 6px 2px 4px; font-size: 11px; }
.av-prix .ico-plume { width: 12px !important; height: 12px !important; }
.av-choix.verrou .av-rond { opacity: .55; }
.av-action { z-index: 3; }
/* Vitrine : cases vides cliquables, déplacement à l'appui long */
.vitrine { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.vitrine-case { position: relative; border-radius: 11px; transition: box-shadow .15s; }
.vitrine-case > .tcg { touch-action: pan-y; transition: transform .2s; }
.vitrine-vide { width: 100%; aspect-ratio: 5 / 7; border-radius: 11px; border: 1.5px dashed var(--trait); background: none; color: var(--pale); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0; }
.vitrine-vide span { font-size: 12px; font-weight: 600; }
.vitrine-vide:active { border-color: var(--sable); color: var(--sable); }
.vitrine .tcg.souleve { position: relative; z-index: 5; transition: none; box-shadow: 0 16px 30px rgba(0,0,0,.5); }
.vitrine.en-glisse .vitrine-case.cible { box-shadow: 0 0 0 2.5px var(--sable); }
.fav-recherche { width: 100%; font: inherit; font-size: 15px; color: var(--encre); background: var(--surface); border: 1.5px solid transparent; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; }
.fav-recherche:focus { outline: none; border-color: var(--sable); }
.fav-grille { padding-bottom: 12px; }
/* Mon Carnet : recherche par mots-clés */
.recherche { display: flex; align-items: center; gap: 8px; background: var(--papier); border-radius: 14px; padding: 0 6px 0 12px; margin-bottom: 12px; border: 1.5px solid transparent; }
.recherche:focus-within { border-color: var(--sable); }
.recherche > svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--doux); stroke-width: 2; stroke-linecap: round; }
.recherche input { flex: 1; min-width: 0; border: 0; background: none; color: var(--encre); font: inherit; font-size: 15px; padding: 12px 0; outline: none; }
.recherche input::-webkit-search-cancel-button { display: none; }
.recherche input::placeholder { color: var(--pale); }
.recherche-effacer { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface); color: var(--doux); font-size: 13px; }
/* iPhone : un champ de texte en dessous de 16 px déclenche un zoom automatique de la page → tous les champs à 16 px */
input, textarea, select { font-size: 16px !important; }
/* Barre de recherche du carnet (ouvre l'écran de recherche) */
.recherche-ouvrir { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--encre); font: inherit; font-size: 15px; padding: 12px 0; text-align: left; }
.recherche-ouvrir svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--doux); stroke-width: 2; stroke-linecap: round; }
.recherche-ouvrir span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .recherche-ouvrir span.vide { color: var(--pale); }
/* Écran de recherche : hauteur = partie visible au-dessus du clavier */
.rech-ecran { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; z-index: 25; background: var(--fond); display: flex; flex-direction: column; animation: fondu .2s; }
.rech-tete { flex: none; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 18px 10px; font-size: 13.5px; color: var(--doux); }
.rech-fini { border: 0; background: none; color: var(--sable); font: inherit; font-size: 15px; font-weight: 700; padding: 6px 2px; }
.rech-resultats { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 18px 16px; -webkit-overflow-scrolling: touch; }
.rech-barre { flex: none; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); background: var(--fond); box-shadow: 0 -10px 16px -6px var(--fond); }
.rech-barre .recherche { margin: 0; }
.rech-ecran.clavier .rech-barre { padding-bottom: 8px; }
/* Couleurs de fond : une rangée discrète à faire glisser */
.av-couleurs { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px 18px; padding: 6px 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.av-couleurs::-webkit-scrollbar { display: none; }
.av-couleurs .av-choix { flex: none; width: 56px; scroll-snap-align: start; gap: 7px; }
.av-couleurs .av-rond { width: 44px; height: 44px; }
.av-couleurs .av-prix { padding: 1px 5px 1px 3px; font-size: 10px; }
.av-couleurs .av-nom { font-size: 10.5px; max-width: 56px; }
.av-choix.bientot .av-rond { background: repeating-linear-gradient(135deg, var(--surface) 0 5px, var(--papier) 5px 10px); opacity: .7; }
.av-choix.bientot .av-prix { font-size: 9.5px; padding: 1px 5px; }
.av-choix.bientot .av-nom { color: var(--pale); }
.av-couleurs { padding: 6px 22px 4px; margin-left: -16px; margin-right: -16px; scroll-padding-inline: 22px; }
.av-cadenas { position: relative; z-index: 1; width: 16px; height: 16px; display: block; } .av-cadenas svg { width: 100%; height: 100%; fill: none; stroke: var(--doux); stroke-width: 2.2; stroke-linecap: round; }
/* Bascule du quiz : même crème que les boutons principaux */
.qz-bascule i { background: var(--encre); }
.qz-bascule button.on { color: var(--fond); }
/* Fin de paquet : bilan détaillé */
.bilan { width: 100%; max-width: 420px; margin: 0 auto 14px; display: flex; flex-direction: column; gap: 8px; color: #fff; }
.bilan-chiffres { display: flex; gap: 8px; }
.bilan-chiffre { flex: 1; background: rgba(255,255,255,.08); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.bilan-chiffre b { font-size: 22px; font-weight: 800; line-height: 1.1; } .bilan-chiffre span { font-size: 11.5px; opacity: .8; display: inline-flex; align-items: center; gap: 3px; }
.bilan-chiffre.vert b { color: #9be07f; } .bilan-chiffre.sable b { color: var(--sable); }
.bilan-rar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.bilan-rar span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.08); border-radius: 99px; padding: 4px 10px; }
.bilan-rar i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.bilan-doublons { display: flex; flex-direction: column; gap: 3px; font-size: 12px; text-align: center; opacity: .9; }
.bilan-doublons em { font-style: normal; opacity: .65; } .bilan-doublons b { color: var(--sable); display: inline-flex; align-items: center; gap: 2px; }
.bilan-carnet { text-align: center; font-size: 12.5px; opacity: .85; } .bilan-carnet em { font-style: normal; color: #9be07f; font-weight: 700; }
/* Affût sans paquet à ouvrir : paquet plus petit, et de l'air entre l'appel au quiz et l'encart saison */
.ecran .pack-zone.repos .pack { height: max(140px, min(calc(100cqh - 64px), 300px, calc(60cqw * 360 / 250))); }
.ecran .appel-quiz { margin: 0 0 12px; }
/* Insignes non obtenus : progression */
.badge-prog { display: block; width: 56px; height: 4px; border-radius: 9px; background: var(--trait); overflow: hidden; margin: 3px 0 1px; }
.badge-prog i { display: block; height: 100%; background: var(--sable); border-radius: 9px; }
.badge-avance { margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.badge-avance span { font-size: 13.5px; color: var(--doux); } .badge-avance b { color: var(--sable); }
/* Pages d'information (mentions, confidentialité, conditions, crédits) */
.infos { padding-bottom: 20px; font-size: 14.5px; line-height: 1.55; }
.infos h3 { margin: 18px 0 6px; font-size: 15px; color: var(--sable); }
.infos p { margin: 0 0 10px; color: var(--encre); }
.infos a { color: var(--sable); }
.infos-chapo { font-size: 15px; color: var(--doux); }
.infos-liste { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; }
.infos-liste.petit { font-size: 12.5px; line-height: 1.45; color: var(--doux); }
.infos-liste b { color: var(--encre); font-weight: 650; }
/* Profil : lignes de paramètres */
.param { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: var(--encre); font: inherit; font-size: 15px; padding: 12px 2px; border-bottom: 1px solid var(--trait); text-align: left; }
.param:last-of-type { border-bottom: 0; }
.param svg { width: 21px; height: 21px; flex: none; fill: none; stroke: var(--sable); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.param span { flex: 1; }
.param .chevron { width: 17px; height: 17px; stroke: var(--pale); }
.param.danger, .param.danger svg:first-child { color: #e2705f; stroke: #e2705f; }
.btn.danger { background: #c4473a; color: #fff; }

/* ---------- Accueil des nouveaux joueurs, connexion, installation ---------- */
.acc { position: fixed; inset: 0; z-index: 80; background: radial-gradient(120% 70% at 50% 0%, #1b3d27 0%, var(--fond) 70%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom)); overflow-y: auto; animation: acc-in .45s ease; }
.acc.fini { opacity: 0; transform: translateY(-14px); transition: opacity .4s, transform .4s; }
@keyframes acc-in { from { opacity: 0; } }
.acc-carte { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; animation: acc-glisse .35s cubic-bezier(.2,.8,.3,1); }
@keyframes acc-glisse { from { opacity: 0; transform: translateX(24px); } }
.acc h1 { margin: 0; font-size: 27px; line-height: 1.15; }
.acc-logo { width: 190px; height: 56px; color: var(--encre); align-self: center; margin-bottom: 6px; }
.acc-chapo { margin: 0; color: var(--doux); font-size: 15.5px; line-height: 1.45; }
.acc-liste { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.acc-liste li, .acc-etapes li { display: grid; gap: 2px; background: var(--papier); border: 1px solid var(--trait); border-radius: 16px; padding: 12px 14px; }
.acc-liste span, .acc-etapes span { color: var(--doux); font-size: 14px; line-height: 1.4; }
.acc-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.acc-etapes li { grid-template-columns: 30px 1fr; align-items: start; gap: 10px; }
.acc-etapes li > b { width: 28px; height: 28px; border-radius: 50%; background: var(--sable); color: var(--marque-vert); display: grid; place-items: center; font-size: 14px; }
.acc-etapes span { color: var(--encre); font-size: 14.5px; }
.acc-etapes span b { color: var(--sable); }
.ico-inline { width: 17px; height: 17px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-form { display: grid; gap: 10px; }
.acc-label { font-size: 13px; color: var(--doux); font-weight: 600; }
.acc-champ { width: 100%; font: inherit; font-size: 17px; color: var(--encre); background: var(--papier); border: 1px solid var(--trait); border-radius: 14px; padding: 14px 16px; outline: none; }
.acc-champ:focus { border-color: var(--sable); }
.acc-code { text-align: center; letter-spacing: .4em; font-size: 24px; font-weight: 600; }
.acc-note { margin: 0; font-size: 13px; color: var(--pale); line-height: 1.45; text-align: center; }
.lien { background: none; border: 0; padding: 4px; color: var(--sable); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.acc-passer { align-self: center; font-size: 14.5px; color: var(--doux); }
.acc-points { display: flex; gap: 7px; margin-top: 22px; }
.acc-points i { width: 7px; height: 7px; border-radius: 99px; background: var(--trait); transition: width .25s, background .25s; }
.acc-points i.on { width: 22px; background: var(--sable); }
#feuille .acc-form { margin-top: 14px; }
#feuille .acc-etapes { margin-top: 14px; }
