/* Sorti de views/index.ejs le 15/11/2026 pour alléger les pages (fichier mis en cache par le navigateur). Modifier ICI, plus dans la vue. */

/* ==================== DESIGN SYSTEM — STYLE TADAO ==================== */
:root {
  /* ── Charte TADAO — alignée sur itineraire.ejs ── */
  --primary:    #cc0000;
  --prim-d:     #a30000;
  --prim-s:     rgba(204,0,0,.08);
  --primary-dark: #a30000;
  --primary-light: #fdf0f0;
  --dark:       #1a1a1a;
  --text:       #1a1a1a;
  --muted:      #68687a;
  --light:      #f4f4ee;
  --white:      #ffffff;
  --border:     #e0e0d8;
  --border2:    #d4d4cc;
  --success:    #059669;
  --warning:    #d97706;
  --info:       #0075c9;

  --shadow-xs:  0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06),0 1px 3px rgba(0,0,0,.04);
  --shadow-md:  0 6px 24px rgba(0,0,0,.09);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.13);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.17);

  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-pill: 100px;

  --transition: all .22s cubic-bezier(.4,0,.2,1);
  --f: 'Plus Jakarta Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════════
   DESIGN OVERRIDE GLOBAL — Charte TADAO
   Coins arrondis · fond crème · typo black uppercase
   ══════════════════════════════════════════════════════════ */

body { background: var(--light) !important; font-family: 'Plus Jakarta Sans',sans-serif !important; }
.wrapper { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.zone { padding: 64px 0; }
@media(max-width:768px){ .wrapper{padding:0 20px;} .zone{padding:44px 0;} }

/* Zone titles */
.zone-label {
  font-size: 11px; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.zone-label::before { display: none; }
.zone-title {
  font-size: clamp(24px,3.5vw,38px); font-weight: 900;
  color: var(--dark); line-height: 1.1; letter-spacing: -.3px;
  text-transform: uppercase;
}
.zone-desc { font-size: 15px; color: var(--muted); max-width: 580px; margin: 10px auto 0; }

/* Cartes / panels blancs */
.stat-card, .alert, .network-box, .community-widget,
.status-card, .lcat-panel, .vlille-card, .popup, .line-modal {
  border-radius: var(--radius-lg) !important;
}

/* Status réseau */
.status-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3,1fr) !important;
  gap: 20px !important; margin-bottom: 36px !important;
}
.status-card {
  background: white !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 28px 24px !important;
  cursor: pointer !important;
  transition: var(--transition) !important;
  box-shadow: var(--shadow-sm) !important;
}
.status-card:hover { transform: translateY(-4px) !important; box-shadow: var(--shadow-md) !important; border-color: var(--primary) !important; }
.status-card-name { font-size: 16px !important; font-weight: 900 !important; text-transform: uppercase !important; letter-spacing: 1px !important; color: var(--dark) !important; margin: 10px 0 8px !important; }
@media(max-width:640px){ .status-cards-grid{grid-template-columns:1fr !important; gap:10px !important;} } /* renforcé : override du bloc TADAO repeat(3) */

/* Lignes panel */
.lcat-panel { background: white !important; border: 1.5px solid var(--border) !important; border-radius: var(--radius-lg) !important; overflow: hidden !important; }
.lcat-row { padding: 20px 28px !important; border-bottom: 1px solid var(--border) !important; }
.lcat-cat-label { font-size: 11px !important; font-weight: 900 !important; text-transform: uppercase !important; letter-spacing: 1.5px !important; color: var(--dark) !important; margin-bottom: 14px !important; }
.line-card { border-radius: 16px !important; transition: var(--transition) !important; box-shadow: var(--shadow-xs) !important; }
.line-card:hover { transform: translateY(-4px) !important; box-shadow: var(--shadow-md) !important; border-color: rgba(204,0,0,.2) !important; }

/* Alertes */
.alert { border-radius: var(--radius-lg) !important; border-left-width: 5px !important; }

/* V'Lille */
.vlille-card { border-radius: var(--radius-xl) !important; border: 2px solid var(--border) !important; background: white !important; }
.vlille-cta { border-radius: var(--radius-pill) !important; font-weight: 900 !important; text-transform: uppercase !important; letter-spacing: .7px !important; }
.vlille-stats { border-radius: var(--radius-lg) !important; }

/* Objets perdus */
.objets-perdus-stat-card { border-radius: var(--radius-lg) !important; border: 1.5px solid rgba(255,255,255,0.2) !important; }
.objets-perdus-cta { border-radius: var(--radius-pill) !important; font-weight: 900 !important; text-transform: uppercase !important; letter-spacing: .7px !important; }

/* Novelty */
.novelty-badge { border-radius: 8px !important; font-weight: 900 !important; }
.novelty-btn { border-radius: var(--radius-pill) !important; font-weight: 800 !important; }

/* Community */
.community-signal { border-radius: var(--radius-md) !important; }

/* Tabs */
.tabs { border-radius: var(--radius-pill) !important; }
.tab.on { border-radius: var(--radius-pill) !important; background: var(--primary) !important; color: white !important; }

/* Section backgrounds */
#reseau-section { background: white !important; }
#vlille-section { background: var(--light) !important; }

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans',sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ==================== LAYOUT ==================== */
.wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.zone {
  padding: 72px 0;
}

.zone-head {
  text-align: center;
  margin-bottom: 48px;
}

.zone-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
  padding: 0;
  background: none;
  border-radius: 0;
  position: relative;
}
.zone-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.zone-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.zone-desc {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Legacy hero CSS — remplacé par le bloc hero inline ci-dessous */
/* .hero, .hero-center etc. définis dans le style héros de la section */

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  background: var(--light);
  border-radius: 100px;
  padding: 5px;
  border: 1px solid var(--border);
  width: fit-content;
  box-shadow: var(--shadow-xs);
  margin-left: auto;
  margin-right: auto;
}

.tab {
  padding: 10px 22px;
  background: transparent;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}

.tab:hover {
  color: var(--dark);
  background: var(--light);
}

.tab.on {
  background: var(--light);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* ==================== ALERTS ==================== */
.alerts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.alert {
  background: var(--light);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.alert::after { display: none; }

.alert:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.alert-top {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.alert-badge, .line-badge {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  flex-shrink: 0;
}

.line-badge {
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 8px;
}

.line-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alert-head {
  flex: 1;
}

.alert-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--primary);
  line-height: 1.3;
}

.alert-info {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  flex-wrap: wrap;
}

.alert-body {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 15px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==================== SIGNALEMENTS ==================== */
.community-widget {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.community-widget h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

#signalCount {
  background: var(--light);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-left: auto;
  color: var(--muted);
}

#signalementsList {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.community-signal {
  background: var(--light);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
  border: 1px solid #E9ECEF;
  position: relative;
  overflow: hidden;
}

.community-signal:hover {
  background: #E9ECEF;
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.community-signal .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.community-signal strong {
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
}

.community-signal .time {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.community-signal p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.community-widget form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.community-widget input,
.community-widget select,
.community-widget textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--light);
  font-size: 14px;
  font-family: 'Plus Jakarta Sans',sans-serif;
  background: white;
  color: var(--text);
  transition: var(--transition);
}

.community-widget input:focus,
.community-widget select:focus,
.community-widget textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(205, 0, 55, 0.1);
}

