/* ==========================================================================
   FITTRACK — FEUILLE DE STYLE GLOBALE
   ========================================================================== */

:root {
    --bg-dark: #0c0d0e;
    --card-bg: #1e1e22;
    --card-border: #2a2b30;
    --input-bg: #121214;
    --input-border: #2e2e34;
    --primary-red: #C42021;
    --primary-red-hover: #a81b1c;
    --secondary-btn: #2b2c31;
    --secondary-btn-hover: #36373d;
    --text-white: #ffffff;
    --text-muted: #a0a0a5;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   1. AUTHENTIFICATION (INDEX.HTML)
   ========================================================================== */

.auth-bg-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(196, 32, 33, 0.14), transparent 55%),
                linear-gradient(180deg, #111215 0%, #0c0d0e 100%);
    z-index: -1;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 40px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.brand-accent {
    width: 6px;
    height: 28px;
    background-color: var(--primary-red);
    border-radius: 3px;
    display: inline-block;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    letter-spacing: 1px;
    color: var(--text-white);
    line-height: 1;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.form-group input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 15px 16px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary-red);
}

.btn-primary {
    width: 100%;
    background-color: var(--primary-red);
    color: var(--text-white);
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 600;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.alert-error {
    background-color: rgba(196, 32, 33, 0.16);
    border: 1px solid var(--primary-red);
    color: #ff8a8a;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.16);
    border: 1px solid #22c55e;
    color: #86efac;
}

/* Sélecteur de rôle Athlète / Coach */
.role-selector {
    display: flex;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 4px;
    gap: 6px;
}

.role-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.role-btn.active {
    background-color: var(--primary-red);
    color: var(--text-white);
}

/* ==========================================================================
   2. DASHBOARD & STRUCTURE COMMUNE
   ========================================================================== */

.dashboard-body {
    padding-bottom: 96px;
}

.dashboard-header-card {
    background-color: #18191c;
    border-bottom: 1px solid var(--card-border);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    padding: 24px 20px 22px 20px;
    max-width: 480px;
    margin: 0 auto;
}

.dashboard-header-card .brand-header {
    margin-bottom: 0;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.header-actions-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.user-greeting {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.coach-tag {
    font-size: 1.1rem;
    background-color: var(--primary-red);
    color: var(--text-white);
    padding: 2px 8px;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 6px;
}

/* Statut Coach dans l'en-tête Athlète */
.coach-status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #2e2e34;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    width: fit-content;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.coach-status-bar:active {
    border-color: var(--primary-red);
    color: var(--text-white);
}

.coach-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
    flex-shrink: 0;
}

/* Cloche de notification */
.notif-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background-color: var(--primary-red);
    color: var(--text-white);
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #18191c;
}

