/* ============================================================
   TABLEAU-DE-BORD.CSS — Page Tableau de Bord (/Epreuve/TableauDeBord)
   Thème : Bleu ciel  #4169E1 / #1e40af
   ============================================================ */

/* ── PAGE WRAPPER ──────────────────────────────────────────── */
.tdb-page { background: #eef2fb; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────────────────── */
.tdb-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: white;
    border-right: 1px solid #e2e8f0;
    min-height: calc(100vh - 70px);
    padding: 28px 0;
    position: sticky;
    top: 70px;
}

.tdb-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #94a3b8;
    text-transform: uppercase;
    padding: 0 20px;
    margin-bottom: 8px;
}

.tdb-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all .2s;
}
.tdb-nav-item:hover  { background: #f0f7ff; color: #1e40af; }
.tdb-nav-item.active {
    background: #e8f4ff;
    color: #1e40af;
    border-left-color: #1e40af;
    font-weight: 700;
}
.tdb-nav-item i { width: 18px; text-align: center; font-size: 15px; }

.tdb-sidebar-sep { border: none; border-top: 1px solid #e2e8f0; margin: 14px 0; }

/* Liens épreuves dans la sidebar */
.tdb-section-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    transition: background .2s;
}
.tdb-section-link:hover { background: #f0f7ff; color: #1e40af; }
.tdb-section-link .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── MAIN ──────────────────────────────────────────────────── */
.tdb-main { flex: 1; padding: 32px 36px; max-width: 960px; }

/* ── HERO STRIP ────────────────────────────────────────────── */
.tdb-hero-strip {
    background: linear-gradient(135deg, #4169E1 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    color: white;
    box-shadow: 0 6px 24px rgba(30,64,175,.3);
    position: relative;
    overflow: hidden;
}
.tdb-hero-strip::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
.tdb-hero-strip h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; position: relative; }
.tdb-hero-strip p  { font-size: 14px; opacity: .85; margin: 0; position: relative; }

.tdb-hero-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    flex-shrink: 0;
    position: relative;
}

/* ── STAT CARDS ────────────────────────────────────────────── */
.tdb-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
@media (max-width: 900px) { .tdb-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .tdb-stats { grid-template-columns: 1fr; } }

.tdb-stat-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
}
.tdb-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30,64,175,.14);
}
.tdb-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 8px;
}
.tdb-stat-value { font-size: 34px; font-weight: 800; color: #0f172a; line-height: 1; margin-bottom: 6px; }
.tdb-stat-sub   { font-size: 12px; color: #64748b; }
.tdb-stat-icon  { font-size: 20px; float: right; margin-top: -4px; }

/* ── BARRE DE PROGRESSION ──────────────────────────────────── */
.tdb-progress-section {
    background: white;
    border-radius: 14px;
    padding: 24px;
    border: 1.5px solid #e8edf5;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.tdb-progress-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tdb-prog-row   { margin-bottom: 14px; }
.tdb-prog-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    margin-bottom: 6px;
}
.tdb-prog-bar  { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.tdb-prog-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #1e40af, #4169E1);
    transition: width .8s ease;
}

/* ── HISTORIQUE ────────────────────────────────────────────── */
.tdb-history {
    background: white;
    border-radius: 14px;
    padding: 24px;
    border: 1.5px solid #e8edf5;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.tdb-history h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tdb-table { width: 100%; border-collapse: collapse; }
.tdb-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 0 12px 10px;
}
.tdb-table td {
    padding: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}
.tdb-table tr:hover td { background: #f0f7ff; }

.score-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.score-high { background: #dcfce7; color: #16a34a; }
.score-mid  { background: #fef9c3; color: #b45309; }
.score-low  { background: #fee2e2; color: #dc2626; }

.tdb-empty   { text-align: center; padding: 40px; color: #94a3b8; }
.tdb-empty i { font-size: 40px; display: block; margin-bottom: 12px; color: #cbd5e1; }

/* ── GRILLE DES SÉRIES ─────────────────────────────────────── */
.tdb-series-grid {
    background: white;
    border-radius: 14px;
    padding: 24px;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.tdb-series-grid h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tdb-series-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 900px) { .tdb-series-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tdb-series-list { grid-template-columns: 1fr; } }

/* Item de série */
.tdb-serie-item {
    border: 1.5px solid #e8edf5;
    border-radius: 12px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .25s;
    background: white;
    text-decoration: none;
    cursor: pointer;
}
.tdb-serie-item:hover {
    border-color: #4169E1;
    box-shadow: 0 4px 14px rgba(30,64,175,.18);
    transform: translateY(-2px);
}
.tdb-serie-item.serie-done {
    background: #f0fdf4;
    border-color: #86efac;
}
.tdb-serie-item.serie-done:hover {
    border-color: #4ade80;
    box-shadow: 0 4px 14px rgba(22,163,74,.13);
}

/* Cercle icône */
.serie-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: background .3s, color .3s;
}
.serie-circle.serie-circle-locked {
    background: linear-gradient(135deg, #4169E1, #1e40af);
    color: white;
}
.serie-circle.serie-circle-done {
    background: #16a34a;
    color: white;
}

/* Texte à droite du cercle */
.serie-item-info { flex: 1; min-width: 0; }
.serie-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.serie-item-sub { font-size: 12px; color: #64748b; }

/* Bouton Débloquer / Refaire */
.serie-action-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.serie-action-btn:hover { border-color: #1e40af; color: #1e40af; }
.serie-action-btn.btn-done { border-color: #86efac; background: #f0fdf4; color: #16a34a; }
.serie-action-btn.btn-done:hover { border-color: #4ade80; color: #15803d; }

/* ── MUR DE CONNEXION ──────────────────────────────────────── */
.tdb-login-wall {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    border: 1.5px solid #e8edf5;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    margin-bottom: 28px;
}
.tdb-login-wall i   { font-size: 50px; color: #1e40af; margin-bottom: 18px; display: block; }
.tdb-login-wall h3  { font-size: 22px; font-weight: 800; color: #0f172a; margin-bottom: 10px; }
.tdb-login-wall p   {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 26px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}
.tdb-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4169E1 0%, #1e40af 100%);
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(30,64,175,.3);
}
.tdb-login-btn:hover { opacity: .88; transform: translateY(-2px); color: white; }

/* ── LIEN RETOUR ───────────────────────────────────────────── */
.tdb-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1e40af;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: gap .2s;
}
.tdb-back:hover { text-decoration: underline; gap: 10px; color: #4a8ab7; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tdb-main { padding: 24px 20px; }
    .tdb-series-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tdb-hero-strip { flex-direction: column; align-items: flex-start; gap: 16px; }
    .tdb-hero-icon  { align-self: flex-end; }
    .tdb-stats      { grid-template-columns: repeat(2, 1fr); }
    .tdb-main       { padding: 20px 16px; }
    .tdb-login-wall { padding: 40px 20px; }
}
@media (max-width: 560px) {
    .tdb-stats       { grid-template-columns: 1fr; }
    .tdb-series-list { grid-template-columns: 1fr; }
    .tdb-hero-strip h1 { font-size: 18px; }
}
