/* =========================================================
   NorthBlue — thème Azuriom
   ========================================================= */

:root,
[data-bs-theme="dark"] {
    --nb-bg: #050b1a;
    --nb-bg-2: #0a1633;
    --nb-surface: rgba(148, 197, 255, 0.05);
    --nb-surface-2: rgba(148, 197, 255, 0.09);
    --nb-border: rgba(148, 197, 255, 0.14);
    --nb-blue: #3b82f6;
    --nb-cyan: #22d3ee;
    --nb-violet: #8b5cf6;
    --nb-text: #e6efff;
    --nb-muted: #93a4c3;
    --nb-radius: 1.1rem;
    --nb-font-title: "Lilita One", "Nunito", system-ui, sans-serif;

    --bs-body-bg: var(--nb-bg);
    --bs-body-bg-rgb: 5, 11, 26;
    --bs-body-color: var(--nb-text);
    --bs-secondary-bg: var(--nb-bg-2);
    --bs-tertiary-bg: #0d1b3d;
    --bs-secondary-color: var(--nb-muted);
    --bs-border-color: var(--nb-border);
    --bs-primary: var(--nb-blue);
    --bs-primary-rgb: 59, 130, 246;
    --bs-link-color: #7cc4ff;
    --bs-link-color-rgb: 124, 196, 255;
    --bs-link-hover-color: var(--nb-cyan);
    --bs-link-hover-color-rgb: 34, 211, 238;
    --bs-body-font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-border-radius: 0.75rem;
    --bs-border-radius-lg: var(--nb-radius);
    --bs-card-bg: var(--nb-surface);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

html, body { height: 100%; }

body.nb-body {
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
        radial-gradient(900px 500px at 100% 30%, rgba(139, 92, 246, 0.08), transparent 60%),
        var(--nb-bg);
    background-attachment: fixed;
    color: var(--nb-text);
}

a { text-decoration: none; }

img { max-width: 100%; height: auto; }

h1, h2, h3, .h1, .h2, .h3, .nb-title { font-family: var(--nb-font-title); font-weight: 400; letter-spacing: 0.01em; }

::selection { background: rgba(34, 211, 238, 0.35); }

/* ---------- Composants Bootstrap (s'appliquent aussi aux pages Vote / Boutique) ---------- */
.card {
    --bs-card-bg: var(--nb-surface);
    --bs-card-border-color: var(--nb-border);
    --bs-card-cap-bg: var(--nb-surface-2);
    border-radius: var(--nb-radius);
    backdrop-filter: blur(6px);
}

.btn-primary {
    --bs-btn-bg: var(--nb-blue);
    --bs-btn-border-color: var(--nb-blue);
    --bs-btn-hover-bg: #2563eb;
    --bs-btn-hover-border-color: #2563eb;
    --bs-btn-active-bg: #1d4ed8;
    --bs-btn-active-border-color: #1d4ed8;
}

.form-control, .form-select {
    --bs-body-bg: rgba(5, 11, 26, 0.6);
    border-color: var(--nb-border);
}

.form-control:focus, .form-select:focus {
    border-color: var(--nb-cyan);
    box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2);
}

.dropdown-menu {
    --bs-dropdown-bg: #0b1730;
    --bs-dropdown-border-color: var(--nb-border);
    --bs-dropdown-link-active-bg: var(--nb-blue);
}

