/* ==========================================================================
   Variables & Reset (Adapté à la charte graphique BTRC)
   ========================================================================== */
:root {
    --bg-dark: #08080a;     /* Asphalte très profond */
    --bg-light: #121216;    /* Bitume clair */
    --text-main: #f0f0f0;   /* Blanc cassé */
    --text-muted: #888894;  /* Gris métal */
    
    /* Nouvelles couleurs tirées du logo BTRC */
    --accent: #4988c5;           /* Bleu vintage BTRC */
    --accent-secondary: #e6e0cc; /* Crème/Beige Léopard BTRC */
    
    --glass-bg: rgba(18, 18, 22, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --font-heading: 'Syncopate', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

/* ==========================================================================
   Utilitaires (Antigravity & Glassmorphism)
   ========================================================================== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-effect:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(73, 136, 197, 0.15); /* Reflet bleu BTRC */
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px clamp(15px, 4vw, 50px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(8, 8, 10, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 12px clamp(15px, 4vw, 50px);
    border-bottom: 1px solid var(--glass-border);
}

.logo-link {
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo-img {
    height: clamp(38px, 6vw, 55px);
    width: auto;
    filter: drop-shadow(0px 0px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

/* Menu de navigation desktop */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu-header {
    display: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: clamp(15px, 2.5vw, 35px);
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.15vw, 2px);
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.main-nav ul a:hover {
    color: var(--accent-secondary);
}

.main-nav ul a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.main-nav ul a:hover::after {
    width: 100%;
}

/* Bouton Burger Mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(73, 136, 197, 0.15);
    border: 1px solid rgba(73, 136, 197, 0.4);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1005;
    flex-shrink: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-toggle:hover {
    background: rgba(73, 136, 197, 0.3);
    border-color: var(--accent);
}

.nav-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease, background-color 0.3s;
    flex-shrink: 0;
}

/* Animation Burger -> Croix */
.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--accent);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--accent);
}

/* Overlay sombre pour mobile */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1002;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Image de fond en mode "Ken Burns" (zoom infini ultra lent) */
.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: -2;
    animation: zoomBg 25s infinite alternate ease-in-out;
}

.video-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Dégradé sombre pour laisser le fond visible mais faire ressortir le texte */
    background: radial-gradient(circle, rgba(8,8,10,0.3) 0%, rgba(8,8,10,0.85) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    perspective: 1000px;
    padding: 0 20px;
    max-width: 100%;
}

/* Titre stylisé comme dans le logo (Italique, large, fluide) */
.floating-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 13vw, 8rem);
    font-weight: 700;
    font-style: italic; /* Match avec la typographie du logo */
    letter-spacing: clamp(4px, 2vw, 12px);
    margin-bottom: 15px;
    text-transform: uppercase;
    animation: float 6s ease-in-out infinite;
    text-shadow: 0 20px 40px rgba(0,0,0,0.9);
    background: linear-gradient(180deg, #ffffff 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transform-style: preserve-3d;
    max-width: 100%;
    word-break: break-word;
}

.subtitle {
    font-size: clamp(0.85rem, 2.8vw, 1.2rem);
    letter-spacing: clamp(2px, 1.2vw, 6px);
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    max-width: 90vw;
    margin: 0 auto;
}

/* Indicateur de scroll (souris qui scrolle) */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

.mouse {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    margin-top: 10px;
    position: relative;
    transition: border-color 0.3s ease;
}

.scroll-indicator:hover .mouse {
    border-color: var(--accent-secondary);
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: scrollWheel 2s infinite;
}

/* ==========================================================================
   Roadbook Section (Timeline Asymétrique)
   ========================================================================== */
.roadbook-section {
    padding: 120px 5vw;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: clamp(40px, 8vw, 100px);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 0.6vw, 4px);
    word-break: break-word;
    padding: 0 10px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* La ligne d'asphalte centrale (avec le bleu vintage) */
.timeline::after {
    content: '';
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, rgba(73,136,197,0) 0%, rgba(73,136,197,0.5) 15%, rgba(73,136,197,0.5) 85%, rgba(73,136,197,0) 100%);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: 0;
}

.timeline-item {
    padding: 20px 50px;
    position: relative;
    width: 50%;
    margin-bottom: 40px;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

/* Le point sur la timeline */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    right: -6px;
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(73, 136, 197, 0.8);
    transition: all 0.4s ease;
}

.timeline-item.right::after {
    left: -6px;
}

.timeline-item:hover::after {
    background: var(--accent);
    box-shadow: 0 0 20px rgba(73, 136, 197, 1);
}

.timeline-content {
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    color: var(--accent-secondary);
}

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

