:root {
    --bg-night: #0c0918;
    --bg-surface: #151026;
    --bg-elevated: #1e1735;
    --border-subtle: rgba(255, 255, 255, 0.13);
    --border-pink: rgba(255, 1, 75, 0.55);
    --border-gold: rgba(255, 209, 102, 0.55);
    --text-primary: #fbf9ff;
    --text-muted: #c2b8d6;
    --accent: #ff014b;
    --gold: #ffd166;
    --emerald: #00e5a0;
    --violet: #9d6bff;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--bg-night);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0;
    line-height: 1.14;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

p {
    margin: 0;
}

a {
    color: inherit;
}

.hidden {
    display: none !important;
}

/* Neige stellaire subtile & confettis */
.snow-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Fond nuit d'hiver électrique pop */
.cosmos-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 12%, rgba(255, 1, 75, 0.22), transparent 40%),
        radial-gradient(circle at 86% 22%, rgba(255, 209, 102, 0.14), transparent 36%),
        radial-gradient(circle at 82% 84%, rgba(0, 229, 160, 0.15), transparent 40%),
        linear-gradient(160deg, #120c26 0%, #0c0918 55%, #160c22 100%);
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(95px);
    opacity: 0.34;
}

.aurora-pink {
    width: 460px;
    height: 460px;
    background: var(--accent);
    top: -170px;
    right: -120px;
}

.aurora-emerald {
    width: 380px;
    height: 380px;
    background: var(--emerald);
    bottom: -150px;
    left: -120px;
}

.aurora-gold {
    width: 300px;
    height: 300px;
    background: var(--gold);
    top: 42%;
    right: -130px;
    opacity: 0.18;
}

.slash-beam {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 145vw;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 1, 75, 0.32), rgba(255, 209, 102, 0.25), transparent);
}

.slash-beam-a {
    transform: translate(-50%, -50%) rotate(30deg);
}

.slash-beam-b {
    transform: translate(-50%, -50%) rotate(-30deg);
}

/* Guirlande lumineuse pop ultra-fine (clin d'œil Noël chic) */
.neon-garland {
    position: relative;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 18px;
    padding: 0 24px;
    background: rgba(12, 9, 24, 0.92);
    border-bottom: 1px solid rgba(255, 209, 102, 0.22);
    overflow: hidden;
}

.neon-garland::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 1, 75, 0.35), rgba(255, 209, 102, 0.45), rgba(0, 229, 160, 0.35));
}

.bulb {
    position: relative;
    z-index: 1;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: garlandGlow 3s ease-in-out infinite;
}

.bulb:nth-child(2n) { animation-delay: 0.7s; }
.bulb:nth-child(3n) { animation-delay: 1.4s; }
.bulb:nth-child(4n) { animation-delay: 2.1s; }

.b-pink {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent), 0 0 18px var(--accent);
}

.b-gold {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold), 0 0 18px rgba(255, 209, 102, 0.8);
}

.b-mint {
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald), 0 0 16px rgba(0, 229, 160, 0.75);
}

.b-white {
    background: #ffffff;
    box-shadow: 0 0 9px rgba(255, 255, 255, 0.85);
}

@keyframes garlandGlow {
    0%, 100% { opacity: 0.45; transform: scale(0.88); }
    50% { opacity: 1; transform: scale(1.22); }
}

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* En-tête */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(12, 9, 24, 0.82);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.brand-logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--accent);
    background: #ffffff;
    box-shadow: 0 0 22px rgba(255, 1, 75, 0.35);
    transition: transform 0.2s ease;
}

.brand-lockup:hover .brand-logo {
    transform: scale(1.05);
}

.brand-tag {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-tag strong {
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--text-primary);
}

.brand-tag span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.brand-tag em {
    font-style: normal;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.94rem;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1.5px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.84rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #ff2c68);
    color: #ffffff;
    box-shadow: 0 8px 28px rgba(255, 1, 75, 0.42);
}

.btn-primary:hover {
    box-shadow: 0 10px 34px rgba(255, 1, 75, 0.62);
}

.btn-gold-ghost {
    background: rgba(255, 209, 102, 0.12);
    color: var(--gold);
    border-color: rgba(255, 209, 102, 0.45);
}

.btn-gold-ghost:hover {
    background: rgba(255, 209, 102, 0.22);
    border-color: var(--gold);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(255, 1, 75, 0.14);
}

.dot-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 209, 102, 0.45);
}

.dot-indicator.active {
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
}

