/* ===== Pastille alcoolémie dans la navbar =====
   Positionnée en absolu à 22 % du viewport, au milieu de l'espace entre la
   fin du logo (~10 %) et le calendrier centré (50 %). Le calendrier reste
   centré sur la page. */
.bac-pill-slot {
  position: absolute;
  left: 25%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}
.bac-pill-slot > * { pointer-events: auto; }

.bac-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.bac-pill:hover {
  background: var(--bg-elevated);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}
.bac-pill-icon { font-size: 1rem; line-height: 1; }
.bac-pill-label,
.bac-pill-value { letter-spacing: -0.01em; }
.bac-pill-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid currentColor;
  opacity: 0.85;
}

/* === Couleurs par niveau (pastille) === */
.bac-pill.bac-no-profile {
  background: transparent;
  color: var(--text-muted);
  border-style: dashed;
  font-family: var(--font-sans);
}
.bac-pill.bac-no-profile:hover { color: var(--text-primary); }

.bac-pill.bac-sober {
  color: var(--dry-color);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.10);
}

.bac-pill.bac-safe {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.10);
}

.bac-pill.bac-contravention {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.55);
  background: rgba(251, 113, 133, 0.12);
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.20);
}

.bac-pill.bac-delict {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.30);
  animation: bac-pulse 2.4s ease-in-out infinite;
}

.bac-pill.bac-critical {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.85);
  background: linear-gradient(135deg, rgba(120, 0, 0, 0.45), rgba(220, 38, 38, 0.25));
  box-shadow: 0 0 22px rgba(220, 38, 38, 0.45);
  animation: bac-pulse 1.6s ease-in-out infinite;
}

@keyframes bac-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

@media (max-width: 600px) {
  .bac-pill .bac-pill-icon { display: none; }
  .bac-pill { padding: 4px 10px; font-size: 0.78rem; }
}

/* Mobile : la navbar-center est cachée → la pastille aussi (sera réintégrée
   plus tard dans une mobile-row dédiée si besoin) */
@media (max-width: 900px) {
  .bac-pill-slot { display: none; }
}

/* ===== Modal de détails (au click sur la pastille) ===== */
.bac-modal {
  text-align: center;
  padding: var(--sp-md) var(--sp-sm) 0;
}

.bac-modal-icon {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: var(--sp-md);
}

.bac-modal-bac {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}

.bac-modal-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--sp-lg);
}

.bac-modal-body {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
  text-align: left;
  margin-bottom: var(--sp-lg);
  padding: var(--sp-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.bac-modal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.bac-modal-delays {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-md);
}
.bac-delay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.bac-delay-label {
  font-size: 0.84rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.bac-delay-values {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.bac-delay-value {
  font-family: var(--font-mono);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
}
.bac-delay-target {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.bac-modal-disclaimer {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
  text-align: center;
}

/* Couleurs spécifiques modal selon niveau */
.bac-modal.bac-sober .bac-modal-bac,
.bac-modal.bac-sober .bac-modal-title { color: var(--dry-color); }
.bac-modal.bac-sober .bac-modal-body { border-color: rgba(52, 211, 153, 0.3); }

.bac-modal.bac-safe .bac-modal-bac,
.bac-modal.bac-safe .bac-modal-title { color: #fbbf24; }

.bac-modal.bac-contravention .bac-modal-bac,
.bac-modal.bac-contravention .bac-modal-title { color: #fb7185; }
.bac-modal.bac-contravention .bac-modal-body { border-color: rgba(251, 113, 133, 0.3); }

.bac-modal.bac-delict .bac-modal-bac,
.bac-modal.bac-delict .bac-modal-title { color: #f87171; }
.bac-modal.bac-delict .bac-modal-body { border-color: rgba(239, 68, 68, 0.4); }

.bac-modal.bac-critical .bac-modal-bac,
.bac-modal.bac-critical .bac-modal-title { color: #fca5a5; }
.bac-modal.bac-critical .bac-modal-body {
  border-color: rgba(220, 38, 38, 0.5);
  background: rgba(120, 0, 0, 0.18);
}
