/* ============================================
   Variables CSS personnalisables
   ============================================ */
:root {
    /* Couleurs principales - Palette professionnelle */
    --primary-blue: #0A2463;         /* Bleu marine profond */
    --primary-light: #1E40AF;        /* Bleu intermédiaire */
    --accent-cyan: #00B4D8;          /* Cyan pour les accents */
    --accent-orange: #FB8500;        /* Orange pour les CTA */
    
    /* Couleurs de fond */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-dark: #0A2463;
    --bg-gradient: linear-gradient(135deg, #0A2463 0%, #1E40AF 100%);
    
    /* Couleurs de texte */
    --text-primary: #1A1A1A;
    --text-secondary: #4A5568;
    --text-light: #718096;
    --text-white: #FFFFFF;
    
    /* Glassmorphism - Nouvelles variables */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-light: rgba(255, 255, 255, 0.15);
    --glass-bg-dark: rgba(10, 36, 99, 0.1);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-shadow-lg: 0 8px 32px 0 rgba(31, 38, 135, 0.5);
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Ombres élégantes */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Typography - Google Fonts + System Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================
   Reset et styles de base
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset pour la navbar fixed */
    overflow-x: hidden; /* Empêcher le scroll horizontal */
    max-width: 100vw; /* Limiter la largeur */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 25%, #0d1b2a 50%, #1a1f3a 75%, #0a0e27 100%);
    background-attachment: fixed;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden; /* Empêcher le scroll horizontal */
    max-width: 100vw; /* Limiter la largeur */
}

/* Effets visuels d'arrière-plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(10, 36, 99, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px);
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* États de visibilité de la navbar */
.navbar-visible {
    transform: translateY(0);
    opacity: 1;
}

.navbar-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: opacity var(--transition-fast);
}

.logo:hover {
    opacity: 0.85;
}

.logo img {
    height: 60px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.nav-link:hover {
    color: var(--primary-blue);
    background: rgba(10, 36, 99, 0.05);
    transform: translateY(-2px);
}

.nav-link.active {
    color: white;
    background: var(--bg-gradient);
    box-shadow: 0 2px 8px rgba(10, 36, 99, 0.3);
}

/* Bouton assistance en direct - style spécial */
.nav-link-assistance {
    background: var(--accent-orange);
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(251, 133, 0, 0.3);
}

.nav-link-assistance:hover {
    background-color: #E67700 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 133, 0, 0.4);
}

/* Menu hamburger pour mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.35rem;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 28px;
    height: 2.5px;
    background-color: var(--primary-blue);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* ============================================
   Hero Section avec fond d'écran
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(10, 36, 99, 0.70) 0%, rgba(30, 64, 175, 0.65) 100%),
                url('/assets/fond_nuit.png') center top/cover no-repeat;
    background-attachment: fixed;
    color: white;
    padding: 8rem 3rem 6rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(251, 133, 0, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.7;
    font-weight: 300;
}

/* ============================================
   Boutons
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--glass-bg-light);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    color: white;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow-lg);
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--spacing-xl) 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-alt {
    background: var(--glass-bg-dark);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* ============================================
   Cards Grid - Design moderne
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3));
    transition: height var(--transition-normal);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--glass-shadow-lg);
    background: var(--glass-bg-light);
    border-color: rgba(255, 255, 255, 0.3);
}

.card:hover::before {
    height: 100%;
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.card-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 1rem;
}

.card strong {
    color: white;
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.card ul {
    list-style: none;
    margin-top: 1rem;
}

.card ul li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ============================================
   Formulaire de contact
   ============================================ */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all var(--transition-fast);
    font-family: inherit;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: var(--glass-bg-light);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-button {
    width: 100%;
    background: var(--bg-gradient);
    color: white;
    padding: 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: 'Inter', sans-serif;
}

.form-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Messages flash */
.flash-messages {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 3rem;
}

.alert {
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 500;
    border-left: 4px solid;
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    border-left-color: #10B981;
    background-color: #F0FDF4;
    color: #065F46;
}

.alert-error {
    border-left-color: #EF4444;
    background-color: #FEF2F2;
    color: #991B1B;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: white;
    padding: var(--spacing-lg) 3rem var(--spacing-md);
    border-top: none;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.25rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.75rem;
    display: block;
    line-height: 1.7;
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ============================================
   Page 404
   ============================================ */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.error-content {
    text-align: center;
    max-width: 600px;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero {
        padding: 5rem 2rem 4rem;
    }

    .section {
        padding: var(--spacing-lg) 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .btn-group {
        justify-content: center;
    }

    /* Désactiver background-attachment: fixed sur mobile */
    body {
        background-attachment: scroll;
    }

    .hero,
    .hero-modern::before {
        background-attachment: scroll !important;
    }
    
    /* Réduire les pseudo-éléments décoratifs sur mobile */
    body::before {
        opacity: 0.5;
    }
    
    body::after {
        opacity: 0.3;
    }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */
@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .logo img {
        height: 50px;
        max-width: 220px;
    }

    .hero {
        padding: 4rem 1.5rem 3rem;
    }

    .section {
        padding: var(--spacing-md) 1.5rem;
    }

    .card {
        padding: 2rem;
    }

    .error-code {
        font-size: 5rem;
    }

    .flash-messages {
        padding: 0 1.5rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animation delays pour effet stagger */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   Utilitaires
   ============================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* ============================================
   Éléments décoratifs
   ============================================ */
.section::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--accent-cyan);
    opacity: 0.03;
    border-radius: 50%;
    top: 10%;
    right: 5%;
    pointer-events: none;
}

.section-alt::after {
    background: var(--accent-orange);
}

/* Stats ou chiffres clés */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin: 3rem 0;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}