/* Ruban prévisualisation */
.preview-ribbon {
    margin-top: 20px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 209, 102, 0.14);
    border: 1px solid var(--border-gold);
    color: #ffe7a8;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Hero */
.main-shell {
    padding-top: 34px;
    padding-bottom: 64px;
}

.hero-block {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
}

.eyebrow-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
}

.festive-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 1, 75, 0.18);
    border: 1px solid var(--border-pink);
    color: #ff7ba2;
}

.hero-copy h1 {
    font-size: clamp(2.15rem, 4.2vw, 3.45rem);
    margin-bottom: 14px;
    background: linear-gradient(120deg, #ffffff 35%, #ffd1e0 75%, #ffd166 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.06rem;
    max-width: 600px;
}

.hero-hud {
    background: linear-gradient(155deg, rgba(30, 23, 53, 0.9), rgba(18, 13, 34, 0.92));
    border: 1px solid rgba(255, 1, 75, 0.35);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hud-top-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.hud-card {
    display: grid;
    grid-template-columns: 1fr 0.72fr 1.28fr;
    gap: 10px;
    margin-bottom: 14px;
}

.hud-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hud-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hud-value {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.hud-value strong {
    color: var(--accent);
    font-size: 1.32rem;
}

.hud-archetype {
    font-size: 0.88rem;
    color: var(--emerald);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--emerald));
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(255, 1, 75, 0.55);
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.hud-save-row {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

.hud-save-status {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.hud-save-status.saved {
    color: var(--emerald);
    font-weight: 700;
}

.hud-save-link {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hud-save-link:hover {
    color: #ffffff;
}

/* Bandeau nudge */
.nudge-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(120deg, rgba(255, 1, 75, 0.2), rgba(255, 209, 102, 0.14));
    border: 1px solid var(--border-pink);
    box-shadow: 0 12px 32px rgba(255, 1, 75, 0.16);
}

.nudge-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 209, 102, 0.18);
    border: 1px solid var(--gold);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nudge-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.94rem;
    flex: 1;
}

.nudge-text span {
    color: var(--text-muted);
}

.nudge-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-icon-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.45rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* Barre d'outils constellation */
.constellation-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.legend-items {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 5px 12px;
}

.swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.swatch-today {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.swatch-open {
    background: var(--emerald);
    box-shadow: 0 0 9px var(--emerald);
}

.swatch-golden {
    background: var(--gold);
    box-shadow: 0 0 9px var(--gold);
}

.swatch-locked {
    background: rgba(205, 194, 240, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.view-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 4px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 7px 15px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(255, 1, 75, 0.5);
}

/* Scène carte stellaire : nuit pop-luxe hivernale */
.constellation-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 540px;
    border-radius: 28px;
    border: 1px solid rgba(255, 209, 102, 0.28);
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 1, 75, 0.22), transparent 50%),
        radial-gradient(circle at 18% 18%, rgba(255, 209, 102, 0.12), transparent 34%),
        radial-gradient(circle at 84% 82%, rgba(0, 229, 160, 0.14), transparent 36%),
        linear-gradient(150deg, #161032 0%, #0e0a20 55%, #1d0c28 100%);
    overflow: hidden;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 1, 75, 0.18);
}

.stage-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.crystal {
    position: absolute;
    opacity: 0.22;
}

.crystal-tl {
    top: -16px;
    left: -16px;
    width: 140px;
    color: var(--gold);
}

.crystal-br {
    bottom: -20px;
    right: -18px;
    width: 150px;
    color: var(--accent);
}

.pine-minimal {
    position: absolute;
    bottom: 14px;
    left: 20px;
    width: 58px;
    opacity: 0.65;
    filter: drop-shadow(0 0 10px rgba(0, 229, 160, 0.35));
}

.sparkle {
    position: absolute;
    color: var(--gold);
    font-size: 0.95rem;
    opacity: 0.65;
    animation: twinkle 3.4s ease-in-out infinite;
}

.sp-1 { top: 9%; left: 42%; animation-delay: 0s; }
.sp-2 { top: 22%; left: 57%; color: var(--emerald); animation-delay: 0.8s; }
.sp-3 { top: 76%; left: 48%; color: #ff7ba2; animation-delay: 1.5s; }
.sp-4 { top: 34%; left: 16%; color: #ffffff; animation-delay: 2.1s; }
.sp-5 { top: 30%; right: 15%; color: var(--gold); animation-delay: 1.1s; }

@keyframes twinkle {
    0%, 100% { transform: scale(0.8); opacity: 0.3; }
    50% { transform: scale(1.25); opacity: 0.95; }
}

.constellation-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.constellation-line {
    stroke: rgba(255, 209, 102, 0.18);
    stroke-width: 0.24;
    transition: stroke 0.35s ease, stroke-width 0.35s ease;
}

.constellation-line.lit {
    stroke: var(--accent);
    stroke-width: 0.42;
    filter: drop-shadow(0 0 4px rgba(255, 1, 75, 0.8));
}

.stars-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.loading-state {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.stage-motto {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 209, 102, 0.72);
    background: rgba(12, 9, 24, 0.65);
    border: 1px solid rgba(255, 209, 102, 0.25);
    border-radius: 999px;
    padding: 5px 15px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
}

/* Nœuds étoiles pop-néon sur nuit sombre */
.star-node {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: rgba(21, 16, 38, 0.88);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.star-node:hover {
    transform: translate(-50%, -50%) scale(1.16);
    z-index: 8;
}

.star-node.locked {
    background: rgba(28, 22, 52, 0.68);
    border-color: rgba(255, 255, 255, 0.2);
    border-style: dashed;
    color: rgba(216, 207, 240, 0.65);
}

.star-node.locked:hover {
    border-color: rgba(255, 209, 102, 0.55);
    color: #ffffff;
}

.star-node.unlocked {
    border-color: var(--accent);
    background: radial-gradient(circle at 30% 28%, #3c1233, #170e29);
    color: #ffffff;
    box-shadow: 0 0 22px rgba(255, 1, 75, 0.42), inset 0 0 12px rgba(255, 1, 75, 0.22);
}

.star-node.is-today {
    width: 62px;
    height: 62px;
    font-size: 1.12rem;
    border: 2px solid var(--gold);
    background: linear-gradient(135deg, var(--accent), #ff3370);
    color: #ffffff;
    box-shadow: 0 0 0 6px rgba(255, 1, 75, 0.26), 0 0 36px rgba(255, 1, 75, 0.85);
    animation: neonPulse 2.2s infinite;
}

.star-node.opened {
    border-color: var(--emerald);
    background: radial-gradient(circle at 30% 30%, #0e3d35, #10192b);
    color: #ffffff;
    box-shadow: 0 0 24px rgba(0, 229, 160, 0.45);
}

.star-node.golden {
    border-color: var(--gold);
    background: radial-gradient(circle at 30% 30%, #443114, #1b1322);
    color: var(--gold);
    box-shadow: 0 0 26px rgba(255, 209, 102, 0.5);
}

.star-node.golden::after {
    content: '★';
    position: absolute;
    top: -8px;
    right: -6px;
    font-size: 0.72rem;
    color: #161024;
    background: var(--gold);
    width: 19px;
    height: 19px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.8);
}

.star-node.day-24 {
    width: 70px;
    height: 70px;
    font-size: 1.2rem;
    border-width: 2px;
}

.star-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1b1430;
    border: 1px solid var(--border-pink);
    color: var(--text-primary);
    padding: 7px 12px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
}

.star-node:hover .star-tooltip,
.star-node:focus-visible .star-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.75), 0 0 32px rgba(255, 1, 75, 0.8);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(255, 209, 102, 0), 0 0 38px rgba(255, 1, 75, 0.9);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 209, 102, 0), 0 0 32px rgba(255, 1, 75, 0.8);
    }
}

/* Vue cases */
.constellation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 14px;
}

.grid-day-card {
    text-align: left;
    background: linear-gradient(155deg, rgba(28, 22, 50, 0.92), rgba(18, 13, 34, 0.95));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.grid-day-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(255, 1, 75, 0.2);
}

.grid-day-card.locked {
    opacity: 0.56;
    border-style: dashed;
}

.grid-day-card.opened {
    border-color: rgba(0, 229, 160, 0.6);
}

.grid-day-card.is-golden {
    border-color: rgba(255, 209, 102, 0.65);
    background: linear-gradient(155deg, rgba(56, 40, 20, 0.55), rgba(21, 16, 38, 0.95));
}

.grid-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.grid-day-num {
    color: var(--accent);
    font-weight: 700;
}

.grid-day-card h3 {
    font-size: 1.02rem;
}

.grid-day-slash {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Callout agence */
.chameleon-callout {
    margin-top: 46px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 1, 75, 0.14), rgba(21, 16, 38, 0.95) 60%, rgba(0, 229, 160, 0.1));
    border: 1px solid rgba(255, 209, 102, 0.26);
    display: grid;
    grid-template-columns: 96px 1fr;
    align-items: center;
    gap: 26px;
}

