/* MAIN.CSS
   --------
   Feuille de style principale du site.
   Mise à jour : Restauration de la "Lumière Violette" en arrière-plan (Body).
*/

/* ==========================================
   CUSTOM SCROLLBAR
   ========================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #050505; 
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a; 
    border-radius: 5px;
    border: 2px solid #050505;
}

::-webkit-scrollbar-thumb:hover {
    background: #6366f1; /* Brand color on hover */
}

/* Light mode overrides */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: #fafafa;
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-color: #fafafa;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* ==========================================
   THEME SYSTEM - DARK / LIGHT MODE
   ========================================== */

:root {
    /* Dark Theme (Default) */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;
    
    --brand: #6366f1;
    --brand-light: #818cf8;
    --brand-dark: #4f46e5;
    --brand-glow: rgba(99, 102, 241, 0.4);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    --gradient-hero: linear-gradient(to bottom, transparent, #050505);
    --gradient-card: linear-gradient(135deg, #18181b 60%, #1e293b 100%);
}

[data-theme="light"] {
    /* Light Theme - Élégant et professionnel */
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-border: rgba(0, 0, 0, 0.08);
    
    --text-primary: #18181b;
    --text-secondary: #3f3f46;
    --text-tertiary: #52525b;
    --text-muted: #a1a1aa;
    
    --brand: #4f46e5;
    --brand-light: #6366f1;
    --brand-dark: #3730a3;
    --brand-glow: rgba(79, 70, 229, 0.25);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.1);
    
    --gradient-hero: linear-gradient(to bottom, transparent, #fafafa);
    --gradient-card: linear-gradient(135deg, #ffffff 60%, #f4f4f5 100%);
}

/* Transition globale pour le changement de thème */
*, *::before, *::after {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                fill 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                stroke 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation de transition spéciale pour le changement de thème */
.theme-transitioning {
    pointer-events: none;
}

.theme-transitioning::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(circle at var(--theme-x, 50%) var(--theme-y, 50%), 
        transparent 0%, 
        var(--bg-primary) 100%);
    animation: themeReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes themeReveal {
    0% { 
        clip-path: circle(0% at var(--theme-x, 50%) var(--theme-y, 50%)); 
        opacity: 1;
    }
    100% { 
        clip-path: circle(150% at var(--theme-x, 50%) var(--theme-y, 50%)); 
        opacity: 0;
    }
}

/* ==========================================
   THEME TOGGLE BUTTON
   ========================================== */

.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--brand);
    transform: scale(1.08);
    box-shadow: 0 0 15px var(--brand-glow);
}

.theme-toggle:active {
    transform: scale(0.92);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .sun-icon {
    color: #fbbf24;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon-icon {
    color: var(--text-secondary);
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Animation des rayons du soleil */
.theme-toggle .sun-icon {
    animation: none;
}

[data-theme="light"] .theme-toggle .sun-icon {
    animation: sunPulse 3s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { filter: drop-shadow(0 0 2px #fbbf24); }
    50% { filter: drop-shadow(0 0 8px #fbbf24); }
}

/* ==========================================
   BODY ET BACKGROUNDS ADAPTATIFS
   ========================================== */

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary);
}

/* Classes utilitaires pour le thème */
.bg-bg, [class*="bg-[#050505]"], [class*="bg-bg"] {
    background-color: var(--bg-primary) !important;
}

.text-white {
    color: var(--text-primary) !important;
}

.text-gray-300 {
    color: var(--text-secondary) !important;
}

.text-gray-400 {
    color: var(--text-tertiary) !important;
}

.text-gray-500 {
    color: var(--text-muted) !important;
}

/* Glass effect adaptatif */
.glass {
    background: var(--bg-glass) !important;
    border-color: var(--bg-glass-border) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="light"] .glass {
    box-shadow: var(--shadow-md);
}

/* Cards adaptatives */
.glass-spotlight {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

.glass-spotlight:hover {
    border-color: var(--border-hover) !important;
}

[data-theme="light"] .glass-spotlight {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .glass-spotlight:hover {
    box-shadow: var(--shadow-md);
}

/* Navigation adaptative */
[data-theme="light"] nav > div {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    border-radius: 50px !important;
    margin-top: 0.5rem !important;
}

[data-theme="light"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: var(--brand);
}

/* Borders adaptatifs */
.border-white\/5, .border-white\/10, .border-white\/20 {
    border-color: var(--border-color) !important;
}

/* Gradients adaptatifs - suppression en mode light pour un rendu propre */
[data-theme="light"] .bg-gradient-to-b.from-transparent.to-bg,
[data-theme="light"] .bg-gradient-to-b.from-transparent.to-\[\#050505\] {
    background: transparent !important;
}

/* Supprimer les gradients de section en mode light */
[data-theme="light"] section .bg-gradient-to-b,
[data-theme="light"] .pointer-events-none.bg-gradient-to-b {
    opacity: 1 !important;
}

/* REVIEWS SECTION - Supprimer les dégradés noirs sur les côtés en mode light */
[data-theme="light"] #reviews-marquee-container .bg-gradient-to-r.from-\[\#050505\],
[data-theme="light"] #reviews-marquee-container .bg-gradient-to-l.from-\[\#050505\],
[data-theme="light"] #reviews-marquee-container > .absolute {
    background: linear-gradient(to right, var(--bg-primary), transparent) !important;
}

[data-theme="light"] #reviews-marquee-container > .absolute:last-of-type {
    background: linear-gradient(to left, var(--bg-primary), transparent) !important;
}

/* Reviews fade classes spécifiques */
[data-theme="light"] .reviews-fade-left {
    background: linear-gradient(to right, var(--bg-primary), transparent) !important;
}

[data-theme="light"] .reviews-fade-right {
    background: linear-gradient(to left, var(--bg-primary), transparent) !important;
}

/* Hero fade overlay pour toutes les pages - fondu vers blanc/gris clair */
[data-theme="light"] .hero-fade-overlay {
    background: linear-gradient(to bottom, transparent, var(--bg-primary)) !important;
}

/* Cibler tous les dégradés vers #050505 ou to-bg */
[data-theme="light"] .to-\[\#050505\],
[data-theme="light"] [class*="to-[#050505]"],
[data-theme="light"] .to-bg {
    --tw-gradient-to: var(--bg-primary) !important;
}

/* Supprimer les fonds sombres hardcodés en light mode */
[data-theme="light"] .bg-\[\#050505\],
[data-theme="light"] [class*="bg-[#050505]"],
[data-theme="light"] .bg-\[\#080808\],
[data-theme="light"] [class*="bg-[#080808]"],
[data-theme="light"] .bg-black {
    background-color: var(--bg-primary) !important;
}

/* Main sections fond adaptatif */
[data-theme="light"] main.bg-bg,
[data-theme="light"] main.bg-\[\#050505\],
[data-theme="light"] main[class*="bg-bg"],
[data-theme="light"] main[class*="bg-[#050505]"] {
    background-color: var(--bg-primary) !important;
}

/* Supprimer TOUS les fonds noirs/sombres hardcodés en mode light */
[data-theme="light"] .from-\[\#050505\],
[data-theme="light"] .to-\[\#050505\],
[data-theme="light"] [class*="from-[#050505]"],
[data-theme="light"] [class*="to-[#050505]"] {
    --tw-gradient-from: var(--bg-primary) !important;
    --tw-gradient-to: var(--bg-primary) !important;
}

/* Gradient bas de page hero - faire un fondu vers blanc en mode light */
[data-theme="light"] .bg-gradient-to-b.to-bg,
[data-theme="light"] section .absolute.bg-gradient-to-b {
    background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 100%) !important;
    opacity: 1 !important;
}

/* Supprimer les effets blur violets en mode light */
[data-theme="light"] .bg-brand\/5,
[data-theme="light"] .bg-brand\/10,
[data-theme="light"] [class*="bg-brand/"] {
    opacity: 0.3;
}

/* Pages services/site-web - supprimer les fonds sombres en haut */
[data-theme="light"] section:first-of-type .absolute[class*="blur"],
[data-theme="light"] .blur-\[120px\] {
    opacity: 0 !important;
}

/* Footer adaptatif */
[data-theme="light"] footer {
    background-color: var(--bg-secondary) !important;
}

/* Mobile menu adaptatif */
[data-theme="light"] #mobile-menu {
    background-color: var(--bg-primary) !important;
}

/* Review cards adaptatifs */
[data-theme="light"] .review-card-marquee {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .review-card-marquee:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* IMPORTANT: Texte des avis lisible en mode light */
[data-theme="light"] .review-card-marquee p,
[data-theme="light"] .review-card-marquee .text-gray-300,
[data-theme="light"] .review-card-marquee .text-gray-400 {
    color: #3f3f46 !important;
}

[data-theme="light"] .review-card-marquee .text-white,
[data-theme="light"] .review-card-marquee h3,
[data-theme="light"] .review-card-marquee h4,
[data-theme="light"] .review-card-marquee .font-bold {
    color: #18181b !important;
}

[data-theme="light"] .review-card-marquee .text-xs,
[data-theme="light"] .review-card-marquee .uppercase {
    color: #52525b !important;
}

/* Hamburger lines adaptatives */
[data-theme="light"] .hamburger-line {
    background-color: var(--text-primary) !important;
}

/* Brand text reste violet */
.text-brand {
    color: var(--brand) !important;
}

/* Inputs adaptatifs */
[data-theme="light"] .contact-input {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .contact-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

[data-theme="light"] .contact-input::placeholder {
    color: var(--text-muted);
}

/* Pricing cards - garder les couleurs de bordure mais adapter le fond */
[data-theme="light"] .tilt-card {
    background: var(--bg-card) !important;
}

/* Cookie banner adaptatif */
[data-theme="light"] #cookie-banner {
    background: var(--bg-card) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

/* Dropdown menu adaptatif */
[data-theme="light"] .group:hover > div > div {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-lg);
}

/* Hero section en mode light - fond complètement blanc */
[data-theme="light"] #canvas-container {
    opacity: 0.6;
}

/* Assurer que le fond est bien blanc partout en light */
[data-theme="light"] section:first-of-type,
[data-theme="light"] .min-h-screen {
    background-color: var(--bg-primary) !important;
}

/* =============================
     PROJETS IMMERSIVE STYLE
     ============================= */

.projects-immersive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 3.5rem 2.5rem;
    padding: 2rem 0 0 0;
}

.project-card {
    position: relative;
    min-height: 420px;
    border-radius: 2.2rem;
    overflow: hidden;
    box-shadow: 0 8px 40px 0 rgba(99,102,241,0.10), 0 2px 16px 0 rgba(0,0,0,0.18);
    background: #18181b;
    transition: transform 0.5s cubic-bezier(.4,2,.3,1), box-shadow 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
}
.project-card:hover {
    transform: scale(1.035) translateY(-8px);
    box-shadow: 0 16px 64px 0 rgba(99,102,241,0.18), 0 8px 32px 0 rgba(0,0,0,0.22);
}

.project-card .slider-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: filter 0.4s, transform 0.5s;
}
.project-card:hover .slider-img {
    filter: brightness(0.7) saturate(1.1) blur(1px);
    transform: scale(1.04);
}

.project-card .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 0.85rem;
    font-size: 1.7rem;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    cursor: pointer;
}
.project-card:hover .slider-btn {
    opacity: 1;
}
.project-card .slider-btn.left {
    left: 1.5rem;
}
.project-card .slider-btn.right {
    right: 1.5rem;
}
.project-card .slider-btn:hover {
    background: #6366f1;
}

.project-card h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 0.5rem 0;
    font-family: 'Syne', 'Montserrat', 'Inter', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    text-align: left;
    text-shadow: 0 2px 16px rgba(99,102,241,0.22);
    padding-left: 2.2rem;
    padding-right: 2.2rem;
}

.project-card .project-desc {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.68);
    color: #fff;
    font-size: 1.15rem;
    padding: 1.2rem 2.2rem 2.2rem 2.2rem;
    border-radius: 0 0 2.2rem 2.2rem;
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.5s, transform 0.5s;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
}
.project-card:hover .project-desc {
    opacity: 1;
    transform: translateY(0);
}

/* Filtres glassmorphism */
#project-filters button, #project-filters .filter-btn {
    border-radius: 2rem;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.13);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.85rem 2.2rem;
    margin: 0.2rem 0.3rem;
    box-shadow: 0 2px 12px 0 rgba(99,102,241,0.08);
    backdrop-filter: blur(8px);
    transition: background 0.3s, color 0.3s, border 0.3s;
}
#project-filters button.active, #project-filters .filter-btn.active {
    background: #fff;
    color: #6366f1;
    border-color: #6366f1;
}
#project-filters button:hover, #project-filters .filter-btn:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
/* =============================
     PROJETS - GRID & CARDS
     ============================= */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.project-card {
    background: linear-gradient(135deg, #18181b 60%, #1e293b 100%);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(.4,2,.3,1), box-shadow 0.4s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 420px;
}
.project-card:hover {
    transform: scale(1.03) translateY(-6px);
    box-shadow: 0 16px 48px 0 rgba(0,0,0,0.35);
}

.project-card .slider-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 1.5rem 1.5rem 0 0;
    transition: filter 0.3s;
}
.project-card:hover .slider-img {
    filter: brightness(0.95) saturate(1.1);
}

.project-card .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 0.75rem;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    cursor: pointer;
}
.project-card:hover .slider-btn {
    opacity: 1;
}
.project-card .slider-btn:hover {
    background: #38bdf8;
}
.project-card .slider-btn.left {
    left: 1.2rem;
}
.project-card .slider-btn.right {
    right: 1.2rem;
}

.project-card h3 {
    margin-top: 1.5rem;
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 2.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    text-align: center;
    text-shadow: 0 2px 8px rgba(56,189,248,0.18);
}

.project-card .project-desc {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 1.08rem;
    padding: 1.2rem 1.5rem;
    border-radius: 0 0 1.5rem 1.5rem;
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.4s, transform 0.4s;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
    z-index: 3;
}
.project-card:hover .project-desc {
    opacity: 1;
    transform: translateY(0);
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: float 3.5s ease-in-out infinite;
}

/* --- RESTAURATION DU BACKGROUND VIOLET --- */
body {
    overflow-x: hidden;
    /* On remet le dégradé d'ambiance en haut à droite */
    background: radial-gradient(ellipse at 60% 20%, rgba(99,102,241,0.18) 0%, rgba(168,85,247,0.10) 30%, #050505 80%);
    background-color: #050505;
}

/* Body en mode light - fond propre sans dégradé violet */
[data-theme="light"] body {
    background: var(--bg-primary) !important;
    background-color: var(--bg-primary) !important;
}

/* ==========================================
   INTRO ANIMATION - SIMPLE & RAPIDE
   ========================================== */

#intro-overlay {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#intro-overlay.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.intro-content {
    opacity: 0;
    transform: scale(0.8);
    animation: introAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes introAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.intro-logo {
    width: 70px;
    height: auto;
    animation: logoSpin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
}

/* Remplacer le logo par logonoir.png en mode clair */
[data-theme="light"] .intro-logo {
    content: url('assets/img/logonoir.png');
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.2));
}

