/* ==========================================================================
   FORMULAIRE DE CONTACT SÉCURISÉ - STYLES v1.0.1 CORRIGÉ
   ========================================================================== */

/* Container principal */
.mfcs-contact-form-wrapper {
    max-width: 700px;
    margin: 30px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Titre du formulaire */
.mfcs-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.mfcs-form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Formulaire */
.mfcs-contact-form {
    width: 100%;
}

/* Rangée de champs */
.mfcs-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.mfcs-form-row .mfcs-form-group {
    flex: 1;
}

/* Groupe de champs */
.mfcs-form-group {
    margin-bottom: 25px;
}

.mfcs-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    letter-spacing: 0.3px;
}

.mfcs-form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

/* ============================================
   CORRECTION IMPORTANTE - Champs de formulaire visibles
   ============================================ */
.mfcs-form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a !important;  /* ← TEXTE NOIR FONCÉ */
    background-color: #ffffff !important;  /* ← FOND BLANC */
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

/* Force le style même si le thème essaie de le changer */
.mfcs-contact-form input.mfcs-form-control,
.mfcs-contact-form textarea.mfcs-form-control {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
}

.mfcs-form-control:focus {
    outline: none;
    background-color: #ffffff !important;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    color: #1a1a1a !important;
}

.mfcs-form-control::placeholder {
    color: #adb5bd;
    opacity: 0.7;
}

/* Textarea */
textarea.mfcs-form-control {
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

/* Compteur de caractères */
.mfcs-char-counter {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    text-align: right;
}

/* Bouton de soumission */
.mfcs-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.mfcs-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.mfcs-submit-btn:hover::before {
    left: 100%;
}

.mfcs-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mfcs-submit-btn:active {
    transform: translateY(0);
}

.mfcs-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.mfcs-btn-icon {
    font-size: 18px;
}

/* Spinner */
.mfcs-spinner {
    display: inline-block;
}

.mfcs-spinner-icon {
    width: 20px;
    height: 20px;
    animation: mfcs-rotate 1s linear infinite;
}

.mfcs-spinner-icon circle {
    stroke: currentColor;
    stroke-linecap: round;
    animation: mfcs-dash 1.5s ease-in-out infinite;
}

@keyframes mfcs-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes mfcs-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Messages de réponse */
.mfcs-response-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    display: none;
    animation: mfcs-slideDown 0.3s ease;
}

.mfcs-response-message.mfcs-success {
    display: block;
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
    color: #155724;
}

.mfcs-response-message.mfcs-error {
    display: block;
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
    color: #721c24;
}

@keyframes mfcs-slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages d'erreur des champs */
.mfcs-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    min-height: 18px;
    animation: mfcs-shake 0.3s ease;
}

.mfcs-error:empty {
    display: none;
}

@keyframes mfcs-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Champ invalide */
.mfcs-form-control.invalid {
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
}

/* Notice de confidentialité */
.mfcs-privacy-notice {
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    margin-top: 20px;
    margin-bottom: 0;
}

/* Honeypot - champ caché */
.mfcs-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mfcs-contact-form-wrapper {
        padding: 30px 20px;
        margin: 20px 10px;
    }
    
    .mfcs-form-title {
        font-size: 24px;
    }
    
    .mfcs-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .mfcs-form-control {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .mfcs-submit-btn {
        padding: 14px 25px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .mfcs-contact-form-wrapper {
        padding: 25px 15px;
    }
    
    .mfcs-form-title {
        font-size: 22px;
    }
}

/* Accessibilité */
.mfcs-form-control:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.mfcs-submit-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Animation de chargement */
@keyframes mfcs-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.mfcs-loading .mfcs-form-control {
    animation: mfcs-pulse 1.5s ease-in-out infinite;
}

/* Corrections pour compatibilité thèmes WordPress */
.mfcs-contact-form input[type="text"],
.mfcs-contact-form input[type="email"],
.mfcs-contact-form input[type="tel"],
.mfcs-contact-form textarea {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    border: 2px solid #e9ecef !important;
}

.mfcs-contact-form input[type="text"]:focus,
.mfcs-contact-form input[type="email"]:focus,
.mfcs-contact-form input[type="tel"]:focus,
.mfcs-contact-form textarea:focus {
    color: #1a1a1a !important;
    background-color: #ffffff !important;
    border-color: #667eea !important;
}
