/* ==========================================================================
   SQ-STYLE.CSS - Styles ultra-minimalistes pour SQ.fr
   Couleurs: #a0522d (brun foncé) et #d2b48c (beige clair)
   ========================================================================== */

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

body {
    font-family: 'Courier New', monospace;
    color: #a0522d;
    background: #d2b48c;
    padding: 20px;
    line-height: 1.4;
}

/* En-tête */
header h1 {
    font-size: 1.5em;
    cursor: pointer;
    margin-bottom: 20px;
}

header h1:hover {
    text-decoration: underline;
}

/* Section d'erreur */
.error-section {
    display: none;
    max-width: 400px;
}

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

.error-section h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.error-section p {
    margin-bottom: 15px;
}

.error-section #countdown-info {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.error-section a {
    color: #a0522d;
    text-decoration: underline;
}

/* Formulaire principal */
#main-form {
    max-width: 400px;
}

#main-form.hidden {
    display: none;
}

#main-form h2 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

#main-form p {
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* Champs de formulaire */
.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9em;
}

.field input,
.field textarea {
    width: 100%;
    padding: 8px;
    background: #d2b48c;
    border: 1px solid #a0522d;
    color: #a0522d;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid #a0522d;
    outline-offset: -2px;
}

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

/* Section sécurité */
.security {
    margin: 20px 0;
}

.security h3 {
    font-size: 1em;
    margin-bottom: 10px;
}

/* Captcha mathématique */
.captcha-math {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-math span {
    font-weight: bold;
}

.captcha-math input {
    width: 60px;
    padding: 4px;
    background: #d2b48c;
    border: 1px solid #a0522d;
    color: #a0522d;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.captcha-math button {
    padding: 4px 6px;
    background: #a0522d;
    color: #d2b48c;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.captcha-math button:hover {
    opacity: 0.8;
}

/* Captcha formes */
.captcha-shape {
    margin-bottom: 15px;
}

.captcha-shape > div {
    margin-bottom: 5px;
}

.shape-display {
    font-size: 2em;
    margin: 10px 0;
    text-align: left;
}

.captcha-shape input {
    width: 120px;
    padding: 4px;
    background: #d2b48c;
    border: 1px solid #a0522d;
    color: #a0522d;
    font-family: 'Courier New', monospace;
    margin-right: 8px;
}

.captcha-shape button {
    padding: 4px 6px;
    background: #a0522d;
    color: #d2b48c;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.captcha-shape button:hover {
    opacity: 0.8;
}

#shape-feedback {
    font-size: 0.8em;
    margin-top: 5px;
    min-height: 16px;
}

#shape-feedback.success {
    color: #a0522d;
}

#shape-feedback.error {
    color: #a0522d;
}

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

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

.consent label {
    font-size: 0.9em;
    line-height: 1.3;
}

#privacy-link {
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
}

#privacy-link:hover {
    opacity: 0.7;
}

/* Bouton submit */
#submit-button {
    padding: 10px 20px;
    background: #a0522d;
    color: #d2b48c;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#submit-button:hover {
    opacity: 0.8;
}

#submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message de statut */
#status-message {
    margin-top: 15px;
    padding: 10px;
    display: none;
    font-size: 0.9em;
}

#status-message.success {
    background: #d2b48c;
    color: #a0522d;
    border: 1px solid #a0522d;
    display: block;
}

#status-message.error {
    background: #d2b48c;
    color: #a0522d;
    border: 1px solid #a0522d;
    display: block;
}

#status-message.loading {
    background: #d2b48c;
    color: #a0522d;
    border: 1px solid #a0522d;
    display: block;
}

/* Page de succès */
#success-section {
    display: none;
    max-width: 400px;
}

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

#success-section h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

#success-section p {
    margin-bottom: 20px;
}

#success-section button {
    padding: 10px 20px;
    background: #a0522d;
    color: #d2b48c;
    border: none;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

#success-section button:hover {
    opacity: 0.8;
}

/* Modal */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(160, 82, 45, 0.8);
    z-index: 1000;
}

#modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #d2b48c;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    border: 2px solid #a0522d;
}

#modal-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #a0522d;
}

#modal-content h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #a0522d;
}

#modal-content p {
    font-size: 0.8em;
    line-height: 1.4;
    color: #a0522d;
}

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

#countdown-timer {
    animation: pulse 1s infinite;
}

/* Responsive */
@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .captcha-math {
        flex-wrap: wrap;
    }
    
    .captcha-shape input {
        width: 100px;
        margin-bottom: 5px;
    }
    
    #modal-content {
        padding: 15px;
        max-width: 350px;
    }
}