@import url('./lb-modal-close-unified-v1.css?v=1');

/* La Bétaillère — donuts de ponctualité interactifs v1
 * Aucun appel réseau ici : l'interaction est visuelle, les détails sont chargés au clic.
 */

/* Donuts SVG natifs #BER — vrais anneaux, légers et espacés */
html[data-lb-v4-live="1"] body.lb-v3 #home #homePunctualityChartHost.home-punct-chart-host,
body.lb-v3 #home #homePunctualityChartHost.home-punct-chart-host {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  height: 80px !important;
  min-height: 80px !important;
  max-height: 80px !important;
  padding: 0 3px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

html[data-lb-v4-live="1"] body.lb-v3 #home .home-punct-chart-wrap,
body.lb-v3 #home .home-punct-chart-wrap {
  position: relative !important;
  display: flex !important;
  flex: 0 0 50px !important;
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

#home .home-punct-chart-wrap.lb-punct-interactive {
  cursor: pointer !important;
  border-radius: 12px;
  outline: none;
  transition:
    transform .16s ease,
    background .16s ease,
    box-shadow .16s ease;
  -webkit-tap-highlight-color: transparent;
}

#home .home-punct-svg-ring {
  --lb-home-punct-color: #668b95;
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 50px !important;
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at center, rgba(3,18,28,.98) 0 53%, rgba(3,18,28,.72) 54% 60%, transparent 61%) !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.28));
  transition: filter .16s ease, transform .16s ease !important;
  contain: layout paint style;
  overflow: visible !important;
}

#home .home-punct-svg {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 50px !important;
  height: 50px !important;
  overflow: visible !important;
  pointer-events: none !important;
}

#home .home-punct-svg-track,
#home .home-punct-svg-progress {
  fill: none !important;
  vector-effect: non-scaling-stroke;
}

#home .home-punct-svg-track {
  stroke: rgba(123, 173, 184, .22) !important;
  stroke-width: 7.2 !important;
}

#home .home-punct-svg-progress {
  stroke: var(--lb-home-punct-color, #668b95);
  stroke-width: 7.2 !important;
  stroke-linecap: round !important;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transform: rotate(-90deg);
  transform-origin: 36px 36px;
  transition: stroke-dashoffset .72s cubic-bezier(.2,.75,.25,1), stroke .25s ease !important;
  filter: drop-shadow(0 0 2.5px color-mix(in srgb, var(--lb-home-punct-color, #668b95) 42%, transparent));
}

#home .home-punct-svg-value {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #f3fdff !important;
  font-family: "Orbitron", system-ui, sans-serif !important;
  font-size: 9.8px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -.02em !important;
  pointer-events: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.55) !important;
}

html[data-lb-v4-live="1"] body.lb-v3 #home .home-punct-mini-label,
body.lb-v3 #home .home-punct-mini-label {
  position: static !important;
  display: block !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #91b7c0 !important;
  font: 800 9px/1 "Rajdhani", system-ui, sans-serif !important;
  letter-spacing: .01em !important;
  text-align: center !important;
  transform: none !important;
}

#home .home-punct-chart-wrap.lb-punct-interactive:focus-visible {
  box-shadow: 0 0 0 2px rgba(80, 232, 244, .34);
  background: rgba(18, 107, 125, .10);
}

@media (hover:hover) and (pointer:fine) {
  #home .home-punct-chart-wrap.lb-punct-interactive:hover {
    transform: translateY(-1px) scale(1.035);
    background: rgba(18, 107, 125, .08);
  }

  #home .home-punct-chart-wrap.lb-punct-interactive:hover > .home-punct-svg-ring {
    filter:
      drop-shadow(0 3px 5px rgba(0,0,0,.34))
      drop-shadow(0 0 6px rgba(77, 229, 242, .20)) !important;
  }
}

#home .home-punct-chart-wrap.lb-punct-interactive:active {
  transform: scale(.98);
}

@media (min-width: 1025px) {
  body.lb-v3 #home #homePunctualityChartHost.home-punct-chart-host {
    gap: 18px !important;
    height: 96px !important;
    min-height: 96px !important;
    max-height: 96px !important;
  }

  body.lb-v3 #home .home-punct-chart-wrap {
    flex-basis: 62px !important;
    width: 62px !important;
    min-width: 62px !important;
    max-width: 62px !important;
    height: 88px !important;
    min-height: 88px !important;
    max-height: 88px !important;
  }

  body.lb-v3 #home .home-punct-svg-ring,
  body.lb-v3 #home .home-punct-svg {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    flex-basis: 60px !important;
  }

  body.lb-v3 #home .home-punct-svg-value {
    font-size: 11.5px !important;
  }

  body.lb-v3 #home .home-punct-mini-label {
    font-size: 10px !important;
  }
}

/* Overlay/modal cohérent #BER */
.lb-punct-detail-dialog {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(4, 12, 20, .78) !important;
  box-shadow: none !important;
  z-index: 6200 !important;
}

.lb-punct-detail-dialog[open] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.lb-punct-detail-dialog::backdrop {
  background: rgba(2, 8, 14, .72) !important;
}