/* Année géante en background (Parallaxe visuelle) */
.timeline-content .date {
    position: absolute;
    top: -20px;
    right: 10px;
    font-size: 5rem;
    font-weight: 700;
    font-style: italic;
    color: rgba(255, 255, 255, 0.03);
    font-family: var(--font-heading);
    pointer-events: none;
    z-index: 0;
}

.timeline-item.left .date {
    left: 10px;
    right: auto;
}

/* ==========================================================================
   Join Section (Formulaire)
   ========================================================================== */
.join-section {
    padding: clamp(50px, 8vw, 100px) 4vw clamp(60px, 10vw, 150px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.join-container {
    width: 100%;
    max-width: 550px;
    padding: clamp(25px, 5vw, 60px);
    text-align: center;
}

.join-container p {
    color: var(--text-muted);
    margin-bottom: clamp(25px, 4vw, 50px);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.minimal-form {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.4s ease;
}

.input-group label {
    position: absolute;
    top: 10px;
    left: 0;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: none;
    font-size: 0.9rem;
}

/* Flottaison du label à la frappe */
.input-group input:focus,
.input-group input:not(:placeholder-shown) {
    border-bottom-color: var(--accent);
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -22px;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-levitate {
    background: var(--accent-secondary);
    color: var(--bg-dark);
    border: none;
    padding: 16px clamp(20px, 4vw, 32px);
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 100%;
}

.btn-levitate:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(73, 136, 197, 0.3);
    background: var(--accent);
    color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    text-align: center;
    padding: clamp(25px, 4vw, 40px) 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(8, 8, 10, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   Keyframes & Animations
   ========================================================================== */
@keyframes zoomBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

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

@keyframes scrollWheel {
    0% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 15px); }
}

.fade-in {
    animation: fadeIn 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

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

/* ==========================================================================
   Responsive Multi-écrans (Mobile, Tablette, Desktop)
   ========================================================================== */

/* Écrans Tablettes et Mobiles (<= 1040px) */
@media screen and (max-width: 1040px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(340px, 85vw);
        height: 100vh;
        height: 100dvh;
        background: rgba(12, 12, 16, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-left: 1px solid var(--glass-border);
        padding: 25px 25px 40px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1004;
        box-shadow: -15px 0 40px rgba(0, 0, 0, 0.8);
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-brand-mobile {
        font-family: var(--font-heading);
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: 3px;
        color: var(--accent);
    }

    .nav-close {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        color: #ffffff;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        line-height: 1;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .nav-close:hover {
        background: rgba(220, 53, 69, 0.25);
        border-color: #dc3545;
        color: #dc3545;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .main-nav ul li {
        width: 100%;
    }

    .main-nav a {
        display: flex;
        align-items: center;
        padding: 14px 10px;
        width: 100%;
        font-size: 0.95rem;
        letter-spacing: 2px;
        border-radius: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: background 0.2s, padding-left 0.2s;
    }

    .main-nav a:hover,
    .main-nav a:active {
        background: rgba(255, 255, 255, 0.06);
        padding-left: 16px;
    }

    .main-nav ul a::after {
        display: none;
    }

    /* Timeline pour tablettes */
    .timeline::after { left: 31px; }
    
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 20px; }
    .timeline-item.right { left: 0; }
    
    .timeline-item.left::after, 
    .timeline-item.right::after { 
        left: 25px; 
        top: 40px; 
        transform: none; 
    }
    
    .timeline-item.left .date,
    .timeline-item.right .date {
        left: auto;
        right: 15px;
        font-size: 3.5rem;
    }
}

/* Écrans Mobiles Standards (<= 768px) */
@media screen and (max-width: 768px) {
    /* Ajustement des paddings généraux de page pour libérer de l'espace */
    main {
        padding-top: 100px !important;
        padding-bottom: 50px !important;
    }

    .roadbook-section {
        padding: 80px 4vw;
    }

    .timeline-item {
        padding-left: 55px;
        padding-right: 10px;
        margin-bottom: 25px;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item.left::after, 
    .timeline-item.right::after {
        left: 14px;
        width: 12px;
        height: 12px;
    }

    .timeline-content {
        padding: 25px 20px;
    }

    .scroll-indicator {
        bottom: 20px;
    }
}

/* Petits Écrans Mobiles (<= 480px) */
@media screen and (max-width: 480px) {
    .main-nav {
        padding: 12px 16px;
    }

    .hero-content {
        padding: 0 10px;
    }

    .floating-text {
        font-size: 2.8rem;
        letter-spacing: 3px;
    }

    .subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .timeline-item {
        padding-left: 45px;
        padding-right: 0;
    }

    .timeline::after {
        left: 15px;
    }

    .timeline-item.left::after, 
    .timeline-item.right::after {
        left: 9px;
    }

    .join-container {
        padding: 25px 15px;
        border-radius: 12px;
    }

    .btn-levitate {
        width: 100%;
        padding: 14px 20px;
    }
}
