/* ============================================
   FORMULAIRE DE CONTACT - CSS COMPLET ET CORRIGÉ
   ============================================ */

/* SECTION PRINCIPALE */
.bloghash-contact-section {
    padding: 30px 0 !important; /* Réduit de 60px à 30px */
    margin: 20px 0 !important; /* Réduit de 40px à 20px */
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.bloghash-contact-section:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.bloghash-contact-section .container {
    padding: 0 30px !important;
    max-width: 90%; /* Changé de 800px à 90% */
    margin: 0 auto; /* Centré */
}

/* Thèmes */
.bloghash-contact-section.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.bloghash-contact-section.bg-dark {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
}

/* Barre décorative avec animation */
.bloghash-contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4361ee, #3a0ca3, #7209b7);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Layout */
.bloghash-contact-section .contact-wrapper {
    display: grid;
    gap: 20px;
}

/* ============================================
   FORMULAIRE - STYLES COMPLETS
   ============================================ */

.bloghash-contact-section .contact-form-container {
    background: white;
    padding: 30px; /* Réduit de 35px à 30px */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.bloghash-contact-section.bg-dark .contact-form-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.contact-form-container:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* EN-TÊTE DU FORMULAIRE */
.bloghash-contact-section .form-header {
    text-align: center;
    margin: 0 0 25px 0; /* Réduit de 30px à 25px */
    padding: 0 0 15px 0; /* Réduit de 20px à 15px */
    border-bottom: 1px solid #f1f3f9;
}

.bloghash-contact-section.bg-dark .form-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.bloghash-contact-section .form-header h2 {
    font-size: 2rem !important; /* Réduit de 2.2rem à 2rem */
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.bloghash-contact-section.bg-dark .form-header h2 {
    background: linear-gradient(90deg, #a5b4fc, #bdb2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bloghash-contact-section .subtitle {
    color: #6c757d;
    font-size: 1.7rem !important; /* Réduit de 1.2rem à 1.1rem */
    margin: 0;
    line-height: 1.6;
    opacity: 0.9;
}

.bloghash-contact-section.bg-dark .subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* Structure du formulaire */
.bloghash-contact-section .contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Réduit de 20px à 15px */
}

.bloghash-contact-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Réduit de 20px à 15px */
}

/* Groupes de champs */
.bloghash-contact-section .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
}

/* LABELS - TAILLE AUGMENTÉE */
.bloghash-contact-section .form-group label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 1.5rem !important; /* Changé de 1.5rem à 0.7rem + 0.25rem */
    font-weight: 600 !important;
    color: #2d3748 !important;
    margin: 0 0 8px 0 !important; /* Réduit de 10px à 8px */
    font-family: inherit !important;
    line-height: 1.4 !important;
}

.bloghash-contact-section.bg-dark .form-group label {
    color: rgba(255, 255, 255, 0.95) !important;
}

.bloghash-contact-section .form-group label .icon {
    color: #4361ee;
    font-size: 1.5rem !important; /* Réduit de 1.2rem à 0.95rem */
}

/* INPUTS - TAILLE AUGMENTÉE */
.bloghash-contact-section .form-group input[type="text"],
.bloghash-contact-section .form-group input[type="email"],
.bloghash-contact-section .form-group input[type="tel"],
.bloghash-contact-section .form-group input[type="number"],
.bloghash-contact-section .form-group input[type="url"],
.bloghash-contact-section .form-group select,
.bloghash-contact-section .form-group textarea {
    padding: 12px 14px !important; /* Réduit de 16px 18px à 12px 14px */
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 1.5rem !important; /* Réduit de 1.6rem à 0.7rem + 0.25rem */
    font-family: inherit !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: #f8fafc !important;
    color: #2d3748 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 45px !important; /* Réduit de 55px à 45px */
    line-height: 1.5 !important;
}

