/* =========================================
   PAGE SPÉCIFIQUE : SIDE PROJECTS
   ========================================= */

.page-header {
    padding: 12rem 5% 4rem;
    text-align: center;
    background-color: var(--bg-black);
}

/* Nouvelles classes exclusives pour isoler des conflits */
.side-section {
    padding: 0 !important; 
    overflow: hidden;
    position: relative;
}

.bg-dark { background-color: var(--bg-black); }
.bg-pink { background-color: var(--accent-pink); }

/* =========================================
   SYSTÈME DE SPLIT INTERACTIF (PLEIN ÉCRAN)
   ========================================= */
.split-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    max-width: 100% !important; 
    width: 100%;
    align-items: stretch;       
    gap: 0;                     
    height: 100vh; 
    will-change: grid-template-columns; 
}

.split-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 8% 8rem 10vw; 
}

.split-text .section-title { 
    text-align: left; 
    margin-bottom: 2rem; 
    line-height: 1.1; 
    transform: none !important; 
}

/* Configuration des lignes de titre cinétiques */
.split-text .section-title span {
    display: inline-block;
    will-change: transform, opacity;
    opacity: 0; 
}

/* ÉTAT INITIAL DU TEXTE (Masqué en bas) */
.split-text p { 
    font-size: 1.2rem; 
    line-height: 1.8; 
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.215, 0.610, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.610, 0.355, 1);
}

/* ÉTAT INITIAL DES BOUTONS (Masqués et réduits) */
.split-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: flex-start; 
    flex-wrap: wrap;             
}

