/* ==========================================================================
   ATHLETE HUB 2026 - STREAMLIT DARK CLEAN & ROBUST NAV
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #ff6600;
    --primary-glow: rgba(255, 102, 0, 0.2);
    --bg: #0e1117;              /* Fond sombre Streamlit */
    --panel: #161b22;           /* Fond des cartes */
    --panel-border: #262c36;    /* Bordure subtile */
    --input-bg: #0d1117;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --danger: #ff4d4d;
    --success: #2ea043;
    --radius-sm: 6px;
    --radius-md: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: "tnum" 1, "cv05" 1;
    line-height: 1.5;
    padding-bottom: 50px;
}

/* --- OVERLAY DE CONNEXION --- */
#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(14, 17, 23, 0.96);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background-color: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 30px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.auth-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

#auth-error {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: #161b22;
    border-bottom: 1px solid var(--panel-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(46, 160, 67, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 160, 67, 0.3);
    border-radius: 20px;
    white-space: nowrap;
    margin-left: auto;
}

.main-tabs, .sub-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-tabs {
    margin: 15px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--panel-border);
}

.tab-btn, .sub-btn {
    background: transparent;
    border: 1px solid var(--panel-border);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    z-index: 10;
    transition: all 0.15s ease;
}

.tab-btn:hover, .sub-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: #484f58;
}

.tab-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

.sub-btn.active {
    background: var(--panel) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* --- STRUCTURE DE LA PAGE --- */
main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.main-page { display: none !important; }
.main-page.active { display: block !important; }

.sub-page { display: none !important; }
.sub-page.active { display: block !important; }

.bloc-header {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--panel-border);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card {
    background-color: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-main);
}

.info-card {
    background-color: rgba(56, 139, 253, 0.1);
    border-left: 4px solid #388bfd;
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin: 12px 0;
}

/* --- FORMULAIRES ET CHAMPS --- */
label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.15s ease;
    margin-bottom: 14px;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
}

input[type="file"] {
    width: 100%;
    background: var(--input-bg);
    border: 1px dashed var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 14px;
}

input[type="file"]::file-selector-button {
    background: #21262d;
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 12px;
    transition: all 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
    background: #30363d;
    border-color: var(--primary);
    color: var(--primary);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); }
.checkbox-row label { margin: 0; text-transform: none; font-size: 0.9rem; color: var(--text-main); }

/* Supprime les fleches natives sur Chrome, Safari, Edge et Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Supprime les fleches natives sur Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- BOUTONS --- */
.btn {
    width: 100%;
    height: 42px;
    background-color: #21262d;
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.btn:hover { background-color: #30363d; }

.btn[id*="save"], .btn[id*="add"], .btn[id*="import"], #auth-submit-btn {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}
.btn[id*="save"]:hover, .btn[id*="add"]:hover, .btn[id*="import"]:hover, #auth-submit-btn:hover {
    filter: brightness(1.1);
}

.btn.danger {
    background-color: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
}
.btn.danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-outline { background-color: transparent; border: 1px solid var(--panel-border); }
.btn-auto { width: auto; height: 32px; padding: 0 14px; }
.btn-group { display: flex; gap: 10px; }

/* --- TABLEAUX --- */
.table-container {
    width: 100%;
    overflow-x: auto !important;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 1900px !important;
    table-layout: fixed;
}

th, td {
    padding: 8px 10px;
    border: 1px solid var(--panel-border);
    vertical-align: middle;
    overflow: hidden;
}

th {
    background: var(--input-bg);
    color: var(--text-muted);
    font-weight: 700;
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

th.col-id, td.col-id { width: 50px; text-align: center; font-weight: 700; color: var(--text-muted); }
th.col-date, td.col-date { width: 130px; }
th.col-user, td.col-user { width: 120px; }
th.col-seance, td.col-seance { width: 360px; }
th.col-sm, td.col-sm { width: 80px; text-align: center; }
th.col-details, td.col-details { width: 500px; }
th.col-notes, td.col-notes { width: 360px; }
th.col-action, td.col-action { width: 60px; text-align: center; }

.data-table-input {
    width: 100%;
    background: transparent !important;
    border: 1px solid transparent !important;
    color: var(--text-main) !important;
    padding: 6px 8px !important;
    margin: 0 !important;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table-input:hover { background: rgba(255, 255, 255, 0.05) !important; }
.data-table-input:focus {
    background: var(--input-bg) !important;
    border-color: var(--primary) !important;
}

.input-seance, .input-details, .input-notes {
    resize: horizontal;
}

/* --- MINUTEUR LIVE --- */
.layout-training {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

#timer-wrapper {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 75px;
}

.timer-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); }

#real-clock, #global-timer {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

#fullscreen-btn { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; }

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--input-bg);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--panel-border);
}

.gauge-center { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    margin: 6px 0; 
    width: 100%;
}