/* Placeholder */
.bloghash-contact-section .form-group input::placeholder,
.bloghash-contact-section .form-group textarea::placeholder {
    color: #94a3b8 !important;
    font-size: 1.5rem !important; /* Réduit */
    transition: opacity 0.3s ease;
}

.bloghash-contact-section .form-group input:focus::placeholder,
.bloghash-contact-section .form-group textarea:focus::placeholder {
    opacity: 0.5;
}

/* Focus */
.bloghash-contact-section .form-group input[type="text"]:focus,
.bloghash-contact-section .form-group input[type="email"]:focus,
.bloghash-contact-section .form-group input[type="tel"]:focus,
.bloghash-contact-section .form-group input[type="number"]:focus,
.bloghash-contact-section .form-group input[type="url"]:focus,
.bloghash-contact-section .form-group select:focus,
.bloghash-contact-section .form-group textarea:focus {
    outline: none !important;
    border-color: #4361ee !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15) !important;
    transform: translateY(-2px);
}

/* Dark theme */
.bloghash-contact-section.bg-dark .form-group input[type="text"],
.bloghash-contact-section.bg-dark .form-group input[type="email"],
.bloghash-contact-section.bg-dark .form-group input[type="tel"],
.bloghash-contact-section.bg-dark .form-group input[type="number"],
.bloghash-contact-section.bg-dark .form-group input[type="url"],
.bloghash-contact-section.bg-dark .form-group select,
.bloghash-contact-section.bg-dark .form-group textarea {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Select */
.bloghash-contact-section .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%234361ee' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important; /* Ajusté */
    background-size: 16px !important;
    padding-right: 40px !important; /* Ajusté */
    cursor: pointer !important;
}

/* Textarea */
.bloghash-contact-section .form-group textarea {
    resize: vertical !important;
    min-height: 120px !important; /* Réduit de 150px à 120px */
    line-height: 1.6 !important;
    font-size: 1.5rem !important; /* Uniformisé */
}

/* CHAR-COUNT - STYLES MANQUANTS */
.bloghash-contact-section .char-count {
    text-align: right;
    font-size: 1.3rem !important; /* Réduit de 0.95rem à 0.8rem */
    color: #6c757d;
    margin: 6px 0 0 0 !important; /* Réduit de 8px à 6px */
    font-style: italic;
}

.bloghash-contact-section.bg-dark .char-count {
    color: rgba(255, 255, 255, 0.7);
}

/* Error states */
.bloghash-contact-section .form-group input.error,
.bloghash-contact-section .form-group select.error,
.bloghash-contact-section .form-group textarea.error {
    border-color: #dc3545 !important;
}

/* Error messages */
.bloghash-contact-section .error-message {
    color: #dc3545 !important;
    font-size: 1.2rem !important; /* Réduit de 0.95rem à 0.8rem */
    margin: 6px 0 0 0 !important; /* Réduit de 8px à 6px */
    min-height: 20px !important;
    font-weight: 500 !important;
}

.bloghash-contact-section.bg-dark .error-message {
    color: #ff6b6b !important;
}

/* CHECKBOX - TOUJOURS SUR LA MÊME LIGNE */
.bloghash-contact-section .checkbox-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important; /* Réduit de 12px à 10px */
    margin-top: 10px !important; /* Réduit de 15px à 10px */
    flex-wrap: nowrap !important;
}