.dashboard-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.dash-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    letter-spacing: 0.5px;
    color: var(--text-white);
    line-height: 1.15;
    margin-bottom: 4px;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.card-footer-text {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.card-btn-row {
    display: flex;
    gap: 10px;
}

.btn-dash {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 13px 16px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-dash:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-dash-primary {
    background-color: var(--primary-red);
    color: var(--text-white);
}

.btn-dash-primary:hover {
    background-color: var(--primary-red-hover);
}

.btn-dash-secondary {
    background-color: var(--secondary-btn);
    color: var(--text-white);
}

.btn-dash-secondary:hover {
    background-color: var(--secondary-btn-hover);
}

.icon-svg {
    width: 24px;
    height: 24px;
}

.btn-icon-svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   3. STATISTIQUES HEBDOMADAIRES & CALENDRIER
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-item {
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-clickable {
    cursor: pointer;
}

.stat-clickable:hover {
    border-color: var(--primary-red);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    color: var(--text-white);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.day-col {
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.day-col.active {
    border-color: var(--primary-red);
}

.day-col.completed {
    background-color: rgba(196, 32, 33, 0.22);
    border-color: var(--primary-red);
}

.day-name {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.day-num {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-white);
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2b30;
}

.record-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.record-name {
    font-size: 0.9rem;
    color: var(--text-white);
}

.record-weight {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-red);
}

/* ==========================================================================
   4. NAVIGATION BASSE
   ========================================================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background-color: #18191c;
    border-top: 1px solid var(--card-border);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 8px 14px 8px;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary-red);
}

/* ==========================================================================
   5. PAGE SÉANCES & HISTORIQUE (WORKOUTS.PHP)
   ========================================================================== */

.workouts-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.segmented-control {
    display: flex;
    background-color: #18191c;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 4px;
    gap: 4px;
}

.segment-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.segment-btn.active {
    background-color: var(--primary-red);
    color: var(--text-white);
}

.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 16px;
    gap: 14px;
}

.empty-icon-box {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background-color: rgba(196, 32, 33, 0.14);
    border: 1px solid rgba(196, 32, 33, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.empty-icon-svg {
    width: 32px;
    height: 32px;
}

.empty-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    letter-spacing: 0.6px;
}

.empty-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 320px;
}

.btn-empty-cta {
    width: 100%;
    max-width: 260px;
    margin-top: 8px;
}

.workouts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.workout-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.more-dots-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workout-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workout-pill {
    background-color: #2b2c30;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
}

/* ==========================================================================
   6. BOTTOM SHEET / DRAWER ACTIONS SÉANCE
   ========================================================================== */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.72);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.bottom-drawer {
    width: 100%;
    max-width: 480px;
    background-color: #242529;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 12px 24px 36px 24px;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer-overlay.open .bottom-drawer {
    transform: translateY(0);
}

.drawer-handle {
    width: 48px;
    height: 4px;
    background-color: #6c6d72;
    border-radius: 999px;
    margin: 0 auto 20px auto;
}

.drawer-title {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    letter-spacing: 0.5px;
    color: var(--text-white);
    margin-bottom: 12px;
}

.drawer-actions {
    display: flex;
    flex-direction: column;
}

.drawer-action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #323338;
    padding: 18px 4px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.drawer-action-btn:last-child {
    border-bottom: none;
}

.drawer-action-btn:active {
    opacity: 0.75;
}

.drawer-action-danger {
    color: var(--primary-red);
}

.drawer-icon {
    width: 22px;
    height: 22px;
}

/* ==========================================================================
   7. CRÉATION / ÉDITION DE SÉANCE & CATALOGUE D'EXERCICES
   ========================================================================== */

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    text-decoration: none;
}

.cw-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cw-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.cw-field input {
    background-color: #121214;
    border: 1px solid #2e2e34;
    border-radius: 12px;
    padding: 14px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}

.cw-field input:focus {
    border-color: var(--primary-red);
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.selected-exercises-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-ex-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ex-badge {
    display: inline-block;
    background-color: rgba(196, 32, 33, 0.18);
    color: var(--primary-red);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.remove-ex-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.ex-inputs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ex-mini-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ex-mini-field label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.ex-mini-field input {
    width: 100%;
    background-color: #121214;
    border: 1px solid #2e2e34;
    border-radius: 10px;
    padding: 10px 8px;
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.ex-mini-field input:focus {
    border-color: var(--primary-red);
}

.btn-save-workout {
    padding: 16px;
    font-size: 1.3rem;
}

/* ==========================================================================
   8. MODALES (OBJECTIF, CONFIRMATION SUPPRESSION, CATALOGUE, NOTIFICATIONS)
   ========================================================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 400;
}

.modal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-input {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.modal-input:focus {
    border-color: var(--primary-red);
}

.picker-modal-card {
    background-color: #1e1e22;
    border: 1px solid #2a2b30;
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.picker-close-btn {
    background: transparent;
    border: none;
    color: var(--primary-red);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
}

.picker-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.picker-search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
}

.picker-search-box input {
    width: 100%;
    background-color: #121214;
    border: 1px solid #2e2e34;
    border-radius: 12px;
    padding: 12px 12px 12px 38px;
    color: var(--text-white);
    font-size: 0.92rem;
    outline: none;
}

.picker-search-box input:focus {
    border-color: var(--primary-red);
}

.muscle-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.filter-chip {
    background-color: #121214;
    border: 1px solid #2e2e34;
    border-radius: 20px;
    padding: 6px 14px;
    color: var(--text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
}

.filter-chip.active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--text-white);
}

.picker-results {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 180px;
    max-height: 320px;
}

.picker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #141417;
    border: 1px solid #28282e;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.picker-item:active {
    border-color: var(--primary-red);
}

.picker-item-name {
    color: var(--text-white);
    font-size: 0.92rem;
    font-weight: 500;
}

.picker-item-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 2px;
}

.picker-item-plus {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-red);
}

.custom-ex-box {
    border-top: 1px solid #2a2b30;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-ex-row {
    display: flex;
    gap: 8px;
}

.custom-ex-row input,
.custom-ex-row select {
    background-color: #121214;
    border: 1px solid #2e2e34;
    border-radius: 10px;
    padding: 10px;
    color: var(--text-white);
    font-size: 0.85rem;
    outline: none;
}

.custom-ex-row input {
    flex: 1;
}

.btn-small-add {
    background-color: var(--primary-red);
    color: var(--text-white);
    border: none;
    border-radius: 10px;
    width: 40px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    cursor: pointer;
}

/* --- SÉANCES ASSIGNÉES DANS LE DASHBOARD COACH --- */

.assigned-workouts-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 12px;
    padding: 12px;
}

.assigned-box-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.assigned-workout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #24252a;
}

.assigned-workout-row:first-of-type {
    border-top: none;
    padding-top: 2px;
}

.assigned-workout-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 0.4px;
    color: var(--text-white);
}

.assigned-workout-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --- BOUTON RETIRER UN ATHLÈTE --- */

.remove-athlete-btn {
    background-color: rgba(196, 32, 33, 0.14);
    border: 1px solid rgba(196, 32, 33, 0.4);
    color: var(--primary-red);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.remove-athlete-btn:active {
    background-color: var(--primary-red);
    color: var(--text-white);
}

/* --- SUPPRESSION D'UNE NOTIFICATION AU SURVOL --- */

.notif-card-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    cursor: default;
}

.notif-card-item.notif-unread {
    border-color: var(--primary-red);
}

.notif-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.notif-card-item:hover .notif-delete-btn,
.notif-card-item:focus-within .notif-delete-btn {
    opacity: 1;
    pointer-events: auto;
}

.notif-delete-btn:hover {
    transform: scale(1.1);
}

@media (hover: none) {
    .notif-delete-btn {
        opacity: 0.85;
        pointer-events: auto;
    }
}

/* ==========================================================================
   9. SÉANCE EN DIRECT (WORKOUT_SESSION.PHP)
   ========================================================================== */

.session-timer-pill {
    background-color: rgba(196, 32, 33, 0.16);
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 999px;
}

.rest-timer-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    max-width: 480px;
    margin: 0 auto;
    background-color: #18191c;
    border-bottom: 2px solid var(--primary-red);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rest-timer-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.rest-timer-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-red);
    line-height: 1;
}

