/* Bloquer le scroll horizontal sur toute la page */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    max-width: 100vw;
    position: relative;
}

/* Empêcher les éléments pinnés de déborder */
.pin-spacer {
    max-width: 100% !important;
    width: 100% !important;
}

.container {
    @media screen and (max-width: 1280px) {
        max-width: 80rem;
    }
}

/* Contenir les éléments scrollTranslate pour éviter le débordement horizontal */
.scrollTranslate {
    will-change: transform;
    contain: layout;
}

.writing-mode-vertical-alt {
    writing-mode: sideways-lr;
    text-orientation: mixed;
}

/* Le parent des scrollTranslate doit clipper le débordement */
footer, .title-section {
    overflow-x: clip;
}

.linear-gradient-black {
    background: linear-gradient(270deg, rgba(0, 0, 0, 0.00) 0%, #000 100%);
}

.chrono-timer {
    position: absolute;
    font-family: 'Preon', sans-serif;
    color: white;
    font-size: 40px;
    letter-spacing: 3px;
    top: -6rem;

    @media screen and (max-width: 1024px) {
        top: -3rem;
        left: 50%;
        transform: translateX(-50%);
    }
}

.custom-bullet-list {
    ul {
        padding-left: 1rem;

        li {
            position: relative;
            padding-left: 1rem;

            &::before {
                content: "•";
                position: absolute;
                left: 0;
                top: 50%;
                transform: translateY(-50%);
            }
        }
    }
}
.custom-text-link {
    a {
        color: var(--color-green-deep);
    }
}

/* Swiper */
.cards-slider {
    .swiper-nav-button.swiper-button-disabled {
        background-color: white !important;
        opacity: 0.4 !important;
        border: 1px solid black;
    }
}

.otgs-development-site-front-end {
    display: none!important;
}

/* ======== WPML LANGUAGE SWITCHER (custom Mak2com style) ======== */
.wpml-ls-legacy-dropdown {
    width: fit-content;

    > ul {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Conteneur principal */
.wpml-ls-slot-shortcode_actions {
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    z-index: 50;
}

/* Bouton actif (langue actuelle) */
.wpml-ls-item-toggle {
    display: flex !important;
    align-items: center;
    gap: 0rem !important;
    padding: 8px 10px !important;
    padding-right: 15px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 9999px;
    color: #fff !important;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Lexend Deca', sans-serif;

    @media screen and (max-width: 1024px) {
        font-size: 12px;
    }
}

/* Effet hover sur le bouton */
.wpml-ls-item-toggle:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: translateY(-1px);
}

/* Supprimer le petit triangle noir ajouté par WPML */
.wpml-ls-item-toggle::after {
    display: none !important;
}

/* Ajout des deux points décoratifs avant le texte */
.wpml-ls-item-toggle::before {
    content: "••";
    font-size: 1rem;
    letter-spacing: 2px;
    color: #fff;
    opacity: 0.9;
    margin-right: 4px;
    transition: all 0.3s ease-in-out;
    transform: rotate(90deg);
}

/* Correction du texte */
.wpml-ls-item-toggle span.wpml-ls-native {
    color: #fff !important;
    font-weight: 500;
}

/* === Sous-menu déroulant === */
.wpml-ls-sub-menu {
    position: absolute;
    top: calc(100% + 1px) !important;
    left: 0;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    min-width: auto;
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-top: none !important;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    min-height: 0;
    font-family: 'Lexend Deca', sans-serif;

    @media screen and (max-width: 1024px) {
        top: 0 !important;
        left: calc(100% + 1rem) !important;
        display: flex;
        flex-direction: row;
        width: fit-content;
    }
}

.wpml-ls-sub-menu .wpml-ls-item {
    border: none !important;
    width: 100% !important;
    text-align: center !important;
    font-family: 'Lexend Deca', sans-serif;
}

/* Affichage au survol */
.wpml-ls-item.wpml-ls-current-language:hover > .wpml-ls-sub-menu {
    max-height: 200px;
    height: fit-content;
    opacity: 1;
}
.wpml-ls-item.wpml-ls-current-language:hover .wpml-ls-item-toggle::before {
    transform: rotate(0deg);
}

/* Items du sous-menu */
.wpml-ls-sub-menu .wpml-ls-item a {
    display: block;
    padding: 10px 16px;
    color: #fff !important;
    text-decoration: none;
    font-size: 0.9rem;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    border: none !important;
    width: 100%;

    @media screen and (max-width: 1024px) {
        font-size: 12px;
    }
}

/* Hover vert fluo */
.wpml-ls-sub-menu .wpml-ls-item a:hover {
    background: #c7ff00;
    color: #000 !important;
}

/* Retirer flèches et espacements WPML */
.wpml-ls-legacy-dropdown a::after {
    display: none !important;
}
.wpml-ls-legacy-dropdown .wpml-ls-sub-menu::before {
    display: none !important;
}

/* Form */
.nf-form-cont {
    .nf-form-wrap {
        .nf-response-msg {
            font-family: var(--font-lexend-deca);
            font-size: 16px;
            line-height: 18px;
            color: var(--color-white) !important;
        }
        .nf-form-layout {
            .nf-before-form-content {
                .nf-form-fields-required {
                    display: none;
                }
            }

            .nf-form-content {
                nf-fields-wrap {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    justify-content: space-between;

                    nf-field {
                        width: 48%;

                        @media screen and (max-width: 1024px) {
                            width: 100%;
                        }

                        .nf-field-label {
                            display: none;
                        }

                        .listradio-container {
                            .nf-field {
                                .nf-field-element {
                                    ul {
                                        display: flex;
                                        flex-direction: row;
                                        justify-content: space-between;
                                        align-items: center;

                                        @media screen and (max-width: 1024px) {
                                            flex-direction: column;
                                        }

                                        li {
                                            font-family: 'Lexend Deca', sans-serif;
                                            color: white;
                                            font-size: 1rem;
                                        }
                                    }
                                    ul[aria-describedby="nf-error-9"] li,
                                    ul[aria-describedby="nf-error-18"] li,
                                    ul[aria-describedby="nf-error-27"] li {
                                        display: flex;
                                        align-items: center;
                                        gap: 0.5rem;
                                    }

                                    ul[aria-describedby="nf-error-9"] input[type="radio"],
                                    ul[aria-describedby="nf-error-18"] input[type="radio"],
                                    ul[aria-describedby="nf-error-27"] input[type="radio"] {
                                        display: none;
                                    }

                                    ul[aria-describedby="nf-error-9"] label,
                                    ul[aria-describedby="nf-error-18"] label,
                                    ul[aria-describedby="nf-error-27"] label {
                                        position: relative;
                                        cursor: pointer;
                                        color: #9ca3af;
                                        font-weight: 500;
                                        font-size: 1.125rem;
                                        padding-left: 1.5rem;
                                        transition: color 0.2s ease;
                                        margin-left: 0;
                                    }

                                    ul[aria-describedby="nf-error-9"] label::before,
                                    ul[aria-describedby="nf-error-18"] label::before,
                                    ul[aria-describedby="nf-error-27"] label::before {
                                        content: "";
                                        position: absolute;
                                        left: 0;
                                        top: 50%;
                                        transform: translateY(-50%);
                                        width: 0.75rem;
                                        height: 0.75rem;
                                        border-radius: 50%;
                                        background: #555;
                                        transition: background 0.2s ease;
                                    }

                                    ul[aria-describedby="nf-error-9"] input[type="radio"]:checked + label,
                                    ul[aria-describedby="nf-error-18"] input[type="radio"]:checked + label,
                                    ul[aria-describedby="nf-error-27"] input[type="radio"]:checked + label {
                                        color: #c7ff00;
                                    }

                                    ul[aria-describedby="nf-error-9"] input[type="radio"]:checked + label::before,
                                    ul[aria-describedby="nf-error-18"] input[type="radio"]:checked + label::before,
                                    ul[aria-describedby="nf-error-27"] input[type="radio"]:checked + label::before {
                                        background: #c7ff00;
                                    }
                                }
                            }
                        }

                        .nf-field {
                            .nf-field-element {
                                input, textarea {
                                    border: 1px solid white;
                                    border-radius: 15px;
                                    font-size: 18px;
                                    font-weight: 200;
                                    padding: 8px 10px;
                                    color: var(--color-white);
                                    font-family: var(--font-lexend-deca);
                                    transition: all 0.2s ease;

                                    &:focus {
                                        border-color: var(--color-green-flash);
                                    }
                                }
                                input[type="submit"] {
                                    background-color: var(--color-green-flash);
                                    color: var(--color-black);
                                    border: 1px solid var(--color-green-flash);
                                    border-radius: 14px;
                                    padding: 14px 20px;
                                    font-family: var(--font-lexend-deca);
                                    font-size: 18px;
                                    transition: all 0.3s ease;
                                    cursor: pointer;

                                    @media screen and (max-width: 1024px) {
                                        width: 100%;
                                    }

                                    &:hover,
                                    &:focus {
                                        background-color: var(--color-black);
                                        color: var(--color-green-flash);
                                    }
                                }
                            }
                        }

                        .checkbox-container {
                            .nf-field {
                                display: flex;
                                flex-direction: row-reverse;
                                align-items: flex-start;
                                gap: 1rem;
                            }

                            .nf-field-label {
                                order: 2;
                                display: block !important;
                                flex: 1;

                                label {
                                    display: block !important;
                                    color: var(--color-white);
                                    font-family: var(--font-lexend-deca);
                                    font-size: 16px;
                                    line-height: 24px;
                                    cursor: pointer;

                                    .nf-help {
                                        margin-left: 0.5rem;
                                        color: var(--color-white);
                                        opacity: 0.7;
                                        transition: opacity 0.2s ease;
                                        background-color: white;
                                        border: 1px solid white;
                                        border-radius: 50px;
                                        width: 17px;
                                        height: 17px;

                                        &:hover {
                                            opacity: 1;
                                        }
                                    }
                                }
                            }

                            .nf-field-element {
                                order: 1;
                                position: relative;
                                width: 44px;
                                height: 24px;
                                flex-shrink: 0;
                                margin-top: 0;
                                cursor: pointer;

                                input[type="checkbox"] {
                                    opacity: 0;
                                    width: 44px;
                                    height: 24px;
                                    position: absolute;
                                    left: 0;
                                    top: 0;
                                    margin: 0;
                                    cursor: pointer;
                                    z-index: 2;
                                }

                                &::before {
                                    content: "";
                                    position: absolute;
                                    left: 0;
                                    top: 0;
                                    width: 44px;
                                    height: 24px;
                                    background-color: #4a4a4a;
                                    border-radius: 24px;
                                    transition: background-color 0.3s ease;
                                    pointer-events: none;
                                    z-index: 1;
                                }

                                &::after {
                                    content: "";
                                    position: absolute;
                                    left: 3px;
                                    top: 3px;
                                    width: 18px;
                                    height: 18px;
                                    background-color: white;
                                    border-radius: 50%;
                                    transition: transform 0.3s ease;
                                    pointer-events: none;
                                    z-index: 1;
                                }
                            }

                            .nf-field-element:has(input[type="checkbox"]:checked)::before {
                                background-color: #DDF240;
                            }

                            .nf-field-element:has(input[type="checkbox"]:checked)::after {
                                transform: translateX(20px);
                            }
                        }

                        .nf-after-field {
                            .nf-error-msg {
                                font-family: var(--font-lexend-deca);
                            }
                        }
                    }
                    nf-field:nth-child(0n+1) {
                        width: 100%;
                    }
                    nf-field:nth-child(0n+7) {
                        width: 100%;
                    }
                }

                .capjs-widget-container {
                    cap-widget {
                        margin-top: 0 !important;
                        margin-bottom: 0 !important;
                    }
                }
            }
        }
    }
}

/* Legal pages */
.legal-page {
    .legal-content {
        h1, h2, h3, h4, h5, h6 {
            font-family: var(--font-lexend-deca);
            font-weight: 700;
            text-decoration: none;
            color: var(--color-black);
        }
        h1 {
            font-size: var(--text-2xl);
            margin-bottom: 2rem;
        }
        h2 {
            font-size: var(--text-xl);
            margin-bottom: 2rem;

            @media screen and (max-width: 1024px) {
                font-size: var(--text-lg);
            }
        }
        h3 {
            font-size: var(--text-lg);
            margin-bottom: 2rem;

            @media screen and (max-width: 1024px) {
                font-size: var(--text-md);
            }
        }
        h4 {
            font-size: var(--text-md);
            margin-bottom: 2rem;
        }
        h5 {
            font-size: var(--text-sm);
            margin-bottom: 2rem;
        }
        h6 {
            font-size: var(--text-xs);
            margin-bottom: 2rem;
        }
        p, li {
            font-family: var(--font-lexend-deca);
            font-size: var(--text-sm);
            font-weight: 400;
            text-decoration: none;
            margin: 1rem 0;
            color: var(--color-black);
        }
        a {
            font-family: var(--font-lexend-deca);
            font-size: var(--text-sm);
            font-weight: 500;
            text-decoration: none;
            color: var(--color-green-deep);
            text-decoration: underline;
        }
    }
}

/* ======== COURSES CAROUSEL (ride_cards section) ======== */
/* Styles de base des cartes (non active) */
/*.course-card .card-date-bg {*/
/*    background-color: var(--card-color, #4a4b2f);*/
/*}*/

/*.course-card .card-date-text,*/
/*.course-card .card-title,*/
/*.course-card .card-label,*/
/*.course-card .card-value {*/
/*    color: #DDF240;*/
/*}*/

/*.course-card .card-underline {*/
/*    background-color: #DDF240;*/
/*}*/

/*.course-card .card-cta {*/
/*    background-color: #DDF240;*/
/*}*/

/*.course-card .card-cta-text {*/
/*    color: var(--card-color, #4a4b2f);*/
/*}*/

/*.course-card .card-arrow {*/
/*    background-color: transparent;*/
/*}*/

/*.course-card .card-arrow-path {*/
/*    color: #DDF240;*/
/*}*/

/* Styles pour la carte active */
.course-card.is-active {
    background-color: #DDF240 !important;
}

.course-card.is-active .card-date-bg {
    background-color: #DDF240 !important;
}

.course-card.is-active .card-date-text,
.course-card.is-active .card-title,
.course-card.is-active .card-label,
.course-card.is-active .card-value {
    color: #000000;
}

.course-card.is-active .card-underline {
    background-color: #000000;
}

.course-card.is-active .card-cta {
    background-color: #000000 !important;
}

.course-card.is-active .card-cta-text {
    color: #DDF240 !important;
}

.course-card.is-active .card-arrow-path {
    color: #000000;
}

.green-flash-button {
    display: block;
    width: fit-content;
    font-family: var(--font-lexend-deca) !important;
    background-color: var(--color-green-flash) !important;
    border: 1px solid var(--color-green-flash) !important;
    border-radius: 50px;
    color: var(--color-black) !important;
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 1rem;
}

.green-flash-button:hover {
    background-color: transparent !important;
    color: var(--color-green-flash) !important;
}

.arrow-inner-grey:hover,
.arrow-inner-grey:focus {
    background-color: var(--color-green-flash) !important;
    color: var(--color-black) !important;
    border-color: var(--color-green-flash) !important;

    span.flex {
        background-color: rgba(0,0,0,0.2) !important;
    }
}

/* ======== EXP SECTION - ScrollTrigger pin-spacer ======== */
/* Fond noir pour le pin-spacer des sections exp-section */
.pin-spacer:has(.exp-section) {
    background-color: #000000 !important;
}

.exp-section {
    background-color: #000000 !important;
}

/* Trait vertical gris - s'étend sur toute la hauteur du pin-spacer */
.exp-section .left-opacity-border {
    position: absolute !important;
    top: 0 !important;
    height: 100vh !important;
    bottom: auto !important;
}

/* ======== ANIMATED TEXT GRADIENT ======== */
/* Animation de texte optimisée pour SEO, accessibilité et performances */
.animated-text-gradient {
    --gradient-progress: 0%;
    background: linear-gradient(
            to bottom,
            currentColor var(--gradient-progress),
            rgba(255, 255, 255, 0.3) var(--gradient-progress)
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 100% 200%;
    /* Force GPU acceleration pour de meilleures performances sur mobile */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: auto;
}

/* Réinitialiser les propriétés du gradient pour les boutons enfants */
.animated-text-gradient a,
.animated-text-gradient a *,
.animated-text-gradient button,
.animated-text-gradient button * {
    -webkit-text-fill-color: inherit;
    text-fill-color: inherit;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    background: none;
}

/* Version avec bords arrondis (effet de vague) */
.animated-text-gradient-rounded {
    --gradient-progress: 0%;
    background: radial-gradient(
            ellipse 100% 100% at var(--gradient-progress) 50%,
            currentColor 0%,
            currentColor 30%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.3) 70%,
            rgba(255, 255, 255, 0.3) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Version avec effet de vague plus prononcé */
.animated-text-gradient-wave {
    --gradient-progress: 0%;
    background: radial-gradient(
            circle at var(--gradient-progress) 50%,
            currentColor 0%,
            currentColor 20%,
            rgba(255, 255, 255, 0.6) 40%,
            rgba(255, 255, 255, 0.3) 60%,
            rgba(255, 255, 255, 0.3) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Version avec transition douce et bordure floue */
.animated-text-gradient-soft {
    --gradient-progress: 0%;
    background: linear-gradient(
            90deg,
            currentColor 0%,
            currentColor calc(var(--gradient-progress) - 15%),
            rgba(255, 255, 255, 0.7) calc(var(--gradient-progress) - 5%),
            rgba(255, 255, 255, 0.5) var(--gradient-progress),
            rgba(255, 255, 255, 0.3) calc(var(--gradient-progress) + 5%),
            rgba(255, 255, 255, 0.3) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer Mobile Styles */
.footer-mobile .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-mobile .footer-menu-list li {
    margin-bottom: 0.75rem;
}

.footer-mobile .footer-menu-list li:last-child {
    margin-bottom: 0;
}

.footer-mobile .footer-menu-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-mobile .footer-menu-list a:hover {
    color: #DDF240;
}

.footer-mobile .accordion-body {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

@media screen and (min-width: 1024px) {
    .gpx-map-3d-container {
        min-height: 600px;
    }
}

/* ======== SOCIAL ICONS HOVER ANIMATION ======== */
/* Animation au survol des icônes de réseaux sociaux dans le header */
.social-icon-link {
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 4px 8px rgba(221, 242, 64, 0.4));
}

.social-icon-link:active {
    transform: translateY(-2px);
}

.gpx-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.gpx-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.gpx-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a4a4a;
    transition: .3s;
    border-radius: 24px;
}
.gpx-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.gpx-toggle-switch input:checked + .gpx-toggle-slider {
    background-color: #DDF240;
}
.gpx-toggle-switch input:checked + .gpx-toggle-slider:before {
    transform: translateX(20px);
}

/* ======== CARDS FLIP GRID ======== */
/* Grille de cartes avec animation flip 3D au survol */

.cards-flip-grid .grid {
    display: grid;
}

.flip-card-wrapper {
    perspective: 1000px;
    width: 100%;
    max-width: 100%;
}

.flip-card {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 4;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
}

.flip-card-front {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.flip-card-back {
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flip-card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.flip-card-title {
    margin-bottom: 1rem;
}

.flip-card-text {
    flex: 1;
    overflow-y: auto;

    &::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
        background-color: #F5F5F5;
    }

    &::-webkit-scrollbar {
        width: 10px;
        background-color: #F5F5F5;
    }

    &::-webkit-scrollbar-thumb {
        background-color: #000000;
        border: 2px solid #555555;
    }
}

.flip-card-link {
    margin-top: auto;
    text-decoration: none;
}

.flip-card-link:hover {
    opacity: 0.7;
}

.flip-card-name {
    margin-top: 1rem;
    text-align: center;
}

/* Responsive adjustments */
@media screen and (max-width: 640px) {
    .flip-card {
        aspect-ratio: 3 / 4.5;
    }

    .flip-card-back {
        padding: 1.5rem;
    }
}