/**
 * quiz-confiance-employe.css
 * Styles dédiés au Quiz Confiance Employé
 * Préfixe : .qce-*
 * Règle : Bootstrap 5 prioritaire — ce fichier ne contient que ce qui n'existe pas ailleurs
 */

/* ── Boutons de rôle ────────────────────────────────────────────────────────── */
.qce-role-btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all .2s ease;
    min-width: 100px;
}

.qce-role-btn.active,
.qce-role-btn:focus-visible {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .25);
}

/* ── Texte de la question ───────────────────────────────────────────────────── */
.qce-question {
    line-height: 1.55;
    color: var(--text, #111);
    min-height: 4.5rem;
}

/* ── Boutons de réponse ─────────────────────────────────────────────────────── */
.qce-answer-btn {
    position: relative;
    border: 2px solid var(--line, #d1d5db);
    border-radius: 10px;
    background: var(--bg-soft, #f9fafb);
    color: var(--text, #111);
    font-weight: 600;
    font-size: .95rem;
    padding: .75rem 1rem;
    text-align: left;
    transition: border-color .18s ease, background .18s ease, transform .12s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.qce-answer-btn:hover {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
    transform: translateY(-1px);
}

.qce-answer-btn:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
}

.qce-answer-selected {
    border-color: #4f46e5 !important;
    background: #eef2ff !important;
    color: #4338ca !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .18);
    animation: qce-select .2s ease;
}

.qce-answer-selected .qce-answer-key {
    background: #4f46e5;
    color: #fff;
}

.qce-answer-label {
    flex: 1;
}

.qce-answer-key {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--line, #e5e7eb);
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted, #6b7280);
    transition: background .18s ease, color .18s ease;
}

@keyframes qce-select {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ── Badge profil (écran résultat) ──────────────────────────────────────────── */
.qce-profile-badge {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid #6366f1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    transition: border-color .3s ease, background-color .3s ease;
    animation: qce-badge-in .4s ease;
}

@keyframes qce-badge-in {
    from { opacity: 0; transform: scale(.75); }
    to   { opacity: 1; transform: scale(1);   }
}

.qce-profile-emoji {
    font-size: 2.6rem;
    line-height: 1;
    animation: qce-emoji-bounce .5s ease .15s both;
}

@keyframes qce-emoji-bounce {
    0%   { transform: scale(.6); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.qce-score-display {
    display: flex;
    align-items: baseline;
    gap: .1rem;
    line-height: 1;
}

.qce-score-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text, #111);
    line-height: 1;
}

.qce-score-max {
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted, #6b7280);
}

/* ── Dark mode ───────────────────────────────────────────────────────────────── */
[data-theme="dark"] .qce-answer-btn {
    background: #1e2130;
    border-color: #2f3447;
    color: #e2e8f0;
}

[data-theme="dark"] .qce-answer-btn:hover,
[data-theme="dark"] .qce-answer-selected {
    background: #2d3250 !important;
    border-color: #818cf8 !important;
    color: #a5b4fc !important;
}

[data-theme="dark"] .qce-answer-selected .qce-answer-key {
    background: #6366f1;
    color: #fff;
}

[data-theme="dark"] .qce-profile-badge {
    background-color: rgba(99, 102, 241, .12) !important;
}

[data-theme="dark"] .qce-score-number {
    color: #f1f5f9;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .qce-role-btn {
        min-width: 80px;
        font-size: .85rem;
        padding: .4rem .6rem;
    }

    .qce-answer-btn {
        font-size: .88rem;
        padding: .65rem .75rem;
    }

    .qce-profile-badge {
        width: 130px;
        height: 130px;
    }

    .qce-profile-emoji {
        font-size: 2rem;
    }

    .qce-score-number {
        font-size: 1.6rem;
    }
}