.bloghash-contact-section .checkbox-group input[type="checkbox"] {
    width: 18px !important; /* Réduit de 22px à 18px */
    height: 18px !important; /* Réduit de 22px à 18px */
    min-width: 18px !important; /* Ajouté */
    flex-shrink: 0 !important;
    accent-color: #4361ee !important;
    cursor: pointer !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.bloghash-contact-section .checkbox-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.bloghash-contact-section .checkbox-group label.contact_consent {
    font-weight: normal !important;
    margin: 0 !important;
    font-size: 1.3rem !important; /* Réduit de 1.2rem à 0.9rem */
    line-height: 1.5 !important; /* Réduit de 1.6 à 1.5 */
    cursor: pointer !important;
    user-select: none !important;
    color: #4a5568 !important;
    flex: 1 !important;
    white-space: normal !important;
}

.bloghash-contact-section.bg-dark .checkbox-group label.contact_consent {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bloghash-contact-section .checkbox-group a {
    color: #4361ee !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    position: relative;
}

.bloghash-contact-section .checkbox-group a:hover {
    color: #3a0ca3 !important;
    text-decoration: underline !important;
}

.bloghash-contact-section.bg-dark .checkbox-group a {
    color: #a5b4fc !important;
}

.bloghash-contact-section.bg-dark .checkbox-group a:hover {
    color: #bdb2ff !important;
}

/* FORM FOOTER */
.bloghash-contact-section .form-footer {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Réduit de 15px à 10px */
    margin: 15px 0 0 0 !important; /* Réduit de 25px à 15px */
}

/* FORM NOTICE - STYLES MANQUANTS */
.bloghash-contact-section .form-notice {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; /* Réduit de 10px à 8px */
    color: #6c757d !important;
    font-size: 1.5rem !important; /* Réduit de 1rem à 0.85rem */
    padding: 10px 12px !important; /* Réduit de 12px 15px à 10px 12px */
    background: #f8f9fa !important;
    border-radius: 8px !important;
    margin-top: 8px !important; /* Réduit de 10px à 8px */
    font-style: italic !important;
    text-align: center !important;
    border: 1px solid #e9ecef !important;
}

.bloghash-contact-section.bg-dark .form-notice {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.bloghash-contact-section .form-notice .icon {
    color: var(--primary-blue);
    font-size: 1.5rem !important; /* Réduit de 1.1rem à 0.9rem */
}

/* Submit button */
.bloghash-contact-section .submit-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important; /* Réduit de 10px à 8px */
    padding: 14px 24px !important; /* Réduit de 18px 32px à 14px 24px */
    background: linear-gradient(90deg, #4361ee, #3a0ca3) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1.7rem !important; /* Réduit de 1.3rem à 0.95rem */
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 48px !important; /* Réduit de 60px à 48px */
    width: 100% !important;
    text-align: center !important;
    text-decoration: none !important;
    font-family: inherit !important;
    letter-spacing: 0.5px;
}

/* Effet de superposition au survol */
.bloghash-contact-section .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.bloghash-contact-section .submit-button:hover:not(:disabled) {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4) !important;
}

.bloghash-contact-section .submit-button:hover::before {
    left: 100%;
}

.bloghash-contact-section .submit-button:active:not(:disabled) {
    transform: translateY(-1px) !important;
}

.bloghash-contact-section .submit-button:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Loader */
.bloghash-contact-section .button-loader {
    display: none;
}

.bloghash-contact-section .button-loader .spinner {
    width: 18px; /* Réduit de 22px à 18px */
    height: 18px; /* Réduit de 22px à 18px */
    border: 2px solid rgba(255, 255, 255, 0.3); /* Réduit de 3px à 2px */
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form messages */
.bloghash-contact-section .form-message {
    padding: 15px !important; /* Réduit de 20px à 15px */
    border-radius: 10px !important;
    margin: 15px 0 0 0 !important; /* Réduit de 20px à 15px */
    display: none !important;
    font-size: 1.5rem !important; /* Réduit de 1.1rem à 0.9rem */
    text-align: center !important;
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) !important;
    font-weight: 600 !important;
    position: relative;
    overflow: hidden;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

.bloghash-contact-section .form-message.success {
    display: block !important;
    background: linear-gradient(135deg, #d1e7dd, #a3cfbb) !important;
    color: #0f5132 !important;
    border: 1px solid #badbcc !important;
}

.bloghash-contact-section .form-message.error {
    display: block !important;
    background: linear-gradient(135deg, #f8d7da, #f1b0b7) !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .bloghash-contact-section .form-row {
        grid-template-columns: 1fr;
        gap: 15px; /* Réduit de 20px à 15px */
    }
    
    .bloghash-contact-section {
        padding: 25px 0 !important; /* Réduit de 50px à 25px */
        margin: 20px 0 !important; /* Réduit de 30px à 20px */
    }
    
    .bloghash-contact-section .container {
        padding: 0 20px !important; /* Réduit de 25px à 20px */
    }
    
    /* Checkbox reste sur la même ligne */
    .bloghash-contact-section .checkbox-group {
        flex-wrap: nowrap !important;
        gap: 8px !important; /* Réduit de 10px à 8px */
    }
}

@media (max-width: 768px) {
    .bloghash-contact-section {
        padding: 20px 15px !important; /* Réduit de 40px 20px à 20px 15px */
        margin: 15px 0 !important; /* Réduit de 25px à 15px */
        border-radius: 12px;
    }
    
    .bloghash-contact-section .container {
        padding: 0 !important;
    }
    
    .bloghash-contact-section .contact-form-container {
        padding: 20px 15px; /* Réduit de 25px 20px à 20px 15px */
    }
    
    .bloghash-contact-section .contact-wrapper {
        gap: 12px; /* Réduit de 15px à 12px */
    }
    
    .bloghash-contact-section .form-header h2 {
        font-size: 1.7rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .subtitle {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .form-group label {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .form-group label .icon {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .form-group input[type="text"],
    .bloghash-contact-section .form-group input[type="email"],
    .bloghash-contact-section .form-group input[type="tel"],
    .bloghash-contact-section .form-group input[type="number"],
    .bloghash-contact-section .form-group input[type="url"],
    .bloghash-contact-section .form-group select,
    .bloghash-contact-section .form-group textarea {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
        padding: 10px 12px !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .submit-button {
        padding: 12px 20px !important; /* Ajusté pour mobile */
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    /* Checkbox reste sur la même ligne en mobile */
    .bloghash-contact-section .checkbox-group {
        align-items: flex-start !important;
        gap: 8px !important; /* Réduit de 10px à 8px */
    }
    
    .bloghash-contact-section .checkbox-group label.contact_consent {
        font-size: 1.4rem !important; /* Ajusté pour mobile */
        line-height: 1.4 !important; /* Ajusté pour mobile */
    }
}

@media (max-width: 576px) {
    .bloghash-contact-section {
        padding: 15px 10px !important; /* Réduit de 30px 15px à 15px 10px */
        margin: 10px 0 !important; /* Réduit de 20px à 10px */
        border-radius: 10px;
    }
    
    .bloghash-contact-section .contact-form-container {
        padding: 15px 10px; /* Réduit de 20px 15px à 15px 10px */
    }
    
    .bloghash-contact-section .contact-wrapper {
        gap: 10px; /* Réduit de 12px à 10px */
    }
    
    .bloghash-contact-section .form-header h2 {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .form-group label {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .form-group input[type="text"],
    .bloghash-contact-section .form-group input[type="email"],
    .bloghash-contact-section .form-group input[type="tel"],
    .bloghash-contact-section .form-group input[type="number"],
    .bloghash-contact-section .form-group input[type="url"],
    .bloghash-contact-section .form-group select,
    .bloghash-contact-section .form-group textarea {
        font-size: 1.5rem !important; /* Ajusté pour mobile */
        padding: 8px 10px !important; /* Ajusté pour mobile */
    }
    
    /* Checkbox reste sur la même ligne */
    .bloghash-contact-section .checkbox-group {
        gap: 6px !important; /* Réduit de 8px à 6px */
    }
    
    .bloghash-contact-section .checkbox-group label.contact_consent {
        font-size: 1.4rem !important; /* Ajusté pour mobile */
    }
    
    .bloghash-contact-section .submit-button {
        padding: 10px 16px !important; /* Ajusté pour mobile */
        font-size: 1.7rem !important; /* Ajusté pour mobile */
    }
}