.emblem-svg {
    width: 92px;
    height: 92px;
    display: block;
}

.callout-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.callout-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.chameleon-callout h2 {
    font-size: clamp(1.45rem, 2.5vw, 1.95rem);
}

.chameleon-callout p {
    color: var(--text-muted);
    max-width: 660px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

/* Modales sombres pop-chic */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(6, 4, 14, 0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 790px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 209, 102, 0.3);
    border-radius: 26px;
    box-shadow: 0 34px 96px rgba(0, 0, 0, 0.72), 0 0 40px rgba(255, 1, 75, 0.18);
    animation: modalIn 0.22s ease-out;
}

.modal-compact {
    max-width: 530px;
}

.modal-inner-pad {
    padding: 30px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(12, 9, 24, 0.6);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.day-header {
    background: linear-gradient(125deg, #ff014b 0%, #b50c58 65%, #3d1246 100%);
    padding: 28px 64px 24px 30px;
    border-bottom: 1px solid rgba(255, 209, 102, 0.3);
}

.day-header h2 {
    font-size: clamp(1.5rem, 2.8vw, 2.08rem);
    margin-bottom: 8px;
    color: #ffffff;
}

.day-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.day-chip {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: #161024;
}

.slash-pair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(12, 9, 24, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.slash-mark {
    color: var(--gold);
}

.day-tagline {
    font-size: 1.04rem;
    color: #ffe8ef;
    font-weight: 500;
}

.day-body-scroll {
    padding: 24px 30px 30px;
}

.day-content-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 16px;
    margin-bottom: 18px;
}

.insight-box,
.action-box,
.poll-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.action-box {
    border-color: rgba(0, 229, 160, 0.35);
    background: linear-gradient(155deg, rgba(0, 229, 160, 0.1), var(--bg-elevated));
}

.box-kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gold);
    margin-bottom: 8px;
}

