/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --primary-color: #0f4c81; /* Bleu (Corporate / Électrique) */
    --primary-dark: #0a355a;
    --secondary-color: #f39c12; /* Jaune/Orange (Solaire) */
    --accent-color: #27ae60; /* Vert (Écologie) */
    
    /* Couleurs Claires */
    --text-color: #4a4a4a;
    --text-dark: #1a1a1a;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    /* Couleurs Sombres (Nouveau) */
    --bg-dark-section: #0b0f19;
    --text-light-muted: #a0aab2;
    --text-white: #ffffff;

    --font-sans: 'Roboto', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Typographie
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

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

/* Utilitaires pour les sections sombres */
.dark-section {
    background-color: var(--bg-dark-section);
    color: var(--text-light-muted);
}

.dark-section h2, .dark-section h3 {
    color: var(--text-white);
}

.light-text h2, .light-text .subtitle {
    color: var(--text-white);
}

.light-text .subtitle {
    opacity: 0.8;
}

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn-primary, .btn-primary-outline, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #d68910;
    border-color: #d68910;
}

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container .logo {
    height: 45px;
    width: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.main-nav a:not(.btn-primary-outline):hover {
    color: var(--primary-color);
}

/* ==========================================================================
   Hero Section (Premium Parallax)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background-color: #000; /* Fallback */
    overflow: hidden; /* Empêche le débordement du bg parallax */
}

/* Grain texture overlay (Ultra Premium feel) */
.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 3;
}

/* Le Background fait 120% de la hauteur pour permettre le parallax GSAP */
.hero-bg {
    position: absolute;
    top: -10%; /* Commence légèrement plus haut */
    left: 0;
    width: 100%;
    height: 120vh; 
    background: linear-gradient(rgba(10, 53, 90, 0.7), rgba(15, 76, 129, 0.4)), url('https://images.unsplash.com/photo-1541888086425-d81bb19240f5?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: 1;
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 4; /* Au dessus du grain */
    max-width: 800px;
    color: #fff;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
}

/* ==========================================================================
   Sections Communes
   ========================================================================== */
.expertises-section, .projects-section, .outro-section {
    padding: 120px 0;
}

.expertises-section {
    background-color: var(--bg-light);
    position: relative;
    z-index: 5; /* Passe au dessus du parallax hero */
}

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

.section-header h2 {
    font-size: 2.8rem;
    color: var(--primary-color);
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 20px auto 30px;
}

.subtitle {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Expertises Grid
   ========================================================================== */
.expertises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.expertise-card {
    background: #fff;
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    border-bottom: 4px solid transparent;
}

.expertise-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.expertise-card:nth-child(1):hover { border-color: var(--primary-color); }
.expertise-card:nth-child(2):hover { border-color: var(--accent-color); }
.expertise-card:nth-child(3):hover { border-color: var(--secondary-color); }

.expertise-card .icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
}

.expertise-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-family: var(--font-sans);
}

/* ==========================================================================
   Project Timeline (Phases avec Parallax Interne)
   ========================================================================== */
.project-timeline {
    display: flex;
    flex-direction: column;
    gap: 120px;
    margin-top: 60px;
}

.phase-row {
    display: flex;
    align-items: center;
    gap: 80px;
}

/* Alterner l'image à droite une fois sur deux */
.phase-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* Conteneur d'image strict pour le Parallax interne */
.phase-image-wrapper {
    flex: 1;
    height: 450px; /* Hauteur fixe pour le conteneur */
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3); /* Ombre plus forte car fond sombre */
    position: relative;
    /* Un masque noir qui va se retirer au scroll */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.phase-image-wrapper img {
    width: 100%;
    /* L'image est plus grande que le conteneur pour permettre de "glisser" */
    height: 130%; 
    object-fit: cover;
    display: block;
    /* GSAP va manipuler le yPercent de l'image */
    will-change: transform; 
}

.phase-content {
    flex: 1;
}

.phase-badge {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.phase-content h3 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.phase-content p {
    font-size: 1.15rem;
    line-height: 1.8;
}

/* ==========================================================================
   Outro / Footer
   ========================================================================== */
.outro-section {
    background-color: var(--primary-dark);
    color: #fff;
    position: relative;
    z-index: 5;
}

.outro-section h2 {
    color: #fff;
    font-size: 3rem;
}

.outro-section p {
    color: rgba(255,255,255,0.8);
    font-size: 1.25rem;
    margin-bottom: 40px;
}

.main-footer {
    background-color: #061c31;
    color: rgba(255,255,255,0.5);
    text-align: center;
    padding: 30px 0;
    font-size: 0.95rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .phase-row, .phase-row:nth-child(even) {
        flex-direction: column;
        gap: 40px;
    }
    
    .phase-image-wrapper {
        width: 100%;
        height: 350px;
    }
}

@media screen and (max-width: 768px) {
    .main-nav ul {
        display: none; /* Simplification pour mobile */
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .expertises-section, .projects-section, .outro-section {
        padding: 80px 0;
    }
}

/* Classes initiales pour GSAP */
.gsap-reveal, .gsap-reveal-delay, .gsap-reveal-delay-2, .gsap-stagger-card {
    visibility: hidden;
}