@keyframes logoSpin {
    0% {
        transform: rotate(-360deg) scale(0);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

.intro-brand {
    font-family: 'Inter', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transform: translateX(-20px);
    animation: brandSlide 0.5s ease 0.3s forwards;
}

@keyframes brandSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Navigation cachée pendant l'intro */
.nav-hidden {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s ease;
}

.nav-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   INFINITE MARQUEE (REVIEWS)
   ========================================== */

.marquee-track-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
    padding-left: 2rem;
    will-change: transform;
}

/* Animation continue même au hover */
.marquee-track:hover {
    animation-play-state: running;
}

.marquee-track.marquee-reverse {
    animation-direction: reverse;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Style des cartes dans le marquee */
.review-card-marquee {
    width: 350px;
    height: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 1.5rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    user-select: none;
}

.review-card-marquee:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive pour le marquee */
@media (max-width: 768px) {
    .review-card-marquee {
        width: 280px;
        height: 240px;
        padding: 1.5rem;
    }
    .marquee-track {
        gap: 1rem;
        padding-left: 1rem;
        animation-duration: 30s;
    }
}


/* ==========================================
   BOUTON DÉMARRER DYNAMIQUE - EFFET FLAMME/GLOW
   ========================================== */

.btn-flame {
    position: relative;
    overflow: visible !important;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #6366f1 100%) !important;
    background-size: 200% 200% !important;
    animation: flameGradient 3s ease infinite, flamePulse 2s ease-in-out infinite, flameFloat 3s ease-in-out infinite !important;
    border: none !important;
    box-shadow: 
        0 0 20px rgba(99, 102, 241, 0.5),
        0 0 40px rgba(99, 102, 241, 0.3),
        0 0 60px rgba(139, 92, 246, 0.2) !important;
    color: white !important;
}

.btn-flame::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, 
        #6366f1, #8b5cf6, #a855f7, #6366f1, 
        #8b5cf6, #6366f1);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: flameRotate 4s linear infinite;
    filter: blur(8px);
    opacity: 0.7;
}

.btn-flame::after {
    content: '';
    position: absolute;
    inset: -6px;
    background: radial-gradient(circle at 50% 50%, 
        rgba(99, 102, 241, 0.4) 0%, 
        transparent 70%);
    border-radius: inherit;
    z-index: -2;
    animation: flameOuter 2.5s ease-in-out infinite;
}

@keyframes flameGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes flamePulse {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(99, 102, 241, 0.5),
            0 0 40px rgba(99, 102, 241, 0.3),
            0 0 60px rgba(139, 92, 246, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(99, 102, 241, 0.7),
            0 0 60px rgba(99, 102, 241, 0.5),
            0 0 90px rgba(139, 92, 246, 0.4);
    }
}

@keyframes flameFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes flameRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes flameOuter {
    0%, 100% { 
        opacity: 0.5;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.btn-flame:hover {
    animation: flameGradient 1.5s ease infinite, flamePulseHover 1s ease-in-out infinite, flameFloat 1.5s ease-in-out infinite !important;
}

@keyframes flamePulseHover {
    0%, 100% { 
        box-shadow: 
            0 0 30px rgba(99, 102, 241, 0.8),
            0 0 60px rgba(99, 102, 241, 0.6),
            0 0 100px rgba(139, 92, 246, 0.5);
    }
    50% { 
        box-shadow: 
            0 0 40px rgba(99, 102, 241, 1),
            0 0 80px rgba(99, 102, 241, 0.8),
            0 0 120px rgba(139, 92, 246, 0.7);
    }
}

/* ==========================================
   COMMON STYLES
   ========================================== */

.glow-spot { 
    position: fixed; 
    filter: blur(120px); 
    z-index: -1; 
    opacity: 0.4; 
    border-radius: 50%; 
    pointer-events: none; 
}

/* Cacher les glow spots en mode light */
[data-theme="light"] .glow-spot {
    opacity: 0 !important;
    display: none;
}

nav { 
    background: transparent;
    transition: none;
    width: 100%;
    margin: 0;
    left: 0;
    pointer-events: none;
}

nav > div {
    --scroll-progress: 0;
    pointer-events: auto;
    margin: 0 auto;
    width: 100%;
    max-width: calc(95% - (var(--scroll-progress) * 35%)); 
    margin-top: calc(var(--scroll-progress) * 0.2rem);
    padding-top: calc(var(--scroll-progress) * 0.5rem);
    padding-bottom: calc(var(--scroll-progress) * 0.5rem);
    padding-left: calc(1rem + var(--scroll-progress) * 2rem);
    padding-right: calc(1rem + var(--scroll-progress) * 2rem);
    background: rgba(255, 255, 255, calc(var(--scroll-progress) * 0.01));
    backdrop-filter: blur(calc(var(--scroll-progress) * 12px));
    -webkit-backdrop-filter: blur(calc(var(--scroll-progress) * 12px));
    border-radius: calc(var(--scroll-progress) * 50px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, calc(var(--scroll-progress) * 0.3));
    transition: box-shadow 0.2s; 
}

.nav-link { 
    position: relative; 
    font-size: 0.75rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    opacity: 0.6; 
    transition: 0.3s; 
    color: white; 
}

.nav-link:hover, .nav-link.active { 
    opacity: 1; 
    color: #6366f1; 
}

.nav-link::after { 
    content: ''; 
    position: absolute; 
    width: 6px; 
    height: 6px; 
    background: #6366f1; /* Brand color */
    border-radius: 50%; 
    bottom: -12px; 
    left: 50%; 
    transform: translateX(-50%) scale(0);
    /* Removed transition property here to avoid conflict with animation */
}

/* Hover effect handled by transition */
.nav-link:hover::after { 
    transform: translateX(-50%) scale(1); 
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Active State - Animation runs on page load */
.nav-link.active::after { 
    /* Ensure final state is visible if animation fails or finishes */
    transform: translateX(-50%) scale(1);
    animation: underlineAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Keyframes with a slight delay to ensure it's noticeable */
@keyframes underlineAppear {
    0% { transform: translateX(-50%) scale(0); }
    30% { transform: translateX(-50%) scale(0); } /* Delay start */
    100% { transform: translateX(-50%) scale(1); }
}

#canvas-container { 
    position: absolute; 
    inset: 0; 
    z-index: 0; 
    pointer-events: none; 
}

.hero-fade-transition { 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
    height: 30vh; 
    background: linear-gradient(to bottom, transparent, var(--bg-primary)); 
    z-index: 5; 
}

/* Hero fade en mode light - fondu vers blanc/gris clair */
[data-theme="light"] .hero-fade-transition {
    background: linear-gradient(to bottom, transparent, var(--bg-primary)) !important;
}

.scrollbar-hide::-webkit-scrollbar { 
    display: none; 
}

#carousel, #reviews-carousel { 
    scroll-behavior: smooth; 
}

.nav-carousel-btn { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 20; 
    transition: 0.4s; 
    color: white; 
    cursor: pointer; 
}

.nav-carousel-btn:hover { 
    background: white; 
    color: black; 
    transform: translateY(-50%) scale(1.1); 
}

.dot { 
    width: 8px; 
    height: 8px; 
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 50%; 
    transition: 0.4s; 
    cursor: pointer; 
}

.dot.active { 
    background: #6366f1; 
    width: 32px; 
    border-radius: 4px; 
}

.glass {
    /* Glass plus neutre mais permettant au background violet de passer */
    background: rgba(255, 255, 255, 0.03); 
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

.contact-input { 
    width: 100%; 
    background: rgba(255, 255, 255, 0.04); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 1.25rem; 
    border-radius: 1rem; 
    color: white; 
    outline: none; 
    transition: 0.3s; 
}

.contact-input:focus { 
    border-color: #6366f1; 
    background: rgba(255, 255, 255, 0.08); 
}

/* Styles pour les erreurs de formulaire */
.contact-input.border-red-500 {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05);
}

.contact-input.border-red-500:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Animation pour le feedback */
#form-feedback {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* État désactivé du bouton */
#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#submit-btn:disabled:hover {
    background: white;
    color: black;
}

/* --- ANIMATIONS & INTERACTIONS --- */

/* Animation de flottement fluide */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
    transition: all 0.5s ease;
}

/* Interaction au survol : Pause l'animation et zoom léger */
.animate-float:hover {
    animation-play-state: paused;
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4); /* Couleur brand */
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.1);
}

