/* ===========================================
   KOALA STUDIO - Style Sobre & Élégant
   Fond blanc avec vignettage
   =========================================== */

@import 'separator.css';
@import 'popup.css';
@import 'domain_details.css';
@import 'splash.css';

/* Variables CSS */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #666666;
    --accent-color: #000000;
    --bg-white: #ffffff;
    --bg-light: #f8f8f8;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e5e5e5;
    --shadow-soft: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 5px 40px rgba(0, 0, 0, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
/*    overflow-y: scroll; /* Force la barre de défilement verticale pour éviter le décalage du menu */
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 150px; /* Increased buffer */
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.5; /* Global line-height set to 1.5 */
    overflow-x: hidden;
    position: relative; /* Nécessaire pour positionner les pseudo-éléments */
}

body::before {
    content: '';
    position: fixed; /* Fixed pour rester visible même au scroll */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* En arrière-plan de tout */
    pointer-events: none; /* Ne doit pas bloquer les interactions */
    background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.06) 1px, transparent 0); /* Opacité baissée de 5% */
    background-size: 4px 4px; /* Espacement des points 4x4px */
}

/* Couleurs complémentaires KOALA - UNIFIÉES 2026 */
:root {
    --koala-turquoise: #41B8A1;
    --koala-blue: #41B8A1; /* Unifié */
    --koala-red: #41B8A1;  /* Unifié */
    --koala-gold: #41B8A1; /* Unifié */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Remove glitch effect - keep class for compatibility */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    display: none;
}

/* Utility: Screen Reader Only (SEO & Accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================================
   NAVIGATION
   =========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 60px; /* Padding vertical rétabli */
    display: none; /* Hidden by default */
    justify-content: flex-start; /* Align items to start */
    align-items: center;
    gap: 40px; /* Standard gap between items */
    z-index: 9999; /* Increased Z-Index for visibility */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

body.splash-active .navbar {
    display: none !important; /* Ensure navbar is hidden when splashscreen is active */
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 55px; /* Rétabli la hauteur du logo */
    width: auto;
    transition: all 0.3s ease;
    opacity: 0.9; /* Opacité réduite de 10% */
}

.logo:hover img {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    position: absolute; /* Absolute positioning for true centering */
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.nav-links li a {
    font-size: 0.85rem; /* Rétabli */
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase; /* Uppercase for nav links */
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links li a:hover {
    color: var(--koala-turquoise);
    background: rgba(65, 184, 161, 0.2); /* Light background tint */
    transform: translateY(-5px); /* Lift effect */
    box-shadow: 0 4px 15px rgba(65, 184, 161, 0.2); /* Subtle shadow */
}

/* Navbar Logo Animation */
.nav-logo-link,
.logo.mobile-only {
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 1.5s ease-out 1s, transform 1.5s ease-out 1s; /* Encore plus long */
}

/* Classe pour désactiver l'animation (navigation interne) */
body.no-anim .nav-logo-link,
body.no-anim .logo.mobile-only {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

body.loaded .nav-logo-link,
body.loaded .logo.mobile-only {
    opacity: 1;
    transform: translateY(0);
}

/* ... existing nav-links styles ... */

.nav-socials {
    display: flex;
    gap: 5px; /* Reduced gap */
    margin-left: auto; /* Push socials to far right */
}

.nav-socials a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #666666; /* Gris pour visibilité */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
}

.nav-socials a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ===========================================
   NEW NAVBAR LOGO STRUCTURE
   =========================================== */
.nav-links {
    align-items: center; /* Ensure logo and text align */
}

.desktop-logo-img {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.nav-logo-link {
    padding: 0 !important; /* Remove padding for image item */
    display: flex;
    align-items: center;
}

.nav-logo-link:hover {
    background: transparent !important; /* No bg hover for logo */
    box-shadow: none !important;
    transform: translateY(0) !important;
}

.nav-logo-link:hover .desktop-logo-img {
    transform: scale(1.1);
}

/* Visibility Classes */
@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .nav-logo-link {
        display: none !important; /* Hide desktop logo inside menu */
    }
    
    .mobile-only {
        display: flex !important; /* Show main logo bar */
    }
}

/* ===========================================
   MOBILE MENU & DRAWER
   =========================================== */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 10001; /* Above side panel */
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Burger Animation to X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Animation spécifique pour le mobile (sans translateX) */
@keyframes btn-pulse-mobile {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
    50% { transform: scale(1.1); box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); }
}

@media (max-width: 768px) {
    /* ... existing navbar styles ... */
    .navbar {
        padding: 15px 20px;
        display: flex !important; /* Force display flex on mobile */
        justify-content: space-between !important;
        align-items: center;
    }

    .menu-toggle {
        display: flex; /* Visible on mobile */
        margin-left: auto; /* Pushes to the far right */
    }

    .hero-title-small {
        white-space: normal !important;
    }

    .expertise-item p {
        white-space: normal !important;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden off-screen right */
        width: 100%; /* Full width */
        height: 100vh;
        background: #F39C5A; /* Orange background as requested */
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: none;
        padding: 40px;
        z-index: 10000;
        left: auto; /* Reset any centering */
        transform: none; /* Reset transforms */
    }

    .nav-links.active {
        right: 0; /* Visible */
    }

    /* Links inside drawer */
    .nav-links li a {
        font-size: 2rem; /* Even larger */
        font-weight: 700;
        color: #ffffff; /* White text for contrast on orange */
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    
    .nav-links li a:hover {
        color: var(--text-primary); /* Dark hover for visibility */
        transform: translateX(5px);
        background: transparent;
        box-shadow: none;
    }

    /* Socials in drawer - Grid 2x2 with space */
    .mobile-drawer-socials {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 per line */
        gap: 45px; /* Increased gap to 45px */
        margin-top: 100px; /* More space between links and icons */
        justify-items: center;
    }

    .mobile-drawer-socials a {
        font-size: 1.8rem; /* Slightly larger icons */
        color: #ffffff;
        width: auto;
        height: auto;
        background: none; /* No background */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .mobile-drawer-socials a:hover {
        transform: scale(1.2);
        color: var(--text-primary);
    }

    .mobile-drawer-socials a {
        font-size: 1.2rem;
        color: #ffffff; /* White socials */
        transition: color 0.3s ease;
    }

    .mobile-drawer-socials a:hover {
        color: var(--text-primary);
    }

    .nav-socials {
        display: none; /* Hide desktop socials on mobile */
    }
    
    /* Ensure desktop logo inside menu is hidden on mobile */
    .nav-logo-link {
        display: none !important; 
    }
}

/* Footer cleanup */
.footer-content {
    display: flex;
    justify-content: center; /* Center content since logo/socials removed */
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

/* Remove footer-logo and social-links styles as they are moved */
.hero {
    min-height: auto;
    display: flex;
    flex-direction: column; /* Stack video then text */
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    background: transparent; /* Fond transparent pour voir la grille du body */
    padding-top: 0; /* Plus de padding sur le hero */
    padding-bottom: 10px;
    margin-bottom: 50px;
}

.hero-video-full-width {
    position: relative;
    width: 100%; /* Utilisation de 100% au lieu de 100vw pour éviter le décalage de la scrollbar */
    height: auto; /* Hauteur automatique pour s'adapter au contenu responsive */
    margin-top: 105px; /* Espace ajusté */
    margin-bottom: 20px; /* Espace réduit avant le texte */
}

.hero-video-wrapper {
    position: relative;
    width: 100%; /* Responsive */
    max-width: 1498px; /* Largeur maximale cible */
    aspect-ratio: 1498 / 490; /* Ratio spécifique (environ 3.06:1) */
    height: auto; /* La hauteur s'adapte à la largeur selon le ratio */
    margin: 0 auto; /* Centrage horizontal explicite */
    overflow: hidden;
    z-index: 1;
    border-radius: 8px;
}

.video-container-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.80;
    pointer-events: none; /* Empêche les clics sur la vidéo */
}

.video-container-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit le conteneur sans déformation */
    border: none;
    border-radius: 8px; /* Applique le même arrondi que le conteneur */
}

.video-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
    transition: all 0.3s ease;
    animation: btn-pulse 3s infinite ease-in-out;
}

@keyframes btn-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
    50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); }
}

