/* ==========================================================================
   SA2V - Style Principal (High Contrast & Professional UX)
   Version: 2.0 (Design Épuré mais Contrasté)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* --- Palette de Couleurs (Contrastées & Professionnelles) --- */
    --primary: #2563eb;       /* Bleu Royal (Confiance) */
    --primary-dark: #1e40af;  /* Bleu Profond (Hover) */
    --primary-light: #eff6ff; /* Fond bleu très clair */
    
    --secondary: #7c3aed;     /* Violet Moderne */
    --secondary-dark: #5b21b6;
    
    --accent: #0f172a;        /* Navy/Noir (Titres & Contrastes) */
    
    --success: #16a34a;       /* Vert Validation */
    --success-bg: #dcfce7;
    
    --bg-body: #f1f5f9;       /* Gris bleuté (Plus de densité que le blanc) */
    --bg-card: #ffffff;
    
    /* --- Typographie & Lisibilité --- */
    --text-main: #1e293b;     /* Gris très foncé (Lisibilité max) */
    --text-muted: #475569;    /* Gris moyen pour sous-titres */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* --- UI Components --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --border-light: #e2e8f0;  /* Bordures subtiles */
    --border-focus: #2563eb;  /* Bordure active */
    
    /* Ombres avec plus de profondeur */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    
    /* Dimensions */
    --header-height: 80px;
    --container-width: 1100px;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Empêche le scroll horizontal sur mobile */
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   2. Typographie
   ========================================================================== */
h1, h2, h3, h4 { color: var(--accent); font-weight: 700; letter-spacing: -0.025em; }

h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.05rem; }

/* ==========================================================================
   3. Composants UI (Boutons & Badges)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
}

/* Bouton Primaire (Gradient Subtil) */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
}

/* Bouton Secondaire (Contour solide) */
.btn-secondary {
    background: white;
    color: var(--accent);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Bouton Outline White (Hero) */
.btn-outline-white {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary);
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
.main-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-xs);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.logo-icon { color: var(--primary); font-size: 1.75rem; }

/* Menu Desktop */
.nav-list { display: flex; gap: 32px; align-items: center; }

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover, .nav-item.active .nav-link { color: var(--primary); }

/* Indicateur actif (Ligne sous le lien) */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-link:hover::after, .nav-item.active .nav-link::after { width: 100%; }

/* Actions Header (Langue + Burger) */
.header-actions { display: flex; align-items: center; gap: 15px; }

/* Bouton Burger Mobile */
.mobile-menu-btn {
    display: none; /* Masqué sur Desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent);
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

/* Overlay sombre pour le mobile (Géré par JS) */
.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
    z-index: 998;
}

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

/* Accent visuel (Cercle décoratif) */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: var(--primary);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
}

.hero-title .highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.hero-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.feature { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: var(--text-main); 
    font-weight: 600; 
}
.feature i { color: var(--primary); }

/* ==========================================================================
   6. Services Cards
   ========================================================================== */
.services { padding: 80px 0; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-card);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    /* Ligne colorée au top pour le contraste */
    border-top: 4px solid var(--primary); 
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 60px; height: 60px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 24px;
    background: var(--primary-light);
    color: var(--primary);
}

.service-card:nth-child(2) { border-top-color: var(--secondary); }
.service-card:nth-child(2) .service-icon { background: #f3e8ff; color: var(--secondary); }

.service-link {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
}

/* ==========================================================================
   7. Formulaires (Auth, Remboursement, Contact)
   ========================================================================== */
.form-page { background: var(--bg-body); min-height: 100vh; }
.form-container { padding: 60px 0; }

.form-header { text-align: center; margin-bottom: 40px; }
.form-header p { font-size: 1.2rem; color: var(--text-muted); }

/* Conteneur principal du formulaire */
.form-section {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    /* Accent pour le rendre moins "clair" */
    border-left: 5px solid var(--primary); 
    max-width: 800px;
    margin: 0 auto 30px;
}

.form-section h2 {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.5rem;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group { margin-bottom: 24px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700; /* Plus gras pour la lisibilité */
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Inputs Stylisés */
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #cbd5e1; /* Bordure visible par défaut */
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--accent);
    background: #ffffff;
    transition: all 0.2s;
}

/* Focus State */
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Champ Code Carte spécifique */
#code_carte {
    font-family: monospace;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--primary-light);
    padding: 15px;
    border-radius: var(--radius-sm);
}
.form-check input { width: auto; margin-top: 4px; }
.form-check label { margin: 0; font-weight: 500; font-size: 0.9rem; }

.form-actions {
    text-align: center;
    margin-top: 40px;
}
.form-actions .btn { width: 100%; max-width: 400px; }

/* Input Toggle Password (Eye Icon) */
.input-with-toggle { position: relative; }
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* ==========================================================================
   8. Page Confirmation
   ========================================================================== */
.confirmation-card {
    background: white;
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    max-width: 700px;
    margin: 40px auto;
    border-top: 6px solid var(--success);
}

.confirmation-icon {
    width: 90px; height: 90px;
    background: var(--success-bg);
    color: var(--success);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    margin: 0 auto 30px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* ==========================================================================
   9. Page Contact
   ========================================================================== */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid var(--border-light);
    border-bottom: 4px solid var(--secondary);
    transition: transform 0.3s;
}

.contact-item:hover { transform: translateY(-5px); }

.contact-item i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* ==========================================================================
   10. Footer (Allégé & Propre)
   ========================================================================== */
.main-footer {
    background: white;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-light);
    margin-top: auto; /* Footer collé en bas si peu de contenu */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.25rem; font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
}

.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-body);
    border-radius: 8px;
    color: var(--text-main);
    transition: 0.2s;
}
.footer-social a:hover { background: var(--primary); color: white; }

.footer-section h3 {
    font-size: 1rem; text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 20px;
    color: var(--accent);
}

.footer-section ul li { margin-bottom: 12px; }
.footer-section ul li a {
    color: var(--text-muted);
    font-weight: 500;
}
.footer-section ul li a:hover { color: var(--primary); padding-left: 5px; }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Brands Section */
.brands { padding: 40px 0; background: white; border-top: 1px solid var(--border-light); }
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    opacity: 0.7;
}
.brand-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}
.brand-item:hover { border-color: var(--primary); opacity: 1; }
.brand-icon { font-size: 1.5rem; margin-bottom: 5px; color: var(--text-main); }

/* ==========================================================================
   11. Responsive Design (Mobile First Approach)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-features { display: none; } /* Simplification sur tablette */
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }

    /* Typographie Mobile */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    /* Header Mobile */
    .mobile-menu-btn { display: block; }
    
    /* Menu Mobile (Slide-in Drawer) */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Caché par défaut */
        width: 85%;
        height: 100vh;
        background: white;
        padding: 80px 30px 30px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        display: block; /* Surcharge le display desktop */
    }
    
    .main-nav.active { right: 0; }
    
    .nav-list { flex-direction: column; align-items: flex-start; gap: 24px; width: 100%; }
    
    .nav-link {
        font-size: 1.1rem;
        display: block;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--bg-body);
    }
    
    .nav-link::after { display: none; } /* Pas de soulignement animé sur mobile */

    /* Grids en 1 colonne */
    .form-row, .footer-content, .hero-actions, .confirmation-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 20px;
    }
    
    .btn { width: 100%; }
    
    .form-section, .contact-item, .confirmation-card {
        padding: 24px;
    }
    
    .footer-content { text-align: center; }
    .footer-logo { justify-content: center; }
    .footer-social { justify-content: center; }
}