/* ==========================================
   EFFET SPOTLIGHT INTERACTIF
   ========================================== */

.glass-spotlight {
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

.glass-spotlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x) var(--mouse-y),
        rgba(99, 102, 241, 0.15),
        rgba(168, 85, 247, 0.1),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.glass-spotlight:hover::before {
    opacity: 1;
}

/* =========================================
   NOUVEAU CARROUSEL MODERNE (CLEAN FIX)
   ========================================= */

.modern-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 500px;
    margin: 0 auto;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.modern-carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    background: #111;
    cursor: pointer;
    will-change: transform, opacity;
}

.modern-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.modern-carousel-overlay {
    position: absolute;
    inset: 0;
    background: black;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.modern-carousel-item:not(.active) .modern-carousel-overlay {
    opacity: 0.5;
}

/* --- Styles spécifiques Projets vs Avis --- */
.project-style {
    width: 650px;
    height: 400px;
}

/* --- Boutons Navigation --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.nav-btn:hover { 
    background: white; 
    color: black; 
    transform: translateY(-50%) scale(1.1);
}
.nav-prev { left: 20px; }
.nav-next { right: 20px; }

/* Responsive Mobile */
@media (max-width: 768px) {
    .modern-carousel-container { height: 400px; }
    .project-style { width: 320px; height: 220px; }
    .nav-btn { width: 40px; height: 40px; }
    .nav-prev { left: 10px; }
    .nav-next { right: 10px; }
}

/* =============================
   ANIMATION FLOTTANTE
   ============================= */
@keyframes float-card {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -15px; }
}

