/* ============================================
   PROXIVOTE — test.css
   ============================================ */

.test-main {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: flex-start;
    padding: 3rem 0;
    background: var(--bg-alt);
}

/* LOADING */
.loading {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* TEST HEADER */
.test-header {
    margin-bottom: 2rem;
}

.test-meta {
    display: flex;
    gap: .75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.test-chambre {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--accent);
    background: var(--accent-light);
    padding: .25rem .75rem;
    border-radius: 20px;
}

.test-niveau {
    font-size: .8rem;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .25rem .75rem;
    border-radius: 20px;
}

.progress-bar-wrap {
    height: 6px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: .5rem;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width .4s ease;
    width: 0%;
}

.progress-text {
    font-size: .8rem;
    color: var(--text-muted);
    text-align: right;
}

/* QUESTION CARD */
.question-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.question-theme {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 1rem;
    padding: .2rem .6rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.theme-fiscal { background: #FEF3C7; color: #92400E; }
.theme-social { background: #DBEAFE; color: #1E40AF; }
.theme-environnement { background: #D1FAE5; color: #065F46; }
.theme-institutionnel { background: #EDE9FE; color: #5B21B6; }
.theme-securite { background: #FEE2E2; color: #991B1B; }
.theme-education { background: #FEF9C3; color: #854D0E; }
.theme-sante { background: #FCE7F3; color: #9D174D; }
.theme-autre { background: #F1F5F9; color: #475569; }

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
}

/* VOTE BUTTONS */
.votes-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    background: var(--bg);
    border-color: var(--border);
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.vote-btn.selected {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.vote-btn--pour:hover,
.vote-btn--pour.selected {
    border-color: var(--success);
    background: #F0FDF4;
}

.vote-btn--contre:hover,
.vote-btn--contre.selected {
    border-color: var(--danger);
    background: #FFF5F5;
}

.vote-btn--abstention:hover,
.vote-btn--abstention.selected {
    border-color: #F59E0B;
    background: #FFFBEB;
}

.vote-icon {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.vote-btn--pour .vote-icon { color: var(--success); }
.vote-btn--contre .vote-icon { color: var(--danger); }
.vote-btn--abstention .vote-icon { color: #F59E0B; }

.vote-label {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}

/* PASSER */
.test-footer {
    text-align: center;
}

.btn-passer {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: .85rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    padding: .5rem;
    transition: color .2s;
}

.btn-passer:hover {
    color: var(--text);
}

/* ERREUR */
.erreur {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.erreur a {
    color: var(--accent);
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .votes-buttons {
        grid-template-columns: 1fr;
    }

    .question-text {
        font-size: 1rem;
    }
}

.erreur { display: none; }