/* ================================================================
   trajectoires_mobpro_theater.css — Style A "Data Theater"
   Immersif, plein écran, alternance dark/light.
   Suppose global.css + trajectoires_mobpro_shared.css chargés avant.
   Variables --cv-*, toggle FAB, scatter, légende, badge, tooltip
   sont définis dans trajectoires_mobpro_shared.css (ne pas dupliquer ici).
   ================================================================ */

/* ── HERO THEATER ────────────────────────────────────────────── */
.thr-hero {
    min-height: 100vh;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    padding: 6rem 2rem 4rem;
}
.thr-hero::before {
    content: '';
    position: absolute; top: -20%; right: -10%;
    width: 900px; height: 900px;
    background: radial-gradient(circle, rgba(53,152,192,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.thr-hero-svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0; z-index: 1;
    transition: opacity 2.5s ease 0.5s;
}
.thr-hero-svg.visible { opacity: 0.35; }
.thr-hero-svg path {
    fill: rgba(53, 152, 192, 0.18);
    stroke: var(--accent-data);
    stroke-width: 0.5;
    transition: fill 1.2s ease;
}
.thr-hero-content {
    position: relative; z-index: 2;
    text-align: center; max-width: 900px;
}
.thr-hero-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3em;
    color: var(--accent-data);
    margin-bottom: 2rem;
}
.thr-counter {
    font-family: 'Space Grotesk', 'IBM Plex Mono', monospace;
    font-size: clamp(3rem, 9.5vw, 7.5rem);
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 60px rgba(53,152,192,0.2);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1, 'lnum' 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-align: center;
    width: 100%;
}
.thr-counter-label {
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 300;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    max-width: 600px; margin: 0 auto 2.5rem;
}
.thr-hero-tags {
    display: flex; gap: 1.5rem; justify-content: center;
    flex-wrap: wrap;
}
.thr-hero-tag {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--accent-territory);
    padding: 0.4rem 1rem;
    border: 1px solid rgba(121,167,155,0.3);
    border-radius: 100px;
}
.thr-scroll-hint {
    position: absolute; bottom: 2rem; left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255,255,255,0.25);
    font-size: 0.75rem;
    text-align: center;
    animation: thrBounce 2s ease-in-out infinite;
}
@keyframes thrBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}

/* ── NARRATION (phrases géantes) ─────────────────────────────── */
.thr-narration {
    min-height: 70vh;
    display: flex; align-items: center; justify-content: center;
    padding: 5rem 2rem;
    position: relative; overflow: hidden;
}
.thr-narration-dark { background: var(--primary); }
.thr-narration-light { background: var(--bg-main); }
.thr-phrase {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.7rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.15;
    max-width: 1000px;
    text-align: center;
}
.thr-narration-dark .thr-phrase { color: white; }
.thr-narration-light .thr-phrase { color: var(--primary); }
.thr-accent {
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.thr-co2 { color: var(--cv-co2); -webkit-text-fill-color: var(--cv-co2); }
.thr-sub-phrase {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 300;
    margin-top: 1.5rem;
    text-align: center;
    max-width: 600px; margin-left: auto; margin-right: auto;
}
.thr-narration-dark .thr-sub-phrase { color: rgba(255,255,255,0.5); }
.thr-narration-light .thr-sub-phrase { color: var(--secondary); }

/* Chart dans narration */
.thr-narration-chart {
    width: 100%; max-width: 900px;
    margin: 3rem auto 0;
    height: 200px;
}

/* ── BLOC DRC (méthode propriétaire) ─────────────────────────── */
.thr-drc-block {
    max-width: 900px;
    text-align: center;
    position: relative;
}
.thr-drc-badge {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary);
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    padding: 0.45rem 1.2rem;
    border-radius: 100px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 18px rgba(53, 152, 192, 0.25);
}
.thr-drc-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem auto;
    font-family: 'IBM Plex Mono', monospace;
}
.thr-drc-formula-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.thr-drc-formula-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.3;
}
.thr-drc-formula-num,
.thr-drc-formula-den {
    font-size: 0.95rem;
    color: var(--secondary);
    padding: 0.2rem 0.8rem;
}
.thr-drc-formula-num { border-bottom: 2px solid var(--primary); }
.thr-drc-formula-op { color: var(--accent-data); font-weight: 700; }
.thr-drc-formula-bar {
    width: 100%;
    height: 0;
}
.thr-drc-unique {
    margin-top: 2rem;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--secondary);
    font-weight: 600;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── SECTION TITRES (theater) ────────────────────────────────── */
