/* TrackFlow — charte : #FFF4E8, #000000, #FF7A00 ; surfaces adoucies (moins de blanc pur) */
:root {
  --tf-cream: #fff4e8;
  --tf-black: #000000;
  --tf-white: #ffffff;
  --tf-orange: #ff7a00;
  --tf-bg: #ffefe4;
  --tf-surface: #f4e9df;
  --tf-elevated: #ebe0d6;
  --tf-border: rgba(0, 0, 0, 0.12);
  --tf-text: var(--tf-black);
  --tf-muted: #4a4a4a;
  --tf-accent: var(--tf-orange);
  --tf-accent-soft: rgba(255, 122, 0, 0.22);
  --tf-success: #15803d;
  --tf-warning: #b45309;
  --tf-danger: #b91c1c;
  --tf-radius: 12px;
  --tf-font: "Plus Jakarta Sans", system-ui, sans-serif;
}

html,
body {
  min-height: 100%;
  background: var(--tf-bg);
  color: var(--tf-text);
  font-family: var(--tf-font);
}

.tf-page {
  background: var(--tf-bg);
}

.tf-card {
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.05);
}

.tf-card-header {
  border-bottom: 1px solid var(--tf-border);
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.35);
}

.tf-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tf-black);
}
.tf-brand em {
  font-style: normal;
  color: var(--tf-accent);
}

.btn-tf-primary {
  background: var(--tf-orange);
  border: none;
  color: var(--tf-white);
  font-weight: 600;
}
.btn-tf-primary:hover {
  filter: brightness(0.95);
  color: var(--tf-white);
}

.tf-text-accent {
  color: var(--tf-orange) !important;
}

.tf-badge-session {
  background: var(--tf-white) !important;
  color: var(--tf-black) !important;
  border: 1px solid var(--tf-black) !important;
}

.tf-statut-panel {
  background: var(--tf-cream);
  border: 1px solid var(--tf-border);
}

.tf-statut-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: space-between;
}

.tf-statut-step {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease, opacity 0.2s ease;
  color: var(--tf-black);
}

.tf-statut-step--done {
  opacity: 0.9;
  color: var(--tf-muted);
}

.tf-statut-step--current {
  opacity: 1;
  font-weight: 700;
  color: var(--tf-orange);
}

.tf-progress--statut {
  height: 10px;
}

.tf-progress-bar--accent {
  background: linear-gradient(90deg, #ff9a3c, var(--tf-orange));
}

.badge-sev1 {
  background: #ffe4e4;
  color: var(--tf-black);
}
.badge-sev2 {
  background: #fff0d6;
  color: var(--tf-black);
}
.badge-sev3 {
  background: #e8e8e8;
  color: var(--tf-black);
}

.tf-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.tf-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--tf-orange);
  transition: width 0.45s ease;
}

.tf-kpi-tile {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  padding: 1rem 1.1rem;
}

.tf-toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 1080;
}

.tf-workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}
.tf-workflow-step {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--tf-border);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.85rem;
}
.tf-workflow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tf-muted);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--tf-border);
  color: var(--tf-text);
}
.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--tf-orange);
  color: var(--tf-text);
  box-shadow: 0 0 0 0.2rem var(--tf-accent-soft);
}

.tf-table {
  --bs-table-bg: var(--tf-surface);
  --bs-table-color: var(--tf-black);
  --bs-table-border-color: var(--tf-border);
  --bs-table-hover-bg: rgba(255, 122, 0, 0.08);
}

.text-muted {
  color: var(--tf-muted) !important;
}

.tf-nav--client {
  border-bottom: 3px solid var(--tf-orange) !important;
}

.tf-nav--staff {
  border-bottom: 3px solid var(--tf-orange) !important;
}

.tf-navbar-dark {
  background: var(--tf-black) !important;
  color: var(--tf-white) !important;
}
.tf-navbar-dark .navbar-brand,
.tf-navbar-dark .nav-link,
.tf-navbar-dark .text-muted {
  color: var(--tf-white) !important;
}
.tf-navbar-dark .navbar-brand.tf-brand em {
  color: var(--tf-orange) !important;
}
.tf-navbar-dark .text-muted {
  opacity: 0.85;
}

.tf-modal {
  background: var(--tf-surface);
  color: var(--tf-black);
  border: 1px solid var(--tf-border);
}

.tf-thread-scroll {
  max-height: 220px;
  overflow: auto;
  background: var(--tf-elevated);
  border: 1px solid var(--tf-border) !important;
}
.tf-thread-item {
  border-bottom: 1px solid var(--tf-border);
  padding: 0.5rem 0;
}
.tf-thread-item:last-child {
  border-bottom: none;
}
.tf-badge-interne {
  font-size: 0.65rem;
  background: var(--tf-black);
  color: var(--tf-white);
}
.tf-modal .modal-header,
.tf-modal .modal-footer {
  border-color: var(--tf-border) !important;
}
.tf-modal .btn-close {
  filter: none;
}

.tf-login-nav .nav-link {
  color: var(--tf-black);
  border: 1px solid var(--tf-border);
}
.tf-login-nav .nav-link.active {
  background: var(--tf-orange);
  color: var(--tf-white);
  border-color: var(--tf-orange);
}

.tf-hint-accent {
  color: var(--tf-orange) !important;
}

.tf-pill-accent {
  background: rgba(255, 122, 0, 0.12);
  color: var(--tf-black);
  border: 1px solid var(--tf-orange);
}

.tf-link {
  color: var(--tf-black);
  text-decoration: underline;
  text-decoration-color: var(--tf-orange);
}
.tf-link:hover {
  color: var(--tf-orange);
}

.tf-step-row {
  border-color: var(--tf-border) !important;
  background: rgba(255, 255, 255, 0.5);
}

/* Notifications (cloche + panneau) */
.tf-notify {
  position: relative;
}
.tf-notify-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  width: min(360px, 92vw);
  max-height: 380px;
  z-index: 1060;
  overflow: hidden;
  flex-direction: column;
  background: var(--tf-surface);
}
.tf-notify--open .tf-notify-panel {
  display: flex;
}
.tf-notify-list {
  overflow-y: auto;
  max-height: 300px;
}
.tf-notify-counter {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 4px;
  font-size: 0.65rem;
  line-height: 1.15rem;
  text-align: center;
  border-radius: 999px;
  background: var(--tf-danger);
  color: #fff;
  font-weight: 700;
}
.tf-notify-item {
  cursor: pointer;
  background: transparent;
  color: var(--tf-text);
  border-bottom: 1px solid var(--tf-border) !important;
}
.tf-notify-item:last-child {
  border-bottom: none !important;
}
.tf-notify-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
.tf-notify-item--unread {
  background: rgba(255, 122, 0, 0.14);
}
.tf-notify-type {
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--tf-accent-soft);
  color: var(--tf-black);
  border: 1px solid var(--tf-border);
}
.tf-notify-msg {
  font-size: 0.8125rem;
  line-height: 1.35;
}
