/* =========================================================
   AZZERA INVEST | CSS ULTRA-PREMIUM (HAUTE COUTURE)
   ========================================================= */

:root {
    /* Palette de base */
    --primary-invest: #141c25; 
    --gold-accent: #c5a880; 
    --gray-main: #2d2d2f; 
    --gray-bg: #f8f8fa; 
    --white: #ffffff;
    
    /* Courbes mathématiques (Timing pur pour les animations) */
    --ease-fast: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-epic: cubic-bezier(0.22, 1, 0.36, 1);

    /* Transitions complètes (Pour les survols au clic/souris) */
    --transition-fast: all 0.4s var(--ease-fast);
    --transition-smooth: all 0.8s var(--ease-fast);
}

/* --- OPTIMISATIONS RENDU & SELECTION --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--gray-main); 
    background: var(--white); 
    line-height: 1.6; 
    /* Lissage typographique ultra-net */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 1. LE GRAIN PHOTOGRAPHIQUE (Effet matière sur tout le site) */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03; 
    pointer-events: none; 
    z-index: 9999; 
}

/* Surlignage du texte en mode Luxe */
::selection { background: var(--gold-accent); color: var(--primary-invest); }

/* Scrollbar sur-mesure ultra fine */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-bg); }
::-webkit-scrollbar-thumb { background: var(--primary-invest); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-accent); }

.container { max-width: 1150px; margin: 0 auto; padding: 0 40px; }

/* --- NAVIGATION CORPORATE (Top Bar) --- */
.topbar-corporate {
    background: #0a0e13 !important; 
    height: 35px;
    padding: 0; 
    display: flex;
    align-items: center; 
    justify-content: center;
    width: 100%;
}

.topbar-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 40px;
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
    align-items: center;
}

.topbar-links a {
    color: rgba(255, 255, 255, 0.4) !important;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: var(--transition-fast);
    display: block;
}

.topbar-links a:hover, .topbar-links a.active {
    color: var(--white) !important; 
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* --- HEADER & NAVIGATION PRINCIPALE --- */
.main-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(20, 28, 37, 0.03);
    transition: var(--transition-smooth);
    opacity: 0; animation: fadeUp 1s var(--ease-epic) forwards;
}

.header-flex {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a { 
    display: flex; align-items: center; gap: 15px; text-decoration: none; color: inherit; 
    transition: var(--transition-fast);
}
.logo a:hover { opacity: 0.8; }

.main-nav ul { display: flex; list-style: none; gap: 45px; align-items: center; }
.main-nav a { 
    position: relative;
    text-decoration: none; 
    color: var(--gray-main); 
    font-weight: 600; 
    font-size: 12px; 
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-fast); 
    padding-bottom: 5px;
}

/* Soulignement or au survol des liens */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: var(--gold-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-fast);
}
.main-nav a:hover::after, .main-nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}
.main-nav a:hover, .main-nav a.active { color: var(--primary-invest); }

/* --- BOUTONS PREMIUM (Sweep Shine) --- */
.btn-primary-invest, .btn-primary-invest-light {
    position: relative;
    padding: 18px 45px; 
    border-radius: 2px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block; 
    overflow: hidden; 
    transition: var(--transition-smooth); 
    z-index: 1;
}

.btn-primary-invest { 
    background: var(--primary-invest); 
    color: var(--white); 
    border: 1px solid var(--primary-invest);
}

.btn-primary-invest-light {
    background: var(--white); 
    color: var(--primary-invest); 
    border: 1px solid var(--white);
}

.btn-primary-invest::after, .btn-primary-invest-light::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: var(--transition-smooth);
    z-index: -1;
}

.btn-primary-invest-light::after {
    background: linear-gradient(to right, rgba(20,28,37,0) 0%, rgba(20,28,37,0.05) 50%, rgba(20,28,37,0) 100%);
}

.btn-primary-invest:hover, .btn-primary-invest-light:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 20px 40px rgba(20, 28, 37, 0.2); 
}

.btn-primary-invest:hover::after, .btn-primary-invest-light:hover::after {
    left: 200%;
    transition: all 0.8s ease-in-out;
}

/* --- HERO SECTION LUXE (Parallaxe + Dégradé) --- */
.hero-section { 
    position: relative;
    padding: 180px 0 150px 0; 
    text-align: center; 
    background: var(--primary-invest);
    color: var(--white);
    overflow: hidden;
    /* 2. LE PARALLAXE */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 50%);
    pointer-events: none;
    animation: slowDrift 20s infinite linear alternate;
}

@keyframes slowDrift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(2%, 2%); }
}

.hero-content { position: relative; z-index: 2; }

/* CORRECTION DE L'ANIMATION ICI */
.hero-surtitle { 
    display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 5px; 
    color: var(--gold-accent); margin-bottom: 30px; font-weight: 700;
    opacity: 0; animation: fadeUp 1s var(--ease-epic) forwards 0.2s;
}

