/* =========================================================================
   LANDING.CSS - Youth Climate Reality & Solutions Map 2026
   DESIGN HERO SPLIT ULTRA-OPTIMISÉ - SANS LOGO
   - Desktop : slider à gauche, tout le texte à droite
   - Mobile : slider entre sous-titre et description
   - Animation des slides : FADE (opacité) 5s
   ========================================================================= */

/* =========================================================================
   RESET
   ========================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    background-color: #183b25;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

/* =========================================================================
   FOND VIDÉO
   ========================================================================= */

.landing-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
}

/* =========================================================================
   OVERLAY
   ========================================================================= */

.landing-overlay {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(8, 35, 20, 0.42) 0%,
            rgba(8, 35, 20, 0.52) 45%,
            rgba(5, 24, 14, 0.68) 100%
        );
}

/* =========================================================================
   CONTENEUR PRINCIPAL
   ========================================================================= */

.landing-container {
    position: relative;
    z-index: 5;
    width: min(94%, 1100px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* =========================================================================
   AFFICHAGE CONDITIONNEL (desktop / mobile)
   ========================================================================= */

.desktop-only { display: block; }
.mobile-only { display: none; }

/* =========================================================================
   HERO WRAPPER - DISPOSITION EN LIGNE (Desktop/Tablette large)
   ========================================================================= */

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 1050px;
    margin: 6px auto 0;
}

/* Colonne gauche : Slider */
.slider-col {
    flex: 0 0 42%;
    max-width: 460px;
}

/* Colonne droite : Tous les textes (badges, titres, description, etc.) */
.text-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
}

/* =========================================================================
   BADGES (premier élément de la colonne texte)
   ========================================================================= */