.modern-carousel-item {
    animation: float-card 6s ease-in-out infinite;
}

.modern-carousel-item:nth-child(odd) {
    animation-delay: 1s;
}

/* =============================
   HAMBURGER MENU STYLES
   ============================= */
#hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
#hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
#mobile-menu.open {
    transform: translateY(0);
}

.mobile-nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link[data-active="true"] {
    opacity: 1;
    color: #6366f1;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #6366f1;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-nav-link:hover::after,
.mobile-nav-link[data-active="true"]::after {
    width: 50%;
}

/* =============================
   RESPONSIVE IMPROVEMENTS
   ============================= */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: -0.02em;
    }
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem !important; }
    .intro-brand {
        font-size: 2rem;
    }
    .intro-logo {
        width: 50px;
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    h1 { font-size: 3.5rem !important; }
    h2 { font-size: 2.5rem !important; }
}
@media (max-width: 768px) {
    .max-w-\[95\%\] {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    .grid-cols-1.md\:grid-cols-3,
    .grid-cols-1.md\:grid-cols-4 {
        gap: 1rem;
    }
    .glass {
        padding: 1.5rem;
    }
    .glass.p-10,
    .glass.p-16 {
        padding: 1.5rem !important;
    }
    .rounded-\[3rem\] {
        border-radius: 1.5rem;
    }
    .rounded-\[2rem\] {
        border-radius: 1rem;
    }
    footer .flex-col.md\:flex-row {
        text-align: center;
    }
    footer nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 640px) {
    #projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    .project-simple-card img {
        height: 180px;
    }
    .project-title-overlay {
        font-size: 1.1rem;
        padding: 1rem;
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    #projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}
@media (max-width: 640px) {
    #project-filters {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    #project-filters .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
}
@media (max-width: 768px) {
    #home .sticky {
        height: auto;
        min-height: 100vh;
    }
    .hero-text-side {
        padding: 2rem 0;
    }
    .hero-text-side h2 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }
    .hero-text-side p {
        font-size: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (max-width: 768px) {
    #processus .flex-col.md\:flex-row {
        gap: 2rem;
    }
    #processus .flex-1 {
        width: 100%;
    }
}
@media (max-width: 768px) {
    #team .flex-col.md\:flex-row {
        gap: 2rem;
    }
    #team .md\:w-1\/3 {
        width: 100%;
    }
    #team .w-32.h-32 {
        width: 100px;
        height: 100px;
    }
}
@media (max-width: 768px) {
    #contact-cta .glass {
        padding: 2rem 1.5rem !important;
    }
    #contact-cta h2 {
        font-size: 1.8rem !important;
    }
    #contact-cta a {
        padding: 1rem 2rem;
        font-size: 0.75rem;
    }
}
@media (max-width: 768px) {
    #cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    #cookie-banner .flex {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 1024px) {
    #project-modal #modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    #project-modal .grid-cols-1.lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    #project-modal .relative.h-72.lg\:h-auto {
        height: 250px;
    }
    #project-modal .p-8.md\:p-12 {
        padding: 1.5rem;
    }
    #modal-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    #modal-gallery img {
        height: 50px;
        object-fit: contain;
        background: rgba(0,0,0,0.3);
    }
}
@media (min-width: 1025px) {
    #project-modal #modal-content {
        max-height: 90vh;
    }
    #modal-gallery {
        gap: 0.75rem;
    }
    #modal-gallery img {
        height: 80px;
        object-fit: contain;
        background: rgba(0,0,0,0.3);
        border-radius: 0.5rem;
    }
}
@media (max-width: 768px) {
    #chiffres .grid {
        gap: 1rem;
    }
    #chiffres .text-5xl {
        font-size: 2.5rem;
    }
}
@media (max-width: 768px) {
    #expertises .grid {
        gap: 1rem;
    }
}
@media (max-width: 768px) {
    #engagements .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    #engagements .glass {
        padding: 1.5rem;
    }
    #engagements h3 {
        font-size: 0.9rem;
    }
    #engagements p {
        font-size: 0.75rem;
    }
}
@media (max-width: 480px) {
    #engagements .grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .nav-prev { left: 5px; }
    .nav-next { right: 5px; }
}

