/* ==========================================================================
   1. VARIABLES & CONFIGURATION
   ========================================================================== */
:root {
    --primary: #3b82f6;
    --accent: #00B4D8;
    --dark-bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --transition-base: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   2. COMPOSANTS (Nav, Modales, Scroll)
   ========================================================================== */
/* À ajouter dans styles.css */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03; /* Très subtil */
    pointer-events: none;
    z-index: 9999;
    background-image: url("https://upload.wikimedia.org/wikipedia/commons/7/76/1k_Noise_Condition.png");
}


/* Barre de navigation au scroll */
.nav-scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Liens de navigation avec soulignement */
.nav-link {
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Système de Modale */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(7, 10, 19, 0.95);
    backdrop-filter: blur(8px);
    transition: var(--transition-base);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar Personnalisée (Modales & Body) */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   3. EFFETS VISUELS & TEXTE
   ========================================================================== */

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   4. ANIMATIONS (Keyframes & Classes)
   ========================================================================== */

/* Fade In Up (Entrée des sections) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating (Images et Badges) */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Gradient Flow (Texte animé) */
@keyframes gradient-flow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Simple Fade */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Classes d'animation */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-float {
    /*animation: float 5s ease-in-out infinite;*/
    position: relative;
    z-index: 20; /* Passe au-dessus des halos de fond */
}

#home .animate-float {
    opacity: 1 !important;
    transform: none !important;
}

.animate-spin-slow {
    animation: spin 12s linear infinite;
}

.animate-gradient-flow {
    background-size: 200% auto;
    animation: gradient-flow 4s linear infinite;
}

/* Preloader */
@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}
.animate-progress {
    animation: progress 1.5s ease-in-out forwards;
}
/* Empêcher le scroll pendant le chargement */
body.loading {
    overflow: hidden;
}