:root {
    --bg:          #0b1628;
    --blue:        rgba(60, 130, 255, 0.14);
    --blue-hover:  rgba(60, 130, 255, 0.35);
    --blue-line:   rgba(60, 130, 255, 0.14);
    --accent:      rgba(120, 180, 255, 0.9);
    --text:        #eef4ff;
    --text-dim:    rgba(214, 228, 255, 0.78);
    --text-muted:  rgba(190, 212, 255, 0.55);

    --s1:          rgba(110, 175, 255, 0.9);
    --s1-bg:       rgba(60, 130, 255, 0.10);
    --s1-border:   rgba(60, 130, 255, 0.35);

    --s2:          rgba(110, 210, 170, 0.9);
    --s2-bg:       rgba(60, 180, 130, 0.10);
    --s2-border:   rgba(60, 180, 130, 0.32);

    --s3:          rgba(180, 140, 255, 0.9);
    --s3-bg:       rgba(130, 80, 255, 0.10);
    --s3-border:   rgba(130, 80, 255, 0.32);
}

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

body {
    margin: 0;
    padding-top: 72px;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
}

/* ==========================================================
   ARRIÈRE-PLAN
   ========================================================== */
#bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(60, 130, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(60, 130, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.bg-glow {
    position: absolute;
    top: 40%;
    left: 50%;
    width: 800px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(30, 100, 255, 0.08) 0%, transparent 65%);
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

.page {
    position: relative;
    z-index: 10;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
    padding: 80px 52px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-eyebrow {
    margin-bottom: 20px;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(140, 190, 255, 0.75);
}

.hero-title {
    margin: 0 0 16px;
    font-family: 'Instrument Serif', serif;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text);
}

.hero-title em {
    font-style: italic;
    color: rgba(120, 175, 255, 0.85);
}

.hero-title::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    margin-top: 16px;
    background: rgba(120, 175, 255, 0.5);
}

/* ==========================================================
   SECTION
   ========================================================== */
.section {
    padding: 60px 52px 100px;
    border-top: 1px solid var(--blue-line);
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    margin: 0 0 32px;
    font-family: 'Instrument Serif', serif;
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: var(--text);
}

.section-title::after {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    margin-top: 12px;
    background: rgba(120, 175, 255, 0.5);
}

/* ==========================================================
   ONGLETS
   ========================================================== */
.stage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.stage-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 32px;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.stage-tab::before,
.stage-tab::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1.5px solid transparent;
    transition: border-color 0.2s;
}

.stage-tab::before { top: 0;    left: 0;   border-right: none;  border-bottom: none; }
.stage-tab::after  { bottom: 0; right: 0;  border-left: none;   border-top: none; }

.stage-tab.s1::before, .stage-tab.s1::after { border-color: rgba(100, 165, 255, 0.4); }
.stage-tab.s2::before, .stage-tab.s2::after { border-color: rgba(100, 200, 160, 0.4); }
.stage-tab.s3::before, .stage-tab.s3::after { border-color: rgba(168, 127, 255, 0.4); }

.stage-tab.active.s1,
.stage-tab.s1:hover { background: var(--s1-bg); }
.stage-tab.active.s2,
.stage-tab.s2:hover { background: var(--s2-bg); }
.stage-tab.active.s3,
.stage-tab.s3:hover { background: var(--s3-bg); }

.stage-tab.active.s1::before, .stage-tab.active.s1::after,
.stage-tab.s1:hover::before,  .stage-tab.s1:hover::after  { border-color: rgba(110, 175, 255, 0.95); }
.stage-tab.active.s2::before, .stage-tab.active.s2::after,
.stage-tab.s2:hover::before,  .stage-tab.s2:hover::after  { border-color: rgba(110, 210, 170, 0.95); }
.stage-tab.active.s3::before, .stage-tab.active.s3::after,
.stage-tab.s3:hover::before,  .stage-tab.s3:hover::after  { border-color: rgba(180, 140, 255, 0.95); }

.tab-num {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
}

.s1 .tab-num { background: rgba(60, 130, 255, 0.16); color: var(--s1); border: 1px solid var(--s1-border); }
.s2 .tab-num { background: rgba(60, 180, 130, 0.14); color: var(--s2); border: 1px solid var(--s2-border); }
.s3 .tab-num { background: rgba(130, 80, 255, 0.14); color: var(--s3); border: 1px solid var(--s3-border); }

.tab-date {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(220, 232, 255, 0.85);
}

/* ==========================================================
   PANELS
   ========================================================== */
.stage-panel        { display: none; }
.stage-panel.active { display: block; }

/* ── Panel header (badges éventuels) ── */
.panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--blue);
}

.s1-panel .panel-header { border-color: var(--s1-border); }
.s2-panel .panel-header { border-color: var(--s2-border); }
.s3-panel .panel-header { border-color: var(--s3-border); }

.panel-title {
    font-family: 'Instrument Serif', serif;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.3px;
    color: var(--text);
}