.btn-custom {
    font-family: var(--font-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 0.6rem 1.5rem;
    border-radius: 50px; 
    border: 2px solid transparent;
    display: inline-block;
    cursor: pointer;
    opacity: 0;
    transform: translateY(15px) scale(0.8);
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* COULEURS DES BOUTONS SELON LE FOND (Isolées) */
/* COULEURS DES BOUTONS SELON LE FOND (Isolées) */
.bg-dark .btn-custom { border-color: var(--accent-pink); color: var(--accent-pink); }
.bg-pink .btn-custom { border-color: #000000; color: #000000; }

/* =========================================
   ORCHESTRATION DU REVEAL (DÉCLENCHÉ PAR JS)
   ========================================= */
.split-container.reveal-active .split-text p {
    opacity: 1;
    transform: translateY(0);
}

.split-container.reveal-active .btn-custom {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.split-container.reveal-active .btn-custom:nth-child(1) { transition-delay: 0.35s; }
.split-container.reveal-active .btn-custom:nth-child(2) { transition-delay: 0.50s; }
.split-container.reveal-active .btn-custom:nth-child(3) { transition-delay: 0.65s; }

/* Rétablissement des transitions fluides ET Aberration Chromatique au survol */
.split-container.reveal-active .btn-custom:hover {
    transition: all 0.3s ease;
    /* On combine ton scale(1.03) original avec notre soulèvement translateY(-3px) */
    transform: scale(1.03) translateY(-3px); 
    box-shadow: -4px 0px 0px rgba(255, 0, 0, 0.8), 4px 0px 0px rgba(0, 255, 255, 0.8);
}

/* Changement de couleurs au survol selon le fond du parent */
.bg-dark .split-container.reveal-active .btn-custom:hover { 
    background-color: var(--accent-pink); 
    color: #000000; 
    border-color: var(--accent-pink);
}

.bg-pink .split-container.reveal-active .btn-custom:hover { 
    background-color: #000000; 
    color: var(--accent-pink); 
    border-color: #000000;
}
/* =========================================
   HIÉRARCHIE DES TITRES (SIDE-PROJECTS)
   ========================================= */
/* On transforme le bloc titre en colonne flexible */
.split-text .section-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* On désactive le saut de ligne HTML qui bloquait l'espacement */
.split-text .section-title br {
    display: none;
}

/* On coupe l'espace transparent sous la police manuscrite */
.split-text .section-title .line-1 {
    line-height: 0.8; 
}

/* Le style du sous-titre */
.split-text .section-title .line-2 {
    font-family: var(--font-main); 
    font-weight: 700; 
    font-size: 2rem; 
    letter-spacing: 1px; 
    text-transform: uppercase; 
    
    /* MAINTENANT LE RÉGLAGE FONCTIONNE ! 
       Plus le chiffre négatif est grand (-10px, -20px...), plus le texte remonte */
    margin-top: 5px; 
}
/* =========================================
   GESTION DE L'IMAGE
   ========================================= */
.split-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.split-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* =========================================
   RESPONSIVE (Mobiles)
   ========================================= */
@media (max-width: 768px) {
    .split-container { grid-template-columns: 1fr !important; height: auto; }
    .split-text { padding: 4rem 5%; }
    .split-text .section-title { text-align: center; }
    .split-buttons { justify-content: center; }
    .split-image { height: 40vh; }
    
    .split-text p, .btn-custom { opacity: 1 !important; transform: none !important; transition: none !important; }
    .split-text .section-title span { opacity: 1 !important; transform: none !important; }
}
/* =========================================
   RESPONSIVE GLOBAL (Mobiles & Tablettes Portrait)
   ========================================= */
@media (max-width: 900px) {
    
    /* 1. TYPOGRAPHIE ET PADDINGS */
    .title { font-size: 2.2rem !important; margin-bottom: 1rem; }
    .section-title { font-size: 2rem !important; margin-bottom: 2rem; }
    .hero-section .description { font-size: 1rem; }
    .portfolio-section, .about-section, .contact-section { padding: 4rem 5%; }
    .about-container { gap: 2rem; }

    /* 2. MENU NAVIGATION (Adaptation pour ne pas déborder) */
    .navbar { flex-direction: column; padding: 1rem; gap: 1rem; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
    .nav-links li { gap: 0.5rem; }
    .nav-links li:not(:last-child)::after { display: none; }
    .nav-links a:not(.btn-outline) { font-size: 0.85rem; }
    .nav-links a.btn-outline { padding: 0.4rem 1rem; font-size: 0.85rem; }

    /* 3. DÉSACTIVATION DES KINÉTICS HORIZONTAUX (Le secret anti-bug) */
    /* Le mot-clé !important force le navigateur à ignorer les ordres du JavaScript */
    .hero-split-left, .hero-split-right { transform: none !important; }
    .section-title, .section-title .line-1, .section-title .line-2 { 
        transform: none !important; 
        opacity: 1 !important; 
    }

    /* 4. SIDE-PROJECTS (Casser la grille 50/50 pour empiler verticalement) */
    .split-container { grid-template-columns: 1fr !important; height: auto !important; }
    .split-text { padding: 3rem 5% !important; text-align: center; }
    .split-text .section-title { text-align: center; margin-bottom: 1rem; }
    .split-buttons { justify-content: center !important; margin-top: 2rem; }
    .split-image { height: 40vh; order: -1; } /* Passe l'image AU-DESSUS du texte */
    
    /* On s'assure que les textes cachés s'affichent correctement */
    .split-container.reveal-active .split-text p,
    .split-container.reveal-active .btn-custom { 
        opacity: 1 !important; transform: none !important; transition: none !important; 
    }

    /* 5. SERVICES (Casser la porte coulissante) */
    .services-split { grid-template-columns: 1fr !important; height: auto !important; }
    .services-image { height: 40vh; }
    .services-content { overflow: visible; padding: 3rem 5%; }
    .services-inner { width: 100%; height: auto; padding: 0; }
    .services-inner .section-title { text-align: center; }
    .service-title { font-size: 1.8rem; padding: 1rem 0; }
    .service-text p { max-width: 100%; font-size: 1rem; }

    /* 6. PORTFOLIO */
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
    .filter-btn { padding: 0.4rem 1rem; font-size: 0.8rem; }

    /* 7. FOOTER */
    .social-icon-link { width: 35px; height: 35px; }
    .footer-follow { font-size: 1.5rem; }
