/* style.css - mise en page simple et adaptée au mobile */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

.container {
    max-width: 480px;
    margin: 16px auto;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h1 {
    margin-top: 0;
    font-size: 1.5rem;
    text-align: center;
}

p {
    line-height: 1.5;
    font-size: 1rem;
}

.form-block {
    margin-top: 16px;
}

label {
    display: block;
    margin-top: 16px;
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    box-sizing: border-box;
}

button {
    display: block;
    width: 100%;
    padding: 12px 14px;
    margin-top: 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

.primary-btn {
    background: #007bff;
    color: #fff;
}

.secondary-btn {
    background: #e0e0e0;
    color: #333;
}

.message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.message.error {
    background: #ffe5e5;
    color: #a40000;
}

.message.success {
    background: #e5ffe8;
    color: #006400;
}

.hidden {
    display: none;
}

#question-counter {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 8px;
}

.button-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}



/* Sur un peu plus grand écran, mettre Oui/Non côte à côte */
@media (min-width: 480px) {
    .button-row {
        flex-direction: row;
    }
}

/* Animation des trois points de chargement */
.loading-dots {
    margin-top: 12px;
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 4px;
}

.loading-dots span {
    display: inline-block;
    animation: loadingBlink 1s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingBlink {
    0%   { opacity: 0.2; transform: translateY(0); }
    50%  { opacity: 1;   transform: translateY(-2px); }
    100% { opacity: 0.2; transform: translateY(0); }
}