.thr-section {
    padding: 5rem 2rem;
    position: relative;
}
.thr-section-dark { background: var(--primary); }
.thr-section-light { background: var(--bg-main); }
.thr-section-inner { max-width: 1300px; margin: 0 auto; }
.thr-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-align: center;
}
.thr-section-dark .thr-section-title { color: white; }
.thr-section-light .thr-section-title { color: var(--primary); }
.thr-section-sub {
    text-align: center;
    font-size: 1rem; font-weight: 300;
    margin-bottom: 3rem;
}
.thr-section-dark .thr-section-sub { color: rgba(255,255,255,0.5); }
.thr-section-light .thr-section-sub { color: var(--secondary); }

/* ── MAP THEATER ─────────────────────────────────────────────── */
.thr-map-section {
    padding: 4rem 2rem;
    background: var(--primary);
}
.thr-map-wrapper {
    max-width: 900px; margin: 0 auto;
    position: relative;
}
.thr-map-controls {
    display: flex; align-items: center; gap: 1.5rem;
    margin-bottom: 1.5rem; flex-wrap: wrap;
    justify-content: center;
}
.thr-map-toggle-group {
    display: flex; border: 1px solid rgba(53,152,192,0.25);
    border-radius: 6px; overflow: hidden;
}
.thr-map-toggle {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem; font-weight: 600;
    background: transparent; border: none; cursor: pointer;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
}
.thr-map-toggle.active {
    background: var(--accent-data); color: white;
}
.thr-map-toggle:not(:last-child) { border-right: 1px solid rgba(53,152,192,0.15); }
.thr-map-year-slider {
    display: flex; align-items: center; gap: 0.75rem;
}
.thr-map-year-slider input[type="range"] {
    width: 200px; height: 4px;
    -webkit-appearance: none;
    background: rgba(53,152,192,0.2);
    border-radius: 2px; outline: none;
}
.thr-map-year-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent-data); cursor: pointer;
    box-shadow: 0 0 10px rgba(53,152,192,0.5);
}
.thr-map-year-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem; font-weight: 900;
    color: var(--accent-data);
    min-width: 3.5em; text-align: center;
}
.thr-map-svg {
    width: 100%; height: auto;
    display: block; margin: 0 auto;
}
.thr-map-svg path {
    transition: fill 0.4s ease;
    stroke: rgba(255,255,255,0.25); stroke-width: 0.5;
    cursor: pointer;
}
.thr-map-svg path:hover {
    stroke: white; stroke-width: 1.5;
    filter: brightness(1.25);
}

/* ── LÉGENDE CARTE ───────────────────────────────────────────── */
/* Déplacé vers trajectoires_mobpro_shared.css (mutualisé avec editorial/dept). */

/* La transition sur `fill` (déclarée plus haut avec .thr-map-svg path)
   sert à la fois pour l'apparition au scroll-in (avec transition-delay
   échelonné posé par JS) et pour les changements de slider/toggle.
   On n'utilise PAS d'animation @keyframes : `animation-fill-mode: forwards`
   verrouillerait la propriété `fill` et empêcherait l'attribut fill posé
   par JS de s'appliquer lors des mises à jour. */

