/* assets/css/forms.css */

/* ========================================= */
/* 1. HERO HEADER (EN-TÊTE PAGE DEVIS)       */
/* ========================================= */
.page-hero {
    /* Fond avec superposition sombre pour lisibilité */
    background-image: linear-gradient(rgba(5, 10, 24, 0.85), rgba(5, 10, 24, 0.85)), url('../img/fanzone-paris-coupe-paris-france-ecran-geant.jpg');
    background-size: cover;
    background-position: center;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
    padding-top: 80px; /* Compensation header fixe */
}

.hero-content-inner h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
}

.hero-content-inner p {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    color: #cbd5e1; /* Gris clair */
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================= */
/* 2. GRID LAYOUT (STRUCTURE DE LA PAGE)     */
/* ========================================= */
.devis-section {
    padding: 60px 20px;
    background-color: #f0f2f5; /* Fond page très léger */
}

.devis-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 1/3 Infos, 2/3 Formulaire */
    gap: 50px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: start;
}

/* --- SIDEBAR INFOS (GAUCHE) --- */
.devis-info-block {
    position: sticky;
    top: 100px; /* Reste visible au scroll */
}

.devis-info-block h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 30px;
    color: var(--navy);
}
.devis-info-block h3 span { color: var(--blue); }

.d-feature {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid var(--blue);
}
.d-feature h5 {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--navy);
    text-transform: uppercase;
}
.d-feature p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}

/* Encadré Contact Rapide */
.contact-box-sidebar {
    margin-top: 40px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #e2e8f0;
}
.contact-box-sidebar h5 {
    font-family:'Syne';
    font-weight:700;
    margin-bottom:5px;
    color: var(--navy);
    text-transform: uppercase;
    font-size: 0.9rem;
}
.contact-box-sidebar p {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 15px;
}
.contact-box-sidebar a {
    color: var(--blue);
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}
.contact-box-sidebar a:hover {
    transform: scale(1.05);
}

/* ========================================= */
/* 3. STYLE DU FORMULAIRE (DROITE)           */
/* ========================================= */
.devis-form-box {
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

/* Titres de sections (1. Vos Coordonnées...) */
.form-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
    margin-top: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}
.form-section-title:first-child { margin-top: 0; }

/* Grille interne du formulaire */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    flex: 1;
    margin-bottom: 20px;
    position: relative;
}

/* Labels */
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #334155;
    font-family: 'Manrope', sans-serif;
}

/* Champs Inputs / Select / Textarea */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: all 0.3s ease;
    color: #1e293b;
    outline: none;
}

/* Focus (clic dans le champ) */
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 78, 162, 0.1);
}

/* État Désactivé (pour les dates) */
.form-input:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
    color: #94a3b8;
    border-color: #cbd5e1;
}

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

/* Select Custom (Flèche) */
.select-wrapper { position: relative; }
.select-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    font-size: 0.8rem;
}
.form-select {
    appearance: none;
    cursor: pointer;
}

/* --- CHECKBOXES "CARTES" (Matériel) --- */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.checkbox-card:hover {
    background: white;
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Cache la case à cocher native moche */
.checkbox-card input { display: none; }

/* Carré personnalisé */
.cb-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: 0.2s;
    background: white;
}

/* État coché */
.checkbox-card input:checked + .cb-custom {
    background: var(--blue);
    border-color: var(--blue);
}

/* Petite coche (FontAwesome) */
.checkbox-card input:checked + .cb-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.cb-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}
.checkbox-card input:checked ~ .cb-label {
    color: var(--blue);
    font-weight: 700;
}

/* Checkbox simple (Sans date) */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.custom-checkbox input { display: none; }
.custom-checkbox input:checked + .cb-custom {
    background: var(--blue);
    border-color: var(--blue);
}
.custom-checkbox input:checked + .cb-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* --- FILE UPLOAD MODERNE (Dropzone) --- */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}
.file-input-hidden {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.9rem;
    transition: 0.3s;
    text-align: center;
    cursor: pointer;
}
.file-upload-wrapper:hover .file-upload-label {
    background: #e2e8f0;
    border-color: var(--blue);
    color: var(--blue);
}
.file-upload-label i { font-size: 1.4rem; }

/* --- CAPTCHA PROPRE --- */
.captcha-box {
    background: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}
.captcha-content {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    font-size: 0.9rem;
    color: #856404;
}
.captcha-input {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 700;
    background: white;
}

/* --- BOUTON SUBMIT --- */
.btn-submit {
    background: var(--navy);
    color: white;
    border: none;
    padding: 18px 40px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    margin-top: 30px;
    box-shadow: 0 10px 20px rgba(5, 10, 24, 0.2);
}
.btn-submit:hover {
    background: var(--blue);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 78, 162, 0.3);
}

/* ========================================= */
/* 4. RESPONSIVE (MOBILE)                    */
/* ========================================= */
@media (max-width: 1024px) {
    .devis-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
    }
    .devis-info-block {
        position: static;
        margin-bottom: 40px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .checkbox-grid {
        grid-template-columns: 1fr 1fr; /* 2 colonnes sur mobile */
    }
    .devis-form-box {
        padding: 25px;
    }
    .page-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .checkbox-grid {
        grid-template-columns: 1fr; /* 1 colonne sur petit mobile */
    }
}