/* Effet "Onde/Sonar" qui sort du bouton (Desktop) */
.video-fullscreen-btn::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    z-index: -1;
    animation: btn-ripple 3s infinite ease-in-out;
}

/* Version RESPONSIVE uniquement */
@media (max-width: 768px) {
    /* 1. OVERLAY TEXTE : Afficher uniquement le texte "CORPORATE..." centré */
    .hero-logo-container {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100%;
        z-index: 20;
    }

    /* Masquer l'image du logo KOALA sur la vidéo */
    .hero-video-logo {
        display: none !important;
    }

    /* Ajuster le style du sous-titre pour qu'il soit bien visible */
    .hero-logo-subtitle {
        display: block !important;
        margin-top: 0 !important; /* Reset marge car logo absent */
        font-size: 0.85rem !important;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5); /* Ombre pour lisibilité */
    }

    /* 2. BOUTON PLAY : Positionné SOUS la vidéo (hors du cadre) */
    
    /* Autoriser le débordement pour que le bouton sorte du cadre vidéo */
    body.home-page .hero-video-wrapper {
        overflow: visible !important;
        margin-bottom: 90px !important; /* Créer l'espace pour le bouton */
    }
    
    /* Appliquer l'arrondi spécifiquement au fond vidéo pour garder le style */
    .video-container-bg {
        border-radius: 8px;
        overflow: hidden;
    }

    /* Positionnement absolu du bouton en bas, à l'extérieur */
    .video-fullscreen-btn {
        position: absolute !important;
        bottom: -65px !important; /* Sort du cadre vers le bas */
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        
        width: 50px !important;
        height: 50px !important;
        background: var(--bg-light) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-primary) !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    /* Texte "PLAY LA VIDÉO" sous le bouton */
    .play-indicator {
        position: absolute !important;
        bottom: -85px !important; /* Encore plus bas */
        left: 50% !important;
        transform: translateX(-50%) !important;
        
        display: block !important;
        text-align: center !important;
        width: 200px; /* Largeur suffisante */
        margin: 0 !important;
        
        font-size: 0.7rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.1em !important;
        color: var(--text-secondary) !important;
        visibility: hidden;
    }

    .play-indicator::after {
        content: "PLAY LA VIDÉO";
        visibility: visible;
        display: block;
        position: absolute;
        width: 100%;
        top: 0;
    }
}

@keyframes btn-ripple {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* PLAY Indicator above Fullscreen Button */
.play-indicator {
    position: absolute;
    bottom: 70px; /* Positionnement au-dessus du bouton (20px bottom + 40px hauteur bouton + 10px marge) */
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.6rem; /* Rendu plus petit */
    font-weight: bold; /* Rendu plus gras */
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
    z-index: 10;
    pointer-events: none; /* Pour ne pas bloquer les interactions avec le bouton si jamais */
    transition: opacity 0.3s ease;
}

/* Hide PLAY indicator on hover */
.video-fullscreen-btn:hover + .play-indicator {
    opacity: 0;
}

/* Fullscreen Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Fond sombre */
    backdrop-filter: blur(10px); /* Flou gaussien sur l'arrière-plan */
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    z-index: 10001;
    box-shadow: none;
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: contain;
    background: #000;
}

.video-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2.5rem;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10002;
    transition: transform 0.3s ease;
}

.video-modal-close:hover {
    transform: rotate(90deg);
}

.tech-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Devant la vidéo pour appliquer le filtre PAR-DESSUS */
    /* Filtre de petits points */
    background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.06) 1px, transparent 0); /* Opacité baissée de 5% */
    background-size: 4px 4px; /* Espacement des points 4x4px */
    pointer-events: none;
}