.hero-title { 
    font-family: 'Montserrat', serif; font-size: 70px; font-weight: 600; 
    margin-bottom: 35px; line-height: 1.05; letter-spacing: -1px;
    opacity: 0; animation: fadeUp 1.2s var(--ease-epic) forwards 0.4s;
}

.hero-subtitle { 
    color: rgba(255, 255, 255, 0.6); font-size: 19px; max-width: 800px; margin: 0 auto 50px auto; 
    line-height: 1.9; font-weight: 300;
    opacity: 0; animation: fadeUp 1.2s var(--ease-epic) forwards 0.6s;
}

/* --- SECTION VISION --- */
.vision-section { padding: 140px 0; background: var(--white); }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: center; }

.heading-subtitle { display: block; color: var(--primary-invest); font-weight: 700; text-transform: uppercase; letter-spacing: 3px; font-size: 11px; margin-bottom: 20px; }
.section-heading { font-family: 'Montserrat', sans-serif; font-size: 2.8rem; color: var(--primary-invest); margin-bottom: 35px; line-height: 1.2; font-weight: 900;}

.vision-text p { color: #555; font-size: 17px; margin-bottom: 25px; line-height: 1.9; }
.vision-text strong { color: var(--primary-invest); font-weight: 700; }

.vision-numbers { display: flex; flex-direction: column; gap: 40px; }
.number-box { 
    background: var(--gray-bg); padding: 50px; border-radius: 4px; 
    border-left: 4px solid var(--primary-invest);
    transition: var(--transition-smooth);
}
.number-box:hover { transform: translateX(10px); box-shadow: -10px 15px 40px rgba(0,0,0,0.03); }

.number-val { display: block; font-family: 'Montserrat', serif; font-size: 4rem; color: var(--primary-invest); font-weight: 600; line-height: 1; margin-bottom: 15px; }
.number-label { font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: #888; font-weight: 700; }

/* --- SECTION FILIALES : TRIANGLE --- */
.filiales-section { padding: 120px 0 180px 0; background: var(--gray-bg); }
.modern-heading { text-align: center; margin-bottom: 80px; }

.triangle-architecture-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: start; padding-bottom: 40px; 
}

.filiale-card { 
    background: var(--white); padding: 70px 50px; border-radius: 4px; text-align: center; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.02);
    transition: var(--transition-smooth); 
    display: flex; flex-direction: column; align-items: center;
    border: 1px solid rgba(20, 28, 37, 0.02);
    position: relative; overflow: hidden;
}

.base-card { margin-top: 100px; }

.apex-card {
    margin-top: 0;
    box-shadow: 0 25px 60px rgba(20, 28, 37, 0.04);
    border: 1px solid rgba(197, 168, 128, 0.15); 
}

.filiale-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--gold-accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.6s var(--ease-fast);
}

.filiale-card:hover::before { transform: scaleX(1); }
.apex-card::before { transform: scaleX(1); background: var(--gold-accent); }

.base-card:hover { 
    transform: translateY(-15px); 
    box-shadow: 0 15px 30px rgba(20,28,37,0.04), 0 30px 60px rgba(20,28,37,0.06); 
}

.apex-card:hover {
    transform: translateY(-15px); 
    box-shadow: 0 20px 40px rgba(20,28,37,0.05), 0 40px 80px rgba(20,28,37,0.08);
}

.card-logo-container { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 40px; width: 100%; }
.filiale-logo { max-height: 100%; max-width: 180px; object-fit: contain; filter: grayscale(100%) opacity(0.4); transition: var(--transition-smooth); }
.filiale-card:hover .filiale-logo { filter: grayscale(0%) opacity(1); transform: scale(1.05); }

.filiale-card h4 { font-family: 'Montserrat', sans-serif; font-size: 1.5rem; color: var(--primary-invest); font-weight: 700; margin-bottom: 20px; }
.filiale-card p { font-size: 15px; color: #666; line-height: 1.8; margin-bottom: 45px; flex-grow: 1; }

.link-arrow { 
    color: var(--primary-invest); text-decoration: none; font-weight: 700; font-size: 12px; 
    text-transform: uppercase; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; 
    transition: var(--transition-fast);
}
.link-arrow:hover { color: var(--gold-accent); gap: 18px; }

/* --- ESPACE DIRECTION / CONTACT --- */
.candidat-section { 
    background: var(--primary-invest); color: var(--white); padding: 140px 0; text-align: center; position: relative; overflow: hidden; 
    background-attachment: fixed;
}
.candidat-section::before { content: ''; position: absolute; top: -50%; left: 50%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(197, 168, 128, 0.05) 0%, transparent 70%); transform: translateX(-50%); pointer-events: none; }
.candidat-section h3 { font-family: 'Montserrat', serif; font-size: 3.5rem; margin-bottom: 30px; font-weight: 600; }
.candidat-section p { color: rgba(255,255,255,0.6); font-size: 18px; max-width: 650px; margin: 0 auto; line-height: 1.9; }

