/* ==========================================================================
   Reset et styles de base
   ========================================================================== */
   body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Container principal
   ========================================================================== */
.split-homepage {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: #1a1a1a;
}

/* Header avec logo et titre
   ========================================================================== */
.logo-container {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    pointer-events: auto;
}

.logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.subtitle {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.about-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    display: inline-block;
}

/* Sections splittées (gauche et droite)
   ========================================================================== */
.split-section {
    position: absolute;
    top: 0;
    height: 100vh;
    width: 50%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Positionnement des sections */
.split-left {
    left: 0;
    z-index: 1;
}

.split-right {
    right: 0;
    z-index: 1;
}

/* Effet hover sur les sections */
.split-section:hover {
    width: 65%;
    z-index: 2;
}

.split-left:hover + .split-right {
    width: 35%;
}

/* Vidéo d'arrière-plan
   ========================================================================== */
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.background-video video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1.1);
    object-fit: cover;
}

/* Overlay sur la vidéo
   ========================================================================== */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: #000;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translate(-50%, -50%) scale(1.1);
}

.split-section:hover .overlay {
    opacity: 0.2;
}

/* Contenu des sections (titres)
   ========================================================================== */
.content {
    position: absolute;
    bottom: 8rem;
    z-index: 3;
    color: var(--text-color, #ffffff);
}

.split-left .content {
    left: 3rem;
}

.split-right .content {
    right: 3rem;
    text-align: right;
}

.content h3 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.content h2 {
    font-size: 3rem;
    font-family: serif;
    margin: 0;
    /* Nouveaux styles pour les titres */
    font-weight: 600;
    text-transform: none;
    color: #264c8d;
    background: #f8df00;
    padding: 0.2em 0.8em;
    border-radius: 250px;
    display: inline-block;
    line-height: 1.2;
    box-sizing: border-box;
}

/* Texte défilant (marquee)
   ========================================================================== */
.marquee-container {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 3;
    overflow: hidden;
}

.split-section:hover .marquee-container {
    opacity: 1;
    visibility: visible;
}

.marquee {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee linear infinite;
    color: var(--text-color, #ffffff);
}

.marquee-item {
    display: inline-block;
    padding: 0 1rem;
}

.separator {
    opacity: 0.5;
    padding: 0 0.5rem;
}

/* Animation du marquee */
@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Cursor Text */
.cursor-text {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    width: 200px;    /* Augmenté pour le cercle plus grand */
    height: 200px;
}

.cursor-text svg {
    width: 100%;
    height: 100%;
    animation: rotate 8s linear infinite;
}

.cursor-text text {
    fill: white;
    font-size: 14px;    /* Revenu à une taille plus petite */
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Version Mobile (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .split-homepage {
        height: 100vh;
        overflow-y: hidden;
    }

    .split-section {
        position: relative;
        width: 100% !important;
        height: 50vh;
        transition: none;
    }

    .split-section:hover {
        width: 100% !important;
    }

    .split-left {
        position: absolute;
        top: 0;
    }

    .split-right {
        position: absolute;
        top: 50vh;
    }

    /* Désactivation des vidéos sur mobile */
    .background-video video {
        display: none !important;
    }
    
    /* Utilisation des thumbnails comme arrière-plan */
    .background-video {
        background-size: cover;
        background-position: center;
    }
    
    .split-left .background-video {
        background-image: var(--mobile-thumbnail-left);
    }
    
    .split-right .background-video {
        background-image: var(--mobile-thumbnail-right);
    }

    /* Forcer le centrage et l'ordre des éléments */
    .split-homepage .split-section .content {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        padding: 1.5rem;
        text-align: center !important;
        box-sizing: border-box;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .split-homepage .split-left .content {
        bottom: 2rem !important;
    }

    .split-homepage .split-right .content {
        top: 2rem !important;
        bottom: auto !important;
    }

    /* Réorganisation des titres et marquee */
    .split-homepage .content h2,
    .split-homepage .content h3 {
        text-align: center !important;
        width: 100% !important;
    }

    /* Ordre spécifique pour la section professionnels */
    .split-homepage .split-left .content h2 {
        order: 2 !important;
        margin-bottom: 0 !important;
        margin-top: 0.5rem !important;
    }

    .split-homepage .split-left .content h3 {
        order: 1 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Ordre spécifique pour la section particuliers */
    .split-homepage .split-right .content h2 {
        order: 1 !important;
        margin-bottom: 0.5rem !important;
    }

    .split-homepage .split-right .content h3 {
        order: 2 !important;
        margin-top: 0 !important;
    }

    /* Spécifique à la section particuliers sur mobile */
    .split-homepage .split-right .marquee-container {
        top: 0.5rem !important;
        bottom: auto !important;
    }

    /* Animation inversée pour mobile */
    @keyframes marquee-mobile {
        0% { transform: translate(-100%, 0); }
        100% { transform: translate(0, 0); }
    }

    .split-homepage .split-right .marquee {
        animation-name: marquee-mobile !important;
    }

    .logo-container {
        top: 1rem;
        width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .logo {
        width: 100px;
    }

    .about-btn {
        margin-top: 0.5rem;
        padding: 0.6rem 1rem !important;
        font-size: 0.8rem !important;
        transform: scale(0.9) !important;
    }

    .cursor-text {
        display: none;
    }

    .marquee-container {
        bottom: 1rem;
        font-size: 0.8rem;
        opacity: 1;
        visibility: visible;
    }

    .split-right .marquee-container {
        top: auto;
        bottom: 1rem;
    }

    .background-video video {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    .split-left:hover + .split-right {
        width: 100% !important;
    }

    /* Désactivation des effets hover */
    .split-section:hover .overlay {
        opacity: 0.7;
    }

    .marquee-container {
        opacity: 1;
        visibility: visible;
    }
}