.action-box .box-kicker {
    color: var(--emerald);
}

.action-box h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.insight-box p,
.action-box p {
    color: #ebe6f6;
    font-size: 0.95rem;
}

/* Sondage express */
.poll-box {
    margin-bottom: 18px;
    border-color: rgba(255, 1, 75, 0.32);
    background: linear-gradient(155deg, rgba(255, 1, 75, 0.08), var(--bg-elevated));
}

.poll-box .box-kicker {
    color: #ff6b98;
}

.poll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.poll-count {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--gold);
}

.poll-box h3 {
    font-size: 1.12rem;
    margin-bottom: 14px;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-option-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    text-align: left;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(12, 9, 24, 0.55);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.93rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.2s ease, transform 0.14s ease;
}

.poll-option-btn:hover {
    border-color: var(--gold);
}

.poll-option-btn.selected {
    border-color: var(--accent);
}

.poll-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, rgba(255, 209, 102, 0.26), rgba(255, 1, 75, 0.2));
    z-index: 0;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.poll-option-btn.selected .poll-bar-fill {
    background: linear-gradient(90deg, rgba(255, 1, 75, 0.48), rgba(255, 209, 102, 0.32));
}

.poll-option-label,
.poll-option-pct {
    position: relative;
    z-index: 1;
}

.poll-option-pct {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--gold);
    flex-shrink: 0;
}

.poll-hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Encart sauvegarde post-vote dans la modale étoile */
.post-vote-save {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(125deg, rgba(255, 1, 75, 0.16), rgba(255, 209, 102, 0.13));
    border: 1px solid rgba(255, 209, 102, 0.48);
    animation: modalIn 0.24s ease-out;
}

.post-vote-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-vote-kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
}

.post-vote-copy p {
    font-size: 0.88rem;
    color: #f4effc;
}

.post-vote-save .btn {
    flex-shrink: 0;
}

/* Bonus & Golden ticket */
.bonus-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gold);
    background: linear-gradient(125deg, rgba(255, 209, 102, 0.2), rgba(255, 1, 75, 0.16));
    box-shadow: 0 12px 32px rgba(255, 209, 102, 0.12);
}

.bonus-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gold);
    color: #161024;
    margin-bottom: 8px;
}

.bonus-box h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.bonus-box p {
    color: #f4ebd8;
    font-size: 0.9rem;
}

.bonus-action {
    flex-shrink: 0;
}

.bonus-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 229, 160, 0.16);
    border: 1px solid var(--emerald);
    color: var(--emerald);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.86rem;
}

.bonus-status-badge.sold-out {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-muted);
}

/* Formulaires & onglets auth */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 20px;
    margin-right: 34px;
}