.panel-title span {
    margin-left: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: var(--text-muted);
}

.panel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid;
}

.badge-s1 { color: rgba(130, 185, 255, 0.95); border-color: rgba(60, 130, 255, 0.35); background: rgba(60, 130, 255, 0.08); }
.badge-s2 { color: rgba(130, 215, 180, 0.95); border-color: rgba(60, 180, 130, 0.35); background: rgba(60, 180, 130, 0.08); }
.badge-s3 { color: rgba(190, 150, 255, 0.95); border-color: rgba(130, 80, 255, 0.35); background: rgba(130, 80, 255, 0.08); }

/* ==========================================================
   CARTES D'INFORMATION
   ========================================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    position: relative;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--blue);
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--blue-hover);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    padding-right: 70px; /* laisse la place au logo pour ne pas chevaucher le texte */
    border-bottom: 1px solid var(--blue-line);
}

.card-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent);
}

.card-logo {
    position: absolute;
    top: 14px;
    right: 14px;
    width: auto;
    max-height: 56px;
    max-width: 100px;
    object-fit: contain;
    object-position: top right;
}

.card p {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 350;
    line-height: 1.8;
    color: var(--text-dim);
}

.card p:last-child {
    margin-bottom: 0;
}

.card p strong {
    font-weight: 600;
    color: rgba(225, 235, 255, 0.95);
}

/* ==========================================================
   STATISTIQUES
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat {
    padding: 28px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--blue);
    transition: border-color 0.2s, transform 0.2s;
}

.stat:hover {
    border-color: var(--blue-hover);
    transform: translateY(-3px);
}

.stat-number {
    margin-bottom: 10px;
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    font-weight: 400;
    line-height: 1;
}

.s1-panel .stat-number { color: var(--s1); }
.s2-panel .stat-number { color: var(--s2); }
.s3-panel .stat-number { color: var(--s3); }

.stat-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(210, 226, 255, 0.7);
}

/* ==========================================================
   TIMELINE
   ========================================================== */
.tl-block {
    padding: 28px 0;
}

.block-label {
    margin-bottom: 32px;
    padding-bottom: 10px;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    color: var(--accent);
    border-bottom: 1px solid var(--blue-line);
}

.tl-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
}

.tl-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, rgba(110, 175, 255, 0.45), transparent);
}

.s2-panel .tl-wrap::before { background: linear-gradient(to bottom, rgba(110, 210, 170, 0.45), transparent); }
.s3-panel .tl-wrap::before { background: linear-gradient(to bottom, rgba(180, 140, 255, 0.45), transparent); }

.tl-item {
    position: relative;
    width: 45%;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--blue);
    transition: border-color 0.2s;
}

.tl-item:hover      { border-color: var(--blue-hover); }
.tl-item:last-child { margin-bottom: 0; }

.tl-item:nth-child(odd)  { align-self: flex-end; }
.tl-item:nth-child(even) { align-self: flex-start; }

.tl-item::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background: rgba(110, 175, 255, 0.6);
    border: 1px solid rgba(110, 175, 255, 0.5);
    transform: translateY(-50%) rotate(45deg);
}

.tl-item:nth-child(odd)::before  { left: calc(-5% - 4px);  transform: translateX(-100%) translateY(-50%) rotate(45deg); }
.tl-item:nth-child(even)::before { right: calc(-5% - 4px); transform: translateX(100%)  translateY(-50%) rotate(45deg); }

.s2-panel .tl-item::before { background: rgba(110, 210, 170, 0.6); border-color: rgba(110, 210, 170, 0.5); }
.s3-panel .tl-item::before { background: rgba(180, 140, 255, 0.6); border-color: rgba(180, 140, 255, 0.5); }

.tl-date {
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(210, 226, 255, 0.7);
}

.tl-title {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: rgba(225, 235, 255, 0.95);
}

.tl-desc {
    font-size: 13px;
    font-weight: 350;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ==========================================================
   COMING SOON
   ========================================================== */
.coming {
    padding: 60px 24px;
    text-align: center;
    border: 1px dashed var(--blue);
}

.coming i {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    color: rgba(160, 195, 255, 0.6);
}

.coming p {
    font-size: 14px;
    color: var(--text-dim);
}

/* ==========================================================
   FADE-IN (CSS pur — ne dépend d'aucun script)
   ========================================================== */
.fade-in {
    animation: fadeInUp 0.7s ease both;
}

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

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
    .hero,
    .section {
        padding-left: 24px;
        padding-right: 24px;
    }

    .card-header {
        padding-right: 0;
        flex-wrap: wrap;
    }

    .card-logo {
        position: static;
        margin-top: 8px;
        max-height: 48px;
    }

    .tl-wrap::before {
        left: 12px;
    }

    .tl-item {
        width: calc(100% - 32px);
        margin-left: 32px;
        align-self: unset !important;
    }

    .tl-item::before {
        left: -24px !important;
        right: auto !important;
        transform: translateY(-50%) rotate(45deg) !important;
    }
}