.community-widget button {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.community-widget button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.community-widget .more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 16px;
  transition: var(--transition);
}

.community-widget .more-link:hover {
  gap: 12px;
}

/* ==================== LAYOUT 2 COLONNES ==================== */
.two-columns-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.col-left,
.col-right {
  min-width: 0;
}

.section-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--primary); border-radius: 0 0 2px 2px;
}

.section-header h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

@media (max-width: 1024px) {
  .two-columns-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ==================== NETWORK BOXES ==================== */
.network-box {
  background: var(--light);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: none;
  border: 1.5px solid var(--border);
  transition: var(--transition);
}

.network-box:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.network-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.network-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.network-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  flex: 1;
}

.network-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--light);
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

/* line-card → voir section lignes */

/* ── Badges ligne ── */
.line-badge-perturb,
.line-badge-deviation,
.line-badge-inactive {
  position: absolute;
  top: -7px; right: -7px;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  border: 2.5px solid white;
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  color: white;
}

/* Interruption → rouge */
.line-badge-perturb.lbp-ko {
  background: #dc2626;
  box-shadow: 0 2px 8px rgba(220,38,38,.4);
}
/* Alerte TMIT (déviation, info) → primaire */
.line-badge-perturb.lbp-warn {
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(204,0,0,.35);
}
/* Info Ilévia/MEL → bleu */
.line-badge-perturb.lbp-mel {
  background: #0075c9;
  box-shadow: 0 2px 8px rgba(0,117,201,.35);
}
/* Fallback sans classe */
.line-badge-perturb:not(.lbp-ko):not(.lbp-warn):not(.lbp-mel) {
  background: var(--primary);
}

.line-badge-deviation {
  background: #f59e0b;
  width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245,158,11,.4);
  z-index: 10;
  border: 2px solid white;
}

.line-badge-inactive {
  top: -7px; right: auto; left: -7px;
  background: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.line-badge-perturb i,
.line-badge-deviation i,
.line-badge-inactive i {
  font-size: 9px;
  line-height: 1;
}

@keyframes pulse-scale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.line-svg-container {
  height: 52px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: transparent;
  border-radius: 8px;
  padding: 3px 6px;
}

.line-svg-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.line-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  line-height: 1.3;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-status {
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 20px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.status-ok {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
}

.status-perturbe {
  color: var(--primary);
  background: rgba(205, 0, 55, 0.09);
}

.status-deviation {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
}

.status-inactive {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
}



/* ==================== MODAL LINE ==================== */
.line-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  overscroll-behavior: contain;
}

.line-modal-overlay.open {
  display: flex !important;
  opacity: 1;
}

.line-modal {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.line-modal-overlay.open .line-modal {
  transform: scale(1) translateY(0);
}

.line-modal-header {
  padding: 32px;
  border-bottom: 2px solid var(--light);
  position: relative;
  background: linear-gradient(135deg, var(--light), white);
}

.line-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  transition: var(--transition);
}

.line-modal-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg) scale(1.1);
}

.line-modal-title {
  display: flex;
  align-items: center;
  gap: 24px;
}

.line-modal-svg {
  width: 90px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-md);
}

.line-modal-svg img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.line-modal-info h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.line-modal-status {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-modal-body {
  padding: 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  flex: 1;
  /* Empêche le scroll de la page quand on scrolle dans la modal */
  isolation: isolate;
}

.line-modal-tabs {
  display: flex;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 20px;
  margin: -32px -32px 20px -32px;
  padding: 0 32px;
}

.line-modal-tab {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans',sans-serif;
}

.line-modal-tab:hover {
  color: var(--primary);
  background: var(--light);
}

.line-modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.line-modal-content {
  display: none;
  animation: fadeInUp 0.3s;
}

.line-modal-content.active {
  display: block;
}

.passages-search {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.passages-select {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  background: white;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Plus Jakarta Sans',sans-serif;
}

.passages-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 17, 32, 0.1);
}

.passages-refresh-btn {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
  flex-shrink: 0;
}

.passages-refresh-btn:hover {
  transform: rotate(180deg);
  background: var(--primary);
}

