/* =====================================================================
   BTCC Vault — design system partage (dashboard, tiers, recherche)
   Extrait de index.html. Modifie ici : tous les onglets en heritent.
   ===================================================================== */
:root {
    --bg: #08080c;
    --srf: rgba(255,255,255,.028);
    --srf-2: rgba(255,255,255,.05);
    --line: rgba(255,255,255,.08);
    --line-2: rgba(255,255,255,.14);
    --txt: #f4f7fb;
    --mut: #9aa6ba;
    --faint: #5a6473;

    /* === Palette de marque BTCC (le « X » tricolore du logo) === */
    --btcc-blue:    #19a8f7;   /* bleu — accent secondaire (familles, halo) */
    --btcc-blue-2:  #7fc9fb;   /* bleu clair — surbrillance */
    --btcc-red:     #f42b26;   /* rouge — accent primaire : scellé / restant / signal de rareté */
    --btcc-red-2:   #ff6b66;   /* rouge vif — surbrillance */
    --btcc-red-d:   #b3160f;   /* rouge profond — départ de dégradé */
    --indigo:       #6f8bf5;   /* dérivé froid — catégoriel (blocs, halving) */
    --btc-orange:   #f7931a;   /* orange Bitcoin — réservé au tier Mythique / « Graal » */

    /* Variables sémantiques historiques remappées sur la marque BTCC :
       toutes les règles existantes héritent du nouveau thème sans toucher au markup.
       Rouge = signal de rareté/données (scellé, restant, survie) · bleu = chrome structurel · gris = réclamé/inerte. */
    --btc:     var(--btcc-blue);     /* chrome structurel (kickers, index de section, icônes) → bleu */
    --gold:    var(--btcc-blue);     /* surbrillance de base → bleu */
    --gold-2:  var(--btcc-blue-2);   /* texte de surbrillance → bleu clair */
    --teal:    var(--btcc-red);      /* « scellé / restant / survie » → rouge (signal de rareté) */
    --violet:  var(--indigo);        /* catégoriel → indigo froid */
    --magenta: var(--btcc-red-2);    /* tier le plus rare → rouge vif */
    --silver:  #cbd5e1;              /* conservé (le wordmark BTCC est argent/blanc) */
    --rose:    var(--btcc-red-2);    /* accent de perte → rouge vif */
    --ember:   rgba(244,43,38,.18);  /* halo « réclamé » → teinté rouge (ex-brun) */
    --r: 15px;
    /* Gouttière latérale fluide : pleine largeur à tous les breakpoints.
       Mobile 16px → tablette/desktop ~3.5vw → plafond 56px sur très grand écran.
       Partagée par <nav> et <main> pour garder le chrome aligné sur le contenu. */
    --gutter: clamp(16px, 3.5vw, 56px);
    /* Mesure max du DASHBOARD (contenu fixe : KPI, graphiques). Plein-bleed en deçà,
       centré au-delà → évite les blocs géants sur écran 4K. Les pages à grille de
       cartes (recherche, tiers) restent pleine largeur, elles densifient au lieu de gonfler.
       Pour élargir/rétrécir le dashboard, change uniquement cette valeur. */
    --maxw: 1680px;
    --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --body: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--txt);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.55;
    overflow-x: hidden;
}
/* fond : halos + grille + grain */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(900px 600px at 85% -5%, rgba(244,43,38,.14), transparent 60%),
        radial-gradient(700px 500px at -10% 10%, rgba(244,43,38,.09), transparent 60%),
        radial-gradient(800px 700px at 50% 110%, rgba(25,168,247,.07), transparent 60%);
}
body::after {
    content: ''; position: fixed; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
::selection { background: rgba(25,168,247,.35); }

main { width: 100%; margin: 0; padding: 0 var(--gutter) 110px; }

/* Dashboard uniquement : SEUL le contenu (main) est centré à --maxw ; le header
   (nav) reste pleine largeur comme sur les autres pages. Le fond (halos + grille)
   reste pleine largeur ; seul le contenu est borné.
   max() = gouttière normale tant que l'écran est étroit, marges qui poussent au-delà. */
body.dash main { padding-inline: max(var(--gutter), calc((100% - var(--maxw)) / 2)); }

/* ---------- nav ---------- */
nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px var(--gutter);
    background: rgba(8,8,12,.72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { height: 23px; width: auto; display: block; transition: filter .25s, transform .25s; }
.brand:hover .brand-logo { filter: drop-shadow(0 0 10px rgba(25,168,247,.4)); transform: translateY(-.5px); }
.brand-sub { font-family: var(--mono); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--mut); padding-left: 11px; border-left: 1px solid var(--line-2); }
.nav-links { display: flex; gap: 22px; }
.nav-links a { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--mut); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--gold-2); }
@media (max-width: 880px) { .nav-links { display: none; } }