.hero-logo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Au-dessus de la grille et de la vidéo */
    pointer-events: none; /* Ne gêne pas les interactions */
    width: 100%; /* S'assure que le conteneur peut contenir les éléments */
}

.hero-video-logo {
    width: auto; /* Permet d'utiliser max-width */
    max-width: 30%; /* Réduit à 30% de la largeur du conteneur */
    height: auto;
    /* Plus de position absolue ici, géré par le conteneur flex */
}

.hero-logo-subtitle {
    margin-top: 30px; /* Espacement augmenté sous le logo */
    color: #ffffff;
    font-size: 0.9rem; /* Taille par défaut pour desktop */
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    /* Plus de position absolue, suit le flux naturel sous le logo */
}

/* Responsive adjustments for .hero-logo-subtitle */
@media (max-width: 1024px) {
    .hero-logo-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.18em;
    }
}

@media (max-width: 768px) {
    .hero-logo-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
    }
}

/* Hide Navbar Logo on Homepage Only - DESKTOP */
body.home-page .nav-logo-link,
body.home-page .navbar .logo.mobile-only {
    display: none !important;
}

/* Règle pour masquer temporairement un élément au chargement */
.hidden-on-load {
    opacity: 0;
    transition: opacity 0.5s ease; /* Pour une apparition douce */
}

/* Règle pour le rendre visible après chargement */
.visible-after-load {
    opacity: 1;
}

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

.hero-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 25px;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.hero-title-small {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Charte graphique KOALA - réutilisable */
.koala-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.koala-brand .dash {
    color: var(--koala-turquoise);
}

.koala-brand .name {
    color: var(--text-primary);
    letter-spacing: 0;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 50px;
    line-height: 1.8;
}

.hero-description-small {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 1000px; /* Increased width to fit the entire sentence on one line */
    margin: 0 auto 15px;
    line-height: 1.7;
    text-align: center;
}

.hero-description-small:first-of-type {
    margin-top: 0px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 20px;
    margin-bottom: 0;
}

.hero-separator {
    width: 300px;
    height: 2px;
    background: var(--border-color);
    margin: 15px auto 0; /* Spacing */
    opacity: 0.6;
    border-radius: 2px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 5px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .wheel {
    width: 3px;
    height: 8px;
    background: var(--text-light);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}

/* ===========================================
   SECTIONS COMMON
   =========================================== */
.section {
    padding: 60px 60px;
    position: relative;
}

.section, .section-dark, .page-header {
    background-color: transparent; /* Permet de voir la grille globale du body */
}

.section-dark {
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-weight: 500;
}

.section-title-medium {
    font-size: clamp(1.4rem, 2.8vw, 2rem); /* Réduit */
    margin-bottom: 0px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title-medium strong {
    font-weight: 900; /* Extra bold for numbers */
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    margin-top: 0px;
    text-transform: uppercase; /* Added for global consistency */
}

@media (max-width: 768px) {
    .section-subtitle {
        white-space: normal !important;
        padding: 0 10px;
        font-size: 0.85rem;
    }
    
    /* Plus d'espace pour la première section sous le sous-menu mobile à 2 lignes */
    .section:first-of-type, 
    section.page-header {
        padding-top: 220px !important; 
    }
}

/* ===========================================
   SERVICES SECTION
   =========================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    max-width: 1300px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 45px 35px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: transparent;
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===========================================
   PORTFOLIO SECTION
   =========================================== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 28px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-category {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.portfolio-title {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: 600;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.portfolio-link:hover {
    opacity: 0.8;
}

/* ===========================================
   ABOUT / STUDIO SECTION
   =========================================== */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
}

.about-image::before {
    display: none;
}

.about-content h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 600;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8; /* Reverted to 1.8 as per original */
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 35px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-item .icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.feature-item span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Harmonized Scroll & Alignment for Studio Page */
.studio-page #expertises,
.studio-page #studio,
.studio-page #who,
.studio-page #methodology {
    scroll-margin-top: 170px !important;
}

/* Force uniform padding for standard Studio sections to align with #expertises at 200px total offset */
.studio-page .section {
    padding-top: 30px !important;
}

/* Specific adjustment for Expertises (no scroll possible) */
.studio-page #expertises {
    padding-top: 200px !important; 
}

/* Harmonized Desktop padding for other pages */
.clients-page .section:first-of-type,
.contact-page .section:first-of-type {
    padding-top: 200px !important;
}

/* Mobile adjustments for Studio Page padding */
@media (max-width: 768px) {
    .studio-page .section {
        padding-top: 45px !important;
    }
    
    .studio-page #expertises {
        padding-top: 215px !important; /* 170px scroll + 45px padding */
    }
}

/* Clients Page Harmonization */
.clients-page #corporate,
.clients-page #medias,
.clients-page #institutions {
    scroll-margin-top: 170px !important;
}

/* Standard padding for clients page sections to align with sub-menu at 200px offset */
.clients-page .section:first-of-type {
    padding-top: 200px !important;
}

.clients-page .studio-bloc {
    padding-top: 30px !important;
}

@media (max-width: 768px) {
    .clients-page .section:first-of-type {
        padding-top: 150px !important; /* Reduced to move title up */
    }
    
    .clients-page .studio-bloc {        padding-top: 45px !important;
    }
    
    /* Fix for 3-item sub-navbar: center the last item */
    .clients-page .sub-navbar ul li:last-child:nth-child(odd) {
        grid-column: 1 / span 2;
    }
}

/* 05. Methodology Section (Styled like Studio Bloc) */
#methodology {
    scroll-margin-top: 170px;
    background: var(--bg-white);
    border-radius: 16px;
    padding: 60px 60px;
    margin: 40px auto;
    max-width: 800px; /* Moins large */
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none; /* Ensure no external border */
}

#methodology:hover {
    transform: translateY(-5px) scale(1.005); /* Added lift + zoom */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); /* Stronger shadow matched to studio-bloc */
}