.lb-punct-detail-sheet {
  position: relative;
  width: min(440px, calc(100vw - 40px));
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  margin: 0 auto;
  padding: 14px;
  overflow: auto;
  box-sizing: border-box;
  color: #eefcff;
  border: 1px solid rgba(0, 240, 255, .44);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(12, 56, 72, .55), transparent 42%),
    linear-gradient(155deg, rgba(7, 31, 43, .98), rgba(2, 14, 23, .99));
  box-shadow:
    0 18px 40px rgba(0,0,0,.45),
    0 0 30px rgba(0,220,255,.16),
    inset 0 0 18px rgba(0,220,255,.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lb-punct-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lb-punct-detail-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.lb-punct-detail-heading h3 {
  margin: 0;
  color: #65eef8;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.12;
}

.lb-punct-detail-heading p {
  margin: 4px 0 0;
  color: #8fb8c0;
  font: 700 10.5px/1.15 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-detail-close.tron-close-button {
  --tron-close-size: 26px !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  flex: 0 0 26px !important;
  margin-left: auto !important;
  padding: 0 !important;
  border-radius: 999px !important;
}

.lb-punct-detail-hero {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 13px;
}

.lb-punct-detail-score {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(3, 19, 29, .98) 0 55%, transparent 56%),
    conic-gradient(var(--lb-punct-color, #39dfa1) var(--lb-punct-pct, 0%), rgba(83, 128, 139, .22) 0);
  box-shadow:
    inset 0 0 18px rgba(0,0,0,.22),
    0 0 16px color-mix(in srgb, var(--lb-punct-color, #39dfa1) 22%, transparent);
}

.lb-punct-detail-score strong {
  color: #f3feff;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.lb-punct-detail-summary {
  min-width: 0;
}

.lb-punct-detail-summary strong {
  display: block;
  color: #eefcff;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.12;
}

.lb-punct-detail-summary span {
  display: block;
  margin-top: 5px;
  color: #97bbc3;
  font: 700 11px/1.18 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-detail-delta {
  display: inline-flex !important;
  width: auto;
  margin-top: 7px !important;
  padding: 4px 7px;
  border: 1px solid rgba(100, 225, 239, .22);
  border-radius: 999px;
  background: rgba(7, 39, 50, .72);
  color: #cbf8fb !important;
  font-size: 10px !important;
  line-height: 1 !important;
}

.lb-punct-detail-mode {
  margin-top: 11px;
  padding: 7px 9px;
  border: 1px solid rgba(97, 224, 237, .14);
  border-radius: 10px;
  background: rgba(4, 24, 36, .54);
  color: #b9d9df;
  font: 750 10.5px/1.15 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-detail-mode[hidden] {
  display: none !important;
}

.lb-punct-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 6px;
  margin-top: 10px;
}

.lb-punct-detail-stat {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(91, 221, 234, .14);
  border-radius: 10px;
  background: rgba(3, 22, 33, .58);
  transition: border-color .14s ease, background .14s ease;
}

.lb-punct-detail-stat.is-selected {
  border-color: rgba(95, 236, 247, .48);
  background: rgba(10, 60, 72, .45);
}

.lb-punct-detail-stat strong {
  display: block;
  color: #f3feff;
  font-family: "Orbitron", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
}

.lb-punct-detail-stat span {
  display: block;
  margin-top: 4px;
  color: #9dbfc6;
  font: 700 10px/1.08 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-trend {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(87, 217, 231, .11);
}

.lb-punct-trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #bedde2;
  font: 800 10.5px/1 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-trend-head small {
  color: #6f9da7;
  font-size: 9px;
  font-weight: 700;
}

.lb-punct-trend-svg {
  display: block;
  width: 100%;
  height: 72px;
  margin-top: 5px;
  overflow: visible;
}

.lb-punct-trend-svg .lb-punct-grid {
  stroke: rgba(111, 194, 207, .12);
  stroke-width: 1;
}

.lb-punct-trend-svg .lb-punct-line {
  fill: none;
  stroke: #68e9f4;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-punct-trend-svg .lb-punct-point {
  fill: #071c26;
  stroke: #68e9f4;
  stroke-width: 1.6;
}

.lb-punct-trend-svg text {
  fill: #779ca5;
  font: 700 8px/1 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-detail-loading,
.lb-punct-detail-error {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: center;
  font: 700 10.5px/1.2 "Rajdhani", system-ui, sans-serif;
}

.lb-punct-detail-loading {
  color: #a9d6dc;
  background: rgba(4, 27, 39, .56);
}

.lb-punct-detail-error {
  color: #ffd2d7;
  border: 1px solid rgba(255, 100, 119, .22);
  background: rgba(76, 19, 29, .32);
}

@media (max-width: 600px) {
  .lb-punct-detail-dialog,
  .lb-punct-detail-dialog[open] {
    padding: 12px !important;
  }

  .lb-punct-detail-sheet {
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--top-bar-height, 64px) - var(--bottom-bar-height, 84px) - 24px);
    padding: 12px 12px 10px;
    border-radius: 16px;
  }

  .lb-punct-detail-heading h3 {
    font-size: 13.5px;
  }

  .lb-punct-detail-hero {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
  }

  .lb-punct-detail-score {
    width: 80px;
    height: 80px;
  }

  .lb-punct-detail-score strong {
    font-size: 18px;
  }

  .lb-punct-detail-summary strong {
    font-size: 12.5px;
  }

  .lb-punct-detail-stats {
    gap: 5px;
    margin-top: 8px;
  }

  .lb-punct-detail-stat {
    padding: 7px 8px;
  }

  .lb-punct-detail-stat strong {
    font-size: 13px;
  }

  .lb-punct-trend-svg {
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #home .home-punct-chart-wrap.lb-punct-interactive,
  #home .home-punct-chart-wrap.lb-punct-interactive > .home-punct-svg-ring,
  #home .home-punct-svg-progress {
    transition: none !important;
  }
}

