/* anniversary-hub.css — Page des 3 ans (anniversary.html, scripts/anniversary-hub.js).
   Couleurs du dash (variables du thème) ; les accents de fête restent dans le contenu. */

.b3h { max-width: 1120px; margin: 24px auto 72px; padding: 0 16px; display: flex; flex-direction: column; gap: 18px; }
.b3h-loading { color: var(--text-muted, #9ca3af); text-align: center; padding: 60px 0; }
.b3h-muted { color: var(--text-muted, #9ca3af); font-size: .88rem; margin: 0; }
.b3h-muted.small { font-size: .8rem; margin-top: 10px; }
.b3h-ic { display: inline-flex; flex: none; }
.b3h-ic svg { width: 16px; height: 16px; }

.b3h-card {
    background: var(--secondary-bg, hsl(217 34% 24%)); border: 1px solid var(--border-color, rgba(255, 255, 255, .1));
    border-radius: 14px; padding: 18px; min-width: 0;
}
.b3h-h { margin: 0 0 12px; font-size: 1.05rem; }
.b3h-sub { margin: 18px 0 8px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #9ca3af); font-weight: 600; }
.b3h-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.b3h-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.b3h-row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .b3h-grid { grid-template-columns: 1fr; } }

.b3h-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, .2)); background: var(--tertiary-bg, #1e293b); color: inherit;
    font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.b3h-btn:hover { border-color: var(--primary-color, #38b1ed); }
.b3h-btn.primary { background: var(--primary-gradient, var(--primary-color, #38b1ed)); border-color: transparent; color: #fff; }
.b3h-btn.ghost { background: transparent; }
.b3h-btn.small { padding: 6px 11px; font-size: .8rem; border-radius: 8px; }
.terminal-mode .b3h-btn.primary { background: var(--primary-color); color: #000; border-radius: 0; }

/* ── Bandeau démo ── */
.b3h-demo {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; border-radius: 12px; border: 1px dashed rgba(250, 204, 21, .55); background: rgba(250, 204, 21, .08);
}
.b3h-demo-txt { display: flex; flex-direction: column; gap: 2px; font-size: .85rem; min-width: 0; flex: 1 1 280px; }
.b3h-demo-txt b { color: #fde68a; }
.b3h-demo-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.b3h-select { background: var(--tertiary-bg, #1e293b); color: inherit; border: 1px solid var(--border-color, rgba(255, 255, 255, .2)); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .8rem; max-width: 100%; }

/* ── En-tête ── */
.b3h-hero {
    position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
    padding: 28px; border-radius: 18px; border: 1px solid rgba(56, 177, 237, .35);
    background: radial-gradient(90% 120% at 0% 0%, rgba(56, 177, 237, .28), transparent 60%),
                radial-gradient(70% 90% at 100% 100%, rgba(244, 194, 91, .16), transparent 60%), var(--secondary-bg, #111827);
}
.b3h-hero-txt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.b3h-hero h1 { margin: 6px 0 0; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.05; }
.b3h-hero p { margin: 0; max-width: 56ch; }
.b3h-three {
    width: 72px; height: 72px; border-radius: 18px; border: 0; cursor: pointer; display: grid; place-items: center;
    font: 800 2.8rem/1 inherit; color: #fff; background: linear-gradient(135deg, #38b1ed, #2563eb);
    box-shadow: 0 8px 22px rgba(56, 177, 237, .45); animation: b3h-bob 3s ease-in-out infinite;
}
@keyframes b3h-bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-4px) rotate(3deg); } }
.b3h-wrapped { display: flex; flex-direction: column; align-items: center; gap: 14px; scroll-margin-top: 90px; }
.b3h-stack { position: relative; width: 170px; height: 300px; padding: 0; border: 0; background: none; cursor: pointer; }
.b3h-stack .b3w-card { position: absolute; inset: 0 auto auto 0; width: 170px; transition: transform .3s ease; }
.b3h-stack .b3w-card * { pointer-events: none; }
.b3h-stack-0 { transform: rotate(-9deg) translate(-26px, 8px) scale(.94); filter: brightness(.7); }
.b3h-stack-1 { transform: rotate(6deg) translate(24px, 4px) scale(.96); filter: brightness(.82); }
.b3h-stack:hover .b3h-stack-0 { transform: rotate(-13deg) translate(-38px, 10px) scale(.94); }
.b3h-stack:hover .b3h-stack-1 { transform: rotate(10deg) translate(36px, 6px) scale(.96); }
.b3h-stack:focus-visible { outline: 2px solid var(--primary-color, #38b1ed); outline-offset: 6px; border-radius: 12px; }
@media (max-width: 700px) { .b3h-hero { grid-template-columns: 1fr; padding: 20px; } }

/* ── Équipe & coffre ── */
.b3h-team-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.b3h-logo { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.b3h-logo svg { width: 28px; height: 28px; }
.b3h-team-name { flex: 1 1 220px; min-width: 0; }
.b3h-team-name h2 { margin: 0; font-size: 1.4rem; }
.b3h-rank { text-align: end; font-size: .78rem; color: var(--text-muted, #9ca3af); display: flex; flex-direction: column; }
.b3h-rank b { font-size: 1.6rem; color: var(--text-primary, #fff); }
.b3h-gauge { position: relative; height: 16px; border-radius: 999px; background: var(--tertiary-bg, #1e293b); overflow: hidden; }
.b3h-gauge > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--primary-gradient, linear-gradient(90deg, #38b1ed, #2563eb)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.b3h-gauge-mark { position: absolute; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .35); border-radius: 2px; }
.b3h-gauge-mark.on { background: rgba(255, 255, 255, .85); }
.b3h-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.b3h-tier { background: var(--tertiary-bg, #1e293b); border: 1px solid var(--border-color, rgba(255, 255, 255, .1)); border-radius: 10px; padding: 10px; font-size: .8rem; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.b3h-tier-top { display: flex; align-items: center; gap: 6px; color: var(--text-muted, #9ca3af); font-size: .74rem; }
.b3h-tier-reward { font-weight: 600; }
.b3h-tier.done { border-color: rgba(74, 222, 128, .5); }
.b3h-tier.done .b3h-tier-top { color: #4ade80; }
.b3h-tier.next { border-color: var(--primary-color, #38b1ed); box-shadow: 0 0 0 1px rgba(56, 177, 237, .25) inset; }
@media (max-width: 700px) { .b3h-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .b3h-rank { text-align: start; } }

/* ── Quêtes ── */
.b3h-qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.b3h-quest { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; background: var(--tertiary-bg, #1e293b); flex-wrap: wrap; }
.b3h-box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border-color, rgba(255, 255, 255, .25)); display: grid; place-items: center; flex: none; }
.b3h-box svg { width: 15px; height: 15px; }
.b3h-quest.ok .b3h-box { background: #4ade80; border-color: #4ade80; color: #052e16; }
.b3h-qtxt { flex: 1 1 180px; min-width: 0; }
.b3h-qlabel { font-weight: 600; }
.b3h-qtxt small { color: var(--text-muted, #9ca3af); }
.b3h-quest.ok .b3h-qlabel { color: var(--text-muted, #9ca3af); text-decoration: line-through; }
.b3h-pts { font-size: .8rem; font-weight: 700; color: #f4c25b; white-space: nowrap; }
.b3h-qgo { display: flex; gap: 6px; }

/* ── Membres & activité ── */
.b3h-mlist, .b3h-flist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.b3h-mlist li { display: flex; align-items: center; gap: 10px; }
.b3h-mlist li.me { font-weight: 700; }
.b3h-face { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .78rem; font-weight: 700; background: radial-gradient(circle at 35% 30%, #5b7bb3, #2a3f66); color: #dbe7fb; }
.b3h-mname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b3h-mlist .b3h-pts { margin-inline-start: auto; color: var(--text-muted, #9ca3af); font-weight: 500; }
.b3h-captain { font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--primary-color, #38b1ed); border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; }
.b3h-flist li { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; color: var(--text-muted, #9ca3af); }
.b3h-flist li b { color: var(--text-primary, #fff); }
.b3h-flist li.me b { color: var(--primary-color, #38b1ed); }
.b3h-flist li .b3h-ic { color: #f4c25b; align-self: center; }
.b3h-flist small { margin-inline-start: auto; font-size: .74rem; }
.b3h-plus { color: #4ade80; font-weight: 700; }

/* ── Capsule ── */
.b3h-capsule { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.b3h-capsule .b3h-h { width: 100%; margin-bottom: 0; }
.b3h-cap-art { width: 120px; height: 120px; flex: none; }
.b3h-cap-art svg { width: 100%; height: 100%; overflow: visible; }
.b3h-capsule.locked .b3h-cap-art { filter: grayscale(.9) brightness(.7); }
.b3h-capsule.ready .b3h-cap-art { animation: b3h-shake 2.4s ease-in-out infinite; }
.b3h-cap-art.opening { animation: b3h-rattle .9s ease-in-out both !important; }
.b3h-cap-art .lid { transition: transform .4s ease; }
@keyframes b3h-shake { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-6deg); } 88% { transform: rotate(6deg); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
@keyframes b3h-rattle { 0% { transform: scale(1); } 20%, 60% { transform: scale(1.05) rotate(-8deg); } 40%, 80% { transform: scale(1.05) rotate(8deg); } 100% { transform: scale(1.25); opacity: .2; } }
.b3h-cap-txt { flex: 1 1 260px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; min-width: 0; }
.b3h-cap-txt p { margin: 0; color: var(--text-muted, #9ca3af); }
.b3h-cap-title { font-size: 1.3rem; font-weight: 800; }
.b3h-cap-title.gold { color: #f4c25b; }
.b3h-capsule.win { border-color: rgba(244, 194, 91, .55); background: radial-gradient(70% 120% at 0% 50%, rgba(244, 194, 91, .16), transparent 70%), var(--secondary-bg, #111827); }
.b3h-capsule.grand { border-color: rgba(244, 194, 91, .9); box-shadow: 0 0 0 1px rgba(244, 194, 91, .35), 0 10px 40px rgba(244, 194, 91, .22); background: radial-gradient(80% 140% at 0% 50%, rgba(244, 194, 91, .3), transparent 70%), var(--secondary-bg, #111827); }
.b3h-capsule.grand .b3h-cap-title { font-size: 1.6rem; }

/* ── Classement ── */
.b3h-provisional { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: .84rem; background: rgba(250, 204, 21, .08); border: 1px solid rgba(250, 204, 21, .3); color: #fde68a; }
.b3h-lb-wrap { overflow-x: auto; }
.b3h-table { width: 100%; min-width: 540px; border-collapse: collapse; font-size: .9rem; }
.b3h-table th { text-align: start; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted, #9ca3af); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, .1)); }
.b3h-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, .06)); font-variant-numeric: tabular-nums; }
.b3h-table tr.mine td { background: rgba(56, 177, 237, .09); }
.b3h-pos { font-weight: 800; width: 40px; }
.b3h-tname { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.b3h-dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.b3h-dot svg { width: 15px; height: 15px; }
.b3h-mini { width: 110px; height: 6px; border-radius: 999px; background: var(--tertiary-bg, #1e293b); overflow: hidden; }
.b3h-mini i { display: block; height: 100%; background: var(--primary-color, #38b1ed); }

/* ── Page indisponible ── */
.b3h-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 18px; }
.b3h-empty h1 { margin: 0; font-size: 1.3rem; }
.b3h-empty-ic svg { width: 36px; height: 36px; opacity: .6; }

@media (prefers-reduced-motion: reduce) {
    .b3h-three, .b3h-capsule.ready .b3h-cap-art, .b3h-cap-art.opening { animation: none !important; }
    .b3h-gauge > i, .b3h-stack .b3w-card { transition: none; }
}