#methodology::before {
    content: '';
    position: absolute;
    top: 0; left: 0; 
    width: 0%; /* Start width 0 for animation */
    height: 5px;
    z-index: 2;
    background: var(--koala-turquoise); /* Orange accent */
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

#methodology.animate-bar::before {
    width: 100%;
}
.process-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: var(--border-color);
}

.process-item {
    display: flex;
    justify-content: flex-end; /* Align odd children to the left side (end of left box) */
    padding-right: 50%;
    padding-left: 0;
    position: relative;
    margin-bottom: 35px;
}

.process-item .process-content {
    text-align: right; /* Text align right for left side items */
    padding-right: 50px;
    padding-left: 0;
    max-width: 380px;
}

.process-item:nth-child(even) {
    justify-content: flex-start; /* Align even children to the right side (start of right box) */
    padding-left: 50%;
    padding-right: 0;
}

.process-item:nth-child(even) .process-content {
    text-align: left; /* Text align left for right side items */
    padding-left: 50px;
    padding-right: 0;
}

.process-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Base transform for centering */
    width: 50px;
    height: 50px;
    background: #F39C5A; /* Changed to orange */
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Apply to all transform/opacity changes */
    opacity: 0; /* Start hidden for arrival animation */
    transform: translateX(-50%) scale(0.5); /* Start smaller for arrival animation */
}

/* Specific colors for process numbers */
.process-item:nth-child(1) .process-number { background: #F39C5A; } /* Changed to orange */
.process-item:nth-child(2) .process-number { background: #F39C5A; } /* Changed to orange */
.process-item:nth-child(3) .process-number { background: #F39C5A; } /* Changed to orange */

/* Animation on arrival */
.process-item.animate-in .process-number {
    opacity: 1;
    transform: translateX(-50%) scale(1); /* Pop to normal size */
    transition-delay: 0.4s; /* Delay after process-item itself animates */
}

/* Hover effect */
.process-item:hover .process-number {
    transform: translateX(-50%) scale(1.1); /* Léger grossissement sans rotation */
}

.process-item {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.process-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.process-content h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.process-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===========================================
   CLIENTS / SECTORS
   =========================================== */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.sector-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.sector-item:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
}

.sector-item .icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.sector-item h4 {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===========================================
   CONTACT SECTION
   =========================================== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item .icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-item-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-item-content p,
.contact-item-content a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-item-content a:hover {
    color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 45px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-white);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--koala-blue);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-white);
}

.btn-glitch {
    position: relative;
}

.btn-glitch::before,
.btn-glitch::after {
    display: none;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    background: var(--bg-light);
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: 35px;
    width: auto;
    transition: all 0.3s ease;
}

.footer-logo:hover img {
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 0;
    max-width: 1300px;
    margin: 0 auto;
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.7rem; /* Rétabli à 0.7rem */
}

.studio-page .footer-bottom p {
    font-size: 0.8rem;
}



.footer-bottom a {
    color: #F39C5A; /* Changed to orange */
}

.footer-bottom a:hover {
    color: #FFB575; /* Lighter orange for hover */
}

/* ===========================================
   PAGE HEADER (for sub-pages)
   =========================================== */
.page-header {
    padding: 180px 60px 100px;
    text-align: center;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 20px 60px; /* Reduced padding for mobile */
    }
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-primary);
    font-weight: 600;
}

.page-header .breadcrumb {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.page-header .breadcrumb a {
    color: var(--text-light);
}

.page-header .breadcrumb a:hover {
    color: var(--text-primary);
}

.page-header .breadcrumb span {
    color: var(--text-secondary);
}

/* ===========================================
   VIDEO PLAYER
   =========================================== */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===========================================
   360 VIDEO SECTION
   =========================================== */
.vr-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

    background: transparent;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .about-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .process-timeline::before {
        left: 20px;
    }

    .process-item,
    .process-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        justify-content: flex-start;
    }

    .process-item .process-content,
    .process-item:nth-child(even) .process-content {
        text-align: left;
        padding-left: 0;
        padding-right: 0;
    }

    .process-number {
        left: 20px;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px 25px;
    }

    .hero-title-small {
        white-space: normal !important;
    }

    .expertise-item p {
        white-space: normal !important;
    }

    /* Duplicate nav-links removed to use the main mobile definition */

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .section {
        padding: 80px 25px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .footer {
        padding: 50px 25px 25px;
    }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.text-gradient {
    color: var(--text-primary);
}

.text-glow {
    color: var(--text-primary);
}

.neon-border {
    border: 1px solid var(--border-color);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

/* ===========================================
   FULLSCREEN IMAGE
   =========================================== */
.fullscreen-image {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
}

.fullscreen-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fullscreen-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* ===========================================
   SHOWREEL VIDEO
   =========================================== */
.showreel-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.showreel-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.showreel-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.showreel-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-top: 15px;
    margin-bottom: 20px;
}

/* Signature Animation */
.signature-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    /* L'animation est définie mais en pause par défaut */
    animation: sign-anim 3s ease forwards;
    animation-play-state: paused; 
}

/* Classe ajoutée par JS quand l'élément est visible */
.signature-path.animate {
    animation-play-state: running;
}

@keyframes sign-anim {
    to {
        stroke-dashoffset: 0;
    }
}
.video-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-popup-overlay.active {
    display: flex;
}

.video-popup-content {
    width: 90%;
    max-width: 1000px;
    position: relative;
}

.video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.video-popup-close:hover {
    opacity: 0.7;
}

/* ===========================================
   EXPERTISES GRID (horizontal)
   =========================================== */
.expertises-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px; /* Reduced width for 3 columns */
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .expertises-row {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
    }
    /* Hide the separator if it breaks layout or adjust logic */
}

@media (max-width: 768px) {
    .expertises-row {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 20px;
    }
}

.expertise-item {
    text-align: center;
    padding: 30px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    color: #ffffff;
}