/* Côté droit de la nav : sélecteur de langue + ticker spot, regroupés. */
.nav-right { display: flex; align-items: center; gap: 12px; }
/* Sélecteur de langue : petit segmenté FR | EN, la langue courante mise en avant. */
.lang-switch { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
    font-family: var(--mono); font-size: 11px; background: linear-gradient(180deg, var(--srf-2), var(--srf)); }
.lang-switch a { padding: 6px 9px; color: var(--faint); text-decoration: none; letter-spacing: .1em; text-transform: uppercase;
    transition: color .2s, background .2s; }
.lang-switch a:hover { color: var(--txt); }
.lang-switch a.on { color: var(--txt); background: var(--srf-2); cursor: default; }
.lang-switch a + a { border-left: 1px solid var(--line); }

/* Ticker spot : lecture sobre et pro — surface discrète, rayon léger, nombre net.
   Le point « live » est petit et calme (vert), passe en gris si le flux est coupé. */
.chip {
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    font-family: var(--mono); font-size: 11.5px; color: var(--mut);
    padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px;
    background: linear-gradient(180deg, var(--srf-2), var(--srf));
}
.chip .spotlbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.chip .spotval { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.chip .spotcur { color: var(--faint); }
.chip .pulse {
    width: 5px; height: 5px; border-radius: 50%; background: #1ad347;
    box-shadow: 0 0 0 0 rgba(26,211,71,.45); animation: pulse 2.6s infinite;
}
.chip.off .pulse { background: var(--faint); animation: none; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(26,211,71,.4);} 60% { box-shadow: 0 0 0 4px rgba(26,211,71,0);} }