.auth-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.84rem;
    padding: 9px 10px;
    border-radius: 9px;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--accent);
    color: #ffffff;
}

.modal-lead {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin: 10px 0 18px;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(12, 9, 24, 0.8);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.checkbox-field input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.form-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 1, 75, 0.16);
    border: 1px solid var(--accent);
    color: #ffd1df;
    font-size: 0.86rem;
}

.recovery-result {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.recovery-code-box {
    font-family: var(--font-mono);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 14px 24px;
    border-radius: 14px;
    background: rgba(255, 209, 102, 0.14);
    border: 1.5px dashed var(--gold);
    color: var(--gold);
}

/* Profil de Slasher */
.archetype-hero {
    background: linear-gradient(135deg, rgba(255, 1, 75, 0.18), rgba(157, 107, 255, 0.14));
    border: 1px solid rgba(255, 209, 102, 0.28);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
}

.archetype-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    margin-bottom: 8px;
}

.archetype-short {
    margin-top: 8px;
    color: #ffd4e3;
    font-weight: 600;
}

.archetype-desc {
    color: var(--text-muted);
    font-size: 0.94rem;
    margin-bottom: 16px;
}

.archetype-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.pillar-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
}

.pillar-pink {
    border-color: rgba(255, 1, 75, 0.35);
}

.pillar-mint {
    border-color: rgba(0, 229, 160, 0.35);
}

.pillar-item span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
}

.pillar-mint span {
    color: var(--emerald);
}

.pillar-item p {
    font-size: 0.86rem;
    color: #ebe6f6;
}

.archetype-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 1fr 44px;
    gap: 6px;
    font-size: 0.8rem;
}

.breakdown-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.breakdown-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-save-prompt {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1a1330;
    border: 1px solid var(--border-gold);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
    max-width: 340px;
}

/* Page règles du jeu */
.rules-shell {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.rules-hero {
    max-width: 780px;
}

.rules-hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    margin: 10px 0 14px;
    background: linear-gradient(120deg, #ffffff 35%, #ffd1e0 75%, #ffd166 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rule-card {
    background: linear-gradient(155deg, rgba(28, 22, 50, 0.92), rgba(18, 13, 34, 0.95));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rule-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 1, 75, 0.18);
    border: 1px solid var(--border-pink);
    color: var(--gold);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
}

.rule-card h2 {
    font-size: 1.32rem;
}

.rule-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.rule-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #e7e1f4;
    font-size: 0.93rem;
}

.rule-list code {
    font-family: var(--font-mono);
    color: var(--gold);
    background: rgba(255, 209, 102, 0.12);
    padding: 2px 6px;
    border-radius: 6px;
}

.rule-list a {
    color: var(--gold);
}

.rules-section-head {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rules-section-head h2 {
    font-size: clamp(1.45rem, 2.6vw, 2rem);
}

.golden-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.golden-rule-card {
    background: linear-gradient(145deg, rgba(255, 209, 102, 0.14), rgba(21, 16, 38, 0.95) 60%, rgba(255, 1, 75, 0.12));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.golden-rule-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.golden-rule-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald);
}

.golden-rule-card h3 {
    font-size: 1.08rem;
}

.golden-rule-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.archetypes-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.archetype-mini-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archetype-mini-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.archetype-mini-card h3 {
    font-size: 1.04rem;
}

.archetype-mini-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.legal-card {
    border-color: rgba(255, 255, 255, 0.16);
}

.rules-cta-bar {
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

/* Responsive */
@media (max-width: 900px) {
    .rules-grid,
    .hero-block,
    .day-content-grid,
    .archetype-pillars,
    .profile-actions,
    .chameleon-callout {
        grid-template-columns: 1fr;
    }

    .hud-card {
        grid-template-columns: 1fr 1fr;
    }

    .hud-stat-wide {
        grid-column: 1 / -1;
    }

    .constellation-stage {
        aspect-ratio: 4 / 5;
        min-height: 490px;
    }

    .star-node {
        width: 40px;
        height: 40px;
        font-size: 0.82rem;
    }

    .star-node.is-today {
        width: 48px;
        height: 48px;
        font-size: 0.94rem;
    }

    .star-node.day-24 {
        width: 54px;
        height: 54px;
        font-size: 0.98rem;
    }

    .bonus-box,
    .nudge-banner,
    .post-vote-save {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 540px) {
    .day-header,
    .day-body-scroll,
    .modal-inner-pad {
        padding: 20px 18px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .brand-tag {
        display: none;
    }
}