/* Specific background colors for each item */
.expertise-item:nth-child(1) { background-color: var(--koala-turquoise); }
.expertise-item:nth-child(2) { background-color: var(--koala-turquoise); }
.expertise-item:nth-child(3) { background-color: var(--koala-blue); }
/* nth-child(4) is the separator */
.expertise-item:nth-child(5) { background-color: var(--koala-red); } /* Live */
.expertise-item:nth-child(6) { background-color: var(--koala-gold); } /* 3D */
.expertise-item:nth-child(7) { background-color: var(--koala-turquoise); } /* VR */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.expertise-item.animate-ready {
    opacity: 0;
    transform: translateX(-30px);
}

.expertise-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* 1. VIDEO - Travelling (Slider) */
.expertise-item:nth-child(1) .icon i {
    animation: travelling-slide 4s ease-in-out infinite;
}

@keyframes travelling-slide {
    0% { transform: translateX(-15px); }
    50% { transform: translateX(15px); }
    100% { transform: translateX(-15px); }
}

/* 2. DRONE - Parcours de vol */
.expertise-item:nth-child(2) .icon i {
    animation: drone-flight-path 12s ease-in-out infinite;
}

@keyframes drone-flight-path {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    15% { transform: translate(-70px, -10px) scale(0.95) rotate(54deg); }   /* Encore plus loin à gauche */
    30% { transform: translate(30px, -40px) scale(0.85) rotate(108deg); }  /* Grande courbe vers le haut */
    45% { transform: translate(80px, -15px) scale(1.0) rotate(162deg); }   /* Encore plus loin à droite */
    60% { transform: translate(-20px, 35px) scale(1.1) rotate(216deg); }    /* Descente sinueuse */
    75% { transform: translate(-75px, 10px) scale(1.05) rotate(270deg); }  /* Très ample courbe gauche */
    90% { transform: translate(15px, -20px) scale(0.9) rotate(324deg); }  /* Trajectoire croisée */
    100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

/* 3. MOTION DESIGN - Marche */
.expertise-item:nth-child(3) .icon i {
    animation: walker 1s linear infinite;
}

@keyframes walker {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(8deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(-6px) rotate(-8deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* 4. LIVE - Clignement Œil */
.expertise-item:nth-child(5) .icon i {
    animation: blink 3s linear infinite;
    transform-origin: center;
}

@keyframes blink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

/* 5. 3D - Rotation Volumétrique */
.expertise-item:nth-child(6) .icon i {
    animation: cube-tumble 6s linear infinite;
}

@keyframes cube-tumble {
    0% { transform: rotate3d(1, 1, 0, 0deg); }
    50% { transform: rotate3d(1, 1, 0, 180deg); }
    100% { transform: rotate3d(1, 1, 0, 360deg); }
}

/* 6. VR 360 - Rotation Gyroscopique */
.expertise-item:nth-child(7) .icon i {
    animation: vr-turn 5s linear infinite;
}

@keyframes vr-turn {
    0% { transform: perspective(100px) rotateY(0deg) scale(1); }
    50% { transform: perspective(100px) rotateY(180deg) scale(0.9); opacity: 0.8; }
    100% { transform: perspective(100px) rotateY(360deg) scale(1); }
}

.expertise-item:hover {
    transform: translateY(-5px) scale(1.05); /* Added scale effect */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Added shadow */
    z-index: 10;
    background-color: #F39C5A; /* Changed to orange on hover */
}

.expertise-item .icon {
    font-size: 2.5rem;
    color: #ffffff; /* White icon */
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    font-weight: 300;
}

.expertise-item:hover .icon {
    transform: scale(1.2) translateY(-20px); /* Reduced translateY */
}

/* Removed specific hover colors since background is now colored */
.expertise-item:nth-child(1):hover .icon,
.expertise-item:nth-child(2):hover .icon,
.expertise-item:nth-child(3):hover .icon,
.expertise-item:nth-child(4):hover .icon,
.expertise-item:nth-child(5):hover .icon,
.expertise-item:nth-child(6):hover .icon {
    color: #ffffff;
}

.expertise-item h4 {
    font-size: 1.31rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
    color: #ffffff; /* White text */
}

.expertise-item p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9); /* Slightly transparent white */
    line-height: 1.6;
    white-space: nowrap;
}

/* ===========================================
   DOMAINES COLORES (Modern Visual Card)
   =========================================== */
.domaines-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 800px; /* Reduced width for more compact centering */
    margin: 0 auto;
}

.domaine-item {
    position: relative;
    /* height: 140px; */ /* Fixed height for uniformity */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid var(--border-color);
}



/* Text Styling */
.domaine-item {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    z-index: 1; /* Above the icon */
}

/* Hover Effects */
.domaine-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
    border-color: transparent;
}



.domaine-item.animate-ready {
    opacity: 0;
    transform: translateY(30px);
}

.domaine-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Remove old border styles */
.domaine-item.outdoor, .domaine-item.corporate, .domaine-item.industries,
.domaine-item.culture, .domaine-item.patrimoine, .domaine-item.formation {
    border-bottom: 1px solid var(--border-color); /* Reset to standard border */
}

/* ===========================================
   CLIENTS SLIDER
   =========================================== */
.clients-slider-container {
    background: transparent;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.clients-slider {
    display: flex;
    width: max-content;
    animation: slide 60s linear infinite;
    gap: 40px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.clients-slider.reverse {
    animation: slide-reverse 60s linear infinite;
}

.clients-slider img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%); /* Noir et blanc par défaut */
    opacity: 0.7; /* Légèrement transparent par défaut */
    transition: all 0.3s ease;
}

.clients-slider img:hover {
    filter: grayscale(0%); /* Couleur au survol */
    opacity: 1; /* Pleine opacité au survol */
    transform: scale(1.9); /* Zoom à 1.9 */
}

/* Specific Logo Sizes (if needed, proportional update) */
.clients-slider img.logo-small { height: 48px; max-height: 48px; }
.clients-slider img.logo-large { height: 96px; max-height: 96px; }
.clients-slider img.logo-xl { height: 120px; max-height: 120px; }