html {
    scroll-behavior: smooth;
}
body, html {
    overflow-x: hidden;
    max-width: 100vw;
}
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
    .nav-link {
        padding: 0.5rem;
    }
}
@media print {
    nav, footer, #cookie-banner, .nav-btn {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}

footer {
    background: #080808;
}

/* Light mode footer */
[data-theme="light"] footer {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

footer a {
    position: relative;
    display: inline-flex;
    align-items: center;
}
footer ul li a {
    transition: all 0.3s ease;
}
footer ul li a:hover {
    transform: translateX(5px);
}
footer .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   LIGHT MODE - PROJETS PAGE FIX
   ========================================== */

/* Page projets - fond gris clair propre */
[data-theme="light"] main.bg-bg,
[data-theme="light"] main[class*="bg-bg"] {
    background-color: var(--bg-primary) !important;
}

/* Boutons de filtre projets en mode light */
[data-theme="light"] #project-filters button {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="light"] #project-filters button:hover,
[data-theme="light"] #project-filters button.active {
    background-color: var(--brand) !important;
    color: white !important;
    border-color: var(--brand) !important;
}

/* Cartes de projets en mode light - GARDER LE STYLE SOMBRE pour les images */
[data-theme="light"] #projects-grid > div,
[data-theme="light"] .project-simple-card {
    background-color: #18181b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] #projects-grid > div:hover,
[data-theme="light"] .project-simple-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Overlay titre des projets - GARDER SOMBRE */
[data-theme="light"] .project-title-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0) 100%) !important;
    color: white !important;
}

