/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color-scheme: dark;
}

body {
    min-height: 100vh;
    background: #0b1020;
    color: #eef2ff;
}

body.is-intro-running { overflow: hidden; }

/* Hide mainContent but keep it in layout so opacity animations work */
body.is-intro-running #mainContent {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ===== INTRO ===== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: radial-gradient(1200px 800px at 50% 40%, rgba(40,40,60,.35), rgba(0,0,0,1));
}

.intro-copy{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate3d(-50%, -50%, 0);
    z-index: 3;
    text-align: center;
    padding: 24px;
    max-width: min(980px, 92vw);
    width: min(980px, 92vw);
    margin-inline: auto;
    will-change: transform, opacity;
}

/* Gate */
.intro-gate {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.gate-card {
    width: min(560px, 92vw);
    border-radius: 18px;
    padding: 22px 20px;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.14);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
    text-align: center;
}

.gate-title { font-weight: 850; font-size: 22px; letter-spacing: .02em; }
.gate-sub { margin-top: 8px; opacity: .85; font-size: 15px; line-height: 1.35; }

.gate-btn {
    margin-top: 16px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.10);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
}
.gate-btn:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.gate-btn:active { transform: translateY(0); }

.gate-btn {
    position: relative;
}
.gate-btn::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.18);
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 250ms ease;
}
.gate-btn:hover::after {
    opacity: 1;
}

/* Video layer */
.intro-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
    z-index: 10000;
}
.intro-video.is-leaving { opacity: 0; pointer-events: none; }

.yt-host {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Skip button */
.intro-skip {
    position: absolute;
    right: 16px;
    top: 16px;
    z-index: 2;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(0,0,0,.40);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.acronym {
    font-weight: 950;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: clamp(42px, 9vw, 110px);
    text-shadow: 0 18px 60px rgba(0,0,0,.55), 0 0 26px rgba(255,255,255,.10);
    visibility: hidden; /* prevent pre-animation flash */
}

.sentence {
    margin-top: 16px;
    font-size: clamp(18px, 2.4vw, 28px);
    line-height: 1.35;
    opacity: .95;
}

.intro.docked{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 86px; /* barre en haut */
    z-index: 9999;
    background: #0b1020;
    border-bottom: 1px solid rgba(255,255,255,.10);
    pointer-events: none; /* optionnel: empêche d'intercepter les clics */
}

/* ===== MAIN COUNTDOWN ===== */
.wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.timer {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.box {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 18px 20px;
    min-width: 140px;
}

.num {
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.lab {
    margin-top: 6px;
    opacity: .8;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .12em;
}

.target {
    margin-top: 18px;
    opacity: .70;
    font-size: 14px;
}

/* ===== Intro Gate Redesign ===== */
.gate-card {
    /* override for a sleeker glass card */
    padding: 36px 28px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20,22,38,.72), rgba(8,10,22,.72));
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 20px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
}

.gate-title {
    font-weight: 900;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: .01em;
    margin-bottom: 20px;
    opacity: .98;
}

/* Play button — circular, minimal, accessible */
.gate-btn--play {
    display: inline-grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    position: relative;
    background: radial-gradient(120% 120% at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,.10) 40%, rgba(255,255,255,.06) 60%, rgba(255,255,255,.02));
    box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08);
    transition: transform .18s ease, box-shadow .3s ease, background .3s ease;
}

/* Triangle icon */
.gate-btn--play::before {
    content: "";
    margin-left: 3px;            /* optical centering */
    width: 0;
    height: 0;
    border-left: 18px solid #fff;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    filter: drop-shadow(0 0 6px rgba(255,255,255,.35));
}

/* Custom ring (override the generic .gate-btn::after) */
.gate-btn--play::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 220ms ease, transform 220ms ease;
}

.gate-btn--play:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 36px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.12);
}

.gate-btn--play:hover::after {
    opacity: 1;
    transform: scale(1);
}

.gate-btn--play:active {
    transform: translateY(0) scale(0.99);
}

.gate-btn--play:focus-visible {
    outline: 2px solid rgba(255,255,255,.6);
    outline-offset: 3px;
}