/* ========== UTILITIES ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== VARIABLES ========== */
:root {
    --bg-dark: #060610;
    --orange: #e8782a;
    --orange-glow: #f4943e;
    --blue: #1a4a8a;
    --blue-light: #2a6aba;
    --blue-game: #3a7fd5;
    --light: #f5e6c8;
    --white-hot: #fff8ee;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --street-inset: 18vw;

    /* Sky */
    --sky-top: #0e1530;
    --sky-blue-glow: rgba(26, 74, 138, 0.25);
    --sky-orange-glow: rgba(232, 120, 42, 0.1);
    --sky-star: rgba(255, 255, 255, 0.02);

    /* Haze */
    --haze-color: 6, 6, 16;

    /* Cards */
    --card-bg: rgba(6, 6, 16, 0.7);
    --card-border: rgba(232, 120, 42, 0.15);
    --card-shadow-accent: rgba(232, 120, 42, 0.05);
    --card-shadow-dark: rgba(0, 0, 0, 0.4);
    --card-highlight: rgba(255, 255, 255, 0.05);

    /* Features */
    --feature-border: rgba(232, 120, 42, 0.2);
    --feature-bg: rgba(232, 120, 42, 0.02);
    --feature-bg-hover: rgba(232, 120, 42, 0.06);

    /* CTA */
    --cta-badge-border: rgba(255, 255, 255, 0.15);

    /* City SVG fills */
    --city-far-fill: #0d1526;
    --city-mid-fill: #0b1220;
    --city-mid-roof: #0e1630;
    --city-near-fill: #080e1c;
    --city-far-detail: #141c34;
    --city-mid-detail: #141c34;
    --city-near-detail: #141c34;
    --city-win-dark: #131a30;

    /* Mobile side gradient */
    --mobile-side: rgba(10, 14, 30, 0.9);
}

/* ========== LIGHT THEME ========== */
[data-theme="light"] {
    --bg-dark: #e8eef5;
    --light: #2a2a40;
    --white-hot: #1a1a2e;
    --text: #1a1a2e;
    --text-muted: rgba(26, 26, 46, 0.6);

    /* Sky */
    --sky-top: #c8ddf0;
    --sky-blue-glow: rgba(100, 160, 220, 0.2);
    --sky-orange-glow: rgba(232, 120, 42, 0.06);
    --sky-star: rgba(255, 255, 255, 0.3);

    /* Haze */
    --haze-color: 200, 221, 240;

    /* Cards */
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(232, 120, 42, 0.2);
    --card-shadow-accent: rgba(232, 120, 42, 0.08);
    --card-shadow-dark: rgba(0, 0, 0, 0.08);
    --card-highlight: rgba(255, 255, 255, 0.5);

    /* Features */
    --feature-border: rgba(232, 120, 42, 0.3);
    --feature-bg: rgba(232, 120, 42, 0.04);
    --feature-bg-hover: rgba(232, 120, 42, 0.1);

    /* CTA */
    --cta-badge-border: rgba(26, 26, 46, 0.2);

    /* City SVG fills */
    --city-far-fill: #8a9ab5;
    --city-mid-fill: #7a8aa5;
    --city-mid-roof: #8090ab;
    --city-near-fill: #6a7a95;
    --city-far-detail: #7e8eaa;
    --city-mid-detail: #6e7e99;
    --city-near-detail: #5e6e8a;
    --city-win-dark: #8898b0;

    /* Mobile side gradient */
    --mobile-side: rgba(200, 221, 240, 0.9);
}

/* ========== RESET ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
}

a {
    color: var(--orange);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--light);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    color: var(--light);
    line-height: 1.1;
    text-shadow: 0 2px 40px rgba(232, 120, 42, 0.3), 0 2px 10px rgba(0, 0, 0, 0.8);
}

h2 {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    color: var(--orange);
    margin-bottom: 1.2rem;
    text-shadow: 0 2px 15px rgba(232, 120, 42, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    font-size: 1rem;
    color: var(--light);
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}

p {
    line-height: 1.7;
    color: var(--text-muted);
}

.subtle {
    margin-top: 1rem;
    font-style: italic;
    opacity: 0.7;
}

/* ========== SKY BACKGROUND (brighter) ========== */
.sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% 15%, var(--sky-blue-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, var(--sky-orange-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 10%, var(--sky-star) 0%, transparent 30%),
        radial-gradient(ellipse at 80% 10%, var(--sky-star) 0%, transparent 30%),
        linear-gradient(180deg, var(--sky-top) 0%, var(--bg-dark) 50%);
    pointer-events: none;
}