/* ---------- hero ---------- */
.hero { padding: 84px 0 22px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--btc); margin-bottom: 18px; }
.kicker::before { content: '— '; color: var(--faint); }
h1 {
    font-family: var(--display); font-weight: 700;
    font-size: clamp(44px, 7vw, 84px); line-height: 1.02; letter-spacing: -.025em;
    text-wrap: balance;
    max-width: 820px;
}
h1 .grad {
    background: linear-gradient(92deg, #fff 0%, var(--btcc-red-2) 42%, var(--btcc-red) 88%, var(--btc-orange) 118%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--mut); font-size: 17px; max-width: 660px; margin-top: 22px; }
.lede b { color: var(--txt); font-weight: 600; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin-top: 52px; }
.cell {
    background: linear-gradient(170deg, var(--srf-2), var(--srf));
    border: 1px solid var(--line); border-radius: var(--r);
    padding: 26px 28px; position: relative; overflow: hidden;
    transition: transform .25s ease, border-color .25s ease;
}
.cell:hover { transform: translateY(-3px); border-color: var(--line-2); }
.cell .glow { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(420px 200px at 20% -20%, var(--g, rgba(244,43,38,.12)), transparent 70%); }
.c-donut { grid-column: span 5; grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 380px; }
.c-4 { grid-column: span 4; }
.c-3 { grid-column: span 3; }
.c-7 { grid-column: span 12; display: flex; align-items: baseline; gap: 26px; flex-wrap: wrap; }
.c-7 .lbl { flex-basis: 100%; }
.c-7 .num { font-size: clamp(44px, 5vw, 64px); }
.c-7 .sub { margin-top: 0; font-size: 14px; }
.c-12 { grid-column: span 12; }
.duo { display: grid; gap: 20px; margin-top: 20px; }
.duo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; font-size: 13.5px; color: var(--mut); }
.duo-head .mv { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.duo-head .mv b { font-size: 15px; font-weight: 500; }
.duo-note { margin-top: 20px; font-size: 13.5px; color: var(--mut); max-width: 740px; }
.duo-note b { color: var(--txt); font-weight: 600; }
.surv-track.big { height: 22px; }
.surv-fill.teal { background: linear-gradient(90deg, #1f6f9e, var(--btcc-blue) 60%, var(--btcc-blue-2)); box-shadow: 0 0 12px rgba(25,168,247,.3); }
@media (max-width: 980px) {
    .c-donut { grid-column: span 12; }
    .c-4, .c-3 { grid-column: span 6; }
}
@media (max-width: 560px) { .c-4, .c-3 { grid-column: span 12; } }
.cell .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--mut); }
.cell .num {
    font-family: var(--display); font-weight: 600; font-size: clamp(34px, 3.6vw, 46px);
    letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, #fff, #cfcfd8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cell .num.hot { background: linear-gradient(180deg, var(--btcc-red-2), var(--btcc-red)); -webkit-background-clip: text; background-clip: text; }
.cell .sub { color: var(--faint); font-size: 13px; margin-top: 6px; }
.cell .sub b { color: var(--mut); font-weight: 500; }

.donut-wrap { position: relative; width: 270px; height: 270px; }
.donut-wrap svg { filter: drop-shadow(0 0 18px rgba(244,43,38,.22)); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; }
.dc-row { text-align: center; }
.dc-num { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dc-lbl { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.donut-legend { display: flex; gap: 22px; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--mut); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }

/* ---------- sections ---------- */
section { margin-top: 110px; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px; }
.sec-idx { font-family: var(--mono); font-size: 12px; color: var(--btc); letter-spacing: .15em; }
h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; }
.sec-sub { color: var(--mut); max-width: 700px; margin-bottom: 34px; font-size: 15px; }
.sec-sub b { color: var(--txt); font-weight: 600; }

.panel { background: linear-gradient(170deg, var(--srf-2), var(--srf)); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 940px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- tiers (toutes les séries empilées par rareté) ---------- */
.tier-group + .tier-group { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--line); }

.tier-desc { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tier-desc .nm { display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--tc); }
.tier-desc .nm .gem { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px;
    background: var(--tc); box-shadow: 0 0 12px var(--tc); }
.tier-desc .rl { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .06em; }
.tier-desc .val { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--mut);
    padding: 5px 12px; border-radius: 99px; background: color-mix(in srgb, var(--tc) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--tc) 25%, transparent); white-space: nowrap; }
.tier-desc .val b { color: var(--tc); font-weight: 600; }
.tier-desc .val em { font-style: normal; color: var(--mut); }

.tier-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 13px;
    animation: tierFade .4s cubic-bezier(.22,1,.36,1); }
@keyframes tierFade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.tcard {
    --tcs: color-mix(in srgb, var(--tc) 30%, transparent);
    position: relative; border-radius: 13px; padding: 18px 20px 16px; overflow: hidden;
    background:
        radial-gradient(280px 130px at 88% -30%, color-mix(in srgb, var(--tc) 14%, transparent), transparent 70%),
        linear-gradient(170deg, var(--srf-2), var(--srf));
    border: 1px solid var(--line);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
/* barre d'accent colorée retirée (rendu plus sobre) */
.tcard:hover { transform: translateY(-4px); border-color: var(--tcs);
    box-shadow: 0 16px 40px -20px color-mix(in srgb, var(--tc) 60%, transparent); }
.tcard .pop { font-family: var(--display); font-weight: 700; font-size: 38px; letter-spacing: -.02em;
    color: var(--tc); line-height: 1; text-shadow: 0 0 28px color-mix(in srgb, var(--tc) 45%, transparent); }
.tcard .pop small { font-family: var(--body); font-size: 12.5px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
.tcard .serie { font-size: 13.5px; font-weight: 500; color: var(--txt); margin-top: 8px; min-height: 2.7em; }
.tcard .bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,.06); margin-top: 4px; overflow: hidden; }
.tcard .bar span { display: block; height: 100%; border-radius: 99px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 45%, transparent), var(--tc)); }
.tcard .meta { font-family: var(--mono); font-size: 11px; color: var(--mut); margin-top: 10px; }