.badges {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.badge-odd  { background: rgba(45, 125, 65, 0.65); }
.badge-youth { background: rgba(20, 100, 65, 0.65); }
.badge-africa { background: rgba(170, 105, 35, 0.65); }

/* =========================================================================
   TITRE / SOUS-TITRE - INTERLIGNES AUGMENTÉES
   ========================================================================= */

.title-section {
    width: 100%;
    max-width: 100%;
    margin-bottom: 2px;
}

.main-title {
    margin: 0 0 6px 0;
    font-size: clamp(22px, 3.6vw, 38px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.subtitle {
    margin: 0 0 4px 0;
    font-size: clamp(14px, 1.6vw, 19px);
    font-weight: 600;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* =========================================================================
   DESCRIPTION - INTERLIGNES AUGMENTÉES
   ========================================================================= */

.text-col .description {
    max-width: 100%;
    margin: 4px 0 2px 0;
    font-size: clamp(14px, 1.3vw, 16px);
    font-weight: 500;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

/* =========================================================================
   SÉLECTEUR DE LANGUE
   ========================================================================= */

.text-col .lang-section {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
}

.text-col .lang-label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.detected-badge {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
}

.lang-cards {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-card {
    position: relative;
    min-width: 120px;
    flex: 1 1 120px;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lang-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lang-card-content {
    min-height: 44px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.lang-card:hover { transform: translateY(-2px); }
.lang-card:hover .lang-card-content { background: rgba(255, 255, 255, 0.17); }

.lang-card.selected .lang-card-content {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15), 0 6px 20px rgba(0, 0, 0, 0.15);
}

.lang-flag-img {
    width: 36px;
    height: 24px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.lang-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

/* =========================================================================
   CTA
   ========================================================================= */

.text-col .cta-section {
    width: 100%;
    margin-top: 4px;
    display: flex;
    justify-content: flex-start;
}

.cta-button {
    min-width: 220px;
    min-height: 48px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

.cta-button:active { transform: translateY(-1px); }
.cta-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

.cta-text { line-height: 1.2; }
.cta-arrow {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.25s ease;
}
.cta-button:hover .cta-arrow { transform: translateX(4px); }

/* =========================================================================
   SLIDER (dans sa colonne gauche) - DESIGN FADE
   ========================================================================= */

.slider-col .hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    aspect-ratio: 1 / 1;
    margin: 0;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-slide.active {
    opacity: 1;
    position: relative;
}

.slider-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.slider-dots {
    position: absolute;
    left: 0;
    bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    z-index: 10;
}

.slider-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.slider-dot:hover { transform: scale(1.2); }
.slider-dot.active {
    width: 18px;
    border-radius: 999px;
    background: #ffffff;
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer-section {
    width: 100%;
    max-width: 760px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.footer-section p {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}

/* =========================================================================
   ICÔNES FLOTTANTES
   ========================================================================= */

.floating-icons {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.float-icon {
    position: absolute;
    width: 28px;
    height: 28px;
    opacity: 0.12;
    animation: floatingIcon 5s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.float-leaf::before,
.float-leaf2::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 26px;
    left: 5px;
    top: 1px;
    border-radius: 100% 0 100% 0;
    background: rgba(255, 255, 255, 0.8);
    transform: rotate(-35deg);
}

.float-globe {
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 50%;
}
.float-globe::before {
    content: '';
    position: absolute;
    left: 6px; right: 6px; top: -2px; bottom: -2px;
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}
.float-globe::after {
    content: '';
    position: absolute;
    left: 2px; right: 2px; top: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.7);
}

.float-drop::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 26px;
    left: 4px;
    top: 1px;
    border-radius: 70% 30% 70% 30%;
    background: rgba(255, 255, 255, 0.75);
    transform: rotate(45deg);
}

.float-sun {
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}
.float-sun::before,
.float-sun::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

.float-recycle::before {
    content: '♻';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes floatingIcon {
    0%, 100% { margin-top: 0; }
    50% { margin-top: -10px; }
}

/* =========================================================================
   RESPONSIVE - TABLETTE ET PETIT BUREAU (≤ 992px)
   Passage en colonne : le slider passe au-dessus du texte
   ========================================================================= */

@media (max-width: 992px) {
    .landing-container {
        padding: 16px 15px 22px;
    }

    .hero-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 4px;
    }

    .slider-col {
        flex: 0 0 auto;
        max-width: 480px;
        width: 100%;
    }

    .slider-col .hero-slider {
        max-width: 480px;
        margin: 0 auto;
    }

    .text-col {
        align-items: center;
        text-align: center;
        gap: 10px;
        width: 100%;
        max-width: 600px;
    }

    .text-col .badges { justify-content: center; }
    .text-col .description { text-align: center; }
    .text-col .lang-cards { justify-content: center; }
    .text-col .cta-section { justify-content: center; }

    /* Sur tablette, on garde le même comportement : pas de logo */
    .desktop-only { display: block; }
    .mobile-only { display: none; }
}

/* =========================================================================
   RESPONSIVE - MOBILE (≤ 520px)
   ========================================================================= */

@media (max-width: 520px) {
    .landing-container {
        padding: 14px 12px 20px;
    }

    /* --- AFFICHAGE CONDITIONNEL --- */
    .desktop-only { display: none; }
    .mobile-only { display: block; }

    .hero-wrapper {
        flex-direction: column;
        gap: 8px;
        margin-top: 2px;
    }

    /* --- SLIDER mobile : entre sous-titre et description --- */
    .slider-col {
        max-width: 75%;
        width: 75%;
        margin: 4px auto;
    }

    .slider-col .hero-slider {
        max-width: 100%;
        border-radius: 14px;
    }

    /* --- BADGES --- */
    .badges {
        justify-content: center;
        gap: 5px;
        margin-bottom: 2px;
    }
    .badge {
        font-size: 9px;
        padding: 4px 10px;
        min-height: 22px;
    }

    /* --- TITRES --- */
    .main-title {
        font-size: 26px;
        margin-bottom: 4px;
        line-height: 1.2;
    }
    .subtitle {
        font-size: 17px;
        line-height: 1.4;
        margin-bottom: 2px;
    }

    /* --- DESCRIPTION --- */
    .text-col .description {
        font-size: 15px;
        line-height: 1.6;
        margin: 4px 0 2px 0;
        text-align: center;
    }

    /* --- LANGUE --- */
    .text-col .lang-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .detected-badge {
        display: block;
        margin-top: 2px;
        margin-left: 0;
        font-size: 11px;
    }

    .lang-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .lang-card { min-width: 0; }
    .lang-card-content {
        min-height: 46px;
        padding: 6px 4px;
        flex-direction: column;
        gap: 4px;
    }
    .lang-flag-img {
        width: 34px;
        height: 22px;
    }
    .lang-name {
        font-size: 11px;
    }

    /* --- CTA --- */
    .text-col .cta-section {
        justify-content: center;
        margin-top: 2px;
    }
    .cta-button {
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding: 12px 18px;
        font-size: 15px;
    }

    /* --- FOOTER --- */
    .footer-section { margin-top: 18px; padding-top: 12px; }
    .footer-section p { font-size: 10px; }

    .floating-icons { display: none; }
}

/* =========================================================================
   TRÈS PETITS ÉCRANS (≤ 360px)
   ========================================================================= */

@media (max-width: 360px) {
    .landing-container { padding-left: 8px; padding-right: 8px; }
    .main-title { font-size: 22px; }
    .subtitle { font-size: 15px; }
    .slider-col { max-width: 80%; }
    .lang-name { font-size: 10px; }
    .cta-button { font-size: 14px; min-height: 46px; }
}

/* =========================================================================
   ACCESSIBILITÉ
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}