/* ========== CITY LAYERS (3-depth skyline) ========== */
.city-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
}

.city-layer svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
}

.city-far {
    z-index: 2;
    opacity: 0.25;
}

.city-mid {
    z-index: 4;
    opacity: 0.45;
}

.city-near {
    z-index: 8;
    opacity: 0.65;
}

/* ========== HAZE LAYERS ========== */
.haze-mid {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 40vh;
    z-index: 6;
    pointer-events: none;
    background: linear-gradient(to top, rgba(var(--haze-color), 0.6) 0%, transparent 100%);
}

.haze-near {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(var(--haze-color), 0.5) 0%, transparent 15%, transparent 85%, rgba(var(--haze-color), 0.5) 100%),
        linear-gradient(to top, rgba(var(--haze-color), 0.4) 0%, transparent 30%);
}

/* Window colors - BRIGHTER */
.win-o {
    fill: var(--orange-glow);
    opacity: 0.85;
}

.win-b {
    fill: var(--blue-light);
    opacity: 0.6;
}

.win-d {
    fill: #131a30;
    opacity: 0.4;
}

/* ========== GROUND GLOW (brighter) ========== */
.ground-glow {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 45vh;
    z-index: 5;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(232, 120, 42, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 100%, rgba(232, 120, 42, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 70% 100%, rgba(232, 120, 42, 0.08) 0%, transparent 40%);
}

/* ========== GAME TRAIL (blue dotted vertical line) ========== */
.game-trail {
    position: fixed;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100vh;
    z-index: 12;
    pointer-events: none;
    transform: translateX(-1px);
    background: repeating-linear-gradient(
        to bottom,
        rgba(42, 106, 186, 0.25) 0px,
        rgba(42, 106, 186, 0.25) 6px,
        transparent 6px,
        transparent 16px
    );
    mask-image: linear-gradient(to bottom, transparent 5%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.6) 80%, transparent 95%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 5%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.6) 80%, transparent 95%);
}

/* ========== STREET (main content) ========== */
.street {
    position: relative;
    z-index: 15;
    margin: 0 var(--street-inset);
    padding: 0 clamp(20px, 3vw, 60px);
    /* .hero-glow (600px) overflows on mobile; body overflow-x: hidden
       doesn't stop horizontal panning there. clip ≠ hidden: no scroll container. */
    overflow-x: clip;
}

.street-section {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 0;
    max-width: 720px;
    margin: 0 auto;
}

/* ========== HERO ========== */
#hero {
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding-bottom: 40px;
}

.hero-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 238, 0.2) 0%, rgba(244, 148, 62, 0.15) 20%, rgba(232, 120, 42, 0.08) 45%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-logo {
    position: relative;
    z-index: 1;
    width: clamp(260px, 36vw, 440px);
    height: auto;
    filter: drop-shadow(0 0 40px rgba(232, 120, 42, 0.3)) drop-shadow(0 0 80px rgba(232, 120, 42, 0.15));
    animation: heroFadeIn 1.4s 0.3s ease-out both;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

[data-theme="light"] .hero-logo {
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 40px rgba(232, 120, 42, 0.3)) drop-shadow(0 0 80px rgba(232, 120, 42, 0.15)) brightness(1.3) saturate(1.4);
    mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, black 35%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, black 35%, transparent 72%);
}

.tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.7rem, 1.5vw, 0.95rem);
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.scroll-hint {
    margin-top: 3rem;
    opacity: 0.5;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 12; opacity: 0.8; }
    50% { cy: 26; opacity: 0.3; }
}


/* ========== CONCEPT ========== */
#concept {
    min-height: auto;
}