.session-sets-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-sets-header,
.session-set-row {
    display: grid;
    grid-template-columns: 44px 1fr 1fr 48px;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.session-sets-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.6px;
}

.session-set-row {
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 12px;
    padding: 6px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.session-set-row.set-completed {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.45);
}

.set-num-badge {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.session-set-row input {
    width: 100%;
    background-color: #0c0d0e;
    border: 1px solid #2e2e34;
    border-radius: 8px;
    padding: 8px 4px;
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.session-set-row input:focus {
    border-color: var(--primary-red);
}

.set-check-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #2e2e34;
    background-color: #1e1e22;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin: 0 auto;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.set-check-btn.checked {
    background-color: #22c55e;
    border-color: #22c55e;
    color: #0c0d0e;
}

/* Grille 4 colonnes : Série | Poids | Répétitions | Poubelle */
.session-sets-header.session-sets-4col,
.session-set-row.session-sets-4col {
    grid-template-columns: 68px 1fr 1fr 34px;
}

/* ==========================================================================
   10. PAGE STATISTIQUES (STATS.PHP)
   ========================================================================== */

.stats-bar-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    align-items: end;
    height: 175px;
    padding-top: 8px;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.bar-val {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
}

.bar-track {
    flex: 1;
    width: 100%;
    max-width: 24px;
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar-fill {
    width: 100%;
    background-color: #3a3b42;
    border-radius: 6px;
    transition: height 0.4s ease;
}

.bar-fill.current {
    background-color: var(--primary-red);
}

.bar-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.1;
}

.bar-sublabel {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1;
}

.muscle-bars-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.muscle-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.muscle-bar-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.muscle-progress-bg {
    width: 100%;
    height: 8px;
    background-color: #141518;
    border-radius: 999px;
    overflow: hidden;
}

.muscle-progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    border-radius: 999px;
}

/* --- GRAPHIQUE LINÉAIRE D'ÉVOLUTION --- */

.line-chart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.line-chart-svg {
    width: 100%;
    height: 150px;
    overflow: visible;
}

.line-x-axis {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.line-x-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* --- CARTES EXERCICES CLIQUABLES DANS STATISTIQUES --- */

.exercise-stat-card {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-body);
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.exercise-stat-card:hover,
.exercise-stat-card:active {
    border-color: var(--primary-red);
}

/* ==========================================================================
   11. PAGE PROFIL (PROFILE.PHP)
   ========================================================================== */

.profile-hero-card {
    align-items: center;
}

.profile-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: rgba(196, 32, 33, 0.16);
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    font-family: var(--font-heading);
    font-size: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coach-invite-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 14px;
    padding: 10px 14px;
}

.coach-invite-code {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    letter-spacing: 2px;
    color: var(--text-white);
}

/* ==========================================================================
   EN-TÊTE FIXE SUR TOUTES LES PAGES
   ========================================================================== */

.dashboard-header-card {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.dashboard-body {
    padding-top: 118px;
}

/* ==========================================================================
   EN-TÊTE FIXE, NAVIGATION 5 ONGLETS COACH & CODE D'INVITATION
   ========================================================================== */

.dashboard-header-card {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
}

.dashboard-body {
    padding-top: 118px;
}

.bottom-nav .nav-item {
    flex: 1;
    min-width: 0;
}

.coach-invite-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background-color: #141518;
    border: 1px solid #28292e;
    border-radius: 14px;
    padding: 10px 14px;
}

