/* ==========================================================================
   WH-STYLE.CSS - Styles pour WH.fr avec charte Expert Compta
   Couleurs: #2C3E50 (bleu foncé), #27AE60 (vert), #ffffff (blanc)
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.5;
}

/* En-tête */
header {
    background-color: #2C3E50;
    color: white;
    padding: 20px;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

header h1:hover {
    opacity: 0.8;
}

/* Container principal */
.container {
    padding: 40px;
    max-width: 600px;
    margin: auto;
}

/* Section d'erreur */
.error-section {
    display: none;
    padding: 40px;
    max-width: 600px;
    margin: auto;
    text-align: center;
}

.error-section.visible {
    display: block;
}

.error-section h2 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.error-section p {
    margin-bottom: 20px;
    color: #333;
}

#wh-countdown-info {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

#wh-redirect-info {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

#wh-countdown-timer {
    font-weight: bold;
    color: #2C3E50;
    animation: pulse 1s infinite;
}

.error-section a {
    display: inline-block;
    background-color: #27AE60;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.error-section a:hover {
    background-color: #229954;
}

/* Container principal masqué */
.container.hidden {
    display: none;
}

/* Formulaire */
#wh-form-title {
    color: #2C3E50;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

#wh-form-description {
    margin-bottom: 30px;
    color: #666;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 5px;
    color: #2C3E50;
    font-weight: bold;
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: #27AE60;
}

.field textarea {
    height: 120px;
    resize: vertical;
}

/* Section captcha */
.captcha-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.captcha-section h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.captcha-question {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-question span {
    font-weight: bold;
    color: #2C3E50;
}

.captcha-question input {
    width: 100px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 1rem;
}

.captcha-question input:focus {
    outline: none;
    border-color: #27AE60;
}

.refresh-btn {
    padding: 8px 10px;
    background-color: #2C3E50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background-color: #34495e;
}

#wh-captcha-feedback {
    margin-top: 10px;
    font-size: 0.9rem;
    min-height: 20px;
}

#wh-captcha-feedback.success {
    color: #27AE60;
    font-weight: bold;
}

#wh-captcha-feedback.error {
    color: #e74c3c;
    font-weight: bold;
}

/* Consentement */
.consent {
    margin: 25px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.consent input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #27AE60;
}

.consent label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
}

#wh-privacy-link {
    color: #27AE60;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 5px;
}

#wh-privacy-link:hover {
    color: #229954;
}

/* Bouton submit */
.btn {
    display: inline-block;
    background-color: #27AE60;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.btn:hover {
    background-color: #229954;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message de statut */
#wh-status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
    font-weight: bold;
}

#wh-status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#wh-status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

#wh-status-message.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Page de succès */
.success-section {
    display: none;
    padding: 40px;
    max-width: 600px;
    margin: auto;
    text-align: center;
}

.success-section.visible {
    display: block;
}

.success-section h2 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.success-section p {
    margin-bottom: 25px;
    color: #333;
}

.success-section .btn {
    width: auto;
    display: inline-block;
}

/* Modal */
#wh-modal-overlay {
    display: none; /* CACHÉ par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.8);
    z-index: 1000;
}

#wh-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 4px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#wh-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

#wh-modal-close:hover {
    color: #333;
}

#wh-modal-content h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#wh-modal-content p {
    color: #333;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .captcha-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .captcha-question input {
        width: 120px;
    }
    
    #wh-modal-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .field input,
    .field textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .captcha-section {
        padding: 15px;
    }
}