/* ===== MOBILE CONTACT INTERACTIONS STYLES ===== */
/* Styles pour améliorer les interactions tactiles et l'accessibilité du formulaire sur mobile */

@media (max-width: 767.98px) {
    /* Styles pour les états de focus */
    .form-group.focused label {
        color: var(--primary-color);
    }
    
    .form-group.focused input,
    .form-group.focused textarea,
    .form-group.focused select {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
    }
    
    /* Styles pour les états de validation */
    .form-group input.valid,
    .form-group textarea.valid,
    .form-group select.valid {
        border-color: #28a745;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2328a745' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 16px 16px;
        padding-right: 40px;
    }
    
    .form-group input.invalid,
    .form-group textarea.invalid,
    .form-group select.invalid {
        border-color: #dc3545;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23dc3545' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 16px 16px;
        padding-right: 40px;
    }
    
    .error-message {
        color: #dc3545;
        font-size: 0.85rem;
        margin-top: 0.3rem;
        animation: fadeIn 0.3s ease-in-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Styles pour le wrapper de select */
    .select-wrapper {
        position: relative;
    }
    
    .select-wrapper::after {
        content: '';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 6px solid var(--dark-gray);
        pointer-events: none;
    }
    
    /* Styles pour la case à cocher */
    .checkbox-group input[type="checkbox"] {
        position: relative;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        background-color: #fff;
        border: 1px solid var(--light-gray);
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .checkbox-group input[type="checkbox"]:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .checkbox-group input[type="checkbox"]:checked::after {
        content: '';
        position: absolute;
        left: 6px;
        top: 2px;
        width: 6px;
        height: 12px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
    }
    
    .checkbox-group label.checked {
        color: var(--primary-color);
    }
    
    /* Styles pour le bouton d'envoi */
    button[type="submit"].pressed {
        transform: scale(0.98);
        background-color: var(--primary-dark);
    }
    
    /* Amélioration de l'accessibilité */
    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus,
    .checkbox-group input[type="checkbox"]:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.3);
    }
    
    /* Styles pour les champs désactivés */
    .form-group input:disabled,
    .form-group textarea:disabled,
    .form-group select:disabled {
        background-color: #f8f9fa;
        cursor: not-allowed;
        opacity: 0.7;
    }
    
    /* Amélioration du contraste pour l'accessibilité */
    .form-group label {
        color: #333;
    }
    
    /* Styles pour les liens dans le formulaire */
    .form-group a {
        color: var(--primary-color);
        text-decoration: underline;
        font-weight: 600;
    }
    
    .form-group a:hover,
    .form-group a:focus {
        text-decoration: none;
    }
    
    /* Styles pour les messages de succès */
    .form-success-message {
        background-color: #d4edda;
        color: #155724;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        animation: slideDown 0.5s ease-in-out;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .form-success-message::before {
        content: '✓';
        display: inline-block;
        width: 24px;
        height: 24px;
        background-color: #28a745;
        color: white;
        border-radius: 50%;
        text-align: center;
        line-height: 24px;
        margin-right: 10px;
        font-weight: bold;
    }
}

/* Styles pour les très petits écrans */
@media (max-width: 480px) {
    .error-message {
        font-size: 0.8rem;
    }
    
    .checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .checkbox-group input[type="checkbox"]:checked::after {
        left: 5px;
        top: 2px;
        width: 5px;
        height: 10px;
    }
}