/* --- FOOTER HOLDING --- */
.legal-compliance { background: #070a0e; color: #fff; padding: 80px 0 40px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.02); }
.official-badge-container { display: flex; justify-content: center; margin-bottom: 60px; }
.official-badge { background: rgba(255, 255, 255, 0.01); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 4px; padding: 35px 45px; display: flex; align-items: center; gap: 35px; max-width: 850px; text-align: left; transition: var(--transition-smooth); }
.official-badge:hover { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(197, 168, 128, 0.2); }
.badge-icon { font-size: 45px; color: var(--gold-accent); }
.badge-title { color: var(--white); font-weight: 600; font-size: 14px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px;}
.badge-numbers { color: rgba(255,255,255,0.5); font-size: 13px; margin-bottom: 5px; }
.badge-numbers strong { color: var(--white); }
.compliance-inner p { color: #444; font-size: 12px; margin-top: 30px; }

/* --- ANIMATIONS DE REVEAL (Apparition au chargement) --- */
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Animations corrigées ici avec la bonne variable */
.filiale-card { opacity: 0; animation: fadeUp 1s var(--ease-epic) forwards 0.2s; }
.filiale-card:nth-child(2) { animation-delay: 0.35s; }
.filiale-card:nth-child(3) { animation-delay: 0.5s; }

/* =========================================================
   RESPONSIVE DESIGN (Mobiles & Tablettes)
   ========================================================= */
@media (max-width: 1024px) {
    .vision-grid { gap: 50px; }
    .triangle-architecture-grid { gap: 30px; }
    .filiale-card { padding: 50px 30px; }
}

@media (max-width: 900px) {
    .vision-grid { grid-template-columns: 1fr; gap: 60px; text-align: center; }
    .number-box { border-left: none; border-top: 4px solid var(--primary-invest); }
    .number-box:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.03); }
    .triangle-architecture-grid { grid-template-columns: 1fr; gap: 40px; }
    .base-card, .apex-card { margin-top: 0; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .topbar-corporate { height: auto !important; padding: 12px 0 !important; }
    .topbar-links { gap: 15px; flex-wrap: wrap; padding: 0 10px !important; }
    .topbar-links a { font-size: 9px; }
    .header-flex { height: auto; flex-direction: column; gap: 20px; padding: 25px 10px; }
    .logo a { flex-direction: column; gap: 8px; text-align: center; }
    .logo img { max-height: 50px !important; }
    .logo h1 { font-size: 22px; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 20px; }
    .main-nav a { font-size: 11px; }
    .hero-section { padding: 100px 0; }
    .hero-title { font-size: 45px; }
    .hero-subtitle { font-size: 16px; padding: 0 10px; }
    .vision-section, .filiales-section { padding: 80px 0; }
    .section-heading { font-size: 2.2rem; }
    .candidat-section { padding: 100px 0; }
    .candidat-section h3 { font-size: 2.5rem; }
    .btn-primary-invest, .btn-primary-invest-light { display: block; width: 100%; text-align: center; }
    .official-badge { flex-direction: column; text-align: center; gap: 20px; padding: 30px 20px; }
}
.scramble-text {
    font-family: 'Montserrat', monospace; /* Style typographique "machine" */
    display: inline-block;
}
.hero-title {
    /* Cela permet de garder l'espace réservé même si les lettres changent */
    display: inline-block;
    min-height: 1.2em;
    /* On empêche le texte de sauter en fixant la police */
    font-family: 'Montserrat', serif; 
    white-space: pre; /* Très important pour garder les espaces intacts */
}
/* =========================================================
   CORRECTION ABSOLUE ET UNIVERSELLE DU LOGO
   S'applique à toutes les pages, indépendamment du HTML
   ========================================================= */

/* 1. Sur Ordinateur : On sécurise le logo majestueux */
.logo img, 
.main-header .logo img, 
.header-flex .logo img {
    height: 500px !important; 
    max-height: 60vh !important; 
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 2. Sur Mobile & Tablette : On impose le format idéal */
@media (max-width: 900px) {
    .logo, 
    .main-header .logo, 
    .header-flex .logo {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        padding-bottom: 10px !important;
    }
    
    .logo a,
    .main-header .logo a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }

    .logo img,
    .main-header .logo img,
    .header-flex .logo img {
        height: 60px !important;
        max-height: 60px !important;
        width: auto !important;
        max-width: 220px !important;
        margin: 0 auto !important;
    }
}
/* =========================================================
   MIRACLE ANTI-DÉCALAGE (Responsivité du Texte)
   S'applique automatiquement à tous les titres du site
   ========================================================= */

@media (max-width: 768px) {
    /* On cible les titres principaux et les classes problématiques */
    h1, h2, h3, .hero-title, .section-heading, .scramble-line {
        /* clamp(taille mini, taille idéale, taille max) */
        /* Cela empêche le texte de dépasser la largeur de l'écran */
        font-size: clamp(1.2rem, 6vw, 2.5rem) !important;
        
        /* Force le texte à revenir à la ligne s'il est trop long */
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: normal !important;
        
        /* Nettoyage des marges qui pourraient pousser le site */
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
        max-width: 100vw !important;
    }
}