/* ---------- survival ---------- */
/* multi-colonnes : remplit la largeur sans étirer les barres (1 col tablette, 2 cols desktop+) */
#survival { columns: 2 480px; column-gap: 48px; }
.surv-row { display: grid; grid-template-columns: minmax(170px, 300px) 1fr 118px; gap: 14px; align-items: center; padding: 6.5px 0; break-inside: avoid; }
.surv-row .name { font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.surv-row:hover .name { color: var(--txt); }
.surv-row .name small { color: var(--faint); font-family: var(--mono); font-size: 10px; }
.surv-track { height: 14px; border-radius: 99px; background: rgba(255,255,255,.045); overflow: hidden; position: relative; }
.surv-fill {
    height: 100%; width: 0; border-radius: 99px;
    background: linear-gradient(90deg, #2e3542, #5f6b7e 55%, #8b97ab);
    transition: width 1.1s cubic-bezier(.22,1,.36,1);
}
.surv-row .val { font-family: var(--mono); font-size: 11.5px; color: var(--faint); text-align: right; font-variant-numeric: tabular-nums; }
.surv-row .val b { color: var(--btcc-red-2); font-weight: 500; }

.legend { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--mut); margin-bottom: 20px; }

/* ---------- svg ---------- */
svg { display: block; width: 100%; height: auto; }
svg text { font-family: var(--mono); fill: var(--faint); }
.cell-tm { transition: opacity .2s; cursor: default; }
svg:has(.cell-tm:hover) .cell-tm:not(:hover) { opacity: .45; }
.pt { transition: filter .2s; cursor: default; }
.pt:hover { filter: brightness(1.4); }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.fact {
    border-radius: 13px; padding: 24px;
    background: linear-gradient(170deg, var(--srf-2), var(--srf));
    border: 1px solid var(--line);
    transition: transform .22s ease, border-color .22s ease;
}
.fact:hover { transform: translateY(-3px); border-color: var(--line-2); }
.fact-idx {
    font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--btc);
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(25,168,247,.08); border: 1px solid rgba(25,168,247,.25);
}
.fact h3 { font-family: var(--display); font-size: 16px; font-weight: 600; margin: 14px 0 6px; }
.fact p { font-size: 13.5px; color: var(--mut); }
.fact p b { color: var(--txt); font-weight: 600; }

/* ---------- visuel intégré à la carte de rareté (SVG détouré ou photo) ---------- */
.tcard .visual { position: relative; height: 108px; display: grid; place-items: center; margin: 4px 0 14px; }
.tcard .visual svg { height: 100%; width: auto; max-width: 100%;
    filter: drop-shadow(0 9px 18px rgba(0,0,0,.5));
    transition: transform .32s cubic-bezier(.22,1,.36,1); }
.tcard:hover .visual svg { transform: translateY(-5px) rotate(-3deg) scale(1.06); }
.tcard .visual .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 9px 18px rgba(0,0,0,.5)); transition: transform .32s cubic-bezier(.22,1,.36,1); }
.tcard .visual.has-photo svg { display: none; }
.tcard:hover .visual.has-photo .photo { transform: translateY(-5px) scale(1.05); }

