/* La Bétaillère — statuts et identités homogènes v1
 * Couche isolée : aucune dimension de conteneur n'est modifiée.
 */

/* Favoris : le numéro reste un lien utile, sans pavé cyan ni halo parasite. */
#favTrainsWidget .fav-train-profile-link,
#favTrainsWidget .fav-train-profile-link:hover,
#favTrainsWidget .fav-train-profile-link:active,
#favTrainsWidget .fav-train-profile-link:focus {
  position: relative !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
}

#favTrainsWidget .fav-train-profile-link::before,
#favTrainsWidget .fav-train-profile-link::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#favTrainsWidget .fav-train-profile-link .fav-train-num {
  color: #d8f4fa !important;
  text-shadow: none !important;
  transition: color .14s ease, text-decoration-color .14s ease !important;
}

#favTrainsWidget .fav-train-profile-link:hover .fav-train-num,
#favTrainsWidget .fav-train-profile-link:focus-visible .fav-train-num {
  color: #78e9f2 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(120, 233, 242, .55) !important;
  text-underline-offset: 3px !important;
}

#favTrainsWidget .fav-train-profile-link:focus-visible {
  outline: 1px solid rgba(120, 233, 242, .55) !important;
  outline-offset: 4px !important;
}

/* Suppression totale : mêmes horaires rouges et barrés dans Favoris et Accueil. */
#favTrainsWidget .fav-card.is-canceled .fav-primary-times,
#favTrainsWidget .fav-card.is-canceled .fav-primary-times .fav-time,
#favTrainsWidget .fav-card[data-lb4-state="cancelled"] .fav-primary-times,
#favTrainsWidget .fav-card[data-lb4-state="cancelled"] .fav-primary-times .fav-time,
#favTrainsWidget .fav-primary-times--canceled,
#favTrainsWidget .fav-primary-times--canceled .fav-time {
  color: #ff667d !important;
  -webkit-text-fill-color: #ff667d !important;
  opacity: 1 !important;
  text-shadow: 0 0 8px rgba(255, 60, 88, .24) !important;
}

/* Les composants horaires peuvent contenir des spans qui réimposent du blanc.
   On force donc aussi les descendants à hériter réellement du rouge suppression. */
#favTrainsWidget .fav-card.is-canceled .fav-primary-times *,
#favTrainsWidget .fav-card[data-lb4-state="cancelled"] .fav-primary-times *,
#favTrainsWidget .fav-primary-times--canceled * {
  color: #ff667d !important;
  -webkit-text-fill-color: #ff667d !important;
}

/* On barre le bloc horaire lui-même pour rester robuste même si le moteur
   ne produit pas de span .fav-time-planned. */
#favTrainsWidget .fav-card.is-canceled .fav-primary-times,
#favTrainsWidget .fav-card[data-lb4-state="cancelled"] .fav-primary-times,
#favTrainsWidget .fav-primary-times--canceled,
#favTrainsWidget .fav-primary-times--canceled .fav-time-planned,
#favTrainsWidget .fav-card.is-canceled .fav-primary-times .fav-time-planned,
#favTrainsWidget .fav-card[data-lb4-state="cancelled"] .fav-primary-times .fav-time-planned {
  text-decoration-line: line-through !important;
  text-decoration-color: #ff304f !important;
  text-decoration-thickness: 2px !important;
  opacity: 1 !important;
}

/* Accueil : suppression totale = heures rouges + barrées, exactement comme les fiches train. */
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .home-fav-time,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .home-fav-time *,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .lb-home-fav-time-clock,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .lb-home-fav-time-clock *,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .home-fav-time-planned,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .home-fav-time-planned *,
#home #homeFavSlot .home-fav-time-part.is-canceled .home-fav-time-planned {
  color: #ff667d !important;
  -webkit-text-fill-color: #ff667d !important;
  text-shadow: 0 0 7px rgba(255, 60, 88, .25) !important;
  opacity: 1 !important;
}

html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .lb-home-fav-time-clock,
html[data-lb-v4-live="1"] body.lb-v3 #home #homeFavSlot .home-fav-row.is-cancelled .home-fav-time-planned,
#home #homeFavSlot .home-fav-time-part.is-canceled .home-fav-time-planned {
  text-decoration-line: line-through !important;
  text-decoration-color: #ff304f !important;
  text-decoration-thickness: 2px !important;
}

/* Suppression partielle = perturbation majeure : rouge partout.
   On ne touche pas à la logique ni aux horaires recalculés : seul le code couleur
   de l'état "partiel" rejoint la famille rouge des suppressions. */