.concept-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 48px);
    text-align: center;
    box-shadow:
        0 0 40px var(--card-shadow-accent),
        0 8px 32px var(--card-shadow-dark),
        inset 0 1px 0 var(--card-highlight);
}

/* ========== FEATURES ========== */
#features {
    min-height: auto;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1rem 1.2rem;
    border-left: 2px solid var(--feature-border);
    background: var(--feature-bg);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.feature-item:hover {
    border-left-color: var(--orange);
    background: var(--feature-bg-hover);
}

.feature-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ========== DOOR / CTA ========== */
#door {
    align-items: center;
    text-align: center;
    min-height: auto;
}

.door-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    color: var(--orange);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#door p {
    margin-top: 0.5rem;
    max-width: 450px;
}

.cta-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.cta-badge {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    border: 1px solid var(--cta-badge-border);
    padding: 6px 18px;
    border-radius: 20px;
}

.cta-button {
    display: inline-block;
    padding: 14px 42px;
    background: linear-gradient(135deg, var(--orange), #c05a15);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(232, 120, 42, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(232, 120, 42, 0.45);
    color: var(--bg-dark);
}

/* ========== SOUVERAINETE / DONNEES ========== */
#souverainete {
    min-height: auto;
}

.souv-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 48px);
    text-align: center;
    box-shadow:
        0 0 40px var(--card-shadow-accent),
        0 8px 32px var(--card-shadow-dark),
        inset 0 1px 0 var(--card-highlight);
}

.souv-eyebrow {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    color: var(--orange);
    font-size: 0.72rem;
    display: block;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.souv-intro {
    max-width: 520px;
    margin: 0 auto;
}

.souv-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    text-align: left;
}

.souv-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-left: 2px solid var(--feature-border);
    background: var(--feature-bg);
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.souv-item:hover {
    border-left-color: var(--orange);
    background: var(--feature-bg-hover);
}

.souv-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
}

.souv-body {
    flex: 1;
    min-width: 0;
}

.souv-body h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.souv-body p {
    font-size: 0.88rem;
    line-height: 1.5;
}

.souv-where {
    flex-shrink: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--cta-badge-border);
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
}

.souv-note {
    margin-top: 1.5rem;
}

.souv-note a {
    color: var(--orange);
    text-decoration: none;
}

.souv-note a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .souv-item {
        flex-wrap: wrap;
        row-gap: 0.7rem;
    }

    /* icone + texte occupent la 1re ligne, la puce passe dessous */
    .souv-body {
        flex: 1 1 calc(100% - 2.6rem);
    }

    .souv-where {
        margin-left: 2.6rem;
    }
}

/* ========== WAITLIST (liste d'attente) ========== */
.waitlist-form {
    margin-top: 2.2rem;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.waitlist-row {
    display: flex;
    gap: 0.6rem;
    width: 100%;
}

.waitlist-form input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px 18px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.waitlist-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.waitlist-form input[type="email"]:focus {
    border-color: var(--orange);
    background: rgba(232, 120, 42, 0.06);
    box-shadow: 0 0 0 3px rgba(232, 120, 42, 0.15);
}

.waitlist-form input.invalid {
    border-color: #e8552a;
    box-shadow: 0 0 0 3px rgba(232, 85, 42, 0.18);
}

.waitlist-submit {
    flex: 0 0 auto;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.waitlist-submit[disabled] {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

.waitlist-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.waitlist-iframe {
    display: none;
}

.waitlist-error {
    color: #f4943e;
    font-size: 0.85rem;
    margin-top: 0.7rem;
    text-align: center;
}

.waitlist-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.9rem;
    text-align: center;
}

.waitlist-consent {
    color: var(--text-muted);
    opacity: 0.75;
    font-size: 0.72rem;
    line-height: 1.5;
    margin-top: 0.7rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.waitlist-consent a {
    color: var(--orange);
    text-decoration: underline;
}

/* ========== STORES (App Store iPhone + accès Android) ========== */
.store-block {
    margin-top: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.store-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.appstore-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 12px 28px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.appstore-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: var(--orange);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.apple-logo {
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
}

.play-logo {
    width: 24px;
    height: 24px;
}

.store-block--android {
    margin-top: 1rem;
    margin-bottom: 0.9rem;
}

.android-note--warning a {
    color: var(--orange);
    text-decoration: underline;
}

.appstore-btn__text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    text-align: left;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
}

.appstore-btn__text small {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

.store-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 360px;
    margin: 2.2rem auto 0.4rem;
    color: var(--text-muted);
}

.store-divider::before,
.store-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--card-border);
}

.store-divider span {
    padding: 0 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.android-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
    max-width: 430px;
}

/* sous le bloc Android, le formulaire se resserre un peu */
.android-note + .waitlist-success,
.android-note ~ .waitlist-form {
    margin-top: 1.4rem;
}

.waitlist-success {
    margin-top: 2rem;
    padding: 1.8rem 1.5rem;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: rgba(232, 120, 42, 0.05);
    text-align: center;
    animation: waitlistFadeIn 0.5s ease;
}

.waitlist-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.8rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), #c05a15);
    color: var(--bg-dark);
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(232, 120, 42, 0.35);
}

