/* Classeur : grille placée toute seule */
.b-auto { margin-bottom: 8px; padding: 8px 12px; border-radius: 12px; font-size: .85rem; background: rgba(61,220,151,.1); border: 1px solid rgba(61,220,151,.35); }
.b-auto .linkbtn { font-weight: 700; }
.b-auto svg { display: inline-block; vertical-align: -2px; }

/* ===== Classeur : cases trouvées une par une (photo en biais) ===== */
.cells-ov { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.cells-ov polygon { fill: none; stroke: var(--accent2); stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 2px rgba(0,0,0,.8)); }
.cells-ov text { fill: var(--accent2); font-size: 13px; font-weight: 900; paint-order: stroke; stroke: #000; stroke-width: 3px; }

/* ===== Rafale ===== */
.r-live { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 3; max-width: calc(100% - 20px); padding: 6px 12px; border-radius: 16px; background: rgba(10,11,22,.78); color: #fff; font-size: .82rem; font-weight: 700; white-space: normal; text-align: center; width: max-content; pointer-events: none; display: block; line-height: 1.3; }
.r-live svg { vertical-align: -2px; margin-right: 3px; } /* v3.87 : sur 2 lignes si besoin (consignes de la rafale certifiée) */
.r-live.go { background: rgba(124,92,255,.9); }
.r-live.ok { background: rgba(26,150,98,.92); }
/* v3.82 : bande des cartes déjà prises en bas de l'image, lues pendant la rafale (visuel officiel + nom dès qu'elles sont trouvées) */
.r-strip { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 3; display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(10,11,22,.72); pointer-events: none; overflow: hidden; }
.r-sum { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 40px; align-self: stretch; color: #fff; font-weight: 800; font-size: .95rem; line-height: 1.1; }
.r-sum small { font-size: .62rem; font-weight: 700; color: #aab0d3; }
.r-th { position: relative; flex: 0 0 auto; width: 48px; display: flex; flex-direction: column; gap: 2px; }
.r-th img { display: block; width: 48px; aspect-ratio: 63/88; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.18); }
.r-th.st-attente img, .r-th.st-lecture img { filter: grayscale(.6) brightness(.6); }
.r-th.st-sure img { box-shadow: 0 0 0 2px var(--ok); }
.r-th.st-verifier img { box-shadow: 0 0 0 2px #ffb84d; }
.r-th small { display: block; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .58rem; font-weight: 700; color: #fff; text-align: center; }
.r-th .spinner { position: absolute; left: 50%; top: 22px; width: 16px; height: 16px; margin: 0 0 0 -8px; border-width: 2px; }
.r-th b { position: absolute; right: -3px; top: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: .62rem; }
.r-th b.ok { background: var(--ok); color: #063; }
.r-th b.q { background: #ffb84d; color: #4a2b00; }
.r-th b.no { background: #ff6b6b; color: #fff; }
.r-th .r-cert { position: absolute; left: -3px; top: -3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: #555b78; color: #fff; opacity: .9; } /* v3.87 : certifiée (vert) ou sans badge (gris) */
.r-th .r-cert.on { background: var(--ok); color: #063; opacity: 1; }
.r-th .r-cert svg { width: 10px; height: 10px; }
.r-sum-cert { display: flex; align-items: center; gap: 2px; margin-top: 3px; padding: 1px 5px; border-radius: 999px; background: var(--ok); color: #063; font-size: .7rem; }
.r-sum-cert svg { width: 10px; height: 10px; }
/* v3.83 : pendant les photos de la rafale, rien sous la caméra (la lecture continue en fond, visible dans la bande) ; bouton Terminer */
.r-shooting #b-results, .r-shooting #b-status { display: none; }
.scan-view:has(.r-strip) .scan-guide::after { content: none; } /* (la bande des cartes prend sa place) */
.r-stop svg { fill: currentColor; }
/* v3.38 : conseils de prise de vue (seulement si un vrai problème dure) — rafale (.r-live.warn), carte seule (.shot-tip), après la photo (.shot-warn) */
.r-live.warn, .shot-tip { background: rgba(196,120,0,.94); color: #fff; white-space: normal; text-align: center; border-radius: 14px; }
.shot-tip { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 5; width: max-content; max-width: calc(100% - 24px); padding: 6px 12px; font-size: .82rem; font-weight: 700; line-height: 1.3; pointer-events: none; }
.scan-view:has(.r-steps) .shot-tip { top: auto; bottom: 12px; } /* v4.09 : carte seule certifiée, sous les pastilles et la consigne */
.shot-warn { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255,170,40,.14); border: 1px solid rgba(255,170,40,.55); font-size: .9rem; }
.shot-warn > span { flex: 1 1 200px; }
.scan-view.r-flash::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: .75; animation: r-flash .26s ease-out forwards; pointer-events: none; z-index: 4; }
@keyframes r-flash { to { opacity: 0; } }
.r-cert { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; line-height: 1.35; }
.r-cert input { margin-top: 2px; }

/* ===== Capsules : boutique (points, achats, ventes) ===== */
.cap-actions { gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gold-btn { background: linear-gradient(135deg, #ffe27a, #ffb52e 55%, #ff8a1f); color: #2a1600; border-color: transparent; font-weight: 800; box-shadow: 0 6px 18px rgba(255,170,40,.28); }
.gold-btn:hover { filter: brightness(1.06); color: #2a1600; }
.gold-btn .gb-n { font-size: .8em; opacity: .8; }
.cap-shop { margin-top: 16px; }
.shop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.shop-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.coins-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: linear-gradient(135deg, rgba(255,210,63,.18), rgba(255,138,31,.12)); border: 1px solid rgba(255,200,61,.45); color: #ffd76a; font-size: .95rem; }
.coins-pill b { font-size: 1.15rem; color: #fff3c4; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-item { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface2, #1b1f3a); border: 1px solid var(--line); }
/* bordure seulement quand on a de quoi l'acheter */
.shop-item.can { border-color: rgba(124,92,255,.65); box-shadow: 0 0 0 1px rgba(124,92,255,.25), 0 6px 18px rgba(124,92,255,.18); }
.shop-item.gold.can { border-color: rgba(255,200,61,.7); box-shadow: 0 0 0 1px rgba(255,200,61,.25), 0 6px 18px rgba(255,200,61,.16); background: linear-gradient(160deg, rgba(255,200,61,.10), transparent 60%), var(--surface2, #1b1f3a); }
.shop-item .shop-art { grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; }
.shop-item .coin-art { color: #ffc83d; }
.shop-item .shop-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shop-item .shop-txt span { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.shop-item .btn { justify-self: start; }
.sp-sell { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .shop-grid { grid-template-columns: 1fr; }
  .cap-actions .btn.big { flex: 1 1 100%; justify-content: center; }
}

/* Match : filtres du choix des Pokémon */
.bt-sel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px; }
.bt-sel-s { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px; border-radius: 10px; border: 1px solid #ff4fa3; background: rgba(255,79,163,.12); color: var(--text); font: inherit; font-size: .74rem; cursor: pointer; text-align: left; }
.bt-sel-s img { width: 24px; aspect-ratio: 63/88; object-fit: cover; border-radius: 3px; flex: none; }
.bt-sel-s span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bt-sel-s b { flex: none; color: var(--muted); font-size: 1rem; line-height: 1; }
.bt-sel-s.empty { border-style: dashed; border-color: var(--line); background: none; color: var(--muted); cursor: default; min-height: 42px; }
.bt-sel-s.empty i { font-style: normal; font-weight: 800; width: 20px; text-align: center; }
.bt-sel-s.empty span { font-weight: 400; }
.bt-filters { display: flex; flex-direction: column; gap: 8px; }
.bt-ftypes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.bt-tchip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #161a2e); color: var(--text); font: inherit; font-size: .76rem; cursor: pointer; }
.bt-tchip i { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); }
.bt-tchip.on { border-color: var(--tc, #ff4fa3); background: color-mix(in srgb, var(--tc, #ff4fa3) 28%, transparent); font-weight: 700; }
.bt-frow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bt-frow label { display: flex; flex-direction: column; gap: 3px; font-size: .7rem; color: var(--muted); min-width: 0; }
.bt-frow select { width: 100%; min-width: 0; font-size: .82rem; }
.bt-fstate { min-height: 1em; }
.bt-pk-n { font-size: .7rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-pk-s { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: .66rem; color: var(--muted); white-space: nowrap; }
.bt-pk-s b { color: var(--text); font-weight: 700; }
.bt-pk-s em { font-style: normal; color: #ffc83d; font-weight: 700; }
.bt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex: none; }
@media (max-width: 760px) {
  .bt-pick-grid { max-height: 44vh; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .bt-frow { grid-template-columns: 1fr 1fr; }
  .bt-frow label:first-child { grid-column: 1 / -1; }
}
.bt-tchip small { color: var(--muted); font-size: .68rem; }
.bt-tchip.none { opacity: .38; cursor: default; }
@media (min-width: 761px) { .bt-ftypes { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 760px) { .bt-ftypes { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 30px; } }

/* Match : modes, barre d'équipe (téléphone), sac */
.bt-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; max-width: 620px; }
.bt-modes button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface, #161a2e); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bt-modes button small { font-size: .72rem; color: var(--muted); }
.bt-modes button.on { border-color: #ff4fa3; background: linear-gradient(135deg, rgba(255,79,163,.18), rgba(124,92,255,.18)); box-shadow: 0 0 0 1px #ff4fa3; }
.bt-tm-pick { padding: 3px 10px; }
.bt-tm-bag { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; }
.bt-tm-bagimgs { display: flex; gap: 3px; }
.bt-tm-bagimgs img { width: 20px; aspect-ratio: 63/88; object-fit: cover; border-radius: 3px; }
.bt-qty { position: absolute; top: 4px; right: 4px; font-size: .64rem; font-weight: 800; padding: 1px 5px; border-radius: 999px; background: rgba(0,0,0,.65); color: #fff; }
.bt-sel.bag { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .bt-modes button { padding: 8px 10px; }
  .bt-modes button small { font-size: .66rem; }
  .bt-team-panel { display: none; }
  .bt-pick .bt-teams { grid-template-columns: 1fr; }
  .bt-pick .bt-tm { display: flex; flex-direction: column; gap: 8px; }
  .bt-pick .bt-tm-h b { flex: 1 1 auto; }
  .bt-pick .bt-tm-cards { grid-template-columns: repeat(3, 58px); }
  .bt-pick .bt-tm-f { flex-direction: row; }
  .bt-sel.bag { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* combat : sac, cartes jouées, états */
.bt-bag { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.bt-played { position: absolute; left: 50%; top: 45%; z-index: 12; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(78vw, 300px); pointer-events: none; transform: translate(-50%, -50%); }
.bt-played img { width: min(46vw, 210px); aspect-ratio: 63/88; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 50px rgba(0,0,0,.6), 0 0 40px rgba(95,180,255,.45); }
.bt-played div { text-align: center; padding: 8px 14px; border-radius: 14px; background: rgba(12,14,30,.9); border: 1px solid rgba(95,180,255,.5); }
.bt-played b { display: block; font-size: 1rem; }
.bt-played small { display: block; font-size: .78rem; color: #cfe6ff; margin-top: 2px; }
.bt-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; }
.bt-tags:empty { display: none; }
.bt-side.foe .bt-tags { justify-content: flex-end; }
.bt-tag { font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.bt-tag.sh { background: rgba(95,180,255,.2); color: #bfe0ff; }
.bt-tag.pw { background: rgba(255,95,109,.2); color: #ffc2c7; }
.bt-tag.st { background: rgba(255,200,61,.18); color: #ffe6a6; }
.bt-float.heal { color: #9ff5c9; text-shadow: 0 3px 0 #0b7a4a, 0 0 16px rgba(61,220,151,.8); }
.bt-foebag { white-space: nowrap; }
.bt-ov.adv .bt-img { width: min(34vw, calc((100vh - 520px) / 2 * .716), 140px); width: min(34vw, calc((100dvh - 520px) / 2 * .716), 140px); }
.bt-ov.adv .bt-actions { min-height: 196px; }
@media (min-width: 761px) {
  .bt-ov.adv .bt-img { width: clamp(110px, calc((100vh - 370px) / 2 * .716), 280px); }
  .bt-ov.adv .bt-actions { min-height: 190px; }
  .bt-ov.adv .bt-actions { max-width: 1100px; }
  .bt-bag { flex-wrap: wrap; justify-content: center; overflow: visible; }
}
@media (max-width: 760px) { .bt-foebag { display: none; } }

/* Combat : en-tête, modes Basique / Avancé, équipe sur téléphone (onglets) */
.bt-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bt-head h1 { margin: 0; }
.bt-modes { display: inline-flex; gap: 4px; padding: 4px; margin: 14px 0 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #161a2e); max-width: none; }
.bt-modes button { display: block; padding: 7px 22px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.bt-modes button.on { color: #fff; background: linear-gradient(135deg, #ff4fa3, #7c5cff); box-shadow: none; }
.bt-hint { margin: 8px 0 14px; }
.bt-mteam { display: none; }
@media (max-width: 760px) {
  .bt-modes { display: flex; }
  .bt-modes button { flex: 1; padding: 8px 10px; }
  .bt-mteam { display: block; margin-bottom: 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface, #161a2e); overflow: hidden; }
  .bt-mtabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
  .bt-mtabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 6px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bt-mtabs button small { font-size: .66rem; font-weight: 600; opacity: .8; }
  .bt-mtabs button.on { color: var(--text); background: rgba(255,79,163,.1); }
  .bt-mtabs button.on::after { content: ''; position: absolute; left: 14%; right: 14%; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #ff4fa3, #7c5cff); }
  .bt-mbody { display: flex; align-items: center; gap: 12px; padding: 12px; }
  .bt-mcards { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-width: 210px; }
  .bt-mcards img, .bt-mcards .bt-tm-empty { width: 100%; aspect-ratio: 63/88; border-radius: 7px; }
  .bt-mcards img { object-fit: cover; display: block; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
  .bt-mact { flex: none; display: flex; flex-direction: column; gap: 6px; width: 112px; }
  .bt-mact .btn { justify-content: center; }
  .bt-mbag { display: flex; align-items: center; gap: 6px; padding: 0 12px 12px; }
  .bt-mbag img { width: 22px; }
}

/* ===== Animation d'attente de la page de classeur (v2.31) =====
   Seulement la carte en cours (batterie) : rayon de scan pendant la lecture du texte (cyan),
   rayon + « points clés » pendant la vérification par l'image (violet), petit éclat quand la carte est trouvée. */
.btile .bphoto { position: relative; display: block; overflow: hidden; border-radius: 6px; min-width: 0; }
.btile .bphoto img { display: block; }
.btile.bwait .bphoto img { filter: grayscale(.6) brightness(.75); }
.bphoto .bscan { position: absolute; left: -10%; right: -10%; top: 0; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(52,213,255,.18) 60%, rgba(52,213,255,.95) 96%, transparent);
  box-shadow: 0 2px 10px rgba(52,213,255,.55); animation: bscan 1.5s ease-in-out infinite alternate; }
.bphoto.scan-txt::after, .bphoto.scan-img::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(52,213,255,.7), inset 0 0 18px rgba(52,213,255,.35); }
.bphoto.scan-img .bscan { background: linear-gradient(180deg, transparent, rgba(124,92,255,.2) 60%, rgba(160,130,255,.95) 96%, transparent); box-shadow: 0 2px 10px rgba(124,92,255,.6); animation-duration: 1.1s; }
.bphoto.scan-img::after { box-shadow: inset 0 0 0 2px rgba(124,92,255,.8), inset 0 0 18px rgba(124,92,255,.4); }
@keyframes bscan { from { transform: translateY(-30%); } to { transform: translateY(380%); } }
/* v3.25 : attente du cadrage d'une page de classeur — voile, rayon qui balaie la photo, étiquette au centre */
.b-finding { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; border-radius: 6px; background: rgba(10, 12, 32, .38); }
.b-finding .bf-line { position: absolute; left: 0; right: 0; top: 0; height: 100%;
  background: linear-gradient(180deg, transparent 78%, rgba(52,213,255,.16) 92%, rgba(52,213,255,.9) 99.4%, #bff6ff 100%);
  animation: bfScan 1.7s ease-in-out infinite alternate; will-change: transform; }
@keyframes bfScan { from { transform: translateY(-100%); } to { transform: translateY(2%); } }
.b-finding .bf-pill { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; max-width: 86%;
  padding: 10px 16px; border-radius: 999px; background: rgba(12, 14, 34, .86); border: 1px solid rgba(52,213,255,.5); box-shadow: 0 8px 30px rgba(0,0,0,.45), 0 0 18px rgba(52,213,255,.25); }
.b-finding .bf-txt { font-size: .92rem; color: #e8f9ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-finding .bf-spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(52,213,255,.25); border-top-color: #5fe3ef; animation: bfSpin .8s linear infinite; will-change: transform; }
@keyframes bfSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .b-finding .bf-line { animation: none; opacity: .5; transform: translateY(-40%); } .b-finding .bf-spin { animation-duration: 2.4s; } }
/* points clés : petits points qui s'allument l'un après l'autre sur la photo */
.bphoto .bdot { position: absolute; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #ffd23f; pointer-events: none;
  box-shadow: 0 0 6px 2px rgba(255,210,63,.8); opacity: 0; animation: bdot 1.4s ease-in-out infinite; }
.bphoto .bdot:nth-of-type(2) { left: 22%; top: 18%; animation-delay: 0s; }
.bphoto .bdot:nth-of-type(3) { left: 71%; top: 26%; animation-delay: .2s; }
.bphoto .bdot:nth-of-type(4) { left: 40%; top: 41%; animation-delay: .4s; }
.bphoto .bdot:nth-of-type(5) { left: 80%; top: 55%; animation-delay: .6s; }
.bphoto .bdot:nth-of-type(6) { left: 18%; top: 63%; animation-delay: .8s; }
.bphoto .bdot:nth-of-type(7) { left: 57%; top: 76%; animation-delay: 1s; }
.bphoto .bdot:nth-of-type(8) { left: 33%; top: 88%; animation-delay: 1.2s; }
@keyframes bdot { 0%, 100% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 60% { opacity: .15; transform: scale(.7); } }
/* carte trouvée : éclat sur la photo, le visuel officiel apparaît */
.btile.bfound .bphoto::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 6px;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%); background-size: 250% 100%;
  animation: bshine .7s ease-out both; }
.btile.bfound .bofficial { animation: bpop .45s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes bshine { from { background-position: 120% 0; opacity: 1; } to { background-position: -30% 0; opacity: 0; } }
@keyframes bpop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
/* barre de progression de la page (reste visible en faisant défiler) */
.bprog { position: sticky; top: 58px; z-index: 22; margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; background: rgba(20,23,42,.95); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.bprog-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; margin-bottom: 6px; }
.bprog-lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bprog-bar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.bprog-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #34d5ff, #7c5cff); transition: width .4s ease; position: relative; overflow: hidden; }
.bprog-bar.img i { background: linear-gradient(90deg, #7c5cff, #ff4fa3); }
.bprog-bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: bprog 1.3s linear infinite; }
@keyframes bprog { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .bphoto .bscan, .bphoto .bdot, .btile.bfound .bphoto::before, .btile.bfound .bofficial, .bprog-bar i::after { animation: none; }
  .bphoto .bscan { display: none; }
  .bphoto .bdot { opacity: .8; }
}

/* ===== Écran plein écran de la page de classeur (v2.32) : analyse, cartes à vérifier, récapitulatif ===== */
html.sv-lock, html.sv-lock body { overflow: hidden; }
.sv { position: fixed; inset: 0; z-index: 300; background: #080a12; overflow-y: auto; overscroll-behavior: contain; }
.sv.hidden { display: none; }
.sv-in { max-width: 520px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; min-height: 100%; box-sizing: border-box; }
.sv-top { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sv-top .bprog-lbl { margin: 0; }
.sv-top .bprog-bar { margin-top: 7px; }
.sv .warn { color: #ffb84d; } .sv .ok { color: var(--ok); }
.sv-pair { display: grid; grid-template-columns: repeat(2, minmax(0, min(44vw, 34vh))); justify-content: center; gap: 10px; }
.sv .bphoto { position: relative; display: block; overflow: hidden; border-radius: 10px; }
.sv-pair img, .sv-pair .sv-off { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 10px; display: block; background: var(--bg2); }
.sv-off.sv-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-size: .85rem; box-sizing: border-box; }
.sv-off.sv-wait b { font-size: 2.4rem; }
.sv-why { text-align: center; color: var(--muted); font-size: .88rem; line-height: 1.35; overflow-wrap: anywhere; }
.sv-name { text-align: center; font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.sv-alts { display: grid; gap: 6px; }
.sv-alts > div { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.sv-alt { flex: none; width: 76px; display: grid; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 4px; color: var(--text); font: inherit; font-size: .7rem; cursor: pointer; text-align: center; }
.sv-alt img { width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; }
.sv-alt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-acts { display: grid; gap: 8px; }
.sv-acts .btn { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }
.sv-nav { display: flex; justify-content: space-between; }
.sv-hint { text-align: center; }
.sv-final { position: sticky; bottom: 0; margin-top: auto; padding: 10px 0 2px; background: linear-gradient(rgba(8,10,18,0), #080a12 25%); }
/* récapitulatif v3.37 : même en-tête et même page en vignettes que l'analyse, filtres, une ligne par carte */
.sv-rtitle { display: flex; flex-direction: column; gap: 2px; }
.sv-rtitle b { font-family: var(--font-title, inherit); font-size: 1.2rem; }
.bprog-bar.done { height: 7px; }
.bprog-bar.done i { background: var(--ok); }
.bprog-bar.done i::after { display: none; }
button.sv-th { border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.sv-th.off img { filter: grayscale(1) brightness(.4); }
.sv-board .sv-th.off { box-shadow: 0 0 0 1.5px rgba(255,255,255,.12); }
.sv-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.sv-filters::-webkit-scrollbar { display: none; }
.sv-f { flex: none; padding: 7px 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.07); color: var(--muted); font: inherit; font-size: .8rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.sv-f b { margin-left: 3px; color: var(--text); }
.sv-f.on { background: var(--c1); color: #0b1020; }
.sv-f.on b { color: #0b1020; }
.sv-final .linkbtn { justify-self: center; padding: 8px; }
.sv-rows { display: flex; flex-direction: column; gap: 6px; }
.sv-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line); }
.sv-row.new, .sv-row.ok { border-left-color: var(--ok); }
.sv-row.dup { border-left-color: #7c5cff; }
.sv-row-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sv-row-open[disabled] { cursor: default; }
.sv-row-img { flex: none; width: 36px; }
.sv-row-img img { display: block; width: 100%; aspect-ratio: 63/88; object-fit: cover; border-radius: 5px; background: var(--bg2); }
.sv-row.off .sv-row-img img { filter: grayscale(1); opacity: .4; }
.sv-row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sv-row-txt > b, .sv-row-txt > .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-row-txt > b { font-size: .88rem; }
.sv-row-txt > .muted { font-size: .74rem; }
.sv-row-side { flex: none; max-width: 44%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sv-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.sv-row.new .sv-tag:first-child, .sv-row.ok .sv-tag:first-child { background: var(--ok); color: #063; }
.sv-row.dup .sv-tag:first-child { background: #7c5cff; color: #fff; }
.sv-row.own .sv-tag:first-child { color: var(--text); }
.sv-tag.warn { background: rgba(255,184,77,.16); color: #ffb84d; }
/* écran d'analyse (v2.33) : fond aux couleurs holo qui bouge doucement, couleur selon l'étape, la carte prend la place */
.sv-in.sv-m-scan { position: relative; height: 100%; min-height: 100dvh; max-width: 1100px; gap: 10px; }
.sv-in.ph-txt { --c1: #34d5ff; --c2: #7c5cff; --c3: #2be4b0; }
.sv-in.ph-img { --c1: #a582ff; --c2: #ff4fa3; --c3: #ffd23f; }
.sv-in.ph-done { --c1: #3ecf8e; --c2: #34d5ff; --c3: #ffd23f; }
.sv-in:not(.sv-m-scan) { position: relative; }
.sv { isolation: isolate; }
.sv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sv-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.sv-steps span { font-size: .78rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); }
.sv-steps span.on { background: var(--c1); color: #0b1020; }
.sv-steps span.past { color: var(--ok); }
.sv-count { font-family: var(--font-title, inherit); white-space: nowrap; }
.sv-count b { font-size: 2rem; line-height: 1; color: var(--text); }
.sv-count span { color: var(--muted); font-weight: 700; margin-left: 3px; }
.sv-m-scan > .bprog-bar { height: 7px; }
.sv-m-scan > .bprog-bar i { background: var(--c1); }
.sv-m-scan > .bprog-bar i::after { display: none; }
.sv-stage { position: relative; flex: 1 1 auto; min-height: 220px; display: flex; align-items: center; justify-content: center; }
.sv-card { position: relative; height: 100%; aspect-ratio: 63/88; border-radius: 14px; overflow: hidden; display: block; box-shadow: 0 0 0 2px var(--c1), 0 14px 34px rgba(0,0,0,.5); }
.sv-card::after { display: none; }
/* la carte en cours, en grand ; la vignette du visuel trouvé se pose dans son coin */
.sv-shot { position: relative; height: min(100%, 110vw); max-height: 100%; aspect-ratio: 63/88; }
.sv-pip { position: absolute; right: -12px; bottom: -12px; width: 36%; aspect-ratio: 63/88; border-radius: 8px; overflow: hidden; z-index: 2; background: var(--bg2);
  box-shadow: 0 0 0 2px rgba(255,255,255,.35), 0 8px 20px rgba(0,0,0,.6); animation: svpop .4s cubic-bezier(.2,1.4,.4,1); }
.sv-pip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-pip:not(.hit) img { filter: saturate(.6) brightness(.8); }
.sv-pip.hit { box-shadow: 0 0 0 2px var(--ok), 0 8px 20px rgba(0,0,0,.6); }
.sv-pip b { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--ok); color: #063; }
.sv-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-caption { text-align: center; }
.sv-title { font-family: var(--font-title, inherit); font-size: 1.5rem; font-weight: 800; line-height: 1.15; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-sub { color: var(--muted); font-size: .82rem; margin-top: 3px; overflow-wrap: anywhere; }
/* la page en vignettes */
.sv-board { display: flex; justify-content: center; gap: 10px; width: min(100%, calc(26vh * var(--cols) / var(--rows) * 63 / 88 + 10px)); margin: 0 auto; }
.sv-board > div { display: grid; gap: 4px; flex: 1; }
.sv-th { position: relative; aspect-ratio: 63/88; border-radius: 5px; overflow: hidden; background: rgba(255,255,255,.06); box-shadow: 0 0 0 1.5px rgba(255,255,255,.12); }
.sv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-th.st-attente img, .sv-th.st-lecture img { filter: grayscale(.8) brightness(.55); }
.sv-th.st-sure, .sv-th.st-saved { box-shadow: 0 0 0 2px var(--ok); }
.sv-th.st-verifier { box-shadow: 0 0 0 2px #ffb84d; }
.sv-th.st-inconnue, .sv-th.st-erreur { box-shadow: 0 0 0 2px #ff6b6b; }
.sv-th.st-vide, .sv-th.st-dos, .sv-th.st-autre { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.sv-th b { position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; background: var(--ok); color: #063; }
.sv-th.st-verifier b { background: #ffb84d; color: #4a2b00; }
.sv-th.cur { box-shadow: 0 0 0 2px var(--c1), 0 0 16px var(--c1); animation: svcur .9s ease-in-out infinite alternate; }
.sv-th.cur img { filter: none; }
.sv-th.pop { animation: svpop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes svpop { from { transform: scale(.6); } to { transform: none; } } /* (taille seulement : toujours visible, même si l'animation ne se joue pas) */
@keyframes svcur { from { transform: scale(1); } to { transform: scale(1.08); } }
.sv-list { align-self: center; color: var(--muted); }
@media (min-width: 900px) {
  .sv-in.sv-m-scan { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; column-gap: 28px; }
  .sv-m-scan .sv-head, .sv-m-scan > .bprog-bar { grid-column: 1 / -1; }
  .sv-m-scan .sv-stage { grid-column: 1; grid-row: 3 / 6; }
  .sv-m-scan .sv-caption { grid-column: 2; grid-row: 3; align-self: end; text-align: left; }
  .sv-m-scan .sv-title { font-size: 2.1rem; white-space: normal; }
  .sv-m-scan .sv-board { grid-column: 2; grid-row: 4; width: min(100%, calc(40vh * var(--cols) / var(--rows) * 63 / 88)); margin: 8px 0 0; }
  .sv-m-scan .sv-list { grid-column: 2; grid-row: 5; align-self: start; justify-self: start; }
  .sv-shot { height: min(100%, 44vw); }
}
@media (prefers-reduced-motion: reduce) {
  .sv-th.cur, .sv-th.pop, .sv-pip { animation: none; }
}
/* carte seule (v2.36) : rayon de scan sur la carte pendant la recherche, étape écrite dessus */
.sc-scanwrap { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.sc-scanwrap .bphoto { position: relative; display: block; height: 100%; max-width: 100%; aspect-ratio: 63/88; overflow: hidden; border-radius: 10px; }
.sc-scanwrap .bphoto img, .sc-scanwrap .bphoto canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-scanlbl { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: 90%;
  padding: 7px 14px; border-radius: 999px; background: rgba(12,14,25,.88); border: 1px solid rgba(52,213,255,.5); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.sc-scanlbl span { overflow: hidden; text-overflow: ellipsis; }
.sc-scanlbl .spinner { width: 16px; height: 16px; margin: 0; border-width: 2px; flex: none; }
/* version de la carte dans l'écran de vérification et le récapitulatif (v2.37) */
.sv-vers { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sv-vers .chips { justify-content: center; }
.sv-vers .chip { padding: 8px 14px; font-size: .9rem; }
.sv-vpill { position: relative; z-index: 2; flex: none; max-width: 100%; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(12,14,25,.92); color: var(--text); font: inherit; font-size: .7rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sv-vpill.doubt { border-color: #ffb84d; color: #ffb84d; }
.sv-vpill span { opacity: .7; }
/* aperçu de la version sur le visuel officiel (v2.40) : holo = l'illustration brille, reverse = tout sauf l'illustration */
.sv-offwrap { position: relative; display: block; overflow: hidden; border-radius: 10px; }
.sv-offwrap .sv-off { display: block; }
.vfx { position: relative; }
.vfx-holo::after, .vfx-reverse::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.08) 10%, rgba(255,0,150,.75) 25%, rgba(255,230,0,.75) 37%, rgba(0,255,170,.75) 50%, rgba(0,160,255,.75) 63%, rgba(180,0,255,.75) 75%, rgba(255,255,255,.08) 90%);
  background-size: 250% 250%; background-position: 30% 30%; mix-blend-mode: color-dodge; opacity: 1; animation: vfxsweep 3.5s ease-in-out infinite alternate; }
.vfx-holo::after { clip-path: inset(11% 9% 50% 9%); }
.vfx-reverse::after { clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 9% 11%, 91% 11%, 91% 50%, 9% 50%, 9% 11%); }
@keyframes vfxsweep { from { background-position: 90% 10%; } to { background-position: 10% 90%; } }
.sv-vnote { opacity: .75; }
.sv-vers > .small { text-align: center; }
@media (prefers-reduced-motion: reduce) { .vfx-holo::after, .vfx-reverse::after { animation: none; } }


/* v3.88 : rafale certifiée — 3 étapes en pastilles en haut de la caméra, couleur du cadre selon l'étape */
.r-steps { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(10,11,22,.8); pointer-events: none; white-space: nowrap; }
.r-steps .rs { display: flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 800; color: #8d93b5; }
.r-steps .rs b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #3a3f5c; color: #c9cde6; font-size: .72rem; }
.r-steps .rs-now { color: #fff; }
.r-steps .rs-now b { background: #fff; color: #2b2066; animation: rs-pulse 1s ease-in-out infinite; }
.r-steps .rs-done { color: #9ff0c8; }
.r-steps .rs-done b { background: var(--ok); color: #063; }
.r-steps .rs-warn { color: #ffcf8a; }
.r-steps .rs-warn b { background: #ff9f1a; color: #3a1d00; animation: rs-pulse .7s ease-in-out infinite; }
.r-steps .rs-line { width: 14px; height: 2px; border-radius: 2px; background: #3a3f5c; }
@keyframes rs-pulse { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .r-steps .rs b { animation: none; } }
.scan-view:has(.r-steps) .r-live { top: 50px; }
.scan-view[data-rstate] .scan-guide { transition: border-color .2s, border-width .2s; }
.scan-view[data-rstate="ok"] .scan-guide { border: 4px solid var(--ok); }
.scan-view[data-rstate="warn"] .scan-guide { border: 4px solid #ff9f1a; }
/* v3.91 : classeur feuilleté (essai) — même DA : sans cadre jaune (la page remplit l'image), c'est le bord de l'image qui devient vert / orange */
.scan-view[data-rstate="ok"]:not(:has(.scan-guide))::after, .scan-view[data-rstate="warn"]:not(:has(.scan-guide))::after { content: ""; position: absolute; inset: 0; z-index: 2; border: 4px solid var(--ok); border-radius: inherit; pointer-events: none; }
.scan-view[data-rstate="warn"]:not(:has(.scan-guide))::after { border-color: #ff9f1a; }
.flip-strip { align-items: center; }
.flip-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.flip-dots b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; }
.flip-dots b.ok { background: var(--ok); color: #063; }
.flip-dots b.no { background: #ff6b6b; color: #fff; }