.svg-container { 
    position: relative; 
    width: 140px; 
    height: 140px; 
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.svg-container svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.gauge-text { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    text-align: center; 
    width: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

#hr-percent, .gauge-pct { font-family: 'Chakra Petch', sans-serif; font-size: 2.2rem; font-weight: 700; color: var(--primary); line-height: 1; }
#hr-bpm, .gauge-bpm { font-size: 0.82rem; font-weight: 600; margin-top: 2px; color: var(--text-muted); }

#status, .status-lbl { font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; color: var(--text-muted); text-align: center; }
#display, .display-timer {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1;
    margin: 4px 0;
}

.timeline-segment { flex: 1; height: 4px; background: var(--panel-border); border-radius: 2px; }
.timeline-active { background: var(--primary) !important; }
.timeline-done { background: var(--text-muted) !important; }

#timeline-container { display: flex; gap: 4px; margin: 6px 0; }

#queue-container {
    background: var(--input-bg);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}

.queue-row { display: flex; flex-direction: column; gap: 2px; }
.queue-row span:first-child { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.queue-row span:last-child { font-size: 0.85rem; color: var(--text-main); font-weight: 600; padding-left: 8px; border-left: 3px solid var(--primary); }

#rounds-text { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-align: center; }

.timer-btn {
    flex: 1;
    height: 38px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

#bt-btn, #resetBtn {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

#startBtn {
    background: var(--primary);
    color: #ffffff;
    flex: 1.3;
}

#spotify-container { margin-top: 6px; width: 100%; }
#spotify-iframe { height: 80px !important; border-radius: 8px !important; width: 100%; }

/* --- CARTES D'EXERCICE --- */
.exos-grid { display: flex; flex-direction: column; gap: 12px; }

.exo-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.exo-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.exo-body { padding: 16px; border-top: 1px solid var(--panel-border); display: none; }
.exo-card.open .exo-body { display: block; }

.exo-images { display: flex; gap: 14px; margin-bottom: 14px; }
.exo-images img {
    width: 50%; max-height: 180px; object-fit: contain;
    border-radius: var(--radius-sm); background: var(--input-bg);
    border: 1px solid var(--panel-border);
}

.exos-row-2col, .exos-duo-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* --- GRILLES RESPONSIVE --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.metric-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.metric-card div:first-child { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.metric-val { font-family: 'Chakra Petch', sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--text-main); margin-top: 4px; }

.macro-container { display: flex; gap: 10px; margin: 14px 0; }
.macro-card {
    flex: 1;
    background: var(--input-bg);
    padding: 12px 6px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--panel-border);
    border-bottom: 3px solid var(--primary);
}
.macro-val-input {
    background: transparent; border: none; color: var(--text-main); font-family: 'Chakra Petch', sans-serif;
    font-size: 20px; font-weight: 700; width: 100%; text-align: center; outline: none; margin-bottom: 2px;
}
.macro-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }

.raw-box {
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 14px 0;
}

/* --- TOAST & DIALOG --- */
dialog {
    display: none;
    background: var(--panel);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: auto;
    max-width: 380px;
}
dialog[open] { display: block; }

#toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(150px);
    background: var(--text-main); color: var(--bg);
    font-weight: 600; padding: 10px 20px; border-radius: 25px;
    transition: transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    header { flex-direction: column; align-items: flex-start; }
    .status-badge { margin-left: 0; }
    .layout-training, .grid-2, .grid-3, .exos-row-2col, .exos-duo-columns { grid-template-columns: 1fr; }
    #timer-wrapper { position: static; }
    main { padding: 12px; }
}

/* ==========================================================================
   MODE PLEIN ÉCRAN OPTIMISÉ ET AGRANDI (SUPER-SIZED HERO CENTER)
   ========================================================================== */
#timer-wrapper:fullscreen,
#timer-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    background-color: #080b11 !important;
    padding: 20px 28px !important;
    display: grid !important;
    grid-template-columns: 340px 1fr 420px !important;
    grid-template-rows: auto 1fr auto auto auto !important;
    gap: 12px 24px !important;
    align-items: center !important;
    overflow: hidden !important;
    border: none !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

#timer-wrapper:fullscreen .timer-bottom {
    display: contents !important;
}

/* --- COLONNE 1 : TOP CLOCK & SPOTIFY --- */
#timer-wrapper:fullscreen .timer-top {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 4px !important;
}

#timer-wrapper:fullscreen #spotify-container {
    grid-column: 1 !important;
    grid-row: 2 / span 4 !important;
    height: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

#timer-wrapper:fullscreen #spotify-iframe {
    height: 100% !important;
    width: 100% !important;
    min-height: 100% !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --- COLONNE 2 : STATS, HERO GAUGE SUPER-SIZED, TIMELINE, CONTROLS --- */
#timer-wrapper:fullscreen .stats-bar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    background: rgba(16, 21, 29, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    padding: 8px 24px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    margin: 0 !important;
}