.waitlist-success h3 {
    margin-bottom: 0.4rem;
}

@keyframes waitlistFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .waitlist-row {
        flex-direction: column;
    }
    .waitlist-submit {
        width: 100%;
    }
}

/* ========== DEMO PIRATE (parchment) ========== */
#demo-pirate {
    min-height: auto;
}

.pirate-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(28px, 4vw, 52px);
    border-radius: 6px;
    color: #3a2718;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(255, 248, 230, 0.6), transparent 60%),
        linear-gradient(135deg, #f3e4c4 0%, #ecd9b2 45%, #e2c896 100%);
    border: 1px solid rgba(120, 80, 35, 0.45);
    box-shadow:
        inset 0 0 70px rgba(120, 78, 30, 0.35),
        inset 0 0 0 1px rgba(255, 248, 230, 0.35),
        0 18px 50px rgba(0, 0, 0, 0.55);
}

/* dashed inner frame, like an old ticket */
.pirate-card::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(110, 72, 28, 0.45);
    border-radius: 4px;
    pointer-events: none;
}

.pirate-compass {
    position: absolute;
    right: -22px;
    bottom: -22px;
    width: 150px;
    height: 150px;
    color: rgba(110, 72, 28, 0.16);
    pointer-events: none;
}
.pirate-compass svg { width: 100%; height: 100%; }

.pirate-eyebrow {
    position: relative;
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a531c;
    margin-bottom: 0.6rem;
}

.pirate-title {
    position: relative;
    font-family: 'Pirata One', 'Orbitron', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1;
    letter-spacing: 1px;
    text-transform: none;
    color: #6b3410;
    text-shadow: 0 1px 0 rgba(255, 250, 235, 0.6), 0 3px 8px rgba(80, 40, 10, 0.2);
    margin-bottom: 1.1rem;
}

.pirate-lead {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    color: #4a3422;
    font-size: 0.98rem;
    line-height: 1.7;
}
.pirate-lead strong { color: #6b3410; }

/* ── In-game style dialogue bubble ── */
.pirate-bubble {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    max-width: 560px;
    margin: 1.8rem auto 0;
}

.pirate-bubble__avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b3410;
    background: radial-gradient(circle at 35% 30%, #fbf1d8, #e6cd9c);
    border: 2px solid #8a531c;
    box-shadow: 0 4px 12px rgba(70, 40, 10, 0.3);
}
.pirate-bubble__avatar svg { width: 40px; height: 40px; }

.pirate-bubble__body {
    position: relative;
    flex: 1;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 252, 242, 0.72);
    border: 1px solid rgba(110, 72, 28, 0.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
/* bubble tail pointing to avatar */
.pirate-bubble__body::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 24px;
    width: 16px;
    height: 16px;
    background: rgba(255, 252, 242, 0.72);
    border-left: 1px solid rgba(110, 72, 28, 0.4);
    border-bottom: 1px solid rgba(110, 72, 28, 0.4);
    transform: rotate(45deg);
}
.pirate-bubble__body p {
    color: #4a3422;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
}
.pirate-bubble__sign {
    display: block;
    margin-top: 6px;
    text-align: right;
    font-family: 'Pirata One', 'Orbitron', sans-serif;
    font-size: 1.05rem;
    color: #6b3410;
}

/* ── Route / escales ── */
.pirate-route {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 14px;
    max-width: 560px;
    margin: 1.8rem auto 0;
}
.pirate-stop {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 6px;
    border-radius: 20px;
    background: rgba(255, 250, 235, 0.55);
    border: 1px solid rgba(110, 72, 28, 0.35);
    font-size: 0.82rem;
    font-weight: 600;
    color: #5a3d20;
}
.pirate-stop b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6b3410;
    color: #f3e3c3;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
}