.coach-invite-code {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    letter-spacing: 2px;
    color: var(--text-white);
}

/* ==========================================================================
   SEMAINIER ACCUEIL (DASHBOARD.PHP)
   ========================================================================== */

.week-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    margin: 4px 0;
}

.week-day-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.week-day-name {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.week-day-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
    border: 1.5px solid transparent;
}

.week-day-num.completed {
    background-color: rgba(196, 32, 33, 0.22);
    color: var(--text-white);
}

.week-day-num.today {
    border-color: var(--primary-red);
}

/* ==========================================================================
   PAGES CONNEXION & INSCRIPTION (MAQUETTE PLEIN ÉCRAN)
   ========================================================================== */

.auth-body {
    margin: 0;
    min-height: 100vh;
    background-color: #0b0b0d;
    background-image:
        linear-gradient(
            180deg,
            rgba(10, 10, 12, 0.72) 0%,
            rgba(10, 10, 12, 0.65) 45%,
            rgba(8, 8, 10, 0.96) 82%,
            #08080a 100%
        ),
        url('assets/images/bg-gym.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
}

.auth-screen {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    padding: 48px 24px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Logo FITTRACK + barre rouge verticale */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-brand-bar {
    width: 7px;
    height: 28px;
    background-color: #c92527;
    border-radius: 2px;
    display: inline-block;
}

.auth-brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.95rem;
    letter-spacing: 1px;
    color: #ffffff;
    line-height: 1;
}

/* Titre principal CONNEXION / INSCRIPTION */
.auth-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.35rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 0.98;
}

.auth-subtitle {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #d4d5d9;
    margin: 0 0 28px 0;
    max-width: 92%;
}

/* Formulaire & Champs */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.6px;
    color: #9e9fa5;
    text-transform: uppercase;
}

.auth-field input {
    width: 100%;
    height: 54px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid #48494e;
    background-color: rgba(45, 45, 48, 0.88);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.auth-field input::placeholder {
    color: #8c8d93;
}

.auth-field input:focus {
    border-color: #c92527;
    background-color: rgba(52, 52, 56, 0.96);
}

/* Bouton rouge SE CONNECTER / CREER MON COMPTE */
.auth-submit-btn {
    width: 100%;
    height: 56px;
    margin-top: 10px;
    border: none;
    border-radius: 15px;
    background-color: #c92527;
    color: #ffffff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.auth-submit-btn:hover {
    background-color: #b01e20;
}

.auth-submit-btn:active {
    transform: scale(0.99);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Lien de bascule en bas */
.auth-switch {
    margin: 28px 0 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #c4c5ca;
}

.auth-switch a {
    color: #c92527;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ESPACE COACH — MES ATHLÈTES (COACH_ATHLETES.PHP)
   ========================================================================== */

.coach-invite-card {
    border: 1px solid rgba(196, 32, 33, 0.35);
    background: linear-gradient(145deg, #2e2e32 0%, #242427 100%);
}

.coach-invite-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.coach-code-box {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: #ffffff;
    line-height: 1.05;
    margin-top: 6px;
}

.coach-copy-pill {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #48494e;
    background-color: #38393e;
    color: #ffffff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.coach-copy-pill:hover {
    background-color: #c42021;
    border-color: #c42021;
}

.coach-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.coach-count-pill {
    background-color: rgba(196, 32, 33, 0.2);
    color: #ff6b6c;
    border: 1px solid rgba(196, 32, 33, 0.45);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.coach-new-workout-link {
    color: var(--primary-red);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.6px;
    text-decoration: none;
}

.coach-new-workout-link:hover {
    text-decoration: underline;
}

/* Carte individuelle d'un athlète */
.athlete-card {
    gap: 14px;
}

.athlete-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.athlete-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(135deg, #c42021 0%, #8b1415 100%);
    color: #ffffff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.athlete-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.athlete-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athlete-ratio-badge {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    color: #ffffff;
    background-color: #1e1e21;
    border: 1px solid #3c3d42;
    padding: 4px 10px;
    border-radius: 10px;
}

/* Barre de progression hebdomadaire */
.athlete-progress-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.athlete-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.athlete-progress-track {
    width: 100%;
    height: 7px;
    background-color: #1c1c1f;
    border-radius: 999px;
    overflow: hidden;
}

.athlete-progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Modale d'assignation (champs sombres dans la DA) */
.coach-modal-card {
    gap: 16px;
}

.coach-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.coach-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.coach-field label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.coach-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #48494e;
    background-color: #1e1e22;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    box-sizing: border-box;
    outline: none;
    color-scheme: dark;
}

.coach-input:focus {
    border-color: var(--primary-red);
}