[data-theme="light"] .project-title-overlay h3,
[data-theme="light"] .project-title-overlay span {
    color: white !important;
}

/* Glass CTA en mode light */
[data-theme="light"] .glass {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md);
}

/* Overlay gradient en mode light - complètement transparent */
[data-theme="light"] .bg-gradient-to-b.from-transparent.to-bg,
[data-theme="light"] .bg-gradient-to-b[class*="to-bg"] {
    background: linear-gradient(to bottom, transparent, var(--bg-primary)) !important;
}

/* ==========================================
   LIGHT MODE - CORRECTIONS COMPLÈTES
   ========================================== */

/* 1. PAGE CONTACT - Texte "expérience inoubliable" lisible */
[data-theme="light"] .text-transparent.bg-clip-text.bg-gradient-to-r.from-white {
    background: linear-gradient(to right, #18181b, #6366f1, #4f46e5) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* 2. MODAL PROJETS - Fond clair avec texte lisible */
[data-theme="light"] #project-modal #modal-content {
    background: white !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #project-modal #modal-backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="light"] #project-modal .text-white,
[data-theme="light"] #project-modal h2,
[data-theme="light"] #project-modal h4,
[data-theme="light"] #project-modal p {
    color: #18181b !important;
}

[data-theme="light"] #project-modal .text-gray-300,
[data-theme="light"] #project-modal .text-gray-400,
[data-theme="light"] #project-modal .text-gray-500 {
    color: #52525b !important;
}

[data-theme="light"] #project-modal #modal-close {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #18181b !important;
}

[data-theme="light"] #project-modal #modal-close:hover {
    background: var(--brand) !important;
    color: white !important;
}

[data-theme="light"] #project-modal .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] #project-modal #modal-services span {
    background: rgba(79, 70, 229, 0.1) !important;
    color: var(--brand) !important;
    border-color: var(--brand) !important;
}

/* Zoom controls en mode light */
[data-theme="light"] #project-modal #zoom-in,
[data-theme="light"] #project-modal #zoom-out,
[data-theme="light"] #project-modal #zoom-reset {
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
}

