/* ================================================
   Style pour la page de contr�le de v�rification humaine
   x-waf/control.php
   ================================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #929394 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Container principal */
.control-container {
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Boite de contrôle */
.control-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px 30px;
    text-align: center;
}

/* Icône de bouclier */
.icon-shield {
    margin-bottom: 20px;
}

.icon-shield svg {
    filter: drop-shadow(0 4px 6px rgba(74, 144, 226, 0.3));
}

/* Titre */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Message d'erreur */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Bo�te d'information */
.info-box {
    background: #f8f9fa;
    border-left: 4px solid #4a90e2;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 25px;
    text-align: left;
}

.info-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Formulaire de v�rification */
.verification-form {
    margin-bottom: 25px;
}

/* Bo�te de question */
.question-box {
    margin-bottom: 20px;
}

.question-box label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.math-question {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 32px;
    font-weight: 700;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Conteneur d'image CAPTCHA */
.captcha-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.captcha-image {
    border: 3px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
    display: block;
}

/* Bouton de rafraîchissement du CAPTCHA */
.refresh-captcha {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #4a90e2;
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-captcha:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.refresh-captcha:active {
    transform: translateY(0);
}

.refresh-captcha svg {
    transition: transform 0.3s ease;
}

.refresh-captcha:hover svg {
    transform: rotate(180deg);
}

/* Groupe d'input */
.input-group {
    margin-bottom: 20px;
}

.answer-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

.answer-input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.answer-input::placeholder {
    color: #bbb;
    font-weight: 400;
}

/* Bouton de soumission */
.submit-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer informatif */
.footer-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.footer-info p {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 11px;
    color: #aaa;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 600px) {
    .control-box {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .math-question {
        font-size: 28px;
        padding: 15px;
    }

    .answer-input {
        font-size: 16px;
        padding: 12px 15px;
    }
}

/* Animation de chargement (optionnel) */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
