/* 
===========================
    Styles des Formulaires Contact Form 7
===========================
*/

/* Conteneur principal du formulaire */
.wpcf7 {
    margin: 40px 0;
}

/* Styles des inputs et textarea */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Focus sur les champs */
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    outline: none;
    border-color: var(--systemoun-strong-color, #19744C);
    box-shadow: 0 0 0 3px rgba(25, 116, 76, 0.1);
}

/* Textarea spécifique */
.wpcf7 textarea {
    min-height: 150px;
    resize: vertical;
}

/* Labels */
.wpcf7 label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-family: var(--wp--preset--font-family--lexend, Lexend);
    color: #333;
}

/* Bouton de soumission */
.wpcf7 input[type="submit"] {
    background-color: var(--systemoun-strong-color, #19744C) !important;
    color: #ffffff !important;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--wp--preset--font-family--lexend, Lexend);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wpcf7 input[type="submit"]:hover {
    background-color: var(--systemoun-strong-color-hover, #135A3B) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wpcf7 input[type="submit"]:active {
    transform: translateY(1px);
}

/* Messages de validation */
.wpcf7-not-valid-tip {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

.wpcf7-validation-errors {
    background-color: #fff5f5;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    color: #e74c3c;
}

.wpcf7-mail-sent-ok {
    background-color: #f0fdf4;
    border: 2px solid var(--systemoun-strong-color, #19744C);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    color: var(--systemoun-strong-color, #19744C);
}

/* Champs avec erreurs */
.wpcf7-not-valid {
    border-color: #e74c3c !important;
}

/* 
===========================
    CHECKBOX & RADIO PERSONNALISÉS
===========================
*/

/* Container pour les checkbox et radio */
.wpcf7-checkbox,
.wpcf7-radio {
    margin: 16px 0;
}

.wpcf7-list-item {
    margin: 12px 0;
    display: block;
}

/* Label global contenant checkbox + texte */
.wpcf7-checkbox .wpcf7-list-item label,
.wpcf7-radio .wpcf7-list-item label {
    display: inline-flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 36px;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.6;
    min-height: 24px;
}

/* Cacher la checkbox/radio native */
.wpcf7-checkbox input[type="checkbox"],
.wpcf7-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    left: 0;
    top: 0;
}

/* Créer la checkbox personnalisée */
.wpcf7-checkbox .wpcf7-list-item label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

/* Créer le radio personnalisé */
.wpcf7-radio .wpcf7-list-item label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

/* État hover */
.wpcf7-checkbox .wpcf7-list-item label:hover::before,
.wpcf7-radio .wpcf7-list-item label:hover::before {
    border-color: var(--systemoun-strong-color, #19744C);
}

/* Checkbox cochée - bordure et fond */
.wpcf7-checkbox .wpcf7-list-item label:has(input[type="checkbox"]:checked)::before {
    background-color: var(--systemoun-strong-color, #19744C);
    border-color: var(--systemoun-strong-color, #19744C);
}

/* Radio coché */
.wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:checked)::before {
    border-color: var(--systemoun-strong-color, #19744C);
}

/* Créer la coche pour checkbox */
.wpcf7-checkbox .wpcf7-list-item label::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 4px;
    width: 10px;
    height: 16px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Afficher la coche quand cochée */
.wpcf7-checkbox .wpcf7-list-item label:has(input[type="checkbox"]:checked)::after {
    opacity: 1;
}

/* Créer le point pour radio */
.wpcf7-radio .wpcf7-list-item label::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--systemoun-strong-color, #19744C);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Afficher le point quand coché */
.wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:checked)::after {
    opacity: 1;
}

/* Focus visible pour accessibilité */
.wpcf7-checkbox .wpcf7-list-item label:has(input[type="checkbox"]:focus)::before,
.wpcf7-radio .wpcf7-list-item label:has(input[type="radio"]:focus)::before {
    box-shadow: 0 0 0 3px rgba(25, 116, 76, 0.1);
}

/* Texte de la checkbox/radio */
.wpcf7-list-item-label {
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wpcf7 input[type="submit"] {
        width: 100%;
        padding: 16px;
    }
    
    .wpcf7-checkbox label,
    .wpcf7-radio label {
        font-size: 15px;
    }
}