@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% / 2)); } /* Adjusted for duplicate set */
}

@keyframes slide-reverse {
    0% { transform: translateX(calc(-100% / 2)); } /* Adjusted for duplicate set */
    100% { transform: translateX(0); }
}

/* ===========================================
   CUSTOM CURSOR FOLLOWER
   =========================================== */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid var(--koala-turquoise); /* Revert to turquoise */
    border-radius: 50%;
    pointer-events: none; /* Click-through */
    z-index: 99999;
    margin-left: -10px; /* Center on mouse */
    margin-top: -10px;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, margin 0.3s ease;
    box-shadow: 0 0 10px rgba(65, 184, 161, 0.3); /* Revert glow effect */
}

.cursor-follower.active {
    width: 50px;
    height: 50px;
    background-color: rgba(65, 184, 161, 0.1); /* Revert light fill */
    margin-left: -25px;
    margin-top: -25px;
    border-color: transparent;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-follower {
        display: none;
    }
}

/* Témoignages en ligne */
.testimonials-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.testimonial-card .quote-icon {
    color: var(--koala-turquoise);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.testimonial-card .author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.testimonial-card .role {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===========================================
   CONTACT COMPACT
   =========================================== */
.contact-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

.contact-compact-info {
    padding: 0;
}

.contact-compact-info p.intro {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

.contact-compact-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-compact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-compact-item.align-top {
    align-items: flex-start;
}

/* Old icon style removed for new icon-box */

.contact-compact-item span,
.contact-compact-item a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-compact-item a:hover {
    color: var(--koala-turquoise);
}

.contact-compact-form {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--koala-turquoise); /* Orange accent */
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.contact-compact-form .form-group {
    margin-bottom: 20px;
}

.contact-compact-form input,
.contact-compact-form textarea {
    width: 100%;
    padding: 15px;
    background: #f9f9f9;
    border: 2px solid transparent;
    border-bottom: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-compact-form input:focus,
.contact-compact-form textarea:focus {
    outline: none;
    background: #ffffff;
    border-bottom-color: var(--koala-turquoise); /* Orange focus color */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-compact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-compact-form .btn-send {
    width: 100%;
    padding: 16px;
    background: #F39C5A; /* Changed to orange */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-compact-form .btn-send:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(243, 156, 90, 0.3); /* Orange shadow */
    filter: brightness(1.1);
}

/* ===========================================
   STUDIO BLOCS (Two Panels Layout)
   =========================================== */
.studio-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.studio-blocs {
    display: grid;
    grid-template-columns: 1fr; /* Une seule colonne */
    justify-content: center; /* Centrer le contenu */
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

/* Rule for client-specific blocks on clients.html */
.client-blocs {
    max-width: 800px; /* Reduced width for the three client boxes */
}

.studio-bloc {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px; /* Reduced padding */
    box-shadow: var(--shadow-medium);
    position: relative;
    /* overflow: hidden; Removed to fix shadow artifact */
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease; /* Add transition back */
    z-index: 1; /* Ensure it's above the background GIF */
    background: var(--bg-white); /* Ensure it has an opaque background */
}

.studio-bloc:hover {
    transform: translateY(-10px) scale(1.01); /* Reduced zoom and lift */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); /* Reduced shadow intensity */
}

.studio-bloc-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 0;
    padding: 10px 10px; /* Reduced vertical padding */
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
    position: relative;
    z-index: 1;
    max-width: none;
    min-height: auto;
}

.studio-bloc-item:last-child {
    border-bottom: none;
}

.studio-bloc-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.studio-bloc-item:hover {
    transform: translateX(10px);
    background: rgba(0,0,0,0.05); /* More noticeable graying */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.studio-bloc-item i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem; /* Augmenté */
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: var(--bg-light);
    color: #F39C5A; /* Changed to orange */
}

.studio-bloc-item span {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.3; /* Reduced line-height */
}

.studio-card-content {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Specific styling for the single studio-bloc in the TECHNIQUE section */
#studio .studio-bloc {
    max-width: 600px; /* Adjust width to reduce empty space */
    margin: 0 auto; /* Center the block within its parent */
    outline: none !important; /* Force removal of debug outlines */
    box-shadow: var(--shadow-medium) !important; /* Force standard shadow */
}

.studio-card-content h4 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.studio-card-content.partner h4 {
    border-bottom-color: var(--koala-turquoise); /* Changed to turquoise */
}

.studio-card-content.director h4 {
    border-bottom-color: var(--koala-turquoise); /* Changed to turquoise */
}

/* Compact Domaines (Grid of small cards) overriding default card style */
.domaines-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 20px;
    max-width: 900px;
    margin: 40px auto 0;
}

.domaine-compact-item.domaine-item {
    padding: 20px 15px;
    height: 140px; /* Ensure height is set for the pseudo background to fill */
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    text-align: center;
    position: relative; /* Essential */
    overflow: hidden; /* Clip the blurred edges */
    isolation: isolate; /* Create stacking context for text */
    background: transparent; /* FIX: Was #1a1a1a, blocking the pseudo */
    transition: all 0.3s ease;
}

/* The Background Pseudo-element */
.domaine-compact-item.domaine-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* Behind text */
    background-color: #1a1a1a; /* Fallback color */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), var(--bg-image) center/cover no-repeat;
    transition: filter 0.4s ease, transform 0.4s ease;
    will-change: filter, transform;
    transform: none; /* Force flat */
}

/* Remove old icon styles if any remain */
/* Hover Effects */
.domaine-compact-item.domaine-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    z-index: 5;
}

.domaine-compact-item.domaine-item:hover::before {
    filter: blur(4px); /* The requested blur */
    transform: scale(1.1); /* Slight zoom to prevent blurred edges showing white */
}

.domaine-compact-item.domaine-item > span:first-child {
    font-size: 1.31rem;
    letter-spacing: 0.15em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
    margin-bottom: 5px;
}

.domaine-compact-item.domaine-item .domaine-subtitle {
    font-size: 0.85rem; /* Smaller explanation */
    font-weight: 400; /* Lighter weight */
    opacity: 0.95;
    margin-top: 0;
    text-transform: none;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ===========================================
   SUB-NAVBAR (STUDIO PAGE)
   =========================================== */
.sub-navbar-container {
    position: fixed;
    top: 95px;
    z-index: 900;
    width: 100%;
    height: 60px; /* Force identical height */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sub-navbar {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    /* No padding here, height is fixed on container */
}

.sub-navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0; /* Remove vertical padding from ul */
    height: 100%; /* Make ul take full height of container */
    align-items: center; /* Vertically center content */
    gap: 30px;
    flex-wrap: wrap;
}

.sub-navbar ul li {
    display: flex;
    align-items: center;
}

.sub-navbar ul li a {
    font-size: 0.85rem; /* Rétabli */
    font-weight: 600;
    color: #F39C5A; /* Changed to orange */
    position: relative;
    padding: 8px 12px; /* Keep padding around text */
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
}

.sub-navbar ul li a:hover {
    color: var(--koala-turquoise);
    background: rgba(65, 184, 161, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 184, 161, 0.2);
}

/* Hover backgrounds unified to turquoise via base rule */

/* Logo Icon in Nav */
.nav-logo-icon {
    transition: transform 0.3s ease;
}

.nav-links a:hover .nav-logo-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .sub-navbar-container {
        top: 70px; /* Ajustement sous la navbar mobile */
        height: auto !important; /* Permet au menu de s'étendre sur 2 lignes */
        padding: 12px 0;
        overflow: visible !important;
        white-space: normal !important;
        mask-image: none !important;
        -webkit-mask-image: none !important;
    }
    
    .sub-navbar ul {
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* 2 colonnes égales */
        gap: 8px; /* Espace entre les boutons */
        padding: 0 15px;
        height: auto;
        justify-items: center;
    }
    
    .sub-navbar ul {
        display: grid !important;
        grid-template-columns: 1fr 1fr; /* 2 colonnes égales */
        gap: 8px; /* Espace entre les boutons */
        padding: 0 15px;
        height: auto;
        justify-items: center;
    }

    /* Nettoyage du pseudo-élément du menu B */
    .sub-navbar ul::before {
        display: none !important;
    }
    
    .sub-navbar ul li {
        width: 100%; /* Les boutons prennent toute la largeur de leur cellule */
        opacity: 1 !important; /* Toujours visible */
        border: none !important;
    }
    
    .sub-navbar ul li a {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 0.75rem;
        padding: 10px 5px;
        background: rgba(243, 156, 90, 0.05); /* Fond léger orangé */
        border: 1px solid rgba(243, 156, 90, 0.2); /* Bordure subtile */
        border-radius: 6px;
        color: #F39C5A;
    }
}

/* Contact Page Animations */
.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-compact-item:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: #F39C5A !important; /* Force orange background on hover */
}