/* ---------- visuel 3D : pivote à la souris (survol) + reflet métal ---------- */
.tcard .visual.d3 { cursor: grab; perspective: 1100px; }
.tcard .visual.d3.d3-solo { cursor: default; }        /* recto seul : on incline juste, pas de prise */
.tcard .visual.d3:active { cursor: grabbing; }
.tcard .visual.d3 .d3-obj { position: relative; transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform .6s cubic-bezier(.22,1,.36,1); will-change: transform; }
.tcard .visual.d3.spin .d3-obj { transition: none; }   /* suit la souris sans lissage pendant le survol */
.tcard .visual.d3 .d3-face { position: absolute; inset: 0; backface-visibility: hidden; }
.tcard .visual.d3 .d3-face .d3-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tcard .visual.d3 .d3-front { transform: translateZ(var(--t)); }
.tcard .visual.d3 .d3-back  { transform: rotateY(180deg) translateZ(var(--t)); }
.tcard .visual.d3 .d3-slice { position: absolute; inset: 0;
    background: linear-gradient(125deg, #6f757f 0%, #c4c9d1 44%, #969ca6 62%, #686e78 100%); }
/* reflet : sheen métal large et doux, piloté par l'inclinaison (pas collé au curseur) */
.tcard .visual.d3 .d3-gloss { position: absolute; inset: 0; pointer-events: none;
    opacity: 0; transition: opacity .35s ease; mix-blend-mode: screen; --gx: 50%; --gy: 38%;
    background:
      radial-gradient(58% 58% at var(--gx) var(--gy), rgba(255,255,255,.72) 0%, rgba(255,255,255,.2) 32%, rgba(255,255,255,0) 62%),
      radial-gradient(130% 85% at var(--gx) var(--gy), rgba(190,212,255,.15) 0%, rgba(255,255,255,0) 60%); }
.tcard .visual.d3.lit .d3-gloss { opacity: 1; }
.tcard .serie small { color: var(--faint); font-family: var(--mono); font-size: 10px; }

/* lightbox */
#lightbox { position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
    background: rgba(4,4,8,.86); backdrop-filter: blur(10px); padding: 40px; }
#lightbox.on { display: grid; animation: lbIn .25s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
#lightbox .lb-imgs { display: flex; gap: 22px; max-width: 100%; max-height: 100%; flex-wrap: wrap; justify-content: center; }
#lightbox img { max-width: min(46vw, 560px); max-height: 84vh; object-fit: contain;
    filter: drop-shadow(0 26px 60px rgba(0,0,0,.7)); }
#lightbox .lb-close { position: absolute; top: 22px; right: 26px; font-family: var(--mono); font-size: 13px;
    color: var(--mut); cursor: pointer; border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; background: var(--srf); }
#lightbox .lb-close:hover { color: var(--txt); border-color: var(--line-2); }

/* ---------- fame ---------- */
.fame { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.fcard {
    border-radius: 13px; padding: 24px;
    background: linear-gradient(170deg, var(--srf-2), var(--srf));
    border: 1px solid var(--line);
    transition: transform .22s ease, border-color .22s ease;
}
.fcard:hover { transform: translateY(-3px); border-color: var(--line-2); }
.fcard .ic {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--btc);
    background: linear-gradient(160deg, rgba(25,168,247,.18), rgba(25,168,247,.05));
    border: 1px solid rgba(25,168,247,.25);
}
.fcard .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fcard h3 { font-family: var(--display); font-size: 16.5px; font-weight: 600; margin: 14px 0 6px; }
.fcard p { font-size: 13.5px; color: var(--mut); }
.fcard p b { color: var(--gold-2); font-weight: 500; }

/* ---------- tooltip ---------- */
#tip {
    position: fixed; z-index: 99; pointer-events: none; opacity: 0; transform: translateY(6px);
    transition: opacity .15s, transform .15s;
    background: rgba(14,14,20,.92); backdrop-filter: blur(8px);
    border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 14px;
    font-size: 12.5px; color: var(--txt); max-width: 280px;
    box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
}
#tip.on { opacity: 1; transform: translateY(0); }
#tip .t-name { font-weight: 600; margin-bottom: 3px; }
#tip .t-row { font-family: var(--mono); font-size: 11px; color: var(--mut); }
#tip .t-row b { color: var(--gold-2); font-weight: 500; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .surv-fill { transition: none; }
    .tier-cards { animation: none; }
}

