/* =====================================================================
   Thème de l'application AWS Quiz
   ===================================================================== */

:root {
    --aws-orange: #ff9900;
    --aws-dark:   #232f3e;
    --aws-blue:   #146eb4;
    --bg:         #f4f6f9;
    --green:      #2e7d32;
    --red:        #c62828;
}

body {
    background-color: var(--bg);
    color: var(--aws-dark);
    font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}

.bg-aws   { background-color: var(--aws-dark) !important; color: #fff; }
.text-aws { color: var(--aws-orange) !important; }

.btn-aws {
    --bs-btn-bg: var(--aws-orange);
    --bs-btn-hover-bg: #e68a00;
    --bs-btn-active-bg: #cc7a00;
    --bs-btn-border-color: var(--aws-orange);
    --bs-btn-hover-border-color: #e68a00;
    --bs-btn-color: #111;
    --bs-btn-hover-color: #111;
    background-color: var(--aws-orange);
    color: #111;
    font-weight: 600;
    border: none;
}
.btn-aws:hover { color: #111; }

/* Cartes */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 6px 20px rgba(35, 47, 62, 0.08);
}
.card-title { font-weight: 700; }

/* Question */
.q-enonce {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.option {
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
}
.option:hover { background-color: #eef2f7; }
.option.selected {
    border-color: var(--aws-orange) !important;
    background-color: #fff4e0;
}

.option.correct   { border-color: var(--green) !important; background-color: #e6f4ea !important; }
.option.wrong     { border-color: var(--red)   !important; background-color: #fdecea !important; }
.option.correct .badge-ok { color: var(--green); }

/* Chrono */
.chrono {
    font-family: "SFMono-Regular", Menlo, monospace;
    font-size: 2.2rem;
    font-weight: 700;
}
.chrono.expired { color: var(--red); }

/* Liste des participants */
.participant-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px dashed #e0e0e0;
}
.participant-item:last-child { border-bottom: none; }

/* ===== Tableau de bord admin (sidebar) ===== */
.admin-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* En-tête */
.admin-header {
    padding-bottom: .75rem;
    border-bottom: 1px solid #f0f0f0;
}
.admin-header .fw-bold { font-size: 1rem; color: #1a1a2e; }
.admin-session-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
}
.admin-progress {
    font-size: .85rem;
    font-weight: 700;
    color: #1a1a2e;
    background: #f0f4ff;
    padding: .15rem .65rem;
    border-radius: 1rem;
}

/* Phase badge */
#admin-phase-badge {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .3px;
    padding: .25rem .75rem;
}

/* Stats */
.admin-stats {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.admin-stat {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    background: #f8f9fb;
    border-radius: .75rem;
    transition: background .15s;
}
.admin-stat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.admin-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    color: #1a1a2e;
}
.admin-stat-lbl {
    font-size: .78rem;
    color: #888;
    margin-left: .25rem;
}

/* Barre de progression des réponses */
.admin-bar-wrapper {
    margin-top: -.25rem;
}
#admin-response-bar {
    height: 8px;
    border-radius: 1rem;
    background: #e9ecef;
}
#admin-response-progress {
    border-radius: 1rem;
    font-size: 0;
    transition: width .4s ease;
}

/* Boutons d'action */
.admin-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-top: .25rem;
    border-top: 1px solid #f0f0f0;
}
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: none;
    border-radius: .75rem;
    padding: .6rem 1rem;
    font-size: .88rem;
    font-weight: 600;
    transition: all .15s ease;
    cursor: pointer;
}
.admin-btn:active { transform: scale(.97); }

.admin-btn-primary {
    background: #1a1a2e;
    color: #fff;
}
.admin-btn-primary:hover { background: #2d2d4a; }

.admin-btn-accent {
    background: #e8f5e9;
    color: #2e7d32;
}
.admin-btn-accent:hover { background: #c8e6c9; }

.admin-btn-danger {
    background: #fff;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.admin-btn-danger:hover { background: #ffebee; }

@media (max-width: 991.98px) {
    .admin-panel { position: static; }
}

/* Suppression des anciennes classes .stat (remplacées ci-dessus) */

/* Responsive — petits écrans (smartphones) */
@media (max-width: 576px) {
    .chrono { font-size: 1.5rem; }
    .q-enonce { font-size: 1rem; }
    .admin-panel { padding: 1rem; }
    .admin-stat { padding: .4rem .6rem; }
    .admin-stat-val { font-size: 1.1rem; }
    .admin-btn { font-size: .82rem; padding: .5rem .75rem; }
    .navbar-brand { font-size: 1rem; }
    #view-lobby .card-body { padding: 1rem !important; }
}

/* État désactivé (spinner) */
.btn:disabled { pointer-events: none; opacity: .7; }

.badge-level { letter-spacing: .5px; }
.badge-standard { background-color: #2e7d32; }
.badge-difficile { background-color: #ef6c00; }
.badge-extreme  { background-color: #c62828; }

/* Classement */
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem .75rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.result-row:last-child { border-bottom: none; }
.result-row:hover { background: #f8f9fb; }

.result-row-me {
    background: #f0f4ff !important;
    border-radius: .5rem;
    margin: .25rem 0;
}

.result-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.result-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9ecef;
    font-size: .82rem;
    font-weight: 700;
    color: #555;
    flex-shrink: 0;
}

.result-name {
    font-weight: 700;
}

.result-right {
    display: flex;
    align-items: center;
}

.result-score {
    font-weight: 800;
    font-size: 1rem;
}

.score-green  { color: #2e7d32; }
.score-orange { color: #ef6c00; }
.score-red    { color: #c62828; }

/* Stats cards (results) */
.stat-card {
    text-align: center;
    background: #f8f9fb;
    border-radius: .75rem;
    padding: .75rem .5rem;
}
.stat-val-lg {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
}
.stat-card .stat-lbl {
    font-size: .78rem;
    color: #888;
    margin-top: .15rem;
}
