/* ==========================================================================
   SA2V - Style Principal (High Contrast & Professional UX)
   Version: 2.2 (Nettoyé & Réorganisé)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   1. VARIABLES & CONFIGURATION (:root)
   ========================================================================== */
:root {
    /* --- Palette de Couleurs --- */
    --primary: #2563eb;       /* Bleu Royal */
    --primary-dark: #1e40af;  /* Bleu Profond */
    --primary-light: #eff6ff; /* Fond bleu très clair */
    
    --secondary: #7c3aed;     /* Violet Moderne */
    --secondary-dark: #5b21b6;
    
    --accent: #0f172a;        /* Navy/Noir */
    
    --success: #16a34a;       /* Vert Validation */
    --success-bg: #dcfce7;
    
    --bg-body: #f1f5f9;       /* Gris bleuté */
    --bg-card: #ffffff;
    
    /* --- Typographie --- */
    --text-main: #1e293b;
    --text-muted: #475569;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* --- UI Components --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --border-light: #e2e8f0;
    --border-focus: #2563eb;
    
    /* Ombres */
    --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;
}

/* ==========================================================================
   2. 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 */
    top: 0 !important; /* Force top 0 contre Google Translate */
}

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;
}

/* ==========================================================================
   3. 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; }

/* ==========================================================================
   4. COMPOSANTS UI (BOUTONS)
   ========================================================================== */
.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;
}

.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);
}

.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);
}

.btn-outline-white {
    background: rgba(2, 141, 254, 0.683);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary);
}

/* ==========================================================================
   5. FORMULAIRES & INPUTS
   ========================================================================== */
.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); }

.form-section {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    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; color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 14px 16px;
    border: 2px solid #cbd5e1; border-radius: var(--radius-sm);
    font-size: 1rem; color: var(--accent);
    background: #ffffff; transition: all 0.2s;
}

.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);
}

#code_carte {
    font-family: monospace; letter-spacing: 2px;
    font-weight: 700; font-size: 1.1rem;
    text-transform: uppercase;
}

.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; }

/* Toggle Password & Checkbox Custom */
.input-with-toggle { position: relative; }

.checkbox-wrapper {
    margin-top: 8px; display: flex; align-items: center;
    gap: 8px; color: var(--text-main);
}
.checkbox-wrapper input[type="checkbox"] {
    width: 16px; height: 16px;
    cursor: pointer; accent-color: var(--primary);
}

/* ==========================================================================
   6. HEADER & NAVIGATION
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
}


.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding-top: 10px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon { font-size: 1.8rem; color: var(--secondary); }

.main-nav { flex: 1; display: flex; justify-content: center; }
.nav-list { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--primary);
    background: var(--primary-light);
}

.header-actions { display: flex; align-items: center; gap: 15px; }

/* Bouton Burger Mobile */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent);
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.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;
}

/* ==========================================================================
   7. MODULE TRADUCTION (STYLE EUROPÉEN & WHITE LABEL)
   ========================================================================== */
/* Positionnement */
.custom-translate-wrapper {
    position: relative;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.current-lang-code {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Le Menu Déroulant */
.lang-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #f1f5f9;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown ul { list-style: none; padding: 0; margin: 0; }

.lang-dropdown li {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: background 0.2s;
}

.lang-dropdown li:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.lang-dropdown .flag { font-size: 1.2rem; }

/* MASQUER LES ÉLÉMENTS GOOGLE */
.goog-te-banner-frame { display: none !important; }
.skiptranslate { display: none !important; }
#google_translate_element { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ==========================================================================
   8. PAGE SECTIONS (HERO, SERVICES, BRANDS)
   ========================================================================== */
/* Hero */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.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); }

/* Services */
.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);
    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); }

/* Brands */
.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); }

/* ==========================================================================
   9. PAGES SPÉCIFIQUES (CONFIRMATION & CONTACT)
   ========================================================================== */
.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; }

.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
   ========================================================================== */
.main-footer {
    background: white; padding: 60px 0 30px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.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;
}

/* ==========================================================================
   11. RESPONSIVE DESIGN (MOBILE FIRST OVERRIDES)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-features { display: none; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }

    /* Fix Menu Fantôme */
    html, body {
        overflow-x: hidden;
        position: relative;
    }

    /* Typographie Mobile */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }

    /* Header Mobile */
    .mobile-menu-btn { display: block; }
    
    /* Menu Mobile (Slide-in) */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Hors écran */
        width: 85%;
        height: 100vh;
        background: white;
        padding: 80px 30px 30px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 999;
        
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        visibility: hidden; /* Masqué pour le DOM quand inactif */
        display: block; /* Surcharge le display desktop */
    }
    
    .main-nav.active {
        right: 0;
        visibility: visible;
    }
    
    .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; }

    /* Layout Mobile */
    .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; }
}