/**
 * Styles pour le formulaire de contact
 *
 * @package ContactMessages
 */

/* Container principal */
.form-contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* En-tête du formulaire */
.form-contact-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-contact-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.form-contact-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Formulaire */
.form-contact {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Ligne de champs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Groupe de champs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Labels */
.form-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

/* Champs de saisie */
.form-input,
.form-textarea {
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Champ fichier */
.form-file {
    padding: 0.5rem;
    border: 2px dashed #e1e5e9;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-file:hover {
    border-color: #0073aa;
}

.form-file:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Aide pour les champs */
.form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Checkbox RGPD */
.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-checkbox {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #0073aa;
}

.form-checkbox-text {
    color: #333;
}

.form-checkbox-text a {
    color: #0073aa;
    text-decoration: underline;
}

.form-checkbox-text a:hover {
    color: #005a87;
}

/* Bouton de soumission */
.form-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
    min-width: 200px;
}

.form-submit:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Champ honeypot (caché) */
.form-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Réponse du formulaire */
.form-response {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-weight: 500;
}

.form-response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* hCaptcha */
.h-captcha {
    margin: 1rem 0;
}

/* États de chargement */
.submit-loading {
    display: none;
}

.form-submit.loading .submit-text {
    display: none;
}

.form-submit.loading .submit-loading {
    display: inline;
}

/* Validation des erreurs */
.form-input.error,
.form-textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 480px) {
    .form-contact-container {
        padding: 1rem;
        margin: 1rem;
    }

    .form-contact-title {
        font-size: 1.5rem;
    }

    .form-submit {
        width: 100%;
        min-width: auto;
    }
}

/* Styles pour l'éditeur Gutenberg */
.contact-form-block-editor {
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 2rem;
    background: #f9f9f9;
}

.contact-form-preview {
    background: #fff;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-preview-notice {
    margin-top: 1rem;
    padding: 1rem;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    text-align: center;
    color: #005a87;
}

.captcha-preview {
    border: 2px dashed #e1e5e9;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    background: #f9f9f9;
}

.captcha-placeholder {
    color: #666;
    font-style: italic;
}