html[data-lb-v4-live="1"] {
  --lb4-state-partial: var(--lb4-state-cancel, #ff5967) !important;
}

/* Info trafic : compteur + badge d'un train partiellement supprimé. */
.lb-traffic-metric.is-partial {
  border-color: rgba(255, 78, 92, .40) !important;
}
.lb-traffic-metric.is-partial strong {
  color: #ff7782 !important;
}
.lb-traffic-train-state.is-partial {
  color: #ff919a !important;
  border-color: rgba(255, 78, 92, .42) !important;
  background: rgba(83, 14, 24, .42) !important;
}

/* LIVE voyageurs : suppression partielle = même niveau visuel rouge qu'une suppression. */
.lb-live-status--partial {
  color: #ff4d6d !important;
  background: rgba(255, 77, 109, .12) !important;
  border-color: rgba(255, 77, 109, .42) !important;
}
.lb-live-card--partial {
  border-color: rgba(255, 77, 109, .85) !important;
  background: linear-gradient(180deg, rgba(34, 14, 20, .76), rgba(20, 10, 14, .92)) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.22), 0 0 14px rgba(255,77,109,.24) !important;
}
.lb-live-card--partial .lb-live-train {
  color: #ff4d6d !important;
  text-shadow: 0 0 8px rgba(255,77,109,.35) !important;
}
.lb-live-card--partial .lb-live-sncf-cause {
  border-color: rgba(255,77,109,.52) !important;
  background: rgba(110,20,42,.34) !important;
  color: #ff9fb3 !important;
}
html[data-lb-v4-live="1"] #lbLiveModal .lb-live-card--partial {
  --lb-live-accent: #ff5967 !important;
  border-color: rgba(255,89,103,.31) !important;
  background: linear-gradient(145deg, rgba(43,19,26,.34), rgba(3,16,26,.88)) !important;
}

/* Favoris / historique : le repère partiel ne doit plus être jaune. */
#favTrainsWidget .fav-summary-run.is-partial {
  background: #dc3545 !important;
}
html[data-lb-v4-live="1"] #favTrainsWidget .fav-card.lb4-favorite-sheet[data-lb4-state="partial"] {
  --lb4-fav-state: var(--lb4-state-cancel, #ff5967) !important;
}

/* Fiche train : état, bandeau et historique partiels passent en rouge.
   Les nouveaux horaires restent bleus conformément au langage visuel du site. */
.lb-train-profile__status.is-partial {
  color: #ff5364 !important;
}
.lb-train-profile__disruption.is-partial {
  border-color: rgba(255,83,100,.62) !important;
  background: rgba(255,83,100,.08) !important;
  color: #ff7382 !important;
}
.lb-train-profile__run.is-partial {
  background: linear-gradient(180deg,#ff8091,#ff2948) !important;
  border-color: rgba(255,128,145,.65) !important;
  box-shadow: 0 0 5px rgba(255,41,72,.34) !important;
}
#trainInfo .partial-service-label--terminus,
#trainInfo .partial-service-label--start {
  color: #ff667d !important;
}

/* Statistiques : "partiel" reste distinguable du supprimé, mais dans la famille rouge. */
.stats-status-partial {
  color: #ff7584 !important;
  text-shadow: 0 0 8px rgba(255,83,100,.38) !important;
}
.stats-v2 {
  --sv2-partial: #ff7584 !important;
}

/* Voix du Bétail : couleur du pseudo déterminée par le niveau communautaire. */
.lb-pseudo-trigger.lb-pseudo-grade {
  font-weight: 800 !important;
  border-bottom-color: currentColor !important;
  text-shadow: none !important;
}

.lb-pseudo-grade-0 { color: #ff7185 !important; } /* Porc en déroute */
.lb-pseudo-grade-1 { color: #a9bcc7 !important; } /* Mouton égaré */
.lb-pseudo-grade-2 { color: #7edff2 !important; } /* Poulette du quai */
.lb-pseudo-grade-3 { color: #55d9bc !important; } /* Porc entassé */
.lb-pseudo-grade-4 { color: #78e692 !important; } /* Bélier du sas */
.lb-pseudo-grade-5 { color: #b99cff !important; } /* Architecte Chèvre */
.lb-pseudo-grade-6 { color: #ffad66 !important; } /* Ministre dindon */
.lb-pseudo-grade-7 {
  color: #ffd45c !important;
  text-shadow: 0 0 8px rgba(255, 205, 72, .26) !important;
} /* Golden Vache */

.lb-pseudo-tooltip .lb-pseudo-grade {
  display: block;
  margin-bottom: 3px;
}

/* Moorail n'appartient pas à l'en-tête La Bétaillère.
   Sécurité anti-cache : masque aussi une ancienne injection JS encore en mémoire. */
#lb-moorail-header-brand,
.top-bar__moorail {
  display: none !important;
}
