/**
 * ============================================================================
 * BON IMPACT — Design System v2.0
 * ============================================================================
 *
 * Shared stylesheet for all pages (index, a-propos, offres).
 * Contains: design tokens, reset, layout, navigation, CTA section,
 * footer, animations, and responsive breakpoints.
 *
 * Page-specific styles live in <style> blocks within each HTML file.
 *
 * Color palette:
 *   - Mauve (#B2749D)   → Brand primary, CTAs, accents
 *   - Vert (#A9BA85)    → Success, highlights, nature/impact
 *   - Bleu clair (#9EBBD8) → Secondary, data/tech
 *   - Bleu foncé (#2E5368) → Headings, dark text
 *   - Bleu nuit (#1B3344)  → Dark backgrounds
 *
 * Typography:
 *   - Montserrat (display) → Headings, numbers, emphasis
 *   - Albert Sans (body)   → Body copy, UI elements
 *
 * Author: Bon Impact
 * Last updated: 2025
 * ============================================================================
 */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
    /* --- Brand colors --- */
    --mauve:       #B2749D;
    --mauve-deep:  #8E5A7D;
    --mauve-light: #D4A5C4;
    --vert:        #A9BA85;
    --vert-deep:   #8EA06A;
    --vert-light:  #C8D6AD;
    --bleu-clair:  #9EBBD8;
    --bleu-fonce:  #2E5368;
    --bleu-nuit:   #1B3344;

    /* --- Neutrals --- */
    --blanc:       #FFFFFF;
    --creme:       #FAFAF7;
    --gris-clair:  #F2F0ED;
    --gris-moyen:  #D8D5D0;
    --texte:       #2E3A40;

    /* --- Typography --- */
    --font-display: 'Montserrat', sans-serif;
    --font-body:    'Albert Sans', sans-serif;

    /* --- Easing curves --- */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ==========================================================================
   2. RESET & FOUNDATIONS
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--texte);
    background: var(--creme);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}


/* ==========================================================================
   3. GRAIN OVERLAY
   --------------------------------------------------------------------------
   Subtle noise texture applied globally via a fixed pseudo-element.
   Non-interactive (pointer-events: none) and high z-index to sit on top.
   ========================================================================== */

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
}


/* ==========================================================================
   5. SECTION HEADERS
   --------------------------------------------------------------------------
   Reusable label + title + subtitle pattern used across all pages.
   ========================================================================== */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mauve);
    margin-bottom: 20px;
}

.section-label::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--mauve);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    color: var(--bleu-fonce);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--texte);
    opacity: 0.75;
    max-width: 620px;
}


/* ==========================================================================
   6. NAVIGATION
   --------------------------------------------------------------------------
   Fixed top nav with glassmorphism on scroll (via .scrolled class).
   Includes hamburger menu for mobile (hidden by default).
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px 0;
    transition: all 0.5s var(--ease-out-expo);
}

/* Glassmorphism effect triggered by JS on scroll */
.nav.scrolled {
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    box-shadow: 0 1px 0 rgba(46, 83, 104, 0.06);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 44px;
    transition: transform 0.3s var(--ease-spring);
}

.nav-logo:hover {
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

/* --- Nav link with animated underline --- */

.nav-link {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bleu-fonce);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--mauve);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--mauve);
}

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

/* --- Nav CTA button --- */

.nav-cta {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bleu-fonce);
    color: var(--blanc);
    padding: 14px 28px;
    border-radius: 60px;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 4px 16px rgba(46, 83, 104, 0.2);
}

.nav-cta:hover {
    background: var(--mauve);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(178, 116, 157, 0.3);
}

/* --- Hamburger (mobile only) --- */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 110;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bleu-fonce);
    transition: all 0.3s ease;
}


/* ==========================================================================
   7. CTA SECTION
   --------------------------------------------------------------------------
   Gradient banner used as a call-to-action before the footer.
   Shared across all pages.
   ========================================================================== */

.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--mauve) 0%, var(--bleu-fonce) 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle radial light spots */
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.cta-inner {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-inner h2 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    color: var(--blanc);
    line-height: 1.15;
    margin-bottom: 20px;
}

.cta-inner p {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 36px;
}

.btn-cta {
    display: inline-block;
    background: var(--blanc);
    color: var(--bleu-fonce);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 20px 48px;
    border-radius: 60px;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.btn-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   8. FOOTER
   ========================================================================== */

footer {
    background: var(--bleu-nuit);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 48px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 18px;
    opacity: 0.9;
}

footer p {
    font-size: 15px;
    line-height: 1.7;
}

footer h4 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blanc);
    margin-bottom: 20px;
}

footer li {
    margin-bottom: 12px;
}

footer a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--mauve-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    opacity: 0.5;
}


/* ==========================================================================
   9. ANIMATIONS
   ========================================================================== */

/* Entry animation used by hero elements */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll-triggered reveal (activated by IntersectionObserver in JS) */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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


/* ==========================================================================
   10. RESPONSIVE — SHARED BREAKPOINTS
   --------------------------------------------------------------------------
   Page-specific responsive rules live in each HTML file's <style> block.
   Only shared components (nav, footer, etc.) are handled here.
   ========================================================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 768px) {
    /* Mobile nav: hide links, show hamburger */
    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: var(--creme);
        justify-content: center;
        align-items: center;
        gap: 28px;
        z-index: 105;
    }

    .hamburger {
        display: flex;
    }
}