.passage-card {
  background: linear-gradient(135deg, var(--light), white);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.passage-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.passage-direction {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.passage-direction i {
  color: var(--primary);
}

/* ── Badges ponctualité passages ── */
.passage-delay-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 800; margin-top: 4px;
}
.passage-delay-badge.delayed { background: #FEE2E2; color: #DC2626; }
.passage-delay-badge.early   { background: #DBEAFE; color: #2563EB; }
.passage-delay-badge.on-time { background: #ECFDF5; color: #059669; }
.passage-current-stop {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--dark);
  background: var(--primary-light); border: 1px solid rgba(204,0,0,.2);
  border-radius: 6px; padding: 2px 8px; margin-top: 4px;
}
.passage-current-stop-dot {
  width: 7px; height: 7px; background: var(--primary);
  border-radius: 50%; animation: pulse-scale 1.5s infinite; flex-shrink: 0;
}
.passage-service { font-size: 10px; color: #94a3b8; font-weight: 600; margin-top: 2px; }
.passage-time-theo { font-size: 11px; color: #94a3b8; text-decoration: line-through; font-weight: 600; margin-right: 4px; }

.passage-times {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.passage-time {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(11, 17, 32, 0.1);
  border: 2px solid rgba(11, 17, 32, 0.1);
  transition: all 0.3s;
  justify-content: center;
  flex-wrap: wrap;
}

.scheduled-time {
  color: #64B5F6;
  text-decoration: line-through;
  font-size: 13px;
  opacity: 0.85;
  font-weight: 600;
}

.realtime-time {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}

.realtime-icon {
  font-size: 11px;
  color: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.passage-time:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 17, 32, 0.15);
  border-color: var(--primary);
}

.passages-loader {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.passages-loader i {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--primary);
}

.passages-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.passages-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #cbd5e1;
}


.perturb-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.perturb-item {
  background: linear-gradient(135deg, var(--light), white);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.perturb-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.perturb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.perturb-type {
  background: linear-gradient(135deg, var(--primary), #dc2626);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(205, 0, 55, 0.3);
}

.perturb-time {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.perturb-message {
  color: var(--text);
  line-height: 1.7;
  font-size: 14px;
}

.no-perturb {
  text-align: center;
  padding: 60px 20px;
}

.no-perturb-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--success), #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

/* ==================== POSTS ==================== */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
}

.post {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1.5px solid var(--border);
}

.post:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.post-img {
  height: 240px;
  background: linear-gradient(135deg, var(--primary), var(--prim-d));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  background-size: cover;
  background-position: center;
}

.post-content {
  padding: 28px;
}

.post-cat {
  display: inline-block;
  padding: 6px 14px;
  background: #E8F4FF;
  color: #0066CC;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary);
  line-height: 1.3;
}

.post-text {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 15px;
}

.post-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.post-link:hover {
  gap: 12px;
}

/* ==================== LOADING ==================== */
.loader {
  text-align: center;
  padding: 60px 0;
}

.spin {
  display: inline-flex;
  gap: 10px;
}

.spin div {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.2s infinite ease-in-out;
}

.spin div:nth-child(1) { animation-delay: -0.24s; }
.spin div:nth-child(2) { animation-delay: -0.12s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.6; }
  40% { transform: scale(1.3); opacity: 1; }
}

/* ==================== MODAL POPUP ==================== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 17, 32, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.open {
  display: flex;
  animation: fadein 0.3s;
}

@keyframes fadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideup 0.4s;
}

@keyframes slideup {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-alert {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 12px rgba(205, 0, 55, 0.8), 0 2px 6px rgba(0,0,0,0.4);
  }
  50% { 
    transform: scale(1.15); 
    box-shadow: 0 0 20px rgba(205, 0, 55, 1), 0 2px 8px rgba(0,0,0,0.5);
  }
}

.popup-head {
  padding: 36px;
  border-bottom: 2px solid var(--light);
  position: relative;
}

.popup-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  background: #F5F5F5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  transition: var(--transition);
}

.popup-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.popup-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.popup-body {
  padding: 36px;
}

.infos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.info-box {
  background: var(--light);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 2px solid #E9ECEF;
}

.info-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.info-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .lines-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 768px) {
  .zone {
    padding: 60px 0;
  }
  
  .carousel {
    height: 500px;
  }
  
  .slide-title {
    font-size: 36px;
  }
  
  .zone-title {
    font-size: 32px;
  }
  
  .alerts,
  .posts {
    grid-template-columns: 1fr;
  }
  
  .infos {
    grid-template-columns: 1fr;
  }
  
  .line-modal {
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    margin: 0;
  }
  
  .line-modal-header {
    padding: 20px;
  }
  
  .line-modal-title {
    gap: 16px;
  }
  
  .line-modal-svg {
    width: 60px;
    height: 40px;
    padding: 8px;
  }
  
  .line-modal-info h3 {
    font-size: 18px;
  }
  
  .line-modal-body {
    padding: 20px;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .line-modal-tabs {
    margin: -20px -20px 16px -20px;
    padding: 0 20px;
  }
  
  .line-modal-tab {
    font-size: 13px;
    padding: 12px 8px;
  }
  
  .passages-select {
    font-size: 13px;
    padding: 12px 14px;
  }
  
  .passages-refresh-btn {
    width: 44px;
    height: 44px;
  }
  
  .passage-card {
    padding: 16px;
  }
  
  .passage-direction {
    font-size: 14px;
  }
  
  .passage-time {
    padding: 8px 12px;
    font-size: 13px;
  }
  
}

@media (max-width: 600px) {
  .wrapper {
    padding: 0 16px;
  }
  
  .carousel {
    height: 400px;
  }
  
  .lines-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
  
/* ==================== MODAL PASSAGES ARRÊT ==================== */
.stop-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,17,32,0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.stop-modal-overlay.open { display: flex; animation: fadein 0.25s; }
@media (min-width: 600px) {
  .stop-modal-overlay { align-items: center; padding: 20px; }
}
.stop-modal {
  background: white;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideup 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@media (min-width: 600px) {
  .stop-modal { border-radius: 24px; }
}
.stop-modal-handle {
  width: 40px; height: 4px;
  background: #e2e8f0; border-radius: 2px;
  margin: 14px auto 0;
}
.stop-modal-header {
  padding: 16px 24px 20px;
  background: var(--primary);
  position: relative;
  flex-shrink: 0;
}
.stop-modal-name {
  font-size: 20px; font-weight: 800; color: white;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 10px;
}
.stop-modal-meta { font-size: 13px; color: rgba(255,255,255,0.7); }
.stop-modal-close {
  position: absolute; top: 16px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; transition: background 0.2s;
}
.stop-modal-close:hover { background: rgba(255,255,255,0.25); }
.stop-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.stop-modal-refresh {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #94a3b8;
  margin-bottom: 16px; cursor: pointer; width: fit-content;
}
.stop-modal-refresh:hover { color: var(--primary); }
.passages-direction {
  margin-bottom: 20px;
}
.passages-dir-title {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.passages-dir-title::before {
  content: ''; display: inline-block;
  width: 12px; height: 2px; background: var(--primary); border-radius: 1px;
}
.passage-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--light); margin-bottom: 8px;
  border: 1.5px solid #f1f5f9; transition: all 0.15s;
}
.passage-row:hover { border-color: #e2e8f0; background: white; }
.passage-line-badge {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.passage-line-badge img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.passage-line-badge span { font-size: 13px; font-weight: 800; color: white; }
.passage-info { flex: 1; min-width: 0; }
.passage-dest {
  font-size: 14px; font-weight: 700; color: var(--dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.passage-sub { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.passage-time {
  flex-shrink: 0; text-align: right;
}
.passage-time-val {
  font-size: 18px; font-weight: 800;
  color: var(--dark); line-height: 1;
}
.passage-time-val.soon { color: var(--primary); animation: pulse-live 2s infinite; }
.passage-time-val.very-soon { color: var(--primary); }
.passage-time-unit { font-size: 11px; color: #94a3b8; }
.stop-modal-empty {
  text-align: center; padding: 40px 20px; color: #94a3b8;
}
.stop-modal-empty i { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.4; }
.stop-modal-loading {
  text-align: center; padding: 40px 20px;
}
.stop-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  display: flex; gap: 10px;
  flex-shrink: 0;
}
.stop-modal-btn {
  flex: 1; padding: 12px; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.stop-modal-btn-primary { background: var(--light); color: white; }
.stop-modal-btn-primary:hover { background: var(--primary); }
.stop-modal-btn-secondary { background: var(--light); color: #475569; border: 1.5px solid #e2e8f0; }
.stop-modal-btn-secondary:hover { border-color: var(--dark); color: var(--dark); }

/* ==================== RESPONSIVE MOBILE OPTIMIZATIONS ==================== */

/* Small mobile (< 480px) */
@media (max-width: 480px) {
  .wrapper {
    padding: 0 16px;
  }
  
  .zone {
    padding: 40px 0;
  }
  
  .zone-head {
    margin-bottom: 32px;
  }
  
  .zone-label {
    font-size: 10px;
    padding: 5px 12px;
    letter-spacing: 1.2px;
  }
  
  .zone-title {
    font-size: clamp(24px, 7vw, 32px);
    padding: 0 8px;
  }
  
  .zone-desc {
    font-size: 14px;
    padding: 0 8px;
  }
  
  /* Hero mobile */
  .hero {
    padding: 48px 0 32px;
  }
  
  .hero::before {
    width: 250px;
    height: 250px;
    top: -60px;
    right: -60px;
  }
  
  .hero::after {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
  }
  
  .hero-inner {
    padding: 0 16px;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .hero-eyebrow {
    font-size: 10px;
    padding: 5px 10px;
    letter-spacing: 1px;
  }
  
  .hero-title {
    font-size: clamp(28px, 8vw, 38px);
    margin-bottom: 14px;
  }
  
  .hero-sub {
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
  }
  
  .hero-actions {
    gap: 8px;
    margin-bottom: 28px;
    flex-direction: column;
  }
  
  .hero-btn-primary,
  .hero-btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 13px 20px;
    font-size: 14px;
  }
  
  .hero-mini-stats {
    gap: 16px;
    justify-content: space-between;
  }
  
  .hero-mini-stat {
    gap: 8px;
  }
  
  .hero-mini-stat-icon {
    width: 32px;
    height: 32px;
  }
  
  .hero-mini-stat-label {
    font-size: 11px;
  }
  
  .hero-mini-stat-value {
    font-size: 20px;
  }
  
  .hero-card {
    padding: 20px 16px;
  }
  
  .hero-card-title {
    font-size: 16px;
    margin-bottom: 16px;
  }
  
  .hero-card-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  /* Grid adjustments */
  .disruption-grid,
  .network-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .disruption-card,
  .network-card,
  .analysis-card {
    padding: 16px;
  }
  
  .disruption-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .disruption-lines {
    gap: 5px;
  }
  
  .disruption-lines img {
    height: 22px;
  }
  
  .disruption-level {
    font-size: 9px;
    padding: 3px 8px;
  }
  
  .disruption-title {
    font-size: 14px;
  }
  
  .disruption-desc {
    font-size: 12px;
  }
  
  .disruption-meta {
    font-size: 10px;
    gap: 8px;
  }
  
  /* Network status cards */
  .network-card-header {
    margin-bottom: 10px;
  }
  
  .network-line-logo {
    height: 28px;
  }
  
  .network-badge {
    font-size: 9px;
    padding: 3px 8px;
  }
  
  .network-card-title {
    font-size: 14px;
  }
  
  .network-card-desc {
    font-size: 11px;
  }
  
  /* Nearby stations */
  #nearbySection {
    margin-top: 24px;
  }
  
  .nearby-trigger {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
  }
  
  .nearby-container {
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .nearby-header {
    margin-bottom: 20px;
  }
  
  .nearby-title {
    font-size: clamp(18px, 5vw, 24px);
    gap: 8px;
  }
  
  .nearby-subtitle {
    font-size: 13px;
  }
  
  .nearby-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  
  /* Station cards in nearby section */
  .station-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  /* ==================== SECTION OBJETS PERDUS ==================== */
.objets-perdus-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.objets-perdus-section .wrapper {
  max-width: 900px;
  text-align: center;
}

/* Icône de recherche */
.objets-perdus-icon {
  display: inline-flex;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  margin-bottom: 24px;
}

.objets-perdus-icon i {
  font-size: 36px;
  color: white;
}

/* Titre */
.objets-perdus-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

/* Description */
.objets-perdus-description {
  font-size: clamp(15px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 32px;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Bouton CTA */
.objets-perdus-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary-dark);
  padding: 16px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.objets-perdus-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
  background: var(--light);
}

.objets-perdus-cta:active {
  transform: translateY(0);
}

.objets-perdus-cta i:first-child {
  font-size: 18px;
}

.objets-perdus-cta i:last-child {
  font-size: 14px;
}

/* Cartes statistiques */
.objets-perdus-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.objets-perdus-stats > div {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.objets-perdus-stats > div:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.objets-perdus-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  line-height: 1;
}

.objets-perdus-stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* ==================== RESPONSIVE ==================== */

/* Mobile (< 640px) */
@media (max-width: 640px) {
  .objets-perdus-section {
    padding: 50px 0;
  }
  
  .objets-perdus-section .wrapper {
    padding: 0 16px;
  }
  
  .objets-perdus-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }
  
  .objets-perdus-icon i {
    font-size: 32px;
  }
  
  .objets-perdus-title {
    font-size: clamp(24px, 7vw, 36px);
  }
  
  .objets-perdus-description {
    font-size: clamp(14px, 4vw, 17px);
    margin-bottom: 28px;
  }
  
  .objets-perdus-cta {
    padding: 14px 28px;
    font-size: 15px;
  }
  
  .objets-perdus-stats {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 36px;
  }
  
  .objets-perdus-stats > div {
    padding: 20px;
  }
  
  .objets-perdus-stat-value {
    font-size: 28px;
  }
  
  .objets-perdus-stat-label {
    font-size: 13px;
  }
}

/* Tablette (641px - 900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .objets-perdus-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop (> 900px) */
@media (min-width: 901px) {
  .objets-perdus-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.objets-perdus-section {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive mobile — sélecteur @media manquant restauré */
@media (max-width: 640px) {
  .station-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .station-rank {
    font-size: 18px;
  }
  
  .station-name {
    font-size: 15px;
  }
  
  .station-meta {
    font-size: 11px;
    gap: 8px;
  }
  
  .station-lines img {
    height: 22px;
  }
  
  .station-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }
  
  .passage-item {
    font-size: 12px;
    gap: 8px;
  }
  
  .passage-info img {
    height: 18px;
  }
  
  .passage-destination {
    font-size: 12px;
  }
  
  .passage-time {
    font-size: 13px;
  }
  
  /* Modal mobile bottom sheet */
  .stop-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  
  .stop-modal {
    border-radius: 22px 22px 0 0;
    max-height: 85vh;
  }
  
  .stop-modal-handle {
    display: block;
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin: 10px auto 6px;
  }
  
  .stop-modal-header {
    padding: 12px 16px;
  }
  
  .stop-modal-name {
    font-size: 16px;
    padding-right: 36px;
  }
  
  .stop-modal-name i {
    font-size: 14px;
  }
  
  .stop-modal-meta {
    font-size: 12px;
  }
  
  .stop-modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
  
  .stop-modal-body {
    padding: 16px;
  }
  
  .stop-modal-refresh {
    font-size: 12px;
    padding: 7px 14px;
  }
  
  .stop-modal-footer {
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
  }
  
  .stop-modal-btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
  }
  
  .passage-row {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .passage-line-badge {
    width: 36px;
    height: 36px;
  }
  
  .passage-dest {
    font-size: 13px;
  }
  
  .passage-sub {
    font-size: 11px;
  }
  
  .passage-time-val {
    font-size: 16px;
  }
  
  /* Footer */
  .footer {
    padding: 36px 0 20px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }
  
  .footer-brand h3 {
    font-size: 20px;
  }
  
  .footer-brand p {
    font-size: 13px;
  }
  
  .footer-col h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .footer-links a {
    font-size: 13px;
  }
  
  .footer-bottom {
    font-size: 11px;
    padding-top: 20px;
  }
  
  /* Community signals */
  .signal-item {
    padding: 12px;
  }
  
  .signal-title {
    font-size: 12px;
    gap: 6px;
  }
  
  .signal-badge {
    font-size: 9px;
    padding: 3px 8px;
  }
  
  .signal-desc {
    font-size: 11px;
  }
  
  .signal-meta {
    font-size: 10px;
  }
}

/* Medium mobile (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .wrapper {
    padding: 0 20px;
  }
  
  .zone {
    padding: 48px 0;
  }
  
  .hero {
    padding: 56px 0 40px;
  }
  
  .hero-inner {
    padding: 0 20px;
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .hero-actions {
    flex-direction: row;
  }
  
  .hero-btn-primary,
  .hero-btn-secondary {
    flex: 1;
  }
  
  .disruption-grid,
  .network-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
  
  .stop-modal-footer {
    flex-direction: row;
  }
  
  .stop-modal-btn {
    flex: 1;
  }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .wrapper {
    padding: 0 28px;
  }
  
  .zone {
    padding: 56px 0;
  }
  
  .hero {
    padding: 64px 0 48px;
  }
  
  .hero-inner {
    padding: 0 28px;
    grid-template-columns: 1fr;
    gap: 36px;
  }
  
  .hero-card {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .disruption-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .network-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px+) - Keep original behavior */
@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 420px;
  }
  
  .disruption-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .network-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
  
  /* Modal centered on desktop */
  .stop-modal-overlay {
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .stop-modal {
    border-radius: 20px;
    max-width: 600px;
  }
  
  .stop-modal-handle {
    display: none;
  }
}

/* Touch optimizations for all mobile devices */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  button,
  a,
  .hero-btn-primary,
  .hero-btn-secondary,
  .nearby-trigger,
  .station-btn,
  .stop-modal-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .disruption-card:hover,
  .network-card:hover,
  .station-card:hover,
  .signal-item:hover {
    transform: none;
  }
  
  /* Better tap highlight */
  * {
    -webkit-tap-highlight-color: rgba(205, 0, 55, 0.1);
  }
}

/* Accessibility - Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Keep light mode for now, but can be extended */
}

/* Landscape mobile optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 32px 0 24px;
  }
  
  .zone {
    padding: 32px 0;
  }
  
  .stop-modal {
    max-height: 90vh;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Images and icons render crisp */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Print styles */
@media print {
  .hero-actions,
  .hero-card,
  .nearby-trigger,
  .footer,
  .stop-modal-overlay {
    display: none !important;
  }
  
  .hero {
    background: white !important;
    color: black !important;
    padding: 20px 0 !important;
  }
  
  .hero-title,
  .hero-sub {
    color: black !important;
  }
  
  .disruption-card,
  .network-card {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* ==================== RESPONSIVE GLOBAL SMARTPHONE ==================== */
/* Base : wrapper padding serré */
@media (max-width: 640px) {
  .wrapper { padding: 0 16px; }
  .zone    { padding: 40px 0; }

  /* Hero */
  .hero-center {
    grid-template-columns: 1fr;
    padding: 28px 16px 36px;
    gap: 24px;
    text-align: center;
  }
  .hero-left  { align-items: center; }
  .hero-right { display: none; }
  .hero-title { font-size: clamp(26px, 8vw, 34px); letter-spacing: -.5px; }
  .hero-sub   { font-size: 14px; margin: 0 auto 20px; }
  .hero-search-bar { margin: 0 auto 18px; max-width: 100%; }
  .hero-search-bar-inner input { font-size: 14px; padding: 12px 10px; }
  .hero-search-go  { padding: 12px 16px; font-size: 13px; }
  .hero-shortcuts  { gap: 8px; justify-content: center; }
  .hero-shortcut   { padding: 8px 14px; }
  .hero-shortcut-icon { width: 30px; height: 30px; font-size: 13px; }
  .hero-shortcut span { font-size: 12px; }
  .hero-alert-banner { max-width: 100%; }

  /* Cartes statut réseau */
  .status-cards-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }
  .status-card { padding: 14px 8px; border-radius: 14px; }
  .status-card-icon { font-size: 22px; margin-bottom: 6px; }
  .status-card-name { font-size: 12px; margin-bottom: 4px; }
  .status-card-body { min-height: unset; }
  .status-card-ok i   { font-size: 12px; }
  .status-card-ok span { font-size: 10px; }

  /* Section perturbations */
  #reseau-section > .wrapper { padding: 0 14px; }
  .perturb-container { padding: 16px; border-radius: 16px; }
  .perturb-toggle-row { padding: 12px 14px; gap: 10px; }
  .perturb-mode-icon  { width: 38px; height: 38px; font-size: 17px; }
  .perturb-mode-name  { font-size: 14px; }
  .perturb-mode-sub   { font-size: 12px; }
  .pc-card { padding: 13px; border-radius: 12px; }
  .pc-header { gap: 5px; flex-wrap: wrap; }
  .pc-desc  { font-size: 12px; padding: 8px 10px; }
  .pc-dir   { padding: 8px 11px; }

  /* Plan des lignes — scroll horizontal par rangée */
  #reseau-section > .wrapper { padding: 0 14px; }
  .lcat-panel  { border-radius: 14px; }
  .lcat-row    { padding: 14px 14px 16px; }
  .lcat-cat-label { font-size: 12px; margin-bottom: 10px; }
  .lcat-row-top { grid-template-columns: 1fr 1px 1fr; }
  .lcat-row-top .lcat-cat { padding: 14px 12px 16px; }

  /* Grille lignes : toutes affichées, wrap propre */
  .lcat-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible;
    gap: 8px !important;
    padding-top: 6px;
  }

  /* Cartes lignes : 4 par ligne sur mobile standard */
  .line-card {
    width: calc(25% - 6px) !important;
    min-width: 62px;
    max-width: 80px;
    flex-shrink: 0;
    padding: 9px 4px 8px !important;
    border-radius: 11px;
  }
  .line-svg-container { height: 32px !important; }
  .line-name   { font-size: 10px !important; min-height: 20px; }
  .line-status { font-size: 9px !important; padding: 2px 5px !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; width:100%; }

  /* Modal ligne — bottom sheet avec handle + scroll intérieur */
  .line-modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .line-modal {
    border-radius: 22px 22px 0 0 !important;
    max-height: 90vh !important;
    width: 100% !important;
  }
  /* Handle drag */
  .line-modal-header::before {
    content: '';
    display: block;
    width: 38px; height: 4px;
    background: #d1d5db;
    border-radius: 100px;
    margin: 0 auto 14px;
  }
  .line-modal-header { padding: 14px 18px 12px !important; }
  .line-modal-svg  { width: 56px !important; height: 38px !important; padding: 7px !important; }
  .line-modal-info h3 { font-size: 17px !important; }
  .line-modal-status  { font-size: 12px !important; }
  .line-modal-close   { width: 34px !important; height: 34px !important; font-size: 14px !important; top: 12px !important; right: 12px !important; }
  /* Body : scrollable, touch-action isolé */
  .line-modal-body {
    padding: 0 16px 40px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    /* Permettre le scroll même quand le doigt commence sur un élément non-scrollable */
    flex: 1;
  }
  /* Tabs collants en haut */
  .line-modal-tabs {
    margin: 0 -16px 14px !important;
    padding: 0 16px !important;
    position: sticky !important;
    top: 0 !important;
    background: white !important;
    z-index: 5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  }
  .line-modal-tab { font-size: 13px !important; padding: 13px 8px !important; }

  /* pc-card dans la modal */
  .pc-card   { padding: 11px 12px !important; }
  .pc-header { gap: 5px; flex-wrap: wrap; }
  .pc-desc   { font-size: 12px !important; padding: 8px 10px !important; }
  .pc-dir    { padding: 8px 10px !important; }

  /* Passages */
  .passages-select      { font-size: 13px; padding: 12px 14px; }
  .passages-refresh-btn { width: 44px; height: 44px; }

  /* Modal arrêt prochains passages */
  .stop-modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .passage-row { padding: 10px 12px; gap: 8px; }
  .passage-dest { font-size: 13px; }
  .passage-time-val { font-size: 18px; }

  /* Objets perdus */
  .objets-perdus-section { padding: 44px 0; }
  .objets-perdus-title   { font-size: clamp(22px, 7vw, 32px); }
  .objets-perdus-stats   { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
  .objets-perdus-stat-card { padding: 18px; }

  /* V'Lille */
  .vlille-stats { flex-wrap: wrap; gap: 8px; width: 100%; }

  /* Zone head */
  .zone-head { margin-bottom: 28px; }
  .zone-title { font-size: clamp(22px, 6vw, 32px); }
  .zone-desc  { font-size: 14px; }
}

/* Très petits écrans (< 380px) */
@media (max-width: 380px) {
  .status-cards-grid { grid-template-columns: 1fr; gap: 8px; }
  .status-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; text-align: left;
    border-radius: 12px;
  }
  .status-card-icon { margin-bottom: 0; font-size: 22px; flex-shrink: 0; }
  .status-card-body { min-height: unset; flex: 1; }
  /* <380px : 3 lignes par rangée, colonnes Métro+Tram empilées */
  .line-card { width: calc(33.33% - 6px) !important; min-width: 54px; }
  .lcat-row-top { grid-template-columns: 1fr; }
  .lcat-cat-sep { display: none; }
}

/* Tablette (641–900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .hero-center { grid-template-columns: 1fr; gap: 28px; padding: 36px 24px 48px; }
  .hero-right  { max-width: 380px; margin: 0 auto; }
  .status-cards-grid { gap: 12px; }
  .lcat-row-top .lcat-cat { padding: 12px 16px 14px; }
}

/* ==================== PERTURBATION CARDS CLASSES ==================== */
.pc-card {
  background: white;
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  animation: pcFadeIn .25s ease both;
}
@keyframes pcFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.pc-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-1px); border-color: #d1d5db; }
.pc-header { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.pc-badge-ligne { background:var(--primary); color:white; font-size:12px; font-weight:800; padding:4px 10px; border-radius:6px; letter-spacing:.5px; white-space:nowrap; }
.pc-badge-statut { color:white; font-size:11px; font-weight:700; padding:4px 10px; border-radius:6px; display:flex; align-items:center; gap:5px; }
.pc-badge-secteur { background:#f3f4f6; color:#6C757D; font-size:11px; font-weight:600; padding:4px 10px; border-radius:6px; }
.pc-time { margin-left:auto; font-size:12px; color:#6C757D; white-space:nowrap; }
.pc-cause { font-size:12px; color:#6C757D; margin-bottom:8px; }
.pc-desc { font-size:13px; color:#374151; line-height:1.6; margin-bottom:6px; padding:10px 12px; background:#f9fafb; border-radius:8px; }
.pc-dir { border-radius:0 8px 8px 0; padding:10px 14px; margin-top:8px; border-left:3px solid; }
.pc-dir + .pc-dir { margin-top:6px; }
.pc-dir-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; margin-bottom:7px; }
.pc-arrets { font-size:13px; color:#374151; margin-bottom:5px; }
.pc-arrets-label { color:#dc2626; font-weight:600; }
.pc-report { font-size:13px; color:#374151; }
.pc-report-label { color:#059669; font-weight:600; }
.pc-bus-relais { margin-top:10px; background:#eff6ff; border-radius:8px; padding:8px 12px; font-size:13px; color:#2563eb; font-weight:600; display:flex; align-items:center; gap:6px; }
.pc-info-bloc { margin-top:8px; display:flex; align-items:flex-start; gap:8px; background:rgba(0,117,201,.07); border:1.5px solid rgba(0,117,201,.18); border-radius:10px; padding:9px 13px; font-size:13px; color:#0369a1; font-weight:600; line-height:1.55; }
.pc-info-bloc i { font-size:13px; flex-shrink:0; margin-top:2px; }
.pc-depart-horaires { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; }
.pc-depart-badge { display:inline-flex; align-items:center; gap:4px; background:#ede9fe; color:#7c3aed; font-size:12px; font-weight:700; padding:4px 10px; border-radius:6px; border:1px solid #ddd6fe; }

/* ==================== STATUS CARDS ==================== */
/* .status-cards-grid défini dans le bloc TADAO en tête de fichier avec !important — doublon supprimé pour éviter conflit */
.status-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.status-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--border);
  transition: background .2s;
}
.status-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #ccc; }
.status-card:hover::after { background: var(--primary); }
.status-card.active { border-color: var(--primary); background: #fffafa; }
.status-card.active::after { background: var(--primary); }
.status-card.has-alert { border-color: #fecaca; background: #fff8f8; }
.status-card.has-alert::after { background: var(--primary); }
.status-card-icon {
  height: 52px; display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 14px;
}
.status-card-icon img { height: 38px; width: auto; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.12)); }
.status-card-icon i { font-size: 32px; line-height: 1; }
.status-card-name { font-size: 13px; font-weight: 900; color: var(--dark); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.status-card-body { min-height: 44px; display: flex; align-items: center; justify-content: center; }
.status-card-ok { display:flex; align-items:center; justify-content:center; gap:6px; }
.status-card-ok i { color: var(--success); font-size: 14px; }
.status-card-ok span { font-size: 12px; color: var(--muted); font-weight: 600; }
.status-card-perturb { font-size: 12px; color: var(--primary); font-weight: 700; }
.status-card-count {
  position:absolute; top:12px; right:12px;
  background:var(--primary); color:white;
  font-size:10px; font-weight:900;
  width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:2px solid white; box-shadow:0 2px 8px rgba(204,0,0,.35);
}
/* Variantes sémantiques — remplacent les styles inline JS */
.status-card-count--interruption {
  background:#dc2626;
  box-shadow:0 2px 8px rgba(220,38,38,.4);
}
.status-card-count--alerte {
  background:var(--primary);
  box-shadow:0 2px 8px rgba(204,0,0,.35);
}
/* Variantes badge FAB notification */
.tnp-badge--dot {
  background:white !important;
  border:2px solid var(--primary) !important;
  width:10px !important; height:10px !important;
  top:6px !important; right:6px !important;
}
.tnp-badge--count {
  background:var(--primary) !important;
  border:none !important;
  width:18px !important; height:18px !important;
  top:2px !important; right:2px !important;
  font-weight:800 !important;
  font-family:'Plus Jakarta Sans',sans-serif !important;
}

/* ==================== REFRESH INDICATOR ==================== */
.refresh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 4px;
  flex-wrap: wrap;
  gap: 8px;
}
.refresh-info { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.refresh-dot { width:7px; height:7px; background:#10B981; border-radius:50%; animation:pulse-green 2s infinite; }
@keyframes pulse-green { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(.7)} }
.refresh-btn { background:none; border:1px solid var(--border); border-radius:8px; padding:5px 12px; font-size:12px; font-weight:600; color:var(--muted); cursor:pointer; transition:all .15s; display:flex; align-items:center; gap:5px; font-family:inherit; }
.refresh-btn:hover { border-color:var(--primary); color:var(--primary); }
.refresh-btn i { font-size:11px; }

/* ==================== MOBILE STATUS CARDS ==================== */
@media (max-width: 640px) {
  .status-cards-grid { gap: 10px; }
  .status-card { padding: 16px 10px; border-radius: 12px; }
  .status-card-icon { font-size: 26px; margin-bottom: 8px; }
  .status-card-name { font-size: 13px; margin-bottom: 6px; }
  .status-card-ok span { font-size: 11px; }
  .status-card-ok i { font-size: 13px; }
  .status-card-count { width:18px; height:18px; font-size:9px; top:7px; right:7px; }
}
@media (max-width: 380px) {
  .status-cards-grid { grid-template-columns: 1fr; gap: 8px; }
  .status-card { padding: 14px 16px; text-align: left; display:flex; align-items:center; gap:14px; }
  .status-card-icon { margin-bottom: 0; font-size: 28px; flex-shrink: 0; }
  .status-card-name { margin-bottom: 2px; }
  .status-card-body { min-height: unset; }
}

/* ==================== PERTURBATIONS SECTION MOBILE ==================== */
@media (max-width: 640px) {
  #reseau-section .wrapper { padding: 0 14px; }
  #reseau-section > div > div:last-child { padding: 20px 16px; border-radius: 16px; }
}

/* ==================== HERO MOBILE AMÉLIORÉ ==================== */
@media (max-width: 640px) {
  .hero-center {
    padding: 32px 16px 40px;
    gap: 28px;
  }
  .hero-title { font-size: clamp(28px, 8vw, 36px); letter-spacing: -.5px; }
  .hero-search-bar { margin: 0 0 20px; }
  .hero-search-bar-inner input { font-size: 14px; padding: 12px 10px; }
  .hero-search-go { padding: 12px 16px; font-size: 13px; }
  .hero-shortcuts { gap: 8px; }
  .hero-shortcut { padding: 8px 14px; }
  .hero-shortcut-icon { width: 30px; height: 30px; font-size: 13px; }
  .hero-shortcut span { font-size: 12px; }
  .hero-info-card { padding: 20px; }
  .hero-info-card h3 { font-size: 14px; }
  .hero-stat-row { padding: 9px 0; font-size: 13px; }
}

/* ==================== PERTURBATION CARDS MOBILE ==================== */
@media (max-width: 640px) {
  .pc-card { padding: 14px; border-radius: 12px; }
  .pc-header { gap: 6px; }
  .pc-badge-ligne { font-size: 11px; padding: 3px 8px; }
  .pc-badge-statut { font-size: 10px; padding: 3px 8px; }
  .pc-badge-secteur { font-size: 10px; padding: 3px 8px; }
  .pc-time { font-size: 11px; }
  .pc-desc { font-size: 12px; padding: 8px 10px; }
  .pc-dir { padding: 9px 11px; }
  .pc-dir-title { font-size: 11px; margin-bottom: 5px; }
  .pc-arrets, .pc-report { font-size: 12px; }
  .pc-bus-relais { font-size: 12px; padding: 7px 10px; }
}

/* ==================== SECTION PERTURBATIONS CONTENEUR ==================== */
.perturb-container {
  background: white;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
@media (max-width: 640px) {
  .perturb-container { padding: 16px; border-radius: 16px; }
  .refresh-bar { padding: 0; margin-bottom: 14px; }
  .refresh-info { font-size: 11px; }
  .refresh-btn { padding: 4px 10px; font-size: 11px; }
}

/* ==================== TABS MOBILE ==================== */
@media (max-width: 480px) {
  .tabs { width: 100%; box-sizing: border-box; }
  .tab { padding: 8px 12px; font-size: 12px; }
}

/* ==================== LIGNE CARDS MOBILE ==================== */
@media (max-width: 480px) {
  .line-card { padding: 12px 8px; border-radius: 10px; }
  .line-svg-container { height: 40px; padding: 5px; }
  .line-name { font-size: 10px; min-height: 22px; }
  .line-status { font-size: 9px; padding: 2px 5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; width:100%; }
}

/* ==================== MODAL MOBILE BOTTOM SHEET ==================== */
@media (max-width: 640px) {
  .line-modal-overlay { align-items: flex-end; padding: 0; }
  .line-modal {
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    width: 100%;
    margin: 0;
  }
  .line-modal-header { padding: 20px 20px 16px; }
  .line-modal-body { padding: 16px 20px; }
  .line-modal-tabs { margin: -16px -20px 16px; padding: 0 20px; }
  .line-modal-tab { font-size: 13px; padding: 12px 8px; gap: 5px; }
}

/* ==================== WRAPPER PADDING ==================== */
@media (max-width: 480px) {
  .wrapper { padding: 0 14px; }
}

/* ==================== NOVELTY BAR MOBILE ==================== */
@media (max-width: 500px) {
  .novelty-text { display: none; }
  .novelty-actions { width: 100%; }
  .novelty-btn { flex: 1; justify-content: center; font-size: 12px; padding: 8px 14px; }
}

/* ==================== SMOOTH EXPAND/COLLAPSE ==================== */
.perturb-details {
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease;
  max-height: 0;
  opacity: 0;
}
.perturb-details.open {
  max-height: 600px; /* valeur réaliste : l'animation CSS fonctionne correctement (9999px rendait la transition imperceptible) */
  opacity: 1;
}
.perturb-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
  transition: background .15s;
  margin-bottom: 8px;
}
.perturb-toggle-row:hover { background: rgba(0,0,0,.02); }
.perturb-toggle-row.has-perturb { background: #fff5f5; border: 2px solid #fecaca; }
.perturb-toggle-row.has-perturb:hover { background: #fff0f0; }
.perturb-mode-icon {
  width: 46px; height: 46px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; flex-shrink: 0;
}
.perturb-mode-label { flex: 1; min-width: 0; }
.perturb-mode-name { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 2px; }
.perturb-mode-sub { font-size: 13px; color: #6C757D; display: flex; align-items: center; gap: 5px; }
.perturb-mode-sub.alert { color: var(--primary); font-weight: 600; }
.perturb-chevron { color: var(--primary); transition: transform .25s; flex-shrink: 0; font-size: 13px; }
.perturb-chevron.open { transform: rotate(180deg); }

/* ── "Voir les N autres perturbations" (au-delà des 5 plus sévères) ── */
.perturb-more { display: none; }
.perturb-more.open { display: block; }
.perturb-more-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 4px 0 8px; padding: 10px 14px;
  background: var(--light); border: 1px dashed #d1d5db; border-radius: 10px;
  color: var(--dark); font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
  transition: background .15s;
}
.perturb-more-toggle:hover { background: #ececec; }
.perturb-more-toggle i { transition: transform .2s; font-size: 11px; }
.perturb-more-toggle.open i { transform: rotate(180deg); }
.no-perturb-mode { padding: 16px 18px; background: var(--light); border-radius: 12px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 14px; }
.no-perturb-mode .perturb-mode-icon { opacity: .7; }

/* ==================== LIGNES CATÉGORIES ==================== */
/* ── Section lignes ─────────────────────────────── */
/* ══════════════════════════════════════════════════
   SECTION LIGNES — charte site, fond blanc/gris
   ══════════════════════════════════════════════════ */

/* Légende */
.lcat-legend {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.lcat-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-pill); padding: 4px 12px;
}
.lcat-legend-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

/* Panel encadré propre */
.lcat-panel {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Rangées */
.lcat-row {
  padding: 18px 24px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.lcat-row:hover { background: #fafaf8; }
.lcat-row-last { border-bottom: none; }

/* Rangée double (Métro + Tram) */
.lcat-row-top {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  padding: 0;
  gap: 0;
}
.lcat-row-top .lcat-cat { padding: 18px 24px 20px; }
.lcat-cat-sep { background: var(--border); }

/* Label de catégorie */
.lcat-cat-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 900;
  color: var(--dark); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px;
}
.lcat-cat-label i { color: var(--primary); font-size: 12px; }
.lcat-cat-label-full { margin-bottom: 14px; }
.lcat-cat-sub {
  font-size: 10px; font-weight: 500;
  color: var(--muted); margin-left: 4px;
  text-transform: none; letter-spacing: 0;
}

.lcat-grid { display: flex; gap: 8px; flex-wrap: wrap; }

/* Compat anciens sélecteurs */
.lcat-block, .lcat-last { display: none; }

/* ── Cards lignes ─────────────────────────────── */
.line-card {
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  width: 80px;
  flex-shrink: 0;
  border-bottom: 3px solid transparent;
}
.line-card:hover {
  background: white;
  border-color: #ccc;
  border-bottom-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.line-card:has(.line-badge-inactive) { opacity: .36; }
.line-card:has(.line-badge-inactive):hover { opacity: .52; transform: none; box-shadow: none; border-color: var(--border); border-bottom-color: transparent; }
.line-card-deviation {
  border-color: rgba(245,158,11,.3);
  background: #fffcf0;
  border-bottom-color: #f59e0b;
}
.line-card-deviation:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245,158,11,.15);
}

/* Badges */
.line-badge-perturb, .line-badge-deviation, .line-badge-inactive {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; z-index: 10;
  border: 2.5px solid white; color: white;
}
.line-badge-inactive { left: -7px; right: auto; background: #cbd5e1; }

/* Contenu carte */
.line-svg-container {
  height: 38px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 7px;
}
.line-svg-container img {
  max-height: 100%; max-width: 100%;
  object-fit: contain;
}
.line-name {
  font-size: 10px; font-weight: 700; color: var(--text);
  margin-bottom: 5px; line-height: 1.2; min-height: 20px;
  display: flex; align-items: center; justify-content: center;
  text-transform: uppercase; letter-spacing: .3px;
}
.line-status {
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  gap: 3px; padding: 2px 6px; border-radius: 100px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; width: 100%; box-sizing: border-box;
}
.status-ok       { color: #059669; background: rgba(5,150,105,.09); }
.status-perturbe { color: var(--primary); background: rgba(204,0,0,.08); }
.status-deviation{ color: #d97706; background: rgba(217,119,6,.09); }
.status-inactive { color: #94a3b8; background: rgba(148,163,184,.1); }
.status-info     { color: #0075c9; background: rgba(0,117,201,.08); }

@media (max-width: 640px) {
  .lcat-head { padding: 11px 14px; gap: 10px; }
  .lcat-body { padding: 10px 14px 14px; }
  .lcat-icon { width: 30px; height: 30px; font-size: 13px; }
  .lcat-name { font-size: 13px; }
  .lcat-grid { gap: 6px; }
  .line-card { width: 70px; padding: 9px 5px 8px; }
  .line-svg-container { height: 32px; }
  .line-name { font-size: 9px; }
}

/* ==================== NEARBYSECTION FIX ==================== */
#nearbySection {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 4px 16px rgba(205,0,55,.2);
  color: white;
}
@media (max-width: 640px) {
  #nearbySection { padding: 18px; border-radius: 16px; margin-bottom: 20px; }
}

/* ==================== STATS ZONE ==================== */
.stats-zone { padding: 56px 0; }
@media (max-width: 640px) {
  .stats-zone { padding: 36px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 20px 16px; }
  .stat-icon { width: 44px; height: 44px; font-size: 22px; margin-bottom: 12px; }
  .stat-value { font-size: 32px; }
  .stat-label { font-size: 11px; }
}

/* ==================== WIDGETS GRID MOBILE ==================== */
@media (max-width: 640px) {
  .widgets-grid { gap: 20px; }
  .widget-card-header { padding: 16px 18px; }
  .widget-card-header h3 { font-size: 15px; }
  .widget-body { padding: 16px 18px; max-height: 360px; }
  .widget-footer { padding: 12px 18px; }
  .histo-item { padding: 10px 0; }
  .histo-titre { font-size: 12px; }
  .histo-meta { font-size: 10px; gap: 8px; }
}

/* ==================== DON SECTION ==================== */

.don-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: white;
  color: var(--primary);
  text-decoration: none;
  border-radius: 100px;
  font-weight: 800;
  font-size: 16px;
  transition: all .25s;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.don-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,.24); color: var(--primary-dark); }
@media (max-width: 640px) {
  .don-cta-btn { padding: 14px 28px; font-size: 15px; }
}

/* ==================== PARTNER SECTION MOBILE ==================== */
@media (max-width: 640px) {
  .partner-section { padding: 48px 0; }
  .partner-head { margin-bottom: 28px; }
  .partner-title { font-size: 22px; }
  .partner-sub { font-size: 14px; }
  .partner-cta { flex-direction: column; align-items: center; gap: 10px; }
  .partner-store-btn { width: 100%; max-width: 280px; justify-content: center; }
}

/* ==================== SIGNALEMENTS SECTION MOBILE ==================== */
@media (max-width: 640px) {
  .community-widget { padding: 20px 18px; border-radius: 16px; }
  .community-widget h4 { font-size: 17px; margin-bottom: 16px; }
  .two-columns-layout { gap: 20px; }
}

/* ==================== NEARBYBUTTON CLEAN ==================== */
.nearby-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(205,0,55,.3);
  transition: all .25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  font-family: inherit;
}
.nearby-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(205,0,55,.4); }
.nearby-btn i { font-size: 18px; }
@media (max-width: 640px) {
  .nearby-btn { max-width: 100%; font-size: 14px; padding: 13px 20px; }
  #nearbyTrigger { padding: 0; }
}


/* ── Passages L1/L2 + tram/bus : rester en 2 colonnes côte à côte sur mobile ── */
@media (max-width: 480px) {
  #modal-passages-list > div[style*="grid-template-columns"] {
    gap: 6px !important;
  }
  #modal-passages-list > div[style*="grid-template-columns"] > div {
    padding: 10px 8px !important;
  }
  #modal-passages-list > div[style*="grid-template-columns"] > div > div:first-child {
    font-size: 11px !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
  }
  #modal-passages-list .realtime-time {
    font-size: 13px !important;
  }
  #modal-passages-list > div[style*="grid-template-columns"] > div > div:last-child > div {
    padding: 7px 8px !important;
  }
  #modal-passages-list .gtfs-meta {
    font-size: 9px !important;
  }
}