footer { margin-top: 110px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; color: var(--faint); }
footer a { color: var(--mut); text-decoration: none; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-logo { height: 18px; width: auto; opacity: .8; }


/* ---------- onglets : navigation principale entre pages (sobre, sans pilule) ---------- */
.tabs { display: flex; gap: 2px; align-items: center; }
.tabs a {
    position: relative;
    font-family: var(--display); font-weight: 500; font-size: 13.5px;
    color: var(--mut); text-decoration: none;
    padding: 9px 13px; border-radius: 7px;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}
.tabs a:hover { color: var(--txt); background: var(--srf-2); }
.tabs a.active { color: var(--txt); }
/* indicateur d'onglet actif : fin trait sous le libellé (pas de fond coloré) */
.tabs a.active::after {
    content: ''; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px;
    border-radius: 2px; background: var(--btcc-red);
}
.tabs a .ti { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
@media (max-width: 760px) {
    .tabs a { padding: 7px 11px; font-size: 12.5px; gap: 6px; }
    .tabs a .tlbl { display: none; }
    .brand-sub { display: none; }
}
/* Mobile : on masque le ticker spot (non essentiel) — sinon la nav déborde. */
@media (max-width: 560px) { .nav-right .chip { display: none; } }

/* ---------- en-tete de page simple (tiers / recherche) ---------- */
.page-head { padding: 64px 0 8px; }
.page-head .kicker { margin-bottom: 14px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 60px); }
.page-head .lede { margin-top: 18px; }

/* ---------- pourboire bitcoin : ligne discrète dans le footer ---------- */
.foot-tip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.foot-tip-lbl { color: var(--btc-orange); opacity: .85; white-space: nowrap; }
.foot-tip-uri {
    display: inline-flex; align-items: center; min-width: 0; max-width: 100%;
    padding: 3px 9px; border-radius: 7px; text-decoration: none;
    background: rgba(247,147,26,.05); border: 1px solid var(--line);
    transition: border-color .2s, background .2s;
}
.foot-tip-uri:hover { border-color: rgba(247,147,26,.4); background: rgba(247,147,26,.09); }
.foot-tip-uri code { font-family: var(--mono); font-size: 11px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-tip-uri:hover code { color: var(--btc-orange); }
.foot-tip-copy {
    flex: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
    padding: 3px 8px; border-radius: 7px; font-family: var(--mono); font-size: 10.5px; font-weight: 500;
    color: var(--mut); background: transparent; border: 1px solid var(--line);
    transition: color .2s, border-color .2s, background .2s;
}
.foot-tip-copy svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.foot-tip-copy:hover { color: var(--btc-orange); border-color: rgba(247,147,26,.4); background: rgba(247,147,26,.06); }
.foot-tip-copy.done { color: #1ad347; border-color: rgba(26,211,71,.4); background: rgba(26,211,71,.08); }
@media (max-width: 560px) {
    .foot-tip-uri code { font-size: 10px; }
}

/* =====================================================================
   Pluie de pièces « réclamées » en fond de page.
   Couche fixe DERRIÈRE le contenu (z-index:-1), large bande à droite
   (> 1/3 de la page) : les vraies pièces désaturées (gris = sorties du
   métal, ≠ rouge = scellé) tombent lentement, très discrètes, et
   s'estompent vers la gauche → elles « entrent » dans le contenu sans le
   gêner, plus présentes côté droit. Active dès le desktop standard.
   ≥ 2100px : en plus, le dashboard s'ancre à gauche et les légendes
   apparaissent dans la gouttière droite devenue libre.
   ===================================================================== */
.coinfield { display: none; }          /* masqué hors desktop (mobile / tablette) */
.cf-cap { display: none; }             /* légendes : grand desktop seulement (cf. ≥ 2100px) */

@media (min-width: 1200px) {
    .coinfield {
        display: block; position: fixed; top: 0; bottom: 0; right: 0;
        width: clamp(420px, 48vw, 1360px);   /* > 1/3 de la page, borné en ultrawide */
        z-index: -1;                          /* DERRIÈRE le contenu (translucide → les pièces transparaissent) */
        pointer-events: none; overflow: hidden;   /* clippe les pièces au bord droit → débordent sans scroll */
    }
    /* halo d'ambiance argenté très léger */
    .coinfield::after {
        content: ''; position: absolute; inset: 0;
        background: radial-gradient(56% 42% at 80% 5%, rgba(148,160,182,.045), transparent 72%);
    }
    /* TOUTE la transparence du champ est portée ICI, par le masque du conteneur
       (les pièces, elles, sont 100% opaques → pas de surimpression « voir à travers »
       quand elles se chevauchent). Le masque applique un alpha en dégradé, plafonné
       (~24%) et plus marqué à gauche (vers le contenu) ; double fondu vertical (haut/bas)
       ∩ horizontal. mask-composite = intersect → les deux dégradés se multiplient. */
    .cf-coins {
        position: absolute; inset: 0;
        -webkit-mask-image:
            linear-gradient(180deg, transparent, #000 7%, #000 40%, transparent 92%),
            linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 26%, rgba(0,0,0,.13) 54%, rgba(0,0,0,.24) 84%);
        -webkit-mask-composite: source-in;
                mask-image:
            linear-gradient(180deg, transparent, #000 7%, #000 40%, transparent 92%),
            linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.03) 26%, rgba(0,0,0,.13) 54%, rgba(0,0,0,.24) 84%);
                mask-composite: intersect;
    }
    .cf-coin {
        position: absolute; top: 0; left: var(--x); width: var(--sz); height: var(--sz);
        opacity: 1; will-change: transform;          /* opaque : l'alpha est géré par le conteneur */
        filter: grayscale(.8) brightness(1.08) contrast(.98) drop-shadow(0 8px 18px rgba(0,0,0,.5));
        animation: cf-sink var(--dur) linear var(--delay) infinite;
    }
    .cf-coin svg,
    .cf-coin img { width: 100%; height: 100%; object-fit: contain; display: block; }
    @keyframes cf-sink {                              /* chute + pivot seuls (plus de fondu par pièce) */
        0%   { transform: translate3d(0, -14vh, 0) rotate(var(--r0)); }
        100% { transform: translate3d(var(--dx), 114vh, 0) rotate(var(--r1)); }
    }
}

@media (min-width: 2100px) {
    /* contenu ancré à GAUCHE : gouttière à gauche, tout le surplus à droite
       (le header reste pleine largeur, cf. règle de base body.dash main) */
    body.dash main { padding-inline: var(--gutter) calc(100% - var(--gutter) - var(--maxw)); }

    /* légendes : ancrées à droite, dans la gouttière libre (et dans les bandes
       de fondu vertical où les pièces s'estompent → restent lisibles) */
    .cf-cap { display: block; position: absolute; right: 40px; left: auto;
              max-width: min(var(--gutter-room, 560px), 46vw); text-align: right; }
    .cf-cap-top { top: 92px; }
    .cf-cap-bot { bottom: 46px; }
    .cf-k  { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .26em;
             text-transform: uppercase; color: var(--faint); }
    .cf-n  { display: block; font-family: var(--display); font-weight: 700; font-size: 30px;
             letter-spacing: -.02em; color: var(--silver); margin-top: 7px;
             font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(203,213,225,.18); }
    .cf-n2 { display: block; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--mut); }
    .cf-s  { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--faint);
             letter-spacing: .04em; margin-top: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .cf-coin { animation: none !important; opacity: 1;
               transform: translateY(var(--y0)) rotate(var(--r0)); }
}

/* ===================== pages de détail serveur (collection / pièce) + fil d'Ariane ===================== */
/* Cartes .tcard transformées en liens (tier list + résultats de recherche) : on garde le bloc. */
a.tcard { display: block; text-decoration: none; color: inherit; }
a.t-serie-link, a.rc-serie-link { color: inherit; text-decoration: none; }
a.t-serie-link:hover, a.rc-serie-link:hover { color: var(--gold-2); }

.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 4px;
    font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.crumb a { color: var(--mut); text-decoration: none; transition: color .2s; }
.crumb a:hover { color: var(--gold-2); }
.crumb [aria-current="page"] { color: var(--txt); }
.crumb-sep { color: var(--faint); opacity: .55; }

.detail { padding: 6px 0 0; }
.detail-head { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin: 12px 0 28px; }
.detail-head .visual { flex: 0 0 auto; width: 200px; height: 200px; display: grid; place-items: center; }
.detail-head .visual svg, .detail-head .visual img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.detail-meta { flex: 1 1 340px; min-width: 280px; }
.detail-meta .kicker { margin-bottom: 8px; }
.detail-meta h1 { font-family: var(--display); font-weight: 700; font-size: clamp(25px, 3.6vw, 38px);
    line-height: 1.08; letter-spacing: -.02em; margin: 4px 0 12px; }
.detail-meta h1 small { font-family: var(--mono); font-size: .46em; color: var(--faint); font-weight: 500; }
.detail-meta .lede { color: var(--mut); font-size: 14.5px; max-width: 64ch; }
.cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-family: var(--mono); font-size: 12px;
    color: var(--gold-2); text-decoration: none; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--srf-2); transition: border-color .2s, color .2s; }