.modal-content { background: #0b1730; border: 1px solid var(--nb-border); }

.progress { --bs-progress-bg: rgba(148, 197, 255, 0.12); }
.progress-bar { background: linear-gradient(90deg, var(--nb-blue), var(--nb-cyan)); }

.content { min-height: 50vh; }

/* ---------- Boutons NorthBlue ---------- */
.nb-btn {
    --bs-btn-padding-x: 1.4rem;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nb-btn:hover { transform: translateY(-2px); }
.nb-btn:active { transform: translateY(0) scale(0.98); }

.nb-btn-primary {
    background: linear-gradient(135deg, var(--nb-blue), var(--nb-cyan));
    color: #fff;
    box-shadow: 0 8px 24px rgba(34, 211, 238, 0.25);
}
.nb-btn-primary:hover, .nb-btn-primary:focus-visible { color: #fff; box-shadow: 0 12px 30px rgba(34, 211, 238, 0.4); }

.nb-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--nb-border);
    color: var(--nb-text);
}
.nb-btn-ghost:hover, .nb-btn-ghost:focus-visible { background: rgba(255, 255, 255, 0.12); color: #fff; }

.nb-btn-discord { background: #5865f2; color: #fff; }
.nb-btn-discord:hover, .nb-btn-discord:focus-visible { background: #4752c4; color: #fff; }

.nb-btn-mode {
    background: color-mix(in srgb, var(--mode) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--mode) 50%, transparent);
    color: #fff;
}
.nb-btn-mode:hover, .nb-btn-mode:focus-visible {
    background: var(--mode);
    color: #0b1020;
    box-shadow: 0 10px 30px color-mix(in srgb, var(--mode) 40%, transparent);
}
.nb-btn.is-copied { background: #22c55e; color: #fff; }

/* ---------- Navbar ---------- */
.nb-navbar {
    background: rgba(5, 11, 26, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--nb-border);
    padding-block: 0.75rem;
}

.nb-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--nb-font-title);
    font-size: 1.5rem;
    color: #fff;
}
.nb-brand i { color: var(--nb-cyan); }
.nb-brand:hover { color: #fff; }

.nb-navbar .nav-link {
    font-weight: 700;
    color: var(--nb-muted);
    border-radius: 999px;
    padding-inline: 0.9rem !important;
    transition: color 0.2s, background-color 0.2s;
}
.nb-navbar .nav-link:hover,
.nb-navbar .nav-link.active { color: #fff; background: rgba(148, 197, 255, 0.08); }

.nb-avatar { border-radius: 8px; margin-right: 0.35rem; image-rendering: pixelated; }

/* ---------- Footer ---------- */
.nb-footer {
    background: linear-gradient(180deg, transparent, rgba(10, 22, 51, 0.9));
    border-top: 1px solid var(--nb-border);
    padding: 3rem 0 2rem;
}
.nb-footer-brand { font-family: var(--nb-font-title); font-size: 1.6rem; color: #fff; }
.nb-footer-brand i { color: var(--nb-cyan); }
.nb-footer-text, .nb-footer-copy { color: var(--nb-muted); font-size: 0.95rem; }
.nb-footer-copy { text-align: center; }
.nb-footer-powered { font-size: 0.8rem; opacity: 0.7; }
.nb-footer-sep { border-color: var(--nb-border); opacity: 1; margin: 2rem 0 1.25rem; }

.nb-social {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 0 0.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--nb-border);
    color: #fff;
    transition: transform 0.2s, background-color 0.2s;
}
.nb-social:hover { background: var(--social); color: #fff; transform: translateY(-3px); }

/* ---------- HERO ---------- */
.nb-hero {
    position: relative;
    overflow: hidden;
    min-height: min(92vh, 860px);
    display: flex;
    align-items: center;
    padding: 6rem 0 5rem;
    isolation: isolate;
}

.nb-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--nb-hero-bg, none) center / cover no-repeat;
    opacity: 0.35;
}

.nb-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(5, 11, 26, 0.2) 0%, rgba(5, 11, 26, 0.65) 70%, var(--nb-bg) 100%);
}

.nb-aurora { position: absolute; inset: -20% -10% auto; height: 80%; z-index: -1; filter: blur(60px); opacity: 0.75; }
.nb-aurora span {
    position: absolute;
    width: 55%;
    height: 60%;
    border-radius: 50%;
    mix-blend-mode: screen;
    animation: nb-aurora 16s ease-in-out infinite alternate;
}
.nb-aurora span:nth-child(1) { left: 0; top: 10%; background: #1d4ed8; }
.nb-aurora span:nth-child(2) { left: 30%; top: 0; background: #06b6d4; animation-delay: -5s; animation-duration: 20s; }
.nb-aurora span:nth-child(3) { right: 0; top: 20%; background: #7c3aed; animation-delay: -9s; animation-duration: 24s; }

@keyframes nb-aurora {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(8%, 10%) scale(1.15) rotate(12deg); }
    100% { transform: translate(-6%, -4%) scale(0.95) rotate(-8deg); }
}

.nb-stars {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 70% 20%, #cfe8ff, transparent),
        radial-gradient(1.5px 1.5px at 40% 70%, #fff, transparent),
        radial-gradient(1px 1px at 85% 60%, #fff, transparent),
        radial-gradient(1px 1px at 10% 80%, #cfe8ff, transparent),
        radial-gradient(1.5px 1.5px at 60% 45%, #fff, transparent),
        radial-gradient(1px 1px at 90% 85%, #fff, transparent),
        radial-gradient(1px 1px at 30% 10%, #fff, transparent);
    background-size: 600px 400px;
    animation: nb-twinkle 6s ease-in-out infinite alternate;
    opacity: 0.6;
}
@keyframes nb-twinkle { from { opacity: 0.35; } to { opacity: 0.8; } }

.nb-hero-logo { max-height: 140px; margin-bottom: 1.25rem; filter: drop-shadow(0 10px 30px rgba(34, 211, 238, 0.35)); animation: nb-float 6s ease-in-out infinite; }

.nb-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #a5f3fc;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.nb-hero-title {
    font-size: clamp(3rem, 9vw, 6.5rem);
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(120deg, #fff 10%, #7dd3fc 45%, #a78bfa 75%, #fff 95%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: nb-shine 8s linear infinite;
    text-shadow: 0 0 60px rgba(59, 130, 246, 0.25);
}
@keyframes nb-shine { to { background-position: 200% center; } }

.nb-hero-tagline { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #c7d6f2; max-width: 640px; margin: 0 auto 1.75rem; }

.nb-ip {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--nb-border);
    background: rgba(5, 11, 26, 0.6);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s, transform 0.2s;
}
.nb-ip:hover { border-color: var(--nb-cyan); transform: translateY(-2px); }
.nb-ip-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.nb-ip-dot.is-online { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: nb-ping 2s infinite; }
@keyframes nb-ping { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.nb-ip-hint { font-size: 0.85rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(34, 211, 238, 0.15); color: #a5f3fc; }
.nb-ip.is-copied { border-color: #22c55e; }
.nb-ip.is-copied .nb-ip-hint { background: #22c55e; color: #fff; }

.nb-hero-players { color: var(--nb-muted); font-weight: 700; margin-bottom: 1.75rem; }

.nb-hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }

.nb-mode-nav { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.nb-mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid color-mix(in srgb, var(--mode) 40%, transparent);
    color: #fff;
    font-weight: 700;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
}
.nb-mode-chip i { color: var(--mode); transition: color 0.2s; }
.nb-mode-chip:hover { background: var(--mode); color: #0b1020; transform: translateY(-3px); }
.nb-mode-chip:hover i { color: #0b1020; }

.nb-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    translate: -50% 0;
    color: var(--nb-muted);
    font-size: 1.6rem;
    animation: nb-bounce 2s ease-in-out infinite;
}
@keyframes nb-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- Sections ---------- */
.nb-section { padding: 5rem 0; }
.nb-section-head { margin-bottom: 3rem; }
.nb-kicker { display: inline-block; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--mode, var(--nb-cyan)); margin-bottom: 0.6rem; }
.nb-section-title { font-size: clamp(2rem, 4.5vw, 3rem); color: #fff; }
.nb-section-sub { color: var(--nb-muted); font-size: 1.1rem; max-width: 620px; margin-inline: auto; }

.nb-card { transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.nb-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); }
.nb-card-title, .nb-card-title a { color: #fff; }
.nb-post .card-img-top { aspect-ratio: 16 / 9; object-fit: cover; border-top-left-radius: var(--nb-radius); border-top-right-radius: var(--nb-radius); }
.nb-progress { height: 8px; }
.nb-code { color: #a5f3fc; background: rgba(34, 211, 238, 0.1); padding: 0.3rem 0.6rem; border-radius: 8px; }

.nb-cta {
    text-align: center;
    padding: 3.5rem 1.5rem;
    border-radius: calc(var(--nb-radius) * 1.5);
    background:
        radial-gradient(600px 200px at 50% 0%, rgba(34, 211, 238, 0.18), transparent 70%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(139, 92, 246, 0.14));
    border: 1px solid var(--nb-border);
}

/* ---------- Modes de jeu ---------- */
.nb-modes { padding-top: 4rem; }

.nb-mode {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
}

.nb-mode::before {
    content: "";
    position: absolute;
    inset: 10% -20%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--mode) 14%, transparent), transparent);
    z-index: -1;
    pointer-events: none;
}

.nb-mode.is-reversed .row { flex-direction: row-reverse; }

/* La vidéo reste visible pendant qu'on lit le texte (grand écran) */
@media (min-width: 992px) {
    .nb-mode-media { position: sticky; top: 100px; }
}

.nb-mode-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.9rem;
    color: #0b1020;
    background: linear-gradient(135deg, var(--mode), var(--mode-2));
    box-shadow: 0 12px 30px color-mix(in srgb, var(--mode) 35%, transparent);
    margin-bottom: 1.1rem;
    animation: nb-float 5s ease-in-out infinite;
}

.nb-mode-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.1rem;
    background: linear-gradient(120deg, #fff 30%, var(--mode));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nb-mode-desc { color: #c7d6f2; font-size: 1.05rem; line-height: 1.7; }

/* Intro en grand */
.nb-mode-lead {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    line-height: 1.6;
    font-weight: 600;
    color: #dbe7ff;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--mode);
}

/* Frise verticale (paragraphes du milieu + question finale) */
.nb-timeline {
    --dot: 44px;
    position: relative;
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

/* La ligne : grise en fond, se remplit de la couleur du mode quand la section apparaît */
.nb-timeline::before,
.nb-timeline::after {
    content: "";
    position: absolute;
    left: calc(var(--dot) / 2 - 1px);
    top: calc(var(--dot) / 2);
    bottom: calc(var(--dot) / 2);
    width: 2px;
    border-radius: 2px;
}
.nb-timeline::before { background: rgba(148, 197, 255, 0.12); }
.nb-timeline::after {
    background: linear-gradient(180deg, var(--mode), var(--mode-2));
    box-shadow: 0 0 12px color-mix(in srgb, var(--mode) 60%, transparent);
    transform-origin: top;
    transform: scaleY(1);
    transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}
.nb-js .nb-reveal .nb-timeline::after { transform: scaleY(0); }
.nb-js .nb-reveal.is-visible .nb-timeline::after { transform: scaleY(1); }

.nb-tl-item {
    position: relative;
    display: flex;
    gap: 1.1rem;
    padding-bottom: 1.6rem;
}
.nb-tl-item:last-child { padding-bottom: 0; }

.nb-tl-dot {
    position: relative;
    z-index: 1;
    flex: none;
    display: grid;
    place-items: center;
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    font-size: 1.25rem;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--mode) 35%, #0b1730), #07112a 70%);
    border: 2px solid color-mix(in srgb, var(--mode) 60%, transparent);
    box-shadow: 0 0 0 5px var(--nb-bg), 0 0 18px color-mix(in srgb, var(--mode) 35%, transparent);
    transition: transform 0.3s, box-shadow 0.3s;
}
.nb-tl-item:hover .nb-tl-dot {
    transform: scale(1.12) rotate(-6deg);
    box-shadow: 0 0 0 5px var(--nb-bg), 0 0 28px color-mix(in srgb, var(--mode) 65%, transparent);
}

.nb-tl-content { padding-top: 0.55rem; min-width: 0; }

.nb-tl-title {
    font-family: var(--bs-body-font-family);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
    color: #fff;
    margin: 0 0 0.35rem;
}
.nb-tl-body { margin: 0; color: #b4c3de; line-height: 1.65; }
.nb-tl-content > .nb-tl-body:only-child { color: #c7d6f2; }

.nb-tl-outro {
    margin: 0;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(90deg, #fff, var(--mode));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Apparition en cascade des étapes */
.nb-js .nb-reveal .nb-tl-item { opacity: 0; transform: translateX(-14px); transition: opacity 0.6s ease, transform 0.6s ease; transition-delay: calc(0.35s + var(--k) * 0.25s); }
.nb-js .nb-reveal.is-visible .nb-tl-item { opacity: 1; transform: none; }

@media (max-width: 575.98px) {
    .nb-timeline { --dot: 38px; }
    .nb-tl-dot { font-size: 1.05rem; }
}

.nb-features { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nb-features li {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    background: color-mix(in srgb, var(--mode) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--mode) 30%, transparent);
}
.nb-features i { color: var(--mode); }

.nb-mode-particles span {
    position: absolute;
    left: calc(5% + var(--p) * 12.5%);
    bottom: -40px;
    font-size: calc(1rem + (var(--p) * 0.17rem));
    opacity: 0;
    animation: nb-rise calc(12s + var(--p) * 1.3s) linear infinite;
    animation-delay: calc(var(--p) * -2.1s);
    pointer-events: none;
    z-index: 0;
}
@keyframes nb-rise {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.35; }
    90% { opacity: 0.25; }
    100% { transform: translateY(-120vh) rotate(200deg); opacity: 0; }
}

@keyframes nb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Apparition au scroll (uniquement si JS actif) */
.nb-js .nb-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.nb-js .nb-reveal.is-visible { opacity: 1; transform: none; }
.nb-js .nb-reveal-delay { transition-delay: 0.15s; }

/* ---------- Scènes (communes) ---------- */
.nb-scene {
    position: relative;
    height: 400px;
    border-radius: calc(var(--nb-radius) * 1.4);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--mode) 35%, transparent);
    background:
        radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--mode) 22%, transparent), transparent 65%),
        linear-gradient(160deg, #0c1a3a, #060d20);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    user-select: none;
}

.nb-scene button { border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nb-scene button:focus-visible { outline: 3px solid var(--mode); outline-offset: 6px; border-radius: 12px; }

.nb-scene-hud {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(5, 11, 26, 0.7);
    border: 1px solid var(--nb-border);
    font-weight: 800;
    font-size: 0.95rem;
    z-index: 5;
}
.nb-scene-hud i { color: var(--mode); }

.nb-scene-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    translate: -50% 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--nb-muted);
    white-space: nowrap;
    z-index: 5;
    animation: nb-hint 3s ease-in-out infinite;
}
@keyframes nb-hint { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.nb-scene-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 6s ease; }
.nb-scene-photo:hover img { transform: scale(1.06); }
.nb-scene-badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(5, 11, 26, 0.8);
    font-weight: 800;
}
.nb-scene-badge i { color: var(--mode); }

.nb-pop {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    font-family: var(--nb-font-title);
    font-size: 1.4rem;
    color: #fff;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 12px color-mix(in srgb, var(--mode) 70%, transparent);
    translate: -50% -50%;
    animation: nb-pop 0.9s ease-out forwards;
    white-space: nowrap;
}
.nb-pop-dmg { color: #ffd1d6; }
.nb-pop-crit { color: #fde047; font-size: 1.8rem; }
.nb-pop-loot { color: #86efac; font-size: 1.6rem; }
@keyframes nb-pop {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0; }
    15% { transform: translate(0, -10px) scale(1.15); opacity: 1; }
    100% { transform: translate(var(--drift, 0), -80px) scale(1); opacity: 0; }
}

.is-hit { animation: nb-hit 0.18s ease-out; }
@keyframes nb-hit { 50% { transform: scale(0.92); } }

/* ---------- Scène FarmRun ---------- */
.nb-scene-farmrun {
    background:
        linear-gradient(180deg, #102a5c 0%, #1e4a8a 45%, #2b6a3a 46%, #1f4d2a 100%);
}
.nb-sun {
    position: absolute;
    top: 40px;
    right: 60px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff7c2, #f5c542 60%, transparent 70%);
    box-shadow: 0 0 60px 20px rgba(245, 197, 66, 0.35);
    animation: nb-float 7s ease-in-out infinite;
}
.nb-cloud {
    position: absolute;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    animation: nb-cloud linear infinite;
}
.nb-cloud::before { content: ""; position: absolute; left: 20%; top: -12px; width: 40%; height: 30px; border-radius: 50%; background: inherit; }
.nb-cloud-1 { top: 70px; width: 110px; animation-duration: 28s; }
.nb-cloud-2 { top: 120px; width: 80px; animation-duration: 38s; animation-delay: -15s; opacity: 0.6; }
@keyframes nb-cloud { from { left: -140px; } to { left: 110%; } }

.nb-field {
    position: absolute !important;
    left: 6%;
    right: 6%;
    bottom: 40px;
    height: 46%;
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    align-items: end;
    gap: 6px 10px;
    padding: 0 1rem 10px !important;
    background: repeating-linear-gradient(0deg, #5b3a1e 0 14px, #6d4626 14px 28px) !important;
    border-radius: 14px;
    box-shadow: inset 0 6px 0 rgba(0, 0, 0, 0.25);
}

.nb-crop {
    position: relative;
    height: 56px;
    transform-origin: bottom center;
    animation: nb-grow 5s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.37s);
}
.nb-crop::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 4px;
    height: 100%;
    translate: -50% 0;
    background: currentColor;
    border-radius: 2px;
}
.nb-crop::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    width: 14px;
    height: 26px;
    translate: -50% 0;
    border-radius: 50% 50% 40% 40%;
    background: repeating-linear-gradient(180deg, currentColor 0 5px, color-mix(in srgb, currentColor 70%, #000) 5px 7px);
}
@keyframes nb-grow {
    0% { transform: scaleY(0.15); color: #4ade80; }
    45% { transform: scaleY(0.8); color: #86efac; }
    75% { transform: scaleY(1); color: #f5c542; }
    92% { transform: scaleY(1); color: #f5c542; }
    100% { transform: scaleY(0.15); color: #4ade80; }
}

.nb-hoe {
    position: absolute;
    right: 14%;
    bottom: 48%;
    font-size: 2.6rem;
    transform-origin: bottom left;
    animation: nb-swing 1.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes nb-swing { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(25deg) translateY(6px); } }

/* ---------- Scène Gens ---------- */
.nb-gear { position: absolute; color: color-mix(in srgb, var(--mode) 35%, transparent); pointer-events: none; }
.nb-gear-1 { font-size: 13rem; top: -40px; left: -50px; animation: nb-spin 18s linear infinite; }
.nb-gear-2 { font-size: 8rem; bottom: -30px; right: -20px; animation: nb-spin 12s linear infinite reverse; }
@keyframes nb-spin { to { transform: rotate(360deg); } }

.nb-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    animation: nb-spin 12s linear infinite;
}
.nb-tool {
    position: absolute;
    left: 0;
    top: 0;
    --r: 130px;
    transform: rotate(calc(var(--a) * 120deg)) translateX(var(--r)) rotate(calc(var(--a) * -120deg));
}
.nb-tool > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    font-size: 1.6rem;
    border-radius: 16px;
    background: rgba(5, 11, 26, 0.75);
    border: 1px solid color-mix(in srgb, var(--mode) 45%, transparent);
    animation: nb-spin 12s linear infinite reverse;
}

.nb-generator {
    position: absolute !important;
    left: 50%;
    top: 50%;
    width: 110px;
    height: 110px;
    translate: -50% -50%;
    border-radius: 22px !important;
    background: linear-gradient(145deg, #2a3550, #151c2e) !important;
    border: 3px solid color-mix(in srgb, var(--mode) 60%, #000) !important;
    box-shadow: 0 0 40px color-mix(in srgb, var(--mode) 45%, transparent), inset 0 -8px 0 rgba(0, 0, 0, 0.3);
}
.nb-gen-core {
    position: absolute;
    inset: 26px;
    border-radius: 12px;
    background: radial-gradient(circle, #fff6c9, var(--mode) 60%, #b45309);
    animation: nb-core 1.4s ease-in-out infinite;
}
@keyframes nb-core { 50% { box-shadow: 0 0 30px 10px color-mix(in srgb, var(--mode) 70%, transparent); filter: brightness(1.3); } }

.nb-coin {
    position: absolute;
    left: calc(50% - 12px);
    top: 50%;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
    animation: nb-coin 2.5s ease-out infinite;
    animation-delay: calc(var(--i) * 0.5s);
    --x: calc((var(--i) - 2) * 45px);
}
@keyframes nb-coin {
    0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
    15% { opacity: 1; }
    60% { transform: translate(var(--x), -150px) scale(1); opacity: 1; }
    100% { transform: translate(var(--x), -120px) scale(0.8); opacity: 0; }
}

/* ---------- Scène Créatif ---------- */
.nb-blocks {
    position: absolute;
    left: 50%;
    top: 52%;
    translate: -50% -50%;
    display: grid;
    grid-template-columns: repeat(4, 64px);
    gap: 10px;
    perspective: 600px;
}
.nb-block {
    width: 64px;
    height: 64px;
    border-radius: 10px !important;
    background: hsl(var(--h) 80% 60%) !important;
    box-shadow: inset 0 -10px 0 hsl(var(--h) 70% 40%), inset 0 6px 0 hsl(var(--h) 90% 75%), 0 10px 20px rgba(0, 0, 0, 0.35);
    animation: nb-wave 3.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.12s);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.nb-block:hover { filter: brightness(1.15); }
@keyframes nb-wave {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    30% { transform: translateY(-14px) rotateX(20deg); }
    60% { transform: translateY(0) rotateX(0deg); }
}
.nb-brush {
    position: absolute;
    font-size: 2.6rem;
    color: var(--mode);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
    animation: nb-paint 7s ease-in-out infinite;
    pointer-events: none;
}
@keyframes nb-paint {
    0% { left: 12%; top: 18%; transform: rotate(-20deg); }
    25% { left: 78%; top: 22%; transform: rotate(15deg); }
    50% { left: 80%; top: 70%; transform: rotate(-10deg); }
    75% { left: 14%; top: 72%; transform: rotate(20deg); }
    100% { left: 12%; top: 18%; transform: rotate(-20deg); }
}

/* ---------- Scène Cookie Clicker ---------- */
.nb-cursors {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    animation: nb-spin 30s linear infinite;
}
.nb-cursor {
    position: absolute;
    left: 0;
    top: 0;
    transform: rotate(calc(var(--a) * 36deg)) translateY(-135px);
}
.nb-cursor i {
    display: block;
    margin: -14px 0 0 -10px;
    font-size: 1.5rem;
    color: #fff;
    transform: rotate(180deg);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
    animation: nb-poke 1.5s ease-in-out infinite;
    animation-delay: calc(var(--a) * 0.15s);
}
@keyframes nb-poke { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }

.nb-cookie {
    position: absolute !important;
    left: 50%;
    top: 50%;
    width: 190px;
    height: 190px;
    translate: -50% -50%;
    border-radius: 50% !important;
    background: radial-gradient(circle at 35% 30%, #f3c98b, #d49a52 55%, #a8672c 100%) !important;
    box-shadow: 0 0 0 6px rgba(168, 103, 44, 0.35), 0 20px 50px rgba(224, 169, 109, 0.35), inset -10px -14px 0 rgba(0, 0, 0, 0.12);
    animation: nb-cookie 6s ease-in-out infinite;
    transition: transform 0.1s;
}
.nb-cookie:hover { filter: brightness(1.08); }
@keyframes nb-cookie { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.04); } }
.nb-cookie.is-hit { animation: nb-hit 0.12s ease-out, nb-cookie 6s ease-in-out infinite; }
.nb-chip {
    position: absolute;
    width: 22px;
    height: 18px;
    border-radius: 45% 55% 50% 40%;
    background: #4a2511;
    box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.1);
}
.nb-chip:nth-child(1) { left: 30%; top: 22%; }
.nb-chip:nth-child(2) { left: 60%; top: 18%; }
.nb-chip:nth-child(3) { left: 20%; top: 52%; }
.nb-chip:nth-child(4) { left: 48%; top: 44%; width: 26px; }
.nb-chip:nth-child(5) { left: 70%; top: 55%; }
.nb-chip:nth-child(6) { left: 38%; top: 72%; }
.nb-chip:nth-child(7) { left: 62%; top: 76%; width: 16px; height: 14px; }

/* ---------- Scène Clicker Mobs ---------- */
.nb-scene-mobs {
    background:
        radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--mode) 20%, transparent), transparent 60%),
        linear-gradient(180deg, #160c26 0%, #0b0716 60%, #1b1027 61%, #120a1d 100%);
}
.nb-mob-wrap {
    position: absolute;
    left: 50%;
    top: 52%;
    translate: -50% -50%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nb-hp {
    width: 160px;
    height: 12px;
    margin-bottom: 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
}
.nb-hp-bar { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22c55e, #86efac); transition: width 0.2s ease; }
.nb-hp-bar.is-low { background: linear-gradient(90deg, #ef4444, #f97316); }

.nb-mob {
    --mob-hue: 130;
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 18px !important;
    background: hsl(var(--mob-hue) 70% 50% / 0.85) !important;
    box-shadow: inset 0 0 0 14px hsl(var(--mob-hue) 70% 38% / 0.6), inset 0 -16px 0 rgba(0, 0, 0, 0.2), 0 0 40px hsl(var(--mob-hue) 80% 50% / 0.35);
    animation: nb-slime 1.4s ease-in-out infinite;
    transition: opacity 0.3s, transform 0.3s, filter 0.1s;
}
@keyframes nb-slime {
    0%, 100% { transform: translateY(0) scale(1, 1); }
    40% { transform: translateY(-28px) scale(0.94, 1.06); }
    80% { transform: translateY(0) scale(1.08, 0.92); }
}
.nb-mob.is-hit { animation: nb-mob-hit 0.2s ease-out, nb-slime 1.4s ease-in-out infinite; filter: brightness(2) saturate(0.4) sepia(1) hue-rotate(-50deg); }
@keyframes nb-mob-hit { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
.nb-mob.is-dead { opacity: 0; transform: scale(1.5) rotate(15deg); pointer-events: none; animation: none; }
.nb-mob-eye { position: absolute; top: 36%; width: 20px; height: 20px; background: #111; border-radius: 3px; }
.nb-mob-eye-l { left: 26%; }
.nb-mob-eye-r { right: 26%; }
.nb-mob-eye::after { content: ""; position: absolute; top: 3px; left: 3px; width: 6px; height: 6px; background: #fff; border-radius: 1px; }
.nb-mob-mouth { position: absolute; left: 50%; bottom: 26%; width: 22px; height: 8px; translate: -50% 0; background: #111; border-radius: 2px; }
.nb-mob-shadow { width: 110px; height: 16px; margin-top: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); animation: nb-shadow 1.4s ease-in-out infinite; }
@keyframes nb-shadow { 40% { transform: scale(0.7); opacity: 0.5; } }

.nb-sword {
    position: absolute;
    right: 12%;
    top: 28%;
    font-size: 2.6rem;
    pointer-events: none;
    animation: nb-slash 2.4s ease-in-out infinite;
}
@keyframes nb-slash {
    0%, 60%, 100% { transform: rotate(0deg) translate(0, 0); }
    70% { transform: rotate(-60deg) translate(-30px, 20px); }
    80% { transform: rotate(10deg) translate(0, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .nb-mode.is-reversed .row { flex-direction: row; }
    .nb-mode { padding: 3.5rem 0; }
}

@media (max-width: 575.98px) {
    .nb-scene { height: 340px; }
    .nb-tool { --r: 105px; }
    .nb-blocks { grid-template-columns: repeat(4, 52px); gap: 8px; }
    .nb-block { width: 52px; height: 52px; }
    .nb-cookie { width: 160px; height: 160px; }
    .nb-cursor { transform: rotate(calc(var(--a) * 36deg)) translateY(-115px); }
    .nb-ip { font-size: 1rem; flex-wrap: wrap; justify-content: center; }
    .nb-hero { padding-top: 4rem; }
}

/* ---------- HERO : animations d'arrivée ---------- */

/* Apparition en cascade (fill "backwards" pour ne pas bloquer les effets de survol) */
.nb-intro { animation: nb-intro 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(var(--d, 0) * 110ms + 150ms); }
@keyframes nb-intro { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

.nb-intro-title { animation: nb-intro-title 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s backwards, nb-shine 8s linear infinite; }
@keyframes nb-intro-title { from { opacity: 0; transform: scale(0.85); letter-spacing: 0.25em; filter: blur(12px); } }

.nb-hero-logo.nb-intro { animation: nb-intro 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s backwards, nb-float 6s ease-in-out 1s infinite; }
.nb-scroll.nb-intro { animation: nb-intro-fade 0.8s ease 1.3s backwards, nb-bounce 2s ease-in-out 2s infinite; }
@keyframes nb-intro-fade { from { opacity: 0; } }

/* Halo qui respire derrière le titre */
.nb-hero-glow {
    position: absolute;
    left: 50%;
    top: 42%;
    width: min(760px, 90vw);
    aspect-ratio: 2 / 1;
    translate: -50% -50%;
    z-index: -1;
    background: radial-gradient(closest-side, rgba(56, 189, 248, 0.22), rgba(139, 92, 246, 0.1) 55%, transparent);
    animation: nb-glow 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes nb-glow { 0%, 100% { opacity: 0.6; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.08); } }

/* Neige / étincelles (canvas dessiné par northblue.js) */
.nb-snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Étoiles filantes */
.nb-shooting { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.nb-shooting span {
    position: absolute;
    width: 160px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.9), #fff);
    box-shadow: 0 0 10px rgba(186, 230, 253, 0.8);
    opacity: 0;
    animation: nb-shoot 11s linear infinite;
}
.nb-shooting span:nth-child(1) { top: 8%; left: 78%; animation-delay: 1.2s; }
.nb-shooting span:nth-child(2) { top: 4%; left: 50%; animation-delay: 5s; animation-duration: 13s; }
.nb-shooting span:nth-child(3) { top: 22%; left: 96%; animation-delay: 8.5s; animation-duration: 15s; }
@keyframes nb-shoot {
    0% { transform: translate(0, 0) rotate(145deg); opacity: 0; }
    2% { opacity: 1; }
    9% { transform: translate(-520px, 364px) rotate(145deg); opacity: 0; }
    100% { transform: translate(-520px, 364px) rotate(145deg); opacity: 0; }
}

/* Objets des modes qui flottent */
.nb-floaters { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.nb-floater {
    --s: 64px;
    --depth: 1;
    --dur: 7s;
    position: absolute;
    /* Parallaxe souris : --mx / --my posés par northblue.js (-1 → 1) */
    translate: calc(var(--mx, 0) * var(--depth) * -34px) calc(var(--my, 0) * var(--depth) * -34px);
    transition: translate 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    animation: nb-floater-in 1s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    animation-delay: calc(0.5s + var(--i) * 0.12s);
}
@keyframes nb-floater-in { from { opacity: 0; scale: 0.2; } }

.nb-item {
    display: grid;
    place-items: center;
    width: var(--s);
    height: var(--s);
    font-size: calc(var(--s) * 0.5);
    line-height: 1;
    border-radius: calc(var(--s) * 0.24);
    background: linear-gradient(145deg, rgba(20, 38, 80, 0.75), rgba(8, 16, 36, 0.75));
    border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
    box-shadow:
        0 0 28px color-mix(in srgb, var(--c) 35%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -4px 0 rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: nb-item-bob var(--dur) ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.9s);
}
@keyframes nb-item-bob {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-18px) rotate(6deg); }
}

/* Placement : les petits sont "loin" (flous, moins de parallaxe) */
.nb-floater:nth-child(1)  { left: 9%;  top: 24%; --s: 70px; --depth: 1.2; --dur: 7s; }
.nb-floater:nth-child(2)  { left: 84%; top: 20%; --s: 62px; --depth: 1;   --dur: 8s; }
.nb-floater:nth-child(3)  { left: 80%; top: 64%; --s: 74px; --depth: 1.3; --dur: 6.5s; }
.nb-floater:nth-child(4)  { left: 13%; top: 66%; --s: 60px; --depth: 0.9; --dur: 7.5s; }
.nb-floater:nth-child(5)  { left: 27%; top: 10%; --s: 44px; --depth: 0.5; --dur: 9s; filter: blur(1px); opacity: 0.7; }
.nb-floater:nth-child(6)  { left: 68%; top: 9%;  --s: 42px; --depth: 0.5; --dur: 8.5s; filter: blur(1px); opacity: 0.7; }
.nb-floater:nth-child(7)  { left: 3%;  top: 46%; --s: 40px; --depth: 0.4; --dur: 10s; filter: blur(1.5px); opacity: 0.6; }
.nb-floater:nth-child(8)  { left: 93%; top: 43%; --s: 40px; --depth: 0.4; --dur: 9.5s; filter: blur(1.5px); opacity: 0.6; }
.nb-floater:nth-child(9)  { left: 30%; top: 82%; --s: 46px; --depth: 0.6; --dur: 8s; filter: blur(0.5px); opacity: 0.8; }
.nb-floater:nth-child(10) { left: 66%; top: 84%; --s: 46px; --depth: 0.6; --dur: 7.8s; filter: blur(0.5px); opacity: 0.8; }

@media (max-width: 991.98px) {
    .nb-floater:nth-child(n + 5) { display: none; }
    .nb-floater { --s: 48px !important; opacity: 0.55; }
    .nb-floater:nth-child(1) { left: 4%; top: 12%; }
    .nb-floater:nth-child(2) { left: 82%; top: 10%; }
    .nb-floater:nth-child(3) { left: 84%; top: 86%; }
    .nb-floater:nth-child(4) { left: 4%; top: 88%; }
}

/* ---------- Vidéos des modes ---------- */
.nb-scene-video { background: #060d20; }

.nb-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 8s ease;
}
.nb-scene-video:hover .nb-video { transform: scale(1.07); }

/* Vignette + reflet couleur du mode par-dessus la vidéo */
.nb-scene-video::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, transparent 55%, rgba(5, 11, 26, 0.75)),
        radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--mode) 30%, transparent), transparent 60%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 0 60px rgba(0, 0, 0, 0.45);
    border-radius: inherit;
}

/* Petit voyant "en direct" quand la vidéo tourne */
.nb-scene-video .nb-scene-badge { z-index: 2; }
.nb-scene-video.is-playing .nb-scene-badge::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 0.5rem;
    border-radius: 50%;
    background: var(--mode);
    vertical-align: middle;
    animation: nb-hint 1.6s ease-in-out infinite;
}

.nb-video-toggle {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: rgba(5, 11, 26, 0.75) !important;
    border: 1px solid var(--nb-border) !important;
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
}
.nb-video-toggle:hover, .nb-video-toggle:focus-visible { opacity: 1; background: var(--mode) !important; color: #0b1020; }

/* ---------- Mots clés (**mot** dans la description) ---------- */
.nb-hl {
    font-weight: 800;
    color: #fff;
    background: linear-gradient(transparent 62%, color-mix(in srgb, var(--mode, #3b9cff) 38%, transparent) 62%);
    padding: 0 0.12em;
    border-radius: 2px;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.nb-mode-lead .nb-hl { color: color-mix(in srgb, var(--mode, #3b9cff) 55%, #fff); background: none; padding: 0; }
.nb-tl-title .nb-hl { color: color-mix(in srgb, var(--mode, #3b9cff) 60%, #fff); background: none; padding: 0; }

/* ---------- Scène générique (mode ajouté depuis l'admin) ---------- */
.nb-scene-generic { display: grid; place-items: center; }
.nb-generic-item {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 190px;
    height: 190px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--mode) 35%, transparent), transparent 70%);
    cursor: pointer;
    animation: nb-generic-bob 3.2s ease-in-out infinite;
}
.nb-generic-item .nb-mc {
    width: 128px;
    height: 128px;
    filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 24px color-mix(in srgb, var(--mode) 60%, transparent));
    transition: transform 0.15s;
}
.nb-generic-item:active .nb-mc { transform: scale(0.92); }
@keyframes nb-generic-bob { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 8px; } }

.nb-orbit { position: absolute; inset: 0; display: grid; place-items: center; animation: nb-orbit 28s linear infinite; pointer-events: none; }
.nb-orbit .nb-mc {
    position: absolute;
    width: 34px;
    height: 34px;
    opacity: 0.75;
    transform: rotate(calc(var(--o) * 60deg)) translateY(-150px) rotate(calc(var(--o) * -60deg));
}
@keyframes nb-orbit { to { rotate: 360deg; } }
.nb-scene-hud .nb-mc { width: 18px; height: 18px; margin-top: -2px; }

@media (max-width: 575.98px) {
    .nb-orbit .nb-mc { transform: rotate(calc(var(--o) * 60deg)) translateY(-120px) rotate(calc(var(--o) * -60deg)); }
}

/* ---------- Objets Minecraft (pixel art 16×16) ---------- */
.nb-mc {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}
.nb-item .nb-mc { width: calc(var(--s) * 0.62); height: calc(var(--s) * 0.62); }
.nb-mode-chip .nb-mc { width: 20px; height: 20px; margin-top: -2px; }
.nb-mode-icon .nb-mc { width: 38px; height: 38px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.nb-scene-badge .nb-mc { width: 18px; height: 18px; margin-top: -2px; }
.nb-tl-dot .nb-mc { width: 24px; height: 24px; }
.nb-mode-particles .nb-mc {
    position: absolute;
    left: calc(5% + var(--p) * 12.5%);
    bottom: -40px;
    width: calc(22px + var(--p) * 3px);
    height: calc(22px + var(--p) * 3px);
    opacity: 0;
    animation: nb-rise calc(12s + var(--p) * 1.3s) linear infinite;
    animation-delay: calc(var(--p) * -2.1s);
    pointer-events: none;
}

/* ========== Page Vote (views/vendor/vote/index.blade.php) ========== */
.nb-vote-head { margin-bottom: 2.5rem; }
.nb-vote-head .nb-kicker .nb-mc { width: 18px; height: 18px; margin-top: -3px; }
.nb-vote-head .nb-pill .nb-mc { width: 18px; height: 18px; }

.nb-vote-card { border-radius: calc(var(--nb-radius) * 1.2); }
.nb-vote-card .card-body { padding: 1.6rem; }
.nb-vote-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.45rem;
    color: #fff;
    margin-bottom: 1.2rem;
}
.nb-vote-title .nb-mc { width: 26px; height: 26px; }
.nb-vote-hint { margin-top: 1rem; font-size: 0.88rem; color: var(--nb-muted); }

/* Sites de vote */
.nb-vote-sites { display: grid; gap: 0.75rem; }
.nb-vote-site {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.95rem 1.1rem;
    text-align: left;
    color: var(--nb-text);
    background: var(--nb-surface-2);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
    transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.nb-vote-site:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--nb-blue) 60%, transparent);
    background: color-mix(in srgb, var(--nb-blue) 14%, transparent);
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.18);
}
.nb-vote-site-num {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-family: var(--nb-font-title);
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(135deg, var(--nb-blue), var(--nb-cyan));
}
.nb-vote-site-name { flex: 1; font-weight: 800; font-size: 1.05rem; min-width: 0; }
.nb-vote-site-action { display: flex; align-items: center; gap: 0.6rem; flex: none; }
.nb-vote-site-go { font-weight: 800; color: var(--nb-cyan); }
.nb-vote-site .vote-timer:empty { display: none; }
.nb-vote-site .vote-timer {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(5, 11, 26, 0.7);
    border: 1px solid var(--nb-border);
}
/* En attente (timer en cours) */
.nb-vote-site.disabled { opacity: 1; filter: saturate(0.3); background: var(--nb-surface); }
.nb-vote-site.disabled .nb-vote-site-go { display: none; }

/* Objectif */
.nb-vote-goal-pct { font-family: var(--nb-font-title); font-size: 1.4rem; color: var(--nb-cyan); }
.nb-vote-progress { height: 14px; border-radius: 999px; }
.nb-vote-progress .progress-bar { background: linear-gradient(90deg, var(--nb-blue), var(--nb-cyan)); }

/* Récompenses */
.nb-vote-rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.nb-vote-reward {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.75rem;
    text-align: center;
    background: var(--nb-surface-2);
    border: 1px solid var(--nb-border);
    border-radius: var(--nb-radius);
}
.nb-vote-reward-img { width: 48px; height: 48px; object-fit: contain; }
.nb-vote-reward-name { font-weight: 800; line-height: 1.25; }
.nb-vote-reward-chance {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--nb-cyan);
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--nb-cyan) 12%, transparent);
}

/* Podium du top 3 */
.nb-vote-top { overflow: hidden; }
.nb-vote-top .card-body {
    background:
        radial-gradient(ellipse at 50% 35%, rgba(245, 197, 66, 0.12), transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(59, 130, 246, 0.18), transparent 60%);
}
.nb-podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 0.6rem;
    margin-top: 2rem;
}
.nb-podium-place {
    --medal: #c0cadb;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    animation: nb-podium-in 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards;
    animation-delay: calc(0.15s + var(--k) * 0.15s);
}
.nb-podium-1 { --medal: #f5c542; --h: 118px; animation-delay: 0.6s; }
.nb-podium-2 { --medal: #c7d2e3; --h: 86px; }
.nb-podium-3 { --medal: #d08b4a; --h: 64px; }
@keyframes nb-podium-in { from { opacity: 0; transform: translateY(40px); } }

.nb-podium-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    margin-bottom: 0.35rem;
}
.nb-podium-1 .nb-podium-name { color: var(--medal); font-size: 1.05rem; }
.nb-podium-place.is-empty .nb-podium-name { color: var(--nb-muted); }

.nb-podium-skin {
    --skin-h: 150px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: var(--skin-h);
    margin-bottom: 6px;
    z-index: 1;
}
.nb-podium-1 .nb-podium-skin { --skin-h: 180px; }
.nb-podium-1 .nb-podium-name { margin-bottom: 2.1rem; }
.nb-podium-body {
    height: var(--skin-h);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55));
    transition: transform 0.3s;
}
.nb-podium-place:not(.is-empty):hover .nb-podium-body { transform: translateY(-6px) scale(1.04); }
.nb-podium-1 .nb-podium-body { filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px rgba(245, 197, 66, 0.45)); }
.nb-podium-place .nb-podium-ghost { filter: brightness(0) drop-shadow(0 0 1px rgba(148, 197, 255, 0.4)); opacity: 0.85; }
.nb-podium-unknown {
    position: absolute;
    top: 6%;
    left: 50%;
    translate: -50% 0;
    font-family: var(--nb-font-title);
    font-size: 2.4rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
}
.nb-podium-crown {
    position: absolute;
    top: -34px;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    z-index: 2;
    filter: drop-shadow(0 0 10px rgba(245, 197, 66, 0.8));
    animation: nb-crown 2.6s ease-in-out infinite;
}
@keyframes nb-crown { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-6px) rotate(8deg); } }

.nb-podium-block {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    height: var(--h);
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 28%, #14244a), #0a1533);
    border: 1px solid color-mix(in srgb, var(--medal) 45%, transparent);
    border-bottom: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 -8px 24px color-mix(in srgb, var(--medal) 18%, transparent);
}
.nb-podium-block::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 8px;
    border-radius: 12px 12px 0 0;
    background: color-mix(in srgb, var(--medal) 55%, transparent);
}
.nb-podium-rank { font-family: var(--nb-font-title); font-size: 1.05rem; color: var(--medal); letter-spacing: 0.03em; }
.nb-podium-votes { font-size: 0.85rem; font-weight: 800; color: #c7d6f2; }

/* Classement 4 → 10 */
.nb-vote-ranking { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.nb-vote-ranking li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.8rem;
    border-radius: 12px;
    background: var(--nb-surface-2);
    border: 1px solid transparent;
}
.nb-vote-ranking li.is-me { border-color: color-mix(in srgb, var(--nb-cyan) 50%, transparent); }
.nb-vote-ranking-pos { width: 2.2rem; font-family: var(--nb-font-title); color: var(--nb-muted); }
.nb-vote-ranking-name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-vote-ranking-votes { font-weight: 800; color: var(--nb-cyan); font-size: 0.9rem; }

@media (max-width: 575.98px) {
    .nb-vote-card .card-body { padding: 1.2rem; }
    .nb-podium-skin { --skin-h: 115px; }
    .nb-podium-1 .nb-podium-skin { --skin-h: 140px; }
    .nb-podium-1 { --h: 96px; }
    .nb-podium-2 { --h: 72px; }
    .nb-podium-3 { --h: 54px; }
    .nb-podium-name { font-size: 0.78rem; }
    .nb-podium-rank { font-size: 0.9rem; }
    .nb-vote-site-go { display: none; }
}

/* ---------- Mouvement réduit (accessibilité) ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .nb-mode-particles, .nb-coin, .nb-cloud, .nb-shooting, .nb-snow { display: none; }
    .nb-crop { animation: none !important; transform: none; color: #f5c542; }
    .nb-js .nb-reveal, .nb-js .nb-reveal .nb-tl-item { opacity: 1; transform: none; }
    .nb-orbit, .nb-generic-item { animation: none; }
    .nb-podium-place, .nb-podium-crown { animation: none; }
    .nb-js .nb-reveal .nb-timeline::after { transform: none; }
    .nb-pop { animation: nb-fade 0.6s linear forwards !important; animation-duration: 0.6s !important; }
    @keyframes nb-fade { from { opacity: 1; } to { opacity: 0; } }
}