/* mystery stops — to be discovered in-game */
.pirate-stop--hidden {
    padding: 5px;
    background: transparent;
    border-style: dashed;
    border-color: rgba(110, 72, 28, 0.5);
}
.pirate-stop--hidden b {
    background: transparent;
    color: #8a531c;
    border: 1px dashed rgba(110, 72, 28, 0.6);
}

.pirate-meta {
    position: relative;
    margin-top: 1.3rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a531c;
}

@media (max-width: 480px) {
    .pirate-bubble { flex-direction: column; align-items: stretch; }
    .pirate-bubble__body::before { display: none; }
}

/* ========== ENQUETE 1900 (case file) ========== */
#enquete-1900 {
    min-height: auto;
}

.dossier-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(28px, 4vw, 52px);
    border-radius: 3px;
    color: #2c2a28;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 250, 0.5), transparent 55%),
        linear-gradient(135deg, #ece8db 0%, #e1dccd 50%, #d4ccb8 100%);
    background-color: #e6e1d2;
    border: 1px solid rgba(70, 64, 55, 0.45);
    box-shadow:
        inset 0 0 70px rgba(80, 72, 55, 0.22),
        inset 0 0 0 1px rgba(255, 255, 250, 0.4),
        0 18px 50px rgba(0, 0, 0, 0.55);
}

/* thin double frame, like an official file */
.dossier-card::before {
    content: '';
    position: absolute;
    inset: 11px;
    border: 1px solid rgba(70, 64, 55, 0.3);
    box-shadow: inset 0 0 0 3px rgba(70, 64, 55, 0.12);
    border-radius: 2px;
    pointer-events: none;
}

/* "En construction" ink stamp */
.dossier-stamp {
    position: absolute;
    top: 26px;
    right: -34px;
    z-index: 2;
    transform: rotate(8deg);
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a322c;
    padding: 5px 42px;
    border: 2.5px solid rgba(138, 50, 44, 0.7);
    border-radius: 3px;
    opacity: 0.82;
    box-shadow: 0 0 0 1px rgba(138, 50, 44, 0.25);
}

.dossier-fingerprint {
    position: absolute;
    left: -18px;
    bottom: -18px;
    width: 140px;
    height: 140px;
    color: rgba(70, 64, 55, 0.13);
    pointer-events: none;
}
.dossier-fingerprint svg { width: 100%; height: 100%; }

.dossier-eyebrow {
    position: relative;
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8a322c;
    margin-bottom: 0.6rem;
}

.dossier-title {
    position: relative;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-weight: 400;
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    line-height: 1.05;
    letter-spacing: 0.5px;
    text-transform: none;
    color: #26242a;
    text-shadow: 0 1px 0 rgba(255, 255, 250, 0.5);
    margin-bottom: 1.1rem;
}