.cta:hover { border-color: rgba(25,168,247,.5); color: var(--txt); }

.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0 0 32px; }
.dt-grid-coin { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.dt-kv { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px; border: 1px solid var(--line);
    border-radius: 12px; background: linear-gradient(170deg, var(--srf-2), var(--srf)); }
.dt-kv.wide { grid-column: 1 / -1; }
.dt-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.dt-v { font-size: 14px; color: var(--txt); font-variant-numeric: tabular-nums; word-break: break-word; }
.dt-v a { color: var(--gold-2); text-decoration: none; }
.dt-v a:hover { text-decoration: underline; }
.btc { color: var(--btcc-red-2); font-family: var(--mono); }
.mono { font-family: var(--mono); font-size: 12px; }
.mini-copy { background: none; border: 1px solid var(--line); border-radius: 6px; color: var(--mut);
    cursor: pointer; padding: 0 7px; margin-left: 4px; font-size: 12px; }
.mini-copy:hover { color: var(--txt); border-color: var(--line-2); }

/* badges/statuts partagés (les pages tiers/recherche redéfinissent les leurs dans leur <style>, qui priment) */
.detail .tier-badge, .coin-list .tier-badge, .dt-v .tier-badge { display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--display); font-weight: 600; font-size: 12px; padding: 3px 10px 3px 8px; border-radius: 99px;
    color: var(--tc, var(--btc-orange)); background: color-mix(in srgb, var(--tc, var(--btc-orange)) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--tc, var(--btc-orange)) 32%, transparent); }
