:root {
    --primary: #e8500a;
    --secondary: #2c3e50;
}

body {
    background-color: #f8f9fa;
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid {
    flex: 1;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary), #c0392b);
    margin-bottom: 24px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

/* ===== CARDS ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===== BOUTONS ===== */
.btn-convert {
    background: linear-gradient(135deg, var(--primary), #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-convert:hover {
    opacity: 0.9;
    color: white;
}

/* ===== RESULT BOX ===== */
.result-box {
    background: linear-gradient(135deg, #f0f4ff, #e8f0fe);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: none;
}

.result-box.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.result-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ===== FORMULAIRES ===== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1.5px solid #dee2e6;
    padding: 10px 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(232, 80, 10, 0.15);
}

.input-group-text {
    background-color: #f8f9fa;
    border-radius: 0 8px 8px 0;
    border: 1.5px solid #dee2e6;
    border-left: none;
    color: #6c757d;
    font-weight: 500;
}

/* ===== BADGE DISTANCE ===== */
.badge-distance {
    background-color: #e8f4fd;
    color: #2980b9;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid #bee3f8;
    transition: all 0.2s;
    display: inline-block;
}

.badge-distance:hover {
    background-color: #2980b9;
    color: white;
}

.badge-gpx {
    background-color: #fff3e0;
    color: #e65100;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1px solid #ffcc80;
    transition: all 0.2s;
    display: inline-block;
}

.badge-gpx:hover {
    background-color: #e65100;
    color: white;
}

.badge-gpx.active {
    background-color: #e65100;
    color: white;
    border-color: #e65100;
}

.badge-gpx-add {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
    text-decoration: none;
    font-style: italic;
}

.badge-gpx-add:hover {
    background-color: #e65100;
    color: white;
    border-color: #e65100;
}

/* ===== TRACES GPX ===== */
.gpx-trace-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #dee2e6;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.82rem;
    user-select: none;
}

.gpx-trace-card:hover {
    border-color: #e8500a;
    background: #fff3e0;
}

.gpx-trace-card.active {
    border-color: #e8500a;
    background: #fff3e0;
    color: #e65100;
    font-weight: 500;
}

.gpx-trace-stats {
    color: #999;
    font-size: 0.75rem;
}

.gpx-trace-card.active .gpx-trace-stats {
    color: #e88050;
}

.gpx-trace-suppr {
    font-size: 1rem;
    line-height: 1;
    color: #bbb;
    padding: 0 3px;
    border-radius: 50%;
    transition: all 0.15s;
}

.gpx-trace-suppr:hover {
    color: #e74c3c;
    background: #fde8e8;
}

/* ===== FOOTER ===== */
footer {
    background: var(--secondary);
    color: #adb5bd;
    margin-bottom: 0;
}

/* ===== SIDEBAR NAV ===== */
.sidebar-nav {
    position: sticky;
    top: 20px;
    align-self: flex-start;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 12px;
    gap: 2px;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #adb5bd;
    padding: 4px 12px;
    display: block;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.sidebar-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: #fff3ee;
    color: var(--primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), #c0392b);
    color: white !important;
    font-weight: 700;
}

/* ===== WIDGET PROFIL MOBILE ===== */
.mobile-profil-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, .18);
    border: 1.5px solid rgba(255, 255, 255, .4);
    border-radius: 50px;
    padding: 6px 16px;
    color: white;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
}

.mobile-profil-pill:hover {
    background: rgba(255, 255, 255, .28);
    color: white;
}

.mobile-profil-pill .mp-avatar {
    font-size: 1.1rem;
}

.mobile-profil-pill .mp-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.mobile-profil-pill .mp-chip {
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: .75rem;
}

/* ===== PROFIL SIDEBAR CARD ===== */
.sidebar-profil-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 10px;
    border-radius: 12px;
    background: #e8f0fe;
    border: 1.5px solid #b6ccf5;
    color: #1a3a6e;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}

.sidebar-profil-card:hover {
    background: #d4e4fd;
    color: #1a3a6e;
}

.sidebar-profil-card .sp-avatar {
    font-size: 1.9rem;
    line-height: 1;
}

.sidebar-profil-card .sp-name {
    font-weight: 700;
    font-size: .88rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a3a6e;
}

.sidebar-profil-card .sp-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.sidebar-profil-card .sp-chip {
    background: rgba(26, 58, 110, .12);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: .72rem;
    color: #1a3a6e;
    font-weight: 600;
}

/* ===== ONGLETS (desktop) ===== */
.tab-content {
    padding-top: 0;
}

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
    .nav-tabs {
        display: none !important;
    }

    .mobile-nav-select {
        display: block;
    }

    .tab-content {
        padding-top: 12px;
    }
}

@media (min-width: 769px) {
    .mobile-nav-select {
        display: none;
    }
}

.mobile-nav-select select {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 10px 14px;
    background: white;
    width: 100%;
    cursor: pointer;
}

.mobile-nav-select select:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(232, 80, 10, 0.2);
}

/* ===== INFOBULLES ===== */
.info-bubble {
    background-color: #e8f4fd;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #1a5276;
    border: 1px solid #bee3f8;
}

/* ===== MODÈLES DE PRÉDICTION ===== */
.model-card {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.model-card:hover {
    border-color: var(--primary);
    background: #fff8f5;
}

.model-card.selected {
    border-color: var(--primary);
    background: #fff3ee;
}

.model-card .model-title {
    font-weight: 700;
    color: var(--secondary);
}

.model-card .model-desc {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 4px;
}

.accuracy-stars {
    color: #f39c12;
    font-size: 0.85rem;
}

/* ===== SÉANCES VMA ===== */
.seance-card {
    border-radius: 14px;
    border: 2px solid #dee2e6;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.seance-card:hover {
    border-color: var(--primary);
    background: #fff8f5;
}

.seance-card.selected {
    border-color: var(--primary);
    background: #fff3ee;
}

.seance-title {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1rem;
}

.seance-desc {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 4px;
}

/* ===== VMA ===== */
.vma-result-big {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.zone-row {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
}

/* ===== FC ZONES ===== */
.fc-zone-bar {
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
    transition: width 0.5s ease;
}

/* ===== CHARGE (TSS) ===== */
.tss-card {
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.tss-value-big {
    font-size: 2rem;
    font-weight: 800;
}

/* ===== PLAN SEMAINE ===== */
.plan-week {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 16px;
}

.plan-week-header {
    background: linear-gradient(135deg, var(--primary), #c0392b);
    color: white;
    padding: 10px 16px;
    font-weight: 700;
}

.plan-day {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.plan-day:last-child {
    border-bottom: none;
}

.plan-day-name {
    font-weight: 600;
    color: var(--secondary);
    min-width: 100px;
}

.seance-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 10px;
}

.progress {
    border-radius: 8px;
}