.dossier-lead {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    color: #3a3632;
    font-size: 0.98rem;
    line-height: 1.7;
}
.dossier-lead strong { color: #8a322c; }

/* dialogue bubble — same anatomy as pirate, ink palette */
.dossier-bubble {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    max-width: 560px;
    margin: 1.8rem auto 0;
}

.dossier-bubble__avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a3632;
    background: radial-gradient(circle at 35% 30%, #faf8f0, #d8d2c2);
    border: 2px solid #6b6358;
    box-shadow: 0 4px 12px rgba(40, 36, 30, 0.28);
}
.dossier-bubble__avatar svg { width: 40px; height: 40px; }

.dossier-bubble__body {
    position: relative;
    flex: 1;
    padding: 14px 18px;
    border-radius: 4px;
    background: rgba(252, 250, 244, 0.78);
    border: 1px solid rgba(70, 64, 55, 0.4);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.dossier-bubble__body::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 24px;
    width: 16px;
    height: 16px;
    background: rgba(252, 250, 244, 0.78);
    border-left: 1px solid rgba(70, 64, 55, 0.4);
    border-bottom: 1px solid rgba(70, 64, 55, 0.4);
    transform: rotate(45deg);
}
.dossier-bubble__body p {
    color: #3a3632;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
}
.dossier-bubble__sign {
    display: block;
    margin-top: 6px;
    text-align: right;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.95rem;
    color: #8a322c;
}

/* theme tags */
.dossier-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    max-width: 560px;
    margin: 1.6rem auto 0;
}
.dossier-tags span {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 0.74rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4a443c;
    padding: 4px 12px;
    border: 1px solid rgba(70, 64, 55, 0.4);
    border-radius: 2px;
    background: rgba(255, 255, 250, 0.4);
}

.dossier-meta {
    position: relative;
    margin-top: 1.3rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a322c;
}

@media (max-width: 480px) {
    .dossier-bubble { flex-direction: column; align-items: stretch; }
    .dossier-bubble__body::before { display: none; }
    .dossier-stamp { right: -28px; font-size: 0.7rem; padding: 4px 36px; }
}