.detail .tier-badge .gem, .dt-v .tier-badge .gem { width: 7px; height: 7px; transform: rotate(45deg); border-radius: 2px;
    background: var(--tc, var(--btc-orange)); box-shadow: 0 0 8px var(--tc, transparent); }
.status { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.status.sealed { color: var(--btcc-red); background: rgba(244,43,38,.1); border: 1px solid rgba(244,43,38,.28); }
.status.redeemed { color: var(--mut); background: rgba(148,160,182,.1); border: 1px solid rgba(148,160,182,.26); }

/* liste des pièces d'une collection */
.coin-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
    background: linear-gradient(170deg, var(--srf-2), var(--srf)); }
.coin-row { display: grid; grid-template-columns: 1.3fr .8fr 1fr .8fr auto; gap: 12px; align-items: center;
    padding: 11px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--txt);
    font-size: 13px; transition: background .15s; }
.coin-row:last-child { border-bottom: none; }
.coin-row:hover { background: rgba(255,255,255,.03); }
.coin-row-h { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--faint); background: rgba(14,14,20,.6); pointer-events: none; }
.cr-ref { font-weight: 500; }
.cr-amt { font-family: var(--mono); color: var(--btcc-red-2); font-variant-numeric: tabular-nums; }
.cr-date, .cr-block { font-family: var(--mono); color: var(--mut); font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
    .coin-row { grid-template-columns: 1fr auto auto; }
    .cr-date, .cr-block, .coin-row-h span:nth-child(3), .coin-row-h span:nth-child(4) { display: none; }
}

/* pagination des pages serveur (liens, pas boutons) — le conteneur .pager n'existe
   que dans le <style> de recherche.html ; les pages rendues serveur ne chargent
   qu'app.css, on le définit donc ici (sinon les contrôles collent à la liste). */
.coin-list-sec .pager { margin-top: 30px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 34px 0 0; flex-wrap: wrap; }
.pager .pg { font-family: var(--mono); font-size: 12.5px; color: var(--mut); }
.pager .pg b { color: var(--gold-2); }
.pager .pg-btn { font-family: var(--mono); font-size: 12.5px; color: var(--txt); text-decoration: none;
    padding: 9px 18px; border-radius: 11px; background: var(--srf-2); border: 1px solid var(--line-2);
    transition: border-color .2s, background .2s; }
.pager a.pg-btn:hover { border-color: rgba(25,168,247,.4); background: rgba(25,168,247,.06); }
.pager .pg-btn.disabled { opacity: .35; pointer-events: none; }