.contact-compact-item:hover .icon-box.mail-icon {
    background: #000000 !important; /* Force black background on hover for mail */
}

.contact-compact-item {
    transition: transform 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.contact-compact-item:hover {
    background: var(--bg-light);
    transform: translateX(10px);
}

@keyframes floatRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes floatDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.floating-arrow-right {
    animation: floatRight 2s infinite ease-in-out;
    display: inline-block;
}

.floating-arrow-down {
    animation: floatDown 2s infinite ease-in-out;
    display: inline-block;
}

.fixed-arrow-size {
    font-size: 1.1rem !important; /* Standardize arrow size */
}

.contact-separator-dynamic {
    height: 2px;
    width: 0; /* Start at 0 for animation */
    max-width: 100%;
    background: var(--koala-blue);
    margin: 20px auto; /* Centered between blocks */
    border-radius: 2px;
    animation: expandWidth 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

.contact-compact-list.tight {
    display: flex;
    flex-direction: column;
    gap: 0 !important;
}

.contact-compact-list.tight .contact-compact-item {
    padding: 4px 10px; /* Very tight padding */
}
@media (max-width: 1024px) {
    .expertises-row,
    .domaines-row {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 cols for tablets */
    }

    .testimonials-row {
        grid-template-columns: repeat(2, 1fr);
    }


}

@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
        padding: 15px 20px;
    }

    .logo img {
        height: 40px; /* Smaller logo on mobile */
    }

    .nav-socials {
        display: none; /* Hide socials on mobile header */
    }

    .expertises-row,
    .domaines-row {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 15px;
    }

    .testimonials-row {
        grid-template-columns: 1fr;
    }

    .contact-compact {
        grid-template-columns: 1fr;
    }

    .domaines-compact {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 15px;
    }

    .domaine-compact-item.domaine-item {
        padding: 20px; /* Comfortable touch target */
        font-size: 0.8rem;
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--text-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: none;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--koala-turquoise);
    transform: translateY(-3px);
}

/* ===========================================
   ANIMATIONS CUSTOM
   =========================================== */
.color-pulse {
    /* Combine Font Awesome's beat with color change */
    animation: fa-beat 1s ease-in-out infinite, colorChange 4s linear infinite !important;
}

@keyframes colorChange {
    0% { color: var(--koala-turquoise); }
    25% { color: var(--koala-blue); }
    50% { color: var(--koala-red); }
    75% { color: var(--koala-gold); }
    100% { color: var(--koala-turquoise); }
}

@keyframes video-action {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-5deg); } /* Zoom In + Tilt */
    50% { transform: scale(1.15) rotate(5deg); }  /* Pan */
    75% { transform: scale(1.05) rotate(0deg); }  /* Stabilisation */
}

.expertise-item-separator {
    line-height: 2.2 !important; /* Interligne large pour absorber la hauteur de l'image */
    padding: 20px !important;
    text-align: center;
    display: block;
}

