/* =========================================
   1. RESET & CONFIGURATION GLOBALE
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    color: #555;
    background-color: #f4f6f9; /* Fond gris clair pour faire ressortir le formulaire blanc */
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }

/* Conteneur principal avec marges de sécurité */
.container-width {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   2. HEADER (Sticky & Identique partout)
   ========================================= */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    padding: 15px 0;
    position: sticky; /* Reste en haut au scroll */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    height: 50px;
}

.top-nav ul {
    display: flex;
    gap: 25px;
}

.top-nav a {
    color: #7a8fa6;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.top-nav a:hover { color: #2659a4; }
.top-nav i { font-size: 1.1rem; }


/* =========================================
   3. STEPPER (Barre de progression)
   ========================================= */
.stepper-container {
    max-width: 600px;
    margin: 30px auto 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* État Actif et Complété */
.step.active .step-circle,
.step.completed .step-circle {
    background-color: #2659a4;
    color: white;
    box-shadow: 0 4px 10px rgba(38, 89, 164, 0.2);
}

.step.active span,
.step.completed span {
    color: #2659a4;
    font-weight: 700;
}

/* Lignes */
.line {
    flex: 1;
    height: 3px;
    background-color: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 28px; /* Ajustement précis */
    border-radius: 2px;
}
.line.completed {
    background-color: #2659a4;
}


/* =========================================
   4. BANNIÈRE CONTEXTE (Bleue)
   ========================================= */
.context-banner-section {
    background: linear-gradient(135deg, #2659a4 0%, #1e4585 100%);
    padding: 30px 0;
    margin-bottom: 40px;
    border-bottom: 4px solid #be0015;
    color: white;
    box-shadow: 0 4px 15px rgba(38, 89, 164, 0.2);
}

.context-banner-inner {
    display: flex;
    align-items: center;
    gap: 30px;
}

.context-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
}

.context-text { flex-grow: 1; }

.security-tag {
    background-color: #27ae60;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.context-text h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
}

.context-text p {
    margin: 8px 0 0 0;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}


/* =========================================
   5. LAYOUT PAGE RENSEIGNEMENT / PAIEMENT
   ========================================= */
.page-renseignement {
    padding-bottom: 80px;
}

/* Grille Principale : Formulaire (auto) + Sidebar (340px) */
.form-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* --- STYLE DU FORMULAIRE --- */
.form-header-block { margin-bottom: 30px; }
.form-header-block h1 { font-size: 1.8rem; color: #2659a4; margin-bottom: 10px; font-weight: 800; }
.form-header-block p { color: #666; font-size: 1rem; }

.form-section-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.section-title i { color: #be0015; font-size: 1.4rem; }
.section-title h3 {
    color: #333; font-size: 1.1rem;
    font-weight: 800; text-transform: uppercase; margin: 0;
}

/* Inputs & Grilles */
.form-row { margin-bottom: 20px; }
.form-row.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 700; font-size: 0.9rem; color: #444; }
.input-helper { font-size: 0.8rem; color: #888; margin-top: -4px; margin-bottom: 6px; }

/* Styles Champs de saisie */
.form-group input, .form-group select {
    padding: 14px 16px; /* Plus grand pour le tactile */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fdfdfd;
    width: 100%;
}
.form-group input:focus {
    border-color: #2659a4;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(38, 89, 164, 0.1);
}

/* Icones dans les inputs */
.input-icon-wrapper { position: relative; }
.input-icon-wrapper i {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #999; pointer-events: none;
}
.input-icon-wrapper input { padding-left: 48px; }

/* Radio buttons & Checkboxes */
.radio-group { display: flex; gap: 25px; align-items: center; }
.radio-label {
    cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 600;
    padding: 10px 15px; border: 1px solid #eee; border-radius: 6px; background: #fafafa;
}
.radio-label:hover { background: #fff; border-color: #ccc; }
.radio-label input { accent-color: #2659a4; width: 18px; height: 18px; }

.form-legal-box {
    margin-bottom: 25px; background: #f8f9fa;
    padding: 20px; border-radius: 8px;
    font-size: 0.85rem; color: #666; border: 1px solid #eee;
}
.checkbox-container { display: flex; gap: 12px; margin-bottom: 12px; cursor: pointer; align-items: flex-start; }
.checkbox-container input { margin-top: 3px; accent-color: #2659a4; flex-shrink: 0; width: 16px; height: 16px; }

/* Bouton Action Principal */
.btn-main-action {
    display: block; width: 100%;
    background-color: #be0015; color: white; padding: 20px; border-radius: 8px;
    font-size: 1.15rem; font-weight: 800; text-transform: uppercase;
    transition: all 0.2s; box-shadow: 0 4px 10px rgba(190, 0, 21, 0.2);
    border: none; cursor: pointer; text-align: center;
}
.btn-main-action:hover {
    background-color: #a00012;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(190, 0, 21, 0.3);
}


/* --- SIDEBAR DROITE (RÉCAP & SÉCURITÉ) --- */
.sidebar-column { display: flex; flex-direction: column; gap: 25px; }

.summary-card {
    background: white; border-radius: 8px; overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eaeaea;
}
.summary-header { background-color: #2659a4; color: white; padding: 18px; text-align: center; }
.summary-header h4 { margin: 0; font-weight: 800; letter-spacing: 1px; font-size: 1rem; }

.summary-content { padding: 25px; text-align: center; }
.gain-display { border-bottom: 2px dashed #eee; padding-bottom: 20px; margin-bottom: 20px; }
.gain-amount { display: block; font-size: 3rem; font-weight: 900; color: #be0015; line-height: 1; margin-bottom: 5px; }
.gain-label { font-size: 0.85rem; text-transform: uppercase; color: #777; letter-spacing: 1px; font-weight: 700; }

.summary-list { text-align: left; font-size: 0.95rem; color: #555; }
.summary-list li { margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.summary-list li i { color: #2659a4; width: 20px; text-align: center; font-size: 1.1rem; }

.security-card {
    background: white; padding: 25px; border-radius: 8px;
    border: 1px solid #eaeaea; box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.security-item { display: flex; gap: 15px; margin-bottom: 20px; font-size: 0.9rem; }
.security-item:last-child { margin-bottom: 0; }
.security-item i { font-size: 1.6rem; color: #27ae60; }
.security-item strong { display: block; color: #333; margin-bottom: 3px; }
.security-item p { margin: 0; color: #777; font-size: 0.8rem; }

.help-box { text-align: center; font-size: 0.9rem; color: #888; margin-top: 10px; }
.help-box a { color: #2659a4; text-decoration: underline; font-weight: 600; }


/* =========================================
   6. FOOTER (Identique partout)
   ========================================= */
.site-footer {
    background-color: #2659a4;
    color: #fff;
    padding: 60px 0 30px;
    font-size: 0.9rem;
    margin-top: 60px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer-col h4 {
    color: #abc4ff;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { opacity: 0.9; }
.footer-col ul li a:hover { opacity: 1; text-decoration: underline; }

.brand-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo { width: 160px; margin-bottom: 25px; }
.footer-map-img { width: 140px; opacity: 0.8; transition: opacity 0.3s; }
.footer-map-img:hover { opacity: 1; }

.social-actions {
    grid-column: 4;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    width: 100%;
    max-width: 260px;
    justify-content: center;
    background: rgba(255,255,255,0.05);
}
.social-btn:hover { background: #fff; color: #2659a4; }


/* =========================================
   7. GESTION DU RESPONSIVE (Mobile First Logic)
   ========================================= */

/* --- TABLETTES & PETITS PC (Max 1024px) --- */
@media (max-width: 1024px) {
    .footer-container { grid-template-columns: 1fr 1fr; }
    .social-actions { grid-column: auto; align-items: flex-start; }
}

/* --- MOBILES (Max 900px) - Point de bascule principal --- */
@media (max-width: 900px) {
    /* Layout Formulaire */
    .form-layout-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
    }
    
    .sidebar-column {
        /* IMPORTANT : Le résumé du gain passe AVANT le formulaire */
        order: -1; 
        margin-bottom: 20px;
    }
    
    /* On cache l'aide et la sécurité sur mobile pour alléger, sauf le gain */
    .security-card, .help-box {
        display: none; 
    }
    /* ... Mais on peut les garder si on veut, à toi de voir. Ici je laisse le gain. */
    
    .gain-amount { font-size: 2.5rem; }
}

/* --- SMARTPHONES (Max 768px) --- */
@media (max-width: 768px) {
    /* Header Stacké */
    .header-inner { flex-direction: column; gap: 20px; }
    .top-nav ul { flex-wrap: wrap; justify-content: center; gap: 15px; }
    
    /* Bannière Contexte */
    .context-banner-inner { flex-direction: column; text-align: center; gap: 15px; }
    .context-text h2 { font-size: 1.4rem; }
    
    /* Formulaire */
    .form-row.two-cols { grid-template-columns: 1fr; } /* Inputs empilés */
    .form-section-box { padding: 20px; }
    
    /* Footer Centré */
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .brand-col, .social-actions { align-items: center; }
}

/* --- PETITS ÉCRANS (Max 480px) --- */
@media (max-width: 480px) {
    .header-logo { height: 40px; }
    .top-nav a { font-size: 0.75rem; }
    
    /* Stepper Compact */
    .stepper-container { padding: 0 10px; margin-bottom: 30px; }
    .step-circle { width: 32px; height: 32px; font-size: 0.9rem; }
    .step span { font-size: 0.75rem; }
    .line { margin-bottom: 24px; }
    
    .btn-main-action { font-size: 1rem; padding: 18px; }
    .radio-group { flex-direction: column; align-items: flex-start; }
    .radio-label { width: 100%; }
}