/* ==========================================================================
   CSS GLOBAL - DALLE WEB & APP (APPLE x IMMERSIF BLEU - MASTER)
   Variables, Reset, Typographie, Effets, Animations & Cookies
   ========================================================================== */

:root {
    /* Couleurs de fond et surfaces */
    --bg-dark: #030406;
    --bg-black-deep: #000000;
    
    /* Couleurs de marque */
    --primary-blue: #0066cc;
    --secondary-cyan: #00b4d8;
    
    /* Typographie */
    --text-main: #ffffff;
    --text-muted: #9ca3af; /* Contraste optimisé WCAG */
    
    /* Effets de verre (Glassmorphism) */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(0, 180, 216, 0.15);
    
    /* Animation globale */
    --transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Polices système */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Fira Code', 'JetBrains Mono', Consolas, monospace;
}

/* ==========================================
   1. RESET & BASE (Optimisation Navigateur)
   ========================================== */
*, *::before, *::after { 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
    background-color: var(--bg-dark); 
}

body {
    margin: 0; 
    padding: 0;
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

a, button { outline: none; }
a:focus-visible, button:focus-visible { 
    outline: 2px solid var(--secondary-cyan); 
    outline-offset: 4px; 
    border-radius: 4px; 
}

/* ==========================================
   2. TYPOGRAPHIE & COULEURS GLOBALES
   ========================================== */
.text-gradient-blue { background: linear-gradient(90deg, var(--secondary-cyan), var(--primary-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-gradient-cyan { background: linear-gradient(90deg, #fff, var(--secondary-cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.text-main { color: var(--text-main); } 
.text-muted { color: var(--text-muted); }

/* ==========================================
   3. EFFETS GLOBAUX : HALOS & TECH THREAD
   ========================================== */
/* Ligne de scroll lumineuse */
.tech-thread-wrapper { position: fixed; top: 0; left: 2vw; width: 2px; height: 100vh; z-index: 9999; pointer-events: none; }
.tech-thread-track { width: 100%; height: 100%; background: rgba(255, 255, 255, 0.05); position: relative; }
.tech-thread-fill { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(to bottom, var(--secondary-cyan), var(--primary-blue)); box-shadow: 0 0 15px var(--secondary-cyan); will-change: height; }
.tech-thread-glow { position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 50%); width: 12px; height: 12px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 20px 8px var(--secondary-cyan); }

/* Halos radiaux GPU */
.ambient-glow { position: absolute; border-radius: 50%; filter: blur(150px); opacity: 0.15; pointer-events: none; mix-blend-mode: screen; z-index: 0; will-change: transform; }

/* Indicateurs d'état */
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.green { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.status-dot.cyan { background: var(--secondary-cyan); box-shadow: 0 0 8px var(--secondary-cyan); }
.status-dot.blue { background: var(--primary-blue); box-shadow: 0 0 8px var(--primary-blue); }
.pulse-anim { animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

/* ==========================================
   4. SYSTÈME D'ANIMATIONS (Scroll Reveal)
   ========================================== */
.reveal { opacity: 0; transition: opacity var(--transition), transform var(--transition); will-change: opacity, transform; }
.reveal-up { transform: translateY(50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal.is-visible { opacity: 1; transform: translate(0); }

.stagger-1 { transition-delay: 0.2s; }
.stagger-2 { transition-delay: 0.4s; }

.float-animation { animation: floatEdge 6s ease-in-out infinite; }
.float-animation-slow { animation: floatEdge 8s ease-in-out infinite; }
@keyframes floatEdge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* ==========================================
   5. BANNIÈRE DE COOKIES (BAS-DROITE)
   ========================================== */
.cookie-glass-banner { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    left: auto;
    transform: translateY(30px); 
    width: auto; 
    max-width: 700px; 
    background: rgba(10, 15, 25, 0.85); 
    backdrop-filter: blur(25px); 
    border: 1px solid var(--glass-border); 
    border-radius: 100px; 
    padding: 0.8rem 1rem 0.8rem 1.5rem; 
    display: none; 
    flex-direction: row; 
    align-items: center;
    justify-content: space-between;
    gap: 2rem; 
    z-index: 99999; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.85), inset 0 0 20px rgba(0, 180, 216, 0.1); 
    opacity: 0;
}

@keyframes slideUp { to { transform: translateY(0); opacity: 1; } }
@keyframes slideDown { to { transform: translateY(30px); opacity: 0; } }

.cookie-info-wrapper {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* Le conteneur du logo avec fond blanc net */
.cookie-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 6px 14px;
    background: #ffffff; /* Fond blanc pur pour conserver le texte noir et l'orange intacts */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Logo original sans aucun filtre d'inversion */
.cookie-logo-img {
    height: 100%;
    width: auto;
    max-height: 26px;
    object-fit: contain;
}

.cookie-content { text-align: left; }
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

.btn-cookie-solid { 
    background: linear-gradient(135deg, var(--secondary-cyan), var(--primary-blue)); 
    color: #fff; border: none; padding: 0.6rem 1.2rem; border-radius: 40px; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: 0.3s; white-space: nowrap;
}
.btn-cookie-solid:hover { filter: brightness(1.2); box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4); }

.btn-cookie-outline { 
    background: transparent; color: var(--text-muted); border: 1px solid var(--glass-border); padding: 0.6rem 1.2rem; border-radius: 40px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: 0.3s; white-space: nowrap;
}
.btn-cookie-outline:hover { border-color: var(--text-main); color: var(--text-main); background: rgba(255,255,255,0.05); }

/* ==========================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1024px) {
    .tech-thread-wrapper { display: none; }
}

@media (max-width: 768px) {
    .cookie-glass-banner { 
        bottom: 15px; 
        right: 15px; 
        left: 15px; 
        width: auto;
        border-radius: 24px;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    .cookie-info-wrapper { flex-direction: column; text-align: center; }
    .cookie-content { text-align: center; }
    .cookie-actions { width: 100%; justify-content: center; flex-direction: row; }
    .cookie-actions button { flex: 1; }
}