.expertise-item-separator img {
    height: 1.8em !important; /* Taille de l'icône */
    vertical-align: middle; /* Alignement */
    margin: 0 5px;
    position: relative;
    top: -3px; /* Centrage optique fin */
}

@keyframes ia-blink {
    0%, 20%, 80%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Mini Logos Row for Studio Cards */
.mini-logos-row {
    display: flex;
    gap: 10px; /* Reduced gap slightly to fit */
    margin-top: auto; /* Push to bottom if flex column */
    padding-top: 20px;
    justify-content: space-between; /* Changed to space-between */
    align-items: center;
    flex-wrap: nowrap; /* Force single line */
    overflow: hidden; /* Prevent overflow */
}

.mini-logo {
    height: 45px; /* Increased height */
    width: auto;
    max-width: 100px;
    object-fit: contain;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.mini-logo.animate-ready {
    opacity: 0;
    transform: translateY(15px);
}

.mini-logo.animate-in {
    opacity: 0.6;
    transform: translateY(0);
}

.mini-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Random Clients Banner */
.random-clients-banner {
    width: auto;
    height: 100px;
    margin: 40px 50px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    position: relative;
    background-color: var(--bg-white);
    overflow: hidden; /* Masque le débordement */
}

/* Grille de texture par-dessus */
.random-clients-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 1px, transparent 0);
    background-size: 4px 4px;
    border-radius: 12px;
}

.banner-track {
    display: flex;
    height: 100%;
    will-change: transform;
    /* Mouvement lent de va-et-vient pour donner de la vie */
    animation: gentle-pan 40s ease-in-out infinite alternate;
}

.random-clients-banner img {
    height: 100%;
    width: auto;
    object-fit: cover;
    flex-shrink: 0;
    /* Transition très lente pour un cross-fade soyeux */
    transition: opacity 1.5s ease-in-out, filter 1.5s ease-in-out;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes gentle-pan {
    0% { transform: translateX(0px); }
    25% { transform: translateX(-50px); }
    50% { transform: translateX(-150px); }
    75% { transform: translateX(-100px); }
    100% { transform: translateX(0px); }
}

/* Ombre interne subtile */
.random-clients-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.03);
    pointer-events: none;
    border-radius: 12px;
    z-index: 2;
}

@media (max-width: 768px) {
    .random-clients-banner {
        display: block; /* Garde la règle mais nettoyée pour éviter les conflits */
    }
}

/* Nouvelle règle pour forcer deux colonnes */
.two-columns-blocks {
    grid-template-columns: 1fr 1fr;
    /* Conserver les autres propriétés de .studio-blocs */
}

/* S'assurer que sur mobile, cela redevient une seule colonne */
@media (max-width: 1024px) {
    .two-columns-blocks {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        justify-content: space-between !important;
        padding: 15px 20px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Force logo visibility and centering on mobile homepage */
    body.home-page .navbar .logo.mobile-only {
        display: flex !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important; /* Neutralise le décalage de l'animation */
        align-items: center !important;
    }

    .logo.mobile-only img {
        display: block !important;
        margin: 0 !important;
    }

    /* Fix responsive logos hidden on mobile */
    .mini-logos-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        overflow: visible;
        height: auto;
    }

    /* Fix long technical text on mobile */
    .studio-bloc-item span {
        white-space: normal;
        word-break: break-word;
        line-height: 1.4;
    }

    /* Fix overflow for various titles and descriptions */
    .section-subtitle,
    .hero-title-small,
    .expertise-item h4,
    .expertise-item p,
    .hero-logo-subtitle {
        white-space: normal !important;
        overflow-wrap: break-word;
    }

    /* Padding adjustments for pages with sub-menu on mobile */
    .studio-page .section:first-of-type,
    #expertises {
        padding-top: 215px !important; /* 45px visual gap */
    }

    .clients-page .section:first-of-type {
        padding-top: 215px !important;
    }

    .contact-page .section:first-of-type {
        padding-top: 160px !important;
    }

    /* Center the single icon in contact sub-menu on mobile - ROBUST FLEX FIX */
    .contact-page .sub-navbar ul {
        display: flex !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .contact-page .sub-navbar ul li:only-child {
        width: 100% !important; /* Full width container */
        display: flex !important;
        justify-content: center !important; /* Center content inside */
        margin: 0 !important;
        border: none !important;
    }

    .contact-page .sub-navbar ul li:only-child a {
        width: auto !important; /* Icon wrapper shrinks to fit */
        min-width: 60px;
        padding: 10px 0 !important; /* Symmetric vertical padding, 0 horizontal to rely on flex */
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Bandeau photo mobile bord à bord et hauteur restaurée */
    .random-clients-banner {
        margin: 20px 0 !important; /* Marge réduite */
        height: 80px !important;
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* === OPTIMISATION VERTICALE STUDIO MOBILE === */
    .studio-page .section {
        padding-bottom: 30px !important; /* Réduction fond de section */
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .studio-page .section-header {
        margin-bottom: 20px !important; /* Titre plus proche du contenu */
    }

    /* Compacter la grille Expertises */
    .studio-page .expertises-row {
        gap: 15px !important;
    }

    .studio-page .expertise-item {
        padding: 15px 10px !important; /* Carte plus petite */
    }

    .studio-page .expertise-item .icon {
        margin-bottom: 10px !important; /* Icône plus proche du texte */
        font-size: 2rem !important; /* Icône légèrement réduite */
    }

    /* Compacter la liste Technique */
    .studio-page .studio-bloc {
        padding: 15px !important;
    }

    .studio-page .studio-bloc-item {
        padding: 6px 0 !important; /* Lignes plus serrées */
        gap: 10px !important;
    }
    
    .studio-page .studio-bloc-item i {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
    }

    /* Compacter la Méthodologie */
    .studio-page .process-item {
        margin-bottom: 20px !important;
        padding-bottom: 0 !important;
    }
    
    .studio-page .process-timeline {
        margin-top: 10px !important;
    }
}
}

