/* ===================================
   CONTACT FORM 7 - CUSTOM STYLES
   Styles pour matcher le design du thème
   =================================== */

/* Container du formulaire */
.wpcf7 {
    width: 100%;
}

/* Labels */
.wpcf7 label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--color-foreground);
}

/* Inputs text, email, tel, url */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background-color: white;
}

/* Textarea */
.wpcf7 textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
    min-height: 150px;
    background-color: white;
}

/* Focus states */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

/* Submit button */
.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
    width: 100%;
    height: 3.5rem;
    background-color: var(--color-secondary);
    color: var(--color-secondary-foreground);
    border: none;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover {
    background-color: rgba(212, 160, 23, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
}

.wpcf7 input[type="submit"]:active,
.wpcf7 button[type="submit"]:active {
    transform: translateY(0);
}

/* Messages de validation */
.wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Message de succès */
.wpcf7-mail-sent-ok {
    border: 2px solid var(--color-secondary) !important;
    background-color: rgba(212, 160, 23, 0.1) !important;
    color: var(--color-secondary) !important;
    padding: 1rem !important;
    border-radius: 1rem !important;
    margin-top: 1rem;
    font-weight: 500;
}

.wpcf7 form.sent .wpcf7-response-output {
    border: 2px solid var(--color-secondary) !important;
    background-color: rgba(212, 160, 23, 0.1) !important;
    color: var(--color-secondary) !important;
}

/* Message d'erreur */
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    border: 2px solid #dc2626;
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    padding: 1rem;
    border-radius: 1rem;
    margin-top: 1rem;
    font-weight: 500;
}

/* Spinner de chargement */
.wpcf7 .ajax-loader {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Champs invalides */
.wpcf7-not-valid {
    border-color: #dc2626 !important;
}

/* Checkbox et Radio */
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
    width: auto;
    height: auto;
    margin-right: 0.5rem;
}

.wpcf7 .wpcf7-list-item {
    margin: 0 0 0.5rem 0;
}

.wpcf7 .wpcf7-list-item-label {
    font-weight: normal;
}

/* Acceptance (RGPD) */
.wpcf7-acceptance {
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 input[type="url"],
    .wpcf7 input[type="number"],
    .wpcf7 input[type="date"],
    .wpcf7 select,
    .wpcf7 textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* Grid layout pour plusieurs colonnes */
.wpcf7 .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .wpcf7 .form-row {
        grid-template-columns: 1fr;
    }
}

/* Espacement entre les champs */
.wpcf7 p {
    margin-bottom: 1rem;
}

.wpcf7 p:last-of-type {
    margin-bottom: 0;
}

/* Placeholder styling */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Disabled state */
.wpcf7 input:disabled,
.wpcf7 textarea:disabled,
.wpcf7 select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}