/* 3. PAGE HÉBERGEMENT - Cartes avec fond clair et bon contraste */
[data-theme="light"] .bg-\[\#111\],
[data-theme="light"] [class*="bg-[#111]"],
[data-theme="light"] .bg-\[\#0a0a0a\],
[data-theme="light"] [class*="bg-[#0a0a0a]"] {
    background: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .bg-\[\#111\] h3,
[data-theme="light"] [class*="bg-[#111]"] h3,
[data-theme="light"] .bg-\[\#0a0a0a\] h3,
[data-theme="light"] [class*="bg-[#0a0a0a]"] h3 {
    color: #18181b !important;
}

[data-theme="light"] .bg-\[\#111\] p,
[data-theme="light"] [class*="bg-[#111]"] p,
[data-theme="light"] .bg-\[\#0a0a0a\] p,
[data-theme="light"] [class*="bg-[#0a0a0a]"] p,
[data-theme="light"] .bg-\[\#111\] .text-gray-400,
[data-theme="light"] .bg-\[\#0a0a0a\] .text-gray-400 {
    color: #52525b !important;
}

/* Plans hébergement en mode light */
[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\],
[data-theme="light"] [class*="from-[#15151b]"] {
    background: linear-gradient(to bottom, #f8f8fc, white) !important;
    border: 2px solid var(--brand) !important;
}

[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] h3,
[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] .text-white {
    color: #18181b !important;
}

[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] .text-gray-400,
[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] .text-gray-500 {
    color: #52525b !important;
}

/* Liste features hébergement */
[data-theme="light"] .bg-\[\#0a0a0a\] li,
[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] li {
    color: #3f3f46 !important;
}

[data-theme="light"] .bg-\[\#0a0a0a\] .text-sm.text-gray-300,
[data-theme="light"] .bg-gradient-to-b.from-\[\#15151b\] .text-sm.text-white {
    color: #3f3f46 !important;
}

/* Boutons plans */
[data-theme="light"] .bg-white\/5.border.border-white\/10 {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #18181b !important;
}

[data-theme="light"] .bg-white\/5.border.border-white\/10:hover {
    background: var(--brand) !important;
    color: white !important;
}

/* 4. PAGE APPLICATION SAAS - Supprimer dégradé sombre en bas */
[data-theme="light"] section.py-32.relative.z-10.px-6 {
    background: var(--bg-primary) !important;
}

/* Glass glow en mode light - pas de dégradé sombre autour */
[data-theme="light"] .glass-glow {
    background: white !important;
    box-shadow: 0 8px 40px rgba(79, 70, 229, 0.15), 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* 5. Tous les textes gris doivent être visibles */
[data-theme="light"] .text-gray-300 {
    color: #3f3f46 !important;
}

[data-theme="light"] .text-gray-400 {
    color: #52525b !important;
}

[data-theme="light"] .text-gray-500 {
    color: #71717a !important;
}

/* 6. Bordures et séparateurs */
[data-theme="light"] .border-white\/5,
[data-theme="light"] .border-white\/10,
[data-theme="light"] .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* 7. Stack technique badges en mode light */
[data-theme="light"] .border.border-white\/10.bg-white\/5 {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #3f3f46 !important;
}

[data-theme="light"] .border.border-white\/10.bg-white\/5:hover {
    background: rgba(79, 70, 229, 0.1) !important;
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}

/* 8. Glass spotlight cards en mode light */
[data-theme="light"] .glass-spotlight {
    background: white !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .glass-spotlight:hover {
    border-color: rgba(79, 70, 229, 0.3) !important;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.1) !important;
}

[data-theme="light"] .glass-spotlight h3 {
    color: #18181b !important;
}

[data-theme="light"] .glass-spotlight p {
    color: #52525b !important;
}

/* 9. Footer en mode light */
[data-theme="light"] footer {
    background: #f4f4f5 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] footer .text-white,
[data-theme="light"] footer span,
[data-theme="light"] footer a:not(:hover) {
    color: #18181b !important;
}

[data-theme="light"] footer .text-gray-400,
[data-theme="light"] footer .text-gray-500 {
    color: #52525b !important;
}

[data-theme="light"] footer .bg-white\/5 {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* 10. Header gradient texts */
[data-theme="light"] h1 .text-transparent.bg-clip-text,
[data-theme="light"] h2 .text-transparent.bg-clip-text {
    background: linear-gradient(to right, #4f46e5, #7c3aed, #6366f1) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* 11. Page SaaS - Supprimer le dégradé sombre en bas */
[data-theme="light"] .saas-bottom-fade {
    display: none !important;
}

/* 12. Carousel projets dans accueil - garder sombre */
[data-theme="light"] .project-card,
[data-theme="light"] #projects-carousel-container .project-card {
    background: #18181b !important;
}

[data-theme="light"] .project-card h3 {
    color: #6366f1 !important;
}

[data-theme="light"] .project-card .project-desc {
    background: rgba(0, 0, 0, 0.68) !important;
    color: white !important;
}

/* 13. Cookie banner en mode light */
[data-theme="light"] #cookie-banner {
    background: white !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #18181b !important;
}

[data-theme="light"] #cookie-banner span {
    color: #3f3f46 !important;
}

[data-theme="light"] #cookie-refuse {
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #18181b !important;
}

[data-theme="light"] #cookie-refuse:hover {
    background: #18181b !important;
    color: white !important;
}

/* 14. Dropdown navigation en mode light */
[data-theme="light"] .bg-\[\#050505\]\/95,
[data-theme="light"] [class*="bg-[#050505]/95"],
[data-theme="light"] .group:hover > div > div.bg-\[\#050505\]\/95,
[data-theme="light"] nav .group > div > div,
[data-theme="light"] .group .absolute > div,
[data-theme="light"] nav .group .absolute.pt-8 > div {
    background: white !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Assurer que le dropdown reste visible */
[data-theme="light"] .group:hover > .absolute {
    visibility: visible !important;
    opacity: 1 !important;
}

[data-theme="light"] .bg-\[\#050505\]\/95 a,
[data-theme="light"] [class*="bg-[#050505]/95"] a,
[data-theme="light"] nav .group > div > div a,
[data-theme="light"] nav .group .absolute a {
    color: #3f3f46 !important;
}

[data-theme="light"] .bg-\[\#050505\]\/95 a:hover,
[data-theme="light"] [class*="bg-[#050505]/95"] a:hover,
[data-theme="light"] nav .group > div > div a:hover {
    background: rgba(79, 70, 229, 0.1) !important;
}

[data-theme="light"] .bg-\[\#050505\]\/95 a:hover span,
[data-theme="light"] [class*="bg-[#050505]/95"] a:hover span,
[data-theme="light"] nav .group > div > div a:hover span {
    color: var(--brand) !important;
}

[data-theme="light"] .bg-\[\#050505\]\/95 .bg-white\/5,
[data-theme="light"] [class*="bg-[#050505]/95"] .bg-white\/5,
[data-theme="light"] nav .group > div > div .bg-white\/5 {
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] nav .group > div > div a .text-gray-300,
[data-theme="light"] nav .group > div > div a .text-gray-400,
[data-theme="light"] nav .group > div > div a span {
    color: #3f3f46 !important;
}

/* 15. Titre principal en mode light */
[data-theme="light"] .font-display.text-white,
[data-theme="light"] h1.text-white,
[data-theme="light"] h2.text-white {
    color: #18181b !important;
}

/* 16. Gradient text hero - "expérience inoubliable" lisible en mode light */
[data-theme="light"] .gradient-text-hero {
    background: linear-gradient(to right, #18181b, #6366f1, #4f46e5) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

/* 17. Code preview en mode light - garder sombre (c'est un éditeur de code) */
[data-theme="light"] .bg-\[\#0f1117\],
[data-theme="light"] [class*="bg-[#0f1117]"] {
    background: #0f1117 !important;
}

/* 18. Plan Pro Hébergement - VISIBLE en mode light */
[data-theme="light"] .pricing-plan-pro {
    background: linear-gradient(to bottom, #f0f0ff, #fafaff) !important;
    border: 2px solid var(--brand) !important;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15) !important;
    opacity: 1 !important;
    display: block !important;
}

[data-theme="light"] .pricing-plan-pro .plan-title {
    color: #18181b !important;
}

[data-theme="light"] .pricing-plan-pro .plan-subtitle {
    color: #52525b !important;
}

[data-theme="light"] .pricing-plan-pro .plan-features li {
    color: #3f3f46 !important;
}

[data-theme="light"] .pricing-plan-pro:hover {
    box-shadow: 0 12px 50px rgba(79, 70, 229, 0.25) !important;
}

/* Plans Hébergement - background sombre pour le plan Essentiel */
[data-theme="light"] .bg-\[\#0a0a0a\] {
    background: #0f0f12 !important;
}
/* Plans Hébergement - background blanc pour le plan Essentiel et les cards en mode light */
[data-theme="light"] .bg-\[\#0a0a0a\],
[data-theme="light"] .bg-\[\#111\] {
    background: #fff !important;
    color: #18181b !important;
}

/* Rendre les titres, prix et textes visibles en light mode pour les plans et cards */
[data-theme="light"] .bg-\[\#0a0a0a\] h3,
[data-theme="light"] .bg-\[\#0a0a0a\] .font-bold,
[data-theme="light"] .bg-\[\#0a0a0a\] .text-gray-400,
[data-theme="light"] .bg-\[\#0a0a0a\] .text-gray-500,
[data-theme="light"] .bg-\[\#0a0a0a\] p,
[data-theme="light"] .bg-\[\#111\] h3,
[data-theme="light"] .bg-\[\#111\] .font-bold,
[data-theme="light"] .bg-\[\#111\] .text-gray-400,
[data-theme="light"] .bg-\[\#111\] .text-gray-500,
[data-theme="light"] .bg-\[\#111\] p {
    color: #18181b !important;
}
}

/* Tous les prix et textes sur les plans hébergement */
[data-theme="light"] section .bg-\[\#0a0a0a\] h3,
[data-theme="light"] section .bg-\[\#0a0a0a\] span.font-bold {
    color: white !important;
}

[data-theme="light"] section .pricing-plan-pro .text-4xl.font-bold {
    color: var(--brand) !important;
}

/* Cards features hébergement - garder sombres */
[data-theme="light"] .bg-\[\#111\] {
    background: #fff !important;
    color: #18181b !important;
}

[data-theme="light"] .bg-\[\#111\] h3,
[data-theme="light"] .bg-\[\#111\] .font-bold,
[data-theme="light"] .bg-\[\#111\] .text-gray-400,
[data-theme="light"] .bg-\[\#111\] .text-gray-500,
[data-theme="light"] .bg-\[\#111\] p {
    color: #18181b !important;
}
}

[data-theme="light"] .bg-\[\#111\] h3 {
    color: white !important;
}

/* 19. Glass spotlight avec effet hover simple et fluide */
.glass-spotlight {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-spotlight:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .glass-spotlight:hover {
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
}

/* 20. Effet hover sur les previews - simple et performant */
.glass.glass-spotlight {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass.glass-spotlight:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .glass.glass-spotlight:hover {
    box-shadow: 0 25px 50px rgba(79, 70, 229, 0.15);
}

/* Effet sur les images de preview - simple */
.parallax-float {
    transition: transform 0.3s ease;
}

.parallax-float:hover {
    transform: translateY(-10px);
}

.parallax-float .glass-spotlight {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parallax-float:hover .glass-spotlight {
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .parallax-float:hover .glass-spotlight {
    box-shadow: 0 30px 60px rgba(79, 70, 229, 0.15);
}

/* 21. Intro overlay en mode light */
[data-theme="light"] #intro-overlay {
    background: var(--bg-primary) !important;
}

[data-theme="light"] #intro-overlay .intro-brand {
    color: #18181b !important;
}

/* 19. Icônes dans les cards hébergement/services */
[data-theme="light"] .bg-brand\/10,
[data-theme="light"] .bg-brand\/20 {
    background: rgba(79, 70, 229, 0.1) !important;
}

[data-theme="light"] .bg-blue-500\/10 {
    background: rgba(59, 130, 246, 0.1) !important;
}

[data-theme="light"] .bg-green-500\/10 {
    background: rgba(34, 197, 94, 0.1) !important;
}

[data-theme="light"] .bg-purple-500\/10 {
    background: rgba(168, 85, 247, 0.1) !important;
}

/* 20. Séparateur horizontal */
[data-theme="light"] .bg-gradient-to-r.from-transparent.via-white\/10.to-transparent {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1), transparent) !important;
}

/* 21. Prix et features - s'assurer qu'ils sont visibles */
[data-theme="light"] .text-4xl.font-bold,
[data-theme="light"] .text-5xl.font-bold {
    color: #18181b !important;
}

[data-theme="light"] .text-\[\#6366f1\] {
    color: var(--brand) !important;
}

/* 22. Liens email et autres en mode light */
[data-theme="light"] a.border-b.border-white\/20 {
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #18181b !important;
}

/* 23. Boutons sociaux en mode light */
[data-theme="light"] .border.border-white\/20.flex.items-center.justify-center {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #3f3f46 !important;
}

[data-theme="light"] .border.border-white\/20.flex.items-center.justify-center:hover {
    background: #18181b !important;
    color: white !important;
}

/* 24. Modern carousel projects - garder sombre */
[data-theme="light"] .modern-carousel-container .project-card,
[data-theme="light"] #projects-carousel-container .project-card {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 25. Glass cards - assurer le bon contraste */
[data-theme="light"] .glass h3,
[data-theme="light"] .glass h2 {
    color: #18181b !important;
}

[data-theme="light"] .glass p {
    color: #52525b !important;
}

/* 26. Formulaire contact en mode light */
[data-theme="light"] .glass input,
[data-theme="light"] .glass textarea,
[data-theme="light"] .glass select {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #18181b !important;
}

[data-theme="light"] .glass input::placeholder,
[data-theme="light"] .glass textarea::placeholder {
    color: #a1a1aa !important;
}

/* SaaS Bar Animation */
@keyframes barEnter {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}
@keyframes barFluctuate {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.7); }
}
.animate-bar {
    transform-origin: bottom;
    animation: barEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards, 
               barFluctuate 3s ease-in-out 0.8s infinite;
}
.animate-bar-delay-1 { animation-delay: 0.1s, 0.9s; }
.animate-bar-delay-2 { animation-delay: 0.2s, 1.0s; }
.animate-bar-delay-3 { animation-delay: 0.3s, 1.1s; }

.typing-line {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #6366f1;
    width: 0;
    animation: typing 4s steps(20, end) infinite;
    display: inline-flex;
    vertical-align: bottom;
}
@keyframes typing {
    0% { width: 0 }
    40% { width: 100% }
    80% { width: 100% }
    95% { width: 0 }
    100% { width: 0 }
}



/* ANIMATION ACTIVE LINK ON LOAD */
@keyframes underlineSlideIn {
    from { transform: translateX(-50%) scale(0); }
    to { transform: translateX(-50%) scale(1); }
}

.nav-link.active::after {
    animation: underlineSlideIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}


/* ==========================================
   SMART NAVBAR TRANSPARENCY FIX
   ========================================== */

/* Init: Transparent by default for both themes at top */
nav, nav > div {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important; /* Force no border */
    border-color: transparent !important;
    transition: all 0.4s ease;
}

/* Scrolled: Dark Theme */
nav.scrolled > div {
    background: rgba(5, 5, 5, 0.01) !important; /* Quasi-transparent pour laisser le flou agir seul */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Scrolled: Light Theme - MATCHING DARK MODE BLUR (Lower blur, lower opacity) */
[data-theme='light'] nav.scrolled > div {
    background: rgba(255, 255, 255, 0.6) !important; /* Reduced from 0.75 */
    backdrop-filter: blur(12px) !important; /* Reduced from 20px */
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    border-radius: 50px !important;
}

/* Remove borders on nav element itself if valid */
nav.scrolled {
    border-bottom: none !important;
}


/* ANIMATION TRANSITION LONGER */
#intro-overlay {
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out !important;
}