/* ========== FOOTER ========== */
.street-footer {
    text-align: center;
    padding: 3rem 0 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.street-footer a {
    color: var(--text-muted);
    margin: 0 0.8rem;
}

.street-footer a:hover {
    color: var(--orange);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.4rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 50%;
    color: var(--text-muted);
    border: 1px solid currentColor;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover {
    color: var(--orange);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========== CITY SVG FILL OVERRIDES ========== */
.city-far svg > path { fill: var(--city-far-fill); }
.city-mid svg > path { fill: var(--city-mid-fill); }
.city-mid svg > polygon { fill: var(--city-mid-roof); }
.city-near svg > path { fill: var(--city-near-fill); }

/* Structural details & floor lines (non-window rects) */
.city-far svg > rect:not(.win-o):not(.win-b):not(.win-d) { fill: var(--city-far-detail); }
.city-mid svg > rect:not(.win-o):not(.win-b):not(.win-d) { fill: var(--city-mid-detail); }
.city-near svg > rect:not(.win-o):not(.win-b):not(.win-d) { fill: var(--city-near-detail); }

/* Dark windows */
.win-d { fill: var(--city-win-dark); }

/* ========== SITE NAV ========== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 12px 24px;
    background: rgba(6, 6, 16, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232, 120, 42, 0.1);
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav-logo img {
    border-radius: 6px;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    flex: 1;
}

.nav-links a {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange);
}

[data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.6);
    border-bottom-color: rgba(232, 120, 42, 0.15);
}

/* ========== THEME TOGGLE (slider) ========== */
.theme-toggle {
    /* Required: .theme-toggle-knob is absolutely positioned inside it.
       Without this, its containing block is .site-nav (position: fixed)
       and the knob lands on top of the logo. */
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 32px;
    border-radius: 16px;
    border: 1px solid rgba(232, 120, 42, 0.3);
    background: rgba(6, 6, 16, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 4px;
    transition: background 0.4s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--orange);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Icons: both always visible, active one brighter */
.theme-toggle { color: #f5e6c8; }
.theme-icon-sun { opacity: 0.4; }
.theme-icon-moon { opacity: 1; margin-left: auto; }

/* Sliding knob */
.theme-toggle-knob {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 2px 8px rgba(232, 120, 42, 0.4);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Dark mode: knob on the right (moon side) */
    left: 35px;
}

/* Light mode */
[data-theme="light"] .theme-toggle { color: #2a2a40; }
[data-theme="light"] .theme-toggle-knob { left: 3px; }
[data-theme="light"] .theme-icon-sun { opacity: 1; }
[data-theme="light"] .theme-icon-moon { opacity: 0.4; }

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(232, 120, 42, 0.3);
}

[data-theme="light"] .theme-toggle:hover {
    border-color: var(--orange);
}

/* ========== BURGER (mobile only) ========== */
.nav-burger {
    display: none;
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--light);
    cursor: pointer;
}

.nav-burger span {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 27px; }

.nav-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ========== THEME TRANSITIONS ========== */
body,
.sky,
.haze-mid,
.haze-near,
.ground-glow,
.site-nav,
.concept-card,
.feature-item,
.cta-badge {
    transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

h1, h2, h3, p, .tagline, .street-footer, .street-footer a, .door-subtitle {
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

/* ========== VILLES ========== */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.city-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.4rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--feature-border);
    background: var(--feature-bg);
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.city-card:hover {
    transform: translateY(-3px);
    background: var(--feature-bg-hover);
    border-color: var(--orange);
}
.city-card--next { border-style: dashed; }

.city-card__status {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.city-card--active .city-card__status { color: var(--orange); }

.city-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
}
.city-card p { font-size: 0.9rem; }

.city-card__more {
    margin-top: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--orange);
}

/* ========== CRÉATEUR ========== */
.creator-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--orange);
    background: var(--feature-bg);
    border: 2px solid var(--orange);
    box-shadow: 0 0 24px var(--card-shadow-accent);
}

.creator-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
    margin: 1.2rem 0;
}
.creator-intro .creator-avatar { flex-shrink: 0; }
.creator-intro p { margin: 0; }

@media (max-width: 600px) {
    .creator-intro { flex-direction: column; text-align: center; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    :root {
        --street-inset: 12vw;
    }
}

@media (max-width: 768px) {
    :root {
        --street-inset: 0px;
    }

    .city-layer, .haze-mid, .haze-near, .ground-glow, .game-trail {
        display: none;
    }

    /* Fix: backdrop-filter + position:fixed causes flickering on mobile Chrome.
       City layers are hidden anyway, so blur has no visual effect — use solid bg instead. */
    .site-nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(6, 6, 16, 0.92);
        transform: translateZ(0);
    }

    [data-theme="light"] .site-nav {
        background: rgba(255, 255, 255, 0.92);
    }

    .theme-toggle {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    /* Nav: the 6 links overflowed the bar and pushed the theme toggle
       off-screen (body has overflow-x: hidden, so it was unreachable).
       They collapse into a panel opened by the burger instead. */
    .site-nav {
        gap: 0.75rem;
        padding: 10px 16px;
    }

    .nav-logo {
        margin-right: auto;
    }

    .nav-burger {
        display: block;
    }

    /* 64x32 visually, but a 44px tall hit area */
    .theme-toggle::after {
        content: '';
        position: absolute;
        inset: -6px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 4px 16px 12px;
        background: #060610;
        border-bottom: 1px solid rgba(232, 120, 42, 0.15);
    }

    [data-theme="light"] .nav-links {
        background: #ffffff;
        border-bottom-color: rgba(232, 120, 42, 0.2);
    }

    .nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        padding: 14px 4px;
        font-size: 0.8rem;
        border-bottom: 1px solid rgba(232, 120, 42, 0.08);
    }

    .nav-links a:last-child {
        border-bottom: 0;
    }

    .street {
        margin: 0;
        padding: 0 24px;
    }

    .street-section {
        padding: 60px 0;
    }

    .feature-item {
        opacity: 1;
        transform: none;
    }

    /* Mobile: subtle side gradient to hint at buildings */
    body::before,
    body::after {
        content: '';
        position: fixed;
        top: 0;
        width: 50px;
        height: 100vh;
        z-index: 5;
        pointer-events: none;
    }

    body::before {
        left: 0;
        background: linear-gradient(90deg, var(--mobile-side) 0%, transparent 100%);
    }

    body::after {
        right: 0;
        background: linear-gradient(-90deg, var(--mobile-side) 0%, transparent 100%);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.2rem;
    }
}