/* PANNEAU CENTRAL : AGRANDISSEMENT DE L'ENSEMBLE */
#timer-wrapper:fullscreen .gauge-center {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(18, 23, 32, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.65), 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
}

/* CERCLE SVG FC - PASSAGE DE 240px À 330px */
#timer-wrapper:fullscreen .svg-container {
    width: 330px !important;
    height: 330px !important;
    filter: drop-shadow(0 0 30px var(--primary-glow));
}

#timer-wrapper:fullscreen #hr-percent {
    font-size: 4.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -1px;
}

#timer-wrapper:fullscreen #hr-bpm {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    opacity: 0.95;
}

#timer-wrapper:fullscreen .timer-display-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

#timer-wrapper:fullscreen #status {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: 4px !important;
    color: var(--primary) !important;
    margin-bottom: 2px !important;
}

/* TIMER GÉANT - PASSAGE DE 6.5rem À 10rem */
#timer-wrapper:fullscreen #display {
    font-size: 10rem !important;
    font-weight: 800 !important;
    line-height: 0.85 !important;
    letter-spacing: 3px !important;
    text-shadow: 0 0 40px rgba(255, 102, 0, 0.4);
    margin: 4px 0 !important;
}

#timer-wrapper:fullscreen #rounds-text {
    grid-column: 2 !important;
    grid-row: 3 !important;
    display: block !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-transform: uppercase;
    text-align: center !important;
    letter-spacing: 1.5px;
}

#timer-wrapper:fullscreen #timeline-container {
    grid-column: 2 !important;
    grid-row: 4 !important;
    display: flex !important;
    width: 100% !important;
    max-width: 550px !important;
    height: 8px !important;
    margin: 0 auto !important;
}

#timer-wrapper:fullscreen .btn-group {
    grid-column: 2 !important;
    grid-row: 5 !important;
    width: 100% !important;
    max-width: 550px !important;
    margin: 0 auto !important;
    display: flex !important;
    gap: 12px !important;
}

#timer-wrapper:fullscreen .timer-btn {
    height: 52px !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 1px;
}

/* --- COLONNE 3 : QUEUE (EXERCICES DUO / SOLO) HARMONISÉE AVEC LE THÈME --- */
#timer-wrapper:fullscreen #queue-container {
    grid-column: 3 !important;
    grid-row: 1 / span 5 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 16px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.exo-card-fullscreen {
    flex: 1;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

/* CARTE ACTUEL : COULEUR FLASHY DU THÈME ACTIF */
.exo-card-fullscreen.actuel {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 30px var(--primary-glow) !important;
    border: none !important;
}

/* CARTE SUIVANT : SURFACES SOMBRES STYLISÉES ET BORDURE ASSORTIE AU THÈME */
.exo-card-fullscreen.suivant {
    background: rgba(22, 27, 34, 0.75) !important;
    border: 2px solid var(--panel-border) !important;
    backdrop-filter: blur(10px);
    color: var(--text-main) !important;
}

.exo-card-header-badge {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.exo-card-fullscreen.actuel .exo-card-header-badge { color: #ffffff !important; }
.exo-card-fullscreen.suivant .exo-card-header-badge { color: var(--primary) !important; }

.exo-sub-badge {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.exo-card-fullscreen.actuel .exo-sub-badge { color: rgba(255, 255, 255, 0.85) !important; }
.exo-card-fullscreen.suivant .exo-sub-badge { color: var(--text-muted) !important; }

.exo-title {
    font-size: 2.1rem;
    font-weight: 800;
    font-family: 'Chakra Petch', sans-serif;
    line-height: 1.15;
}

.exo-card-fullscreen.actuel .exo-title { color: #ffffff !important; }
.exo-card-fullscreen.suivant .exo-title { color: var(--text-main) !important; }

.exo-title-sub {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Chakra Petch', sans-serif;
    line-height: 1.2;
}

.exo-card-fullscreen.actuel .exo-title-sub { color: #ffffff !important; }
.exo-card-fullscreen.suivant .exo-title-sub { color: var(--text-muted) !important; }

.u-tag {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.exo-card-fullscreen.actuel .u-tag { color: #ffffff !important; }
.exo-card-fullscreen.suivant .u-tag { color: var(--text-main) !important; }

/* ==========================================================================
   EFFET DE FLASH (FIN DE TIMER)
   ========================================================================== */
#timer-wrapper.flash-active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary); /* Utilise la couleur du thème */
    z-index: 99999;
    pointer-events: none; /* Pour ne pas bloquer les clics */
    border-radius: inherit;
    animation: flashFade 0.8s ease-out forwards;
}

@keyframes flashFade {
    0% { 
        opacity: 0.6; 
        box-shadow: inset 0 0 150px var(--primary); 
    }
    100% { 
        opacity: 0; 
    }
}
