.traces-layout {
    min-height: 100vh;
    background: #0c1321;
}

.trace-sidebar {
    background: #161f30;
    border-right: 1px solid rgba(60, 74, 94, 0.15);
}

.trace-hero-map {
    position: relative;
    z-index: 0;
    background: #050c18;
}

/* Plein écran natif — la carte prend tout l'écran */
#hero-map-wrap:fullscreen,
#hero-map-wrap:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #050c18;
}
#hero-map-wrap:fullscreen #hero-map,
#hero-map-wrap:-webkit-full-screen #hero-map {
    height: 100% !important;
}

.trace-hero-map .leaflet-container {
    z-index: 0 !important;
}

.trace-hero-map .leaflet-pane,
.trace-hero-map .leaflet-tile-pane,
.trace-hero-map .leaflet-overlay-pane,
.trace-hero-map .leaflet-shadow-pane,
.trace-hero-map .leaflet-marker-pane,
.trace-hero-map .leaflet-tooltip-pane,
.trace-hero-map .leaflet-popup-pane,
.trace-hero-map .leaflet-top,
.trace-hero-map .leaflet-bottom {
    z-index: 0 !important;
}

.trace-detail-map {
    position: relative;
    z-index: 0;
    background: #111827;
}

.trace-detail-map .leaflet-container {
    z-index: 0 !important;
}

.trace-detail-map .leaflet-pane,
.trace-detail-map .leaflet-tile-pane,
.trace-detail-map .leaflet-overlay-pane,
.trace-detail-map .leaflet-shadow-pane,
.trace-detail-map .leaflet-marker-pane,
.trace-detail-map .leaflet-tooltip-pane,
.trace-detail-map .leaflet-popup-pane,
.trace-detail-map .leaflet-top,
.trace-detail-map .leaflet-bottom {
    z-index: 0 !important;
}

.trace-detail-map .leaflet-control-attribution {
    display: none;
}

.trace-detail-map .leaflet-popup-content-wrapper,
.trace-hero-map .leaflet-popup-content-wrapper {
    background: #151b2a;
    color: #dce2f6;
    border: 1px solid rgba(88, 66, 55, 0.25);
    box-shadow: none;
}

.trace-detail-map .leaflet-popup-tip,
.trace-hero-map .leaflet-popup-tip {
    background: #151b2a;
}

.trace-card {
    border-radius: 0.75rem;
    background: #151b2a;
    border: 1px solid rgba(88, 66, 55, 0.08);
    overflow: hidden;
}

.trace-glass-card {
    background: rgba(35, 42, 57, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 66, 55, 0.1);
    border-radius: 0.75rem;
}

.trace-gradient-primary {
    background: linear-gradient(135deg, #ffb690 0%, #f97316 100%);
}

.trace-stat-card {
    border-radius: 0.75rem;
    background: rgba(35, 42, 57, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(88, 66, 55, 0.1);
    padding: 2rem;
}

.trace-altitude-card {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(88, 66, 55, 0.08);
    background: #151b2a;
}

.trace-altitude-chart-wrap {
    position: relative;
    height: 220px;
}

.trace-waypoint-line {
    width: 1px;
    background: rgba(88, 66, 55, 0.2);
}

.trace-mini-meta {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #94a3b8;
    font-weight: 700;
}

.trace-kpi-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #dce2f6;
}

.trace-overlay-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.7rem 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.trace-overlay-button:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255, 182, 144, 0.45);
}

.trace-overlay-button:active {
    transform: scale(0.98);
}

@media (max-width: 1023px) {
    .trace-stat-card {
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .trace-altitude-chart-wrap {
        height: 190px;
    }

    .trace-stat-card {
        padding: 1.25rem;
    }
}

/* ── Contenu éditorial long — pages région / département ────────────────── */

.traces-region-content > *:first-child { margin-top: 0; }
.traces-region-content > *:last-child  { margin-bottom: 0; }

.traces-region-content p {
    margin: 0 0 1.2rem;
    color: #cbd5e1;
    line-height: 1.85;
}

.traces-region-content h2,
.traces-region-content h3,
.traces-region-content h4 {
    margin: 2.25rem 0 0.85rem;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.traces-region-content h2 { font-size: 1.45rem; }
.traces-region-content h3 { font-size: 1.2rem; }
.traces-region-content h4 { font-size: 1.05rem; }

.traces-region-content strong,
.traces-region-content b {
    color: #f1f5f9;
    font-weight: 700;
}

.traces-region-content em,
.traces-region-content i {
    font-style: italic;
    color: #e2e8f0;
}

.traces-region-content a {
    color: #fb923c;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .15s;
}

.traces-region-content a:hover { color: #fdba74; }

.traces-region-content ul,
.traces-region-content ol {
    margin: 0.75rem 0 1.4rem 1.25rem;
    padding: 0;
}

.traces-region-content ul { list-style: disc; }
.traces-region-content ol { list-style: decimal; }

.traces-region-content li {
    margin: 0 0 0.5rem;
    padding-left: 0.2rem;
    color: #cbd5e1;
    line-height: 1.75;
}

.traces-region-content li::marker {
    color: #fb923c;
    font-weight: 700;
}

.traces-region-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid rgba(251,146,60,.4);
    background: rgba(15,23,42,.5);
    border-radius: .75rem;
    color: #cbd5e1;
}

/* ── Barre filtres desktop ───────────────────────────────────────────────── */
.traces-sf-bar { display: none; }
@media (min-width: 1280px) { .traces-sf-bar { display: block; } }

/* ── Cards (mirror sorties.css) ─────────────────────────────────────────── */
.mc-card        { background: #232a39; border: 1px solid rgba(255,255,255,.05); border-radius: 14px; }
.mc-card-orange { background: rgba(21,27,42,.9); border: 1px solid rgba(249,115,22,.15); border-radius: 14px; }

/* ── Carousel régions traces ─────────────────────────────────────────────── */
.rc-track { display:flex; overflow-x:auto; gap:1rem; padding-bottom:.75rem; cursor:grab; -webkit-overflow-scrolling:touch; scrollbar-width:thin; scrollbar-color:#1e2d42 transparent; }
.rc-track::-webkit-scrollbar { height:4px; }
.rc-track::-webkit-scrollbar-track { background:transparent; }
.rc-track::-webkit-scrollbar-thumb { background:#1e2d42; border-radius:2px; }
.rc-grad { background:linear-gradient(to top,#151b2a 0%,transparent 60%); }
.rc-chef { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.15em; }