/* ── CHARTS THEATER (pleine largeur, dark) ───────────────────── */
.thr-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem; margin-top: 2rem;
}
.thr-chart-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(53,152,192,0.1);
    border-radius: 12px;
    padding: 1.75rem;
}
.thr-chart-card.full { grid-column: 1 / -1; }
.thr-chart-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem; font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.thr-chart-card h3 .badge {
    /* Badge unité stylé dans trajectoires_mobpro_shared.css (.cv-page .badge). */
}
.thr-chart-note {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255,255,255,0.5);
    margin: -0.4rem 0 1rem;
    font-style: italic;
}
.thr-chart-canvas { width: 100%; height: 300px; }
.thr-chart-canvas-tall { width: 100%; height: 340px; }

/* ── METHODO THEATER ─────────────────────────────────────────── */
.thr-methodo { max-width: 800px; margin: 0 auto; }
.thr-methodo-item {
    background: white;
    border: 1px solid var(--card-border, rgba(14,62,73,0.08));
    border-radius: 8px; margin-bottom: 0.75rem;
    overflow: hidden;
}
.thr-methodo-trigger {
    width: 100%; display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: none; border: none; cursor: pointer;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.9rem; font-weight: 600;
    color: var(--primary); text-align: left;
    transition: background 0.2s;
}
.thr-methodo-trigger:hover { background: rgba(53,152,192,0.04); }
.thr-methodo-trigger svg {
    width: 16px; height: 16px;
    stroke: var(--secondary); fill: none;
    transition: transform 0.3s;
}
.thr-methodo-trigger.open svg { transform: rotate(180deg); }
.thr-methodo-content {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease;
}
.thr-methodo-content.open { max-height: 6000px; }
.thr-methodo-body {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.88rem; color: var(--secondary);
    line-height: 1.7;
}
.thr-methodo-body p { margin: 0 0 0.75rem; }
.thr-methodo-body p:last-child { margin-bottom: 0; }
.thr-methodo-body strong { color: var(--primary); font-weight: 600; }
.thr-methodo-body a { color: var(--accent-data); text-decoration: none; border-bottom: 1px solid rgba(53,152,192,0.3); }
.thr-methodo-body a:hover { color: var(--primary); }
.thr-methodo-body ul,
.thr-methodo-body ol { margin: 0.5rem 0 0.75rem; padding-left: 1.4rem; }
.thr-methodo-body ul li,
.thr-methodo-body ol li { margin-bottom: 0.4rem; }
.thr-methodo-body ul li::marker { color: var(--accent-data); }

/* ── DEPT GRID THEATER ───────────────────────────────────────── */
.thr-dept-search {
    max-width: 500px; margin: 0 auto 2rem;
}
.thr-dept-search input {
    width: 100%; padding: 0.8rem 1.2rem;
    border: 1px solid rgba(14,62,73,0.1);
    border-radius: 8px;
    font-family: 'IBM Plex Sans', sans-serif; font-size: 0.95rem;
    outline: none; background: white;
}
.thr-dept-search input:focus { border-color: var(--accent-data); }

/* ── SCATTER PLOT EXPLORATEUR ────────────────────────────────── */
/* Déplacé vers trajectoires_mobpro_shared.css (mutualisé avec editorial/dept). */

/* ── FOOTER THEATER ──────────────────────────────────────────── */
.thr-footer {
    background: var(--primary); padding: 3rem 2rem 2rem;
    color: rgba(255,255,255,0.5);
}
.thr-footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem; margin-bottom: 2rem;
}
.thr-footer-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem; font-weight: 900;
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 0.5rem;
}
.thr-footer-desc { font-size: 0.85rem; line-height: 1.7; }
.thr-footer-col h5 {
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.12em; margin-bottom: 1rem;
}
.thr-footer-col a {
    display: block; color: rgba(255,255,255,0.5);
    font-size: 0.85rem; margin-bottom: 0.5rem;
    text-decoration: none; transition: color 0.2s;
}
.thr-footer-col a:hover { color: var(--accent-data); }
.thr-footer-bottom {
    text-align: center; font-size: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── NAV THEATER (simplifiée, transparente) ──────────────────── */
.thr-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s;
}
.thr-nav.scrolled {
    background: rgba(14,62,73,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(53,152,192,0.12);
}
.thr-nav-inner {
    max-width: 1300px; margin: 0 auto;
    padding: 1rem 2rem;
    display: flex; align-items: center; justify-content: space-between;
}
.thr-nav-brand {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem; font-weight: 900;
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}
.thr-nav-links {
    display: flex; gap: 2rem; list-style: none;
}
.thr-nav-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem; font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.thr-nav-links a:hover { color: var(--accent-data); }

/* ── TRANSFRONTALIERS ────────────────────────────────────────── */
.thr-tf-lede {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto 4rem;
    flex-wrap: wrap;
    justify-content: center;
}
.thr-tf-lede-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}
.thr-tf-lede-number {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-data), var(--accent-territory));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.thr-tf-lede-suffix {
    font-size: 0.5em;
    -webkit-text-fill-color: var(--accent-data);
}
.thr-tf-lede-caption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 300;
    line-height: 1.4;
}
.thr-tf-lede-text {
    font-size: 1.05rem;
    color: var(--secondary);
    line-height: 1.7;
    font-weight: 300;
    max-width: 500px;
}
.thr-tf-lede-text strong { color: var(--primary); font-weight: 600; }

.thr-tf-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}
.thr-tf-card {
    background: white;
    border: 1px solid rgba(14, 62, 73, 0.08);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 14px rgba(14, 62, 73, 0.04);
}
.thr-tf-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
}
.thr-tf-chart-card .thr-chart-canvas-tall { height: 340px; }

.thr-tf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.thr-tf-table th {
    text-align: left;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid rgba(14, 62, 73, 0.1);
}
.thr-tf-table td {
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid rgba(14, 62, 73, 0.06);
    color: var(--primary);
}
.thr-tf-table tbody tr:last-child td { border-bottom: none; }
.thr-tf-pays { font-weight: 500; display: flex; align-items: center; gap: 0.6rem; }
.thr-tf-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}
.thr-tf-dot-su { background: #5C6BC0; }
.thr-tf-dot-lu { background: #4CAF50; }
.thr-tf-dot-al { background: #FF6E40; }
.thr-tf-dot-be { background: #E57373; }
.thr-tf-dot-mo { background: #BA68C8; }
.thr-tf-num { text-align: right; font-variant-numeric: tabular-nums; font-family: 'IBM Plex Mono', monospace; font-size: 0.9rem; }
.thr-tf-delta { font-weight: 600; }
.thr-tf-up { color: #c0392b; }
.thr-tf-down { color: #2e7d32; }

.thr-tf-chart-full {
    max-width: 900px;
    margin: 0 auto 3rem;
    background: white;
    border: 1px solid rgba(14, 62, 73, 0.08);
    border-radius: 10px;
    padding: 1.5rem 1.5rem 1rem;
    box-shadow: 0 2px 14px rgba(14, 62, 73, 0.04);
}
.thr-tf-chart-full h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
    text-align: center;
}
.thr-tf-chart-full .thr-chart-canvas { height: 280px; }

.thr-tf-couv {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.92rem;
    color: var(--secondary);
    line-height: 1.6;
    font-weight: 300;
    padding: 1.2rem 1.5rem;
    background: rgba(76, 175, 80, 0.06);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 8px;
}
.thr-tf-couv strong { color: var(--primary); font-weight: 600; }
.thr-tf-couv code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85em;
    background: rgba(14, 62, 73, 0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}
.thr-tf-couv-badge {
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: white;
    background: #4CAF50;
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .thr-tf-grid { grid-template-columns: 1fr; }
    .thr-tf-lede { gap: 1.5rem; }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .thr-charts-grid { grid-template-columns: 1fr; }
    .thr-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .thr-nav-links { display: none; }
}
@media (max-width: 768px) {
    .thr-narration { min-height: auto; padding: 4rem 1.5rem; }
    .thr-section { padding: 3rem 1.5rem; }
    .thr-dept-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
