:root {
  color-scheme: light;

  /* Neutres - typographie & surfaces */
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --soft: #f1f5f9;
  --softer: #f8fafc;

  /* Marque - bleu marine industriel */
  --nav: #0a1929;
  --nav-hover: #132f4c;
  --nav-line: rgba(255, 255, 255, 0.08);
  --primary: #1e3a5f;
  --primary-hover: #16314f;
  --blue: #1e3a5f;

  /* Accent - ambre industriel */
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-soft: #fed7aa;
  --accent-bg: #fff7ed;
  --teal: #c2410c;

  /* Status */
  --green: #15803d;
  --green-bg: #dcfce7;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --red: #b91c1c;
  --red-bg: #fee2e2;
  --info: #1d4ed8;
  --info-bg: #dbeafe;

  /* Effets */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --radius-lg: 12px;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

.api-sync-banner {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  color: #9f1239;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
}

.api-sync-banner.hidden {
  display: none;
}

.api-sync-banner .api-sync-inner strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.api-sync-banner .api-sync-inner p {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.85rem;
  white-space: pre-wrap;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Évite le micro-saut au clic (hover qui enlève translate / ombre qui bouge) */
button:active:not(:disabled),
.primary-button:active:not(:disabled),
.ghost-button:active:not(:disabled),
.danger-button:active:not(:disabled),
.fleet-btn:active:not(:disabled),
.nav-item:active,
.fleet-tab:active,
.hub-card-btn:active,
.hub-logout:active,
.logout-btn:active {
  transform: none;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--nav);
  color: #fff;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--nav-line);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 6px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  margin-top: 2px;
}

.sidebar-foot span,
.sidebar-foot small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.sidebar-foot small {
  display: block;
  margin-top: 10px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow-y: auto;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  padding: 0 14px 6px;
}

.nav-item {
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  padding: 9px 14px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

.nav-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item.intranet-nav:not(.active)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(194, 65, 12, 0.5);
  border-radius: 2px;
}

.finance-subnav {
  margin: 0 0 18px;
}

.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 18px;
}

.sidebar-currency-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.sidebar-currency-label > .field-label-with-help {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-currency-label select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 13px;
}

/* Section nav Administration */
.nav-section-admin .nav-section-title {
  color: var(--accent-soft);
}

/* Page admin users : badges niveau + tag "vous" */
.users-manage-list .user-level-platform_owner {
  background: var(--accent-bg);
  color: var(--accent-hover);
  border: 1px solid var(--accent-soft);
}

.users-manage-list .user-level-company_admin {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}

.users-manage-list .user-level-operator {
  background: var(--soft);
  color: var(--muted-strong);
  border: 1px solid var(--line-strong);
}

.user-profiles-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}

.user-profiles-field legend {
  padding: 0 4px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.user-profiles-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 2px;
}

.user-profile-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.user-profile-option input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--primary);
}

.user-profile-option > span {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.user-profile-option strong,
.user-profile-option small {
  display: block;
  overflow-wrap: anywhere;
}

.user-profile-option small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.user-self-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  font-style: italic;
  margin-left: 4px;
}

/* Vue Profil utilisateur */
.profile-page {
  display: grid;
  gap: 18px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid #d7e5f8;
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 0%, rgba(194, 65, 12, 0.14), transparent 28%),
    linear-gradient(135deg, #0a1929 0%, #1e3a5f 58%, #244767 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.profile-hero .eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-hero h2 {
  color: #fff;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 850;
  letter-spacing: -0.055em;
}

.profile-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.55;
}

.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.profile-hero-card strong,
.profile-hero-card span,
.profile-hero-card small {
  display: block;
}

.profile-hero-card strong {
  color: #fff;
  font-size: 19px;
  font-weight: 850;
}

.profile-hero-card span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.profile-hero-card small {
  margin-top: 8px;
  color: #fed7aa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.35fr);
  gap: 18px;
}

.profile-card {
  padding: 18px;
  border-radius: 18px;
}

.profile-card--permissions {
  grid-column: 1 / -1;
}

.profile-card .panel-head {
  margin-bottom: 14px;
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(135deg, #c2410c, #f97316);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 30px rgba(194, 65, 12, 0.24);
}

.profile-avatar--small {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 15px;
}

.profile-identity-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.profile-identity-head h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.1;
}

.profile-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-badge--level {
  background: var(--accent-bg);
  color: var(--accent-hover);
}

.profile-badge--success {
  background: #dcfce7;
  color: #15803d;
}

.profile-badge--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.profile-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.profile-detail-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.profile-detail-list div:last-child {
  border-bottom: 0;
}

.profile-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.profile-detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.profile-spaces {
  display: grid;
  gap: 10px;
}

.profile-space-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.profile-space-card.is-open {
  border-color: #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 82%);
}

.profile-space-card.is-closed {
  opacity: 0.72;
}

.profile-space-code {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--nav);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.profile-space-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.profile-space-card p {
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.profile-space-link,
.profile-space-denied,
.profile-access-request {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.profile-space-link {
  background: var(--primary);
  color: #fff;
}

.profile-space-denied {
  background: #fee2e2;
  color: #991b1b;
}

.profile-note {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e40af;
}

.profile-note strong {
  color: inherit;
}

.profile-note span {
  font-size: 13px;
  line-height: 1.45;
}

.profile-note--owner {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.profile-note--admin {
  margin-bottom: 14px;
}

.profile-role-list {
  display: grid;
  gap: 10px;
}

.profile-role-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--softer);
}

.profile-role-card strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.profile-role-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.profile-role-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.profile-role-meta > span:not(.profile-badge) {
  color: var(--ink);
  font-weight: 800;
}

.profile-password-form {
  display: grid;
  gap: 12px;
}

.profile-password-form label {
  display: grid;
  gap: 7px;
}

.profile-password-form label > span {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.profile-password-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}

.profile-password-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(30, 58, 95, 0.13);
}

.profile-password-form .primary-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.profile-password-strength.is-success {
  color: #15803d;
}

.profile-password-strength.is-warning {
  color: #b45309;
}

.profile-password-strength.is-error,
.profile-form-message.is-error {
  color: #b91c1c;
}

.profile-form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.profile-form-message.is-success {
  color: #15803d;
}

.profile-permission-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
}

.profile-permission-summary strong {
  font-size: 20px;
  line-height: 1;
}

.profile-permission-summary span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.profile-permission-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.profile-permission-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.profile-permission-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.profile-permission-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.profile-permission-head strong {
  color: var(--primary);
  font-size: 13px;
  white-space: nowrap;
}

.profile-permission-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-permission-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.profile-permission-list li:last-child {
  border-bottom: 0;
}

.profile-permission-list li.is-missing {
  background: #fbfdff;
  color: var(--muted);
}

.profile-permission-mark {
  display: inline-flex;
  justify-content: center;
  min-width: 36px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.is-missing .profile-permission-mark {
  background: #f1f5f9;
  color: #64748b;
}

.profile-permission-label {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.is-missing .profile-permission-label {
  color: var(--muted);
}

.profile-access-request {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.logout-btn {
  margin-top: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #dbe4ec;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Page de connexion */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at top left, rgba(194, 65, 12, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(30, 58, 95, 0.15) 0%, transparent 60%),
    linear-gradient(135deg, #0a1929 0%, #132f4c 100%);
  padding: 24px;
  position: relative;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 38px 34px 28px;
  width: 100%;
  max-width: 380px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}

.auth-card h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.auth-card .auth-sub {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.auth-card label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink);
}

.auth-card label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

.auth-card button {
  width: 100%;
  background: var(--nav);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.15s ease;
}

.auth-card button:hover {
  background: var(--nav-hover);
}

.auth-card button:disabled {
  background: var(--muted);
  cursor: not-allowed;
}

.auth-error {
  background: var(--red-bg);
  border: 1px solid rgba(185, 28, 28, 0.25);
  color: var(--red);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* Bandeau d'information non-bloquant (ex. session expirée) */
.auth-notice {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-notice.hidden {
  display: none;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

main {
  padding: 26px 30px;
  overflow: hidden;
  background: var(--softer);
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

body.si-root .topbar .eyebrow {
  color: var(--muted-strong, #475569);
}

body.si-root .topbar #pageTitle {
  color: var(--ink, #0f172a);
}

.panel-head,
.dialog-head,
.dialog-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
  margin: 0 2px;
}

.ghost-button-sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12.5px;
  color: var(--muted-strong);
}

.panel-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  color: var(--muted-strong);
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 26px;
  font-weight: 700;
}

h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.primary-button {
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.primary-button:hover {
  background: var(--primary-hover);
}

.compact-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

.add-action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.add-action-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.ghost-button {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.ghost-button:hover {
  background: var(--soft);
  border-color: var(--muted);
}

.danger-button {
  color: #fff;
  background: var(--red);
}

.danger-button:hover {
  background: #991b1b;
}

.icon-button {
  width: 38px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--muted-strong);
}

.icon-button:hover {
  background: var(--soft);
  color: var(--ink);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 12px;
  margin: 22px 0 18px;
}

.metrics article,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.metrics article {
  padding: 16px 18px;
  position: relative;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.metrics article:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.metrics article.metric-link {
  cursor: pointer;
}

.metrics article.metric-link:focus-visible {
  outline: 3px solid rgba(18, 82, 142, 0.25);
  outline-offset: 3px;
}

.metrics article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  opacity: 0.7;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metrics .metric-breakdown {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 16px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 12px;
  font-size: 13.5px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12);
}

input::placeholder {
  color: #94a3b8;
}

textarea {
  resize: vertical;
}

select[multiple] {
  min-height: 132px;
}

select[multiple] option {
  padding: 5px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 16px;
}

.services-only {
  display: none;
}

.services-focus {
  grid-template-columns: minmax(0, 1fr);
}

.services-focus .services-only {
  display: block;
}

.services-focus .dashboard-only {
  display: none;
}

.service-guide-panel {
  border-left: 4px solid var(--primary);
}

.service-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.service-guide article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--softer);
  padding: 14px;
}

.service-guide strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 6px;
}

.service-guide span {
  display: block;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.intranet-page {
  max-width: 1100px;
  margin: 0 auto;
}

.intranet-hero {
  background: linear-gradient(135deg, #0a1929 0%, #132f4c 60%, #1e3a5f 100%);
  color: #f4f8fb;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.intranet-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 100%;
  background: radial-gradient(circle at right, rgba(194, 65, 12, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.intranet-hero .eyebrow {
  color: #fdba74;
}

.intranet-hero-title {
  font-size: 1.35rem;
  font-weight: 750;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.intranet-hero-lead {
  margin: 0;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(230, 240, 245, 0.92);
}

.intranet-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(160px, 220px);
  gap: 12px;
  margin-bottom: 1.25rem;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(20, 32, 45, 0.06);
}

.intranet-toolbar .search-field {
  min-width: 0;
}

.portals-by-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1rem 1.15rem;
  box-shadow: 0 4px 18px rgba(20, 32, 45, 0.05);
}

.portal-section-title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-strong);
}

.portal-section-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.portals-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, var(--surface) 100%);
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-card:hover {
  border-color: #c5d7e8;
  box-shadow: 0 10px 28px rgba(20, 32, 45, 0.08);
}

.portal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.portal-card-vendor {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--soft);
  padding: 4px 8px;
  border-radius: 6px;
}

.portal-card-edit {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.portal-card-edit:hover {
  border-color: #b8c6d4;
  background: var(--soft);
}

.portal-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.portal-card-login {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}

.portal-card-login-label {
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-right: 6px;
}

.portal-card-desc {
  margin: 0;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.portal-card-actions {
  margin-top: auto;
  padding-top: 4px;
}

.portal-card-actions .primary-button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* Vue presentation — outil et contact */
.about-page {
  max-width: 1120px;
  margin: 0 auto;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 20px;
  align-items: stretch;
  background: linear-gradient(135deg, #0a1929 0%, #122b46 55%, #1e3a5f 100%);
  color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.about-hero .eyebrow {
  color: #fdba74;
}

.about-hero h2 {
  max-width: 760px;
  margin: 0.35rem 0 0.9rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.about-hero p,
.about-panel p,
.about-grid p {
  margin: 0;
  color: rgba(241, 245, 249, 0.84);
  line-height: 1.6;
}

.about-contact-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.about-contact-card span,
.about-contact-card small {
  color: rgba(241, 245, 249, 0.78);
  line-height: 1.45;
}

.about-contact-card a {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.about-contact-card a:hover {
  text-decoration: underline;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.about-grid article,
.about-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.about-grid article {
  padding: 18px;
}

.about-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
}

.about-grid p,
.about-panel p {
  color: var(--muted-strong);
}

.about-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  margin-top: 18px;
  padding: 22px;
}

.about-panel h3 {
  margin: 0.25rem 0 0;
  font-size: 1.35rem;
  line-height: 1.25;
}

.about-flow {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.about-flow-eyebrow {
  color: var(--accent-hover);
  margin-bottom: 4px;
}

.about-flow-head h3 {
  margin: 6px 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.about-flow-intro {
  margin: 0;
  max-width: 52rem;
  line-height: 1.55;
  font-size: 14px;
}

.about-mermaid-wrap {
  margin-top: 18px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--softer);
  overflow-x: auto;
}

.about-mermaid {
  min-width: min(100%, 520px);
  margin: 0 auto;
}

.about-mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.about-mermaid-fallback {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--muted);
}

.about-flow-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.about-flow-legend article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--softer);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-strong);
}

.about-flow-legend strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.95rem;
}

.about-flow-legend ol,
.about-flow-legend ul {
  margin: 0;
  padding-left: 1.15rem;
}

.about-flow-legend li + li {
  margin-top: 6px;
}

.about-flow-legend p {
  margin: 0;
}

.about-flow-legend code {
  font-size: 0.85em;
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.panel {
  min-width: 0;
  padding: 18px 20px;
}

.panel.wide {
  grid-column: span 1;
}

/* Quand le panneau wide est seul dans sa section, qu'il prenne toute la largeur */
.content-grid > .panel.wide:only-child {
  grid-column: 1 / -1;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrap {
  overflow: auto;
  margin: 14px -20px -18px;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px 20px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13.5px;
}

thead th {
  border-top: 0;
  background: var(--softer);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 10px;
  padding-bottom: 10px;
}

tbody tr {
  transition: background 0.1s ease;
}

tbody tr:hover {
  background: var(--softer);
}

td strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

td span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.badge.active {
  color: var(--green);
  background: var(--green-bg);
  border-color: rgba(21, 128, 61, 0.2);
}

.badge.soon {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: rgba(180, 83, 9, 0.25);
}

.badge.expired {
  color: var(--red);
  background: var(--red-bg);
  border-color: rgba(185, 28, 28, 0.25);
}

.row-action {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-strong);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.15s ease;
}

.row-action:hover {
  background: var(--soft);
  border-color: var(--muted);
  color: var(--ink);
}

/* Le bouton Ouvrir n'apparait qu'au survol de la ligne pour alleger le visuel */
tbody tr .row-action {
  opacity: 0.35;
}

tbody tr:hover .row-action,
tbody tr:focus-within .row-action {
  opacity: 1;
}

/* Cellule expiration : pile date / sous-titre / tag de renouvellement */
.cell-sub {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.cell-renewal {
  display: inline-block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.cell-renewal-auto {
  color: var(--green);
  background: var(--green-bg);
  border-color: rgba(21, 128, 61, 0.18);
}

.cell-renewal-manual {
  color: var(--muted-strong);
  background: var(--soft);
  border-color: var(--line-strong);
}

.alert-list,
.expense-list,
.breakdown {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.alert-item,
.expense-item,
.bar-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface);
  transition: border-color 0.12s ease, background 0.12s ease;
  position: relative;
}

.alert-item:hover,
.expense-item:hover {
  border-color: var(--line-strong);
  background: var(--softer);
}

.alert-item {
  padding-left: 16px;
  border-left: 3px solid var(--amber);
}

.alert-item.critical {
  border-left-color: var(--red);
  background: linear-gradient(90deg, var(--red-bg) 0%, var(--surface) 30%);
}

.alert-item strong,
.expense-item strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 13.5px;
}

.alert-item span,
.expense-item span,
.bar-row span {
  color: var(--muted);
  font-size: 12.5px;
}

.bar-track {
  height: 8px;
  background: var(--soft);
  border-radius: 99px;
  margin-top: 9px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: inherit;
}

.hidden {
  display: none;
}

dialog {
  border: 0;
  border-radius: var(--radius-lg);
  width: min(840px, calc(100vw - 24px));
  padding: 0;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

dialog::backdrop {
  background: rgba(10, 25, 41, 0.55);
  backdrop-filter: blur(2px);
}

.dialog-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--softer);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dialog-head h2 {
  font-size: 17px;
  font-weight: 700;
}

label {
  overflow: visible;
}

dialog form {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 900px);
  padding: 0;
  overflow: hidden;
}

dialog form .dialog-head {
  flex-shrink: 0;
}

dialog form > .form-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px;
  margin: 0;
  row-gap: 16px;
  column-gap: 20px;
}

dialog form > .dialog-actions {
  flex-shrink: 0;
  margin-top: 0;
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  align-items: start;
}

.span-2 {
  grid-column: span 2;
}

.form-budget-panel {
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--softer) 0%, var(--surface) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.form-budget-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.form-budget-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-strong);
}

.form-budget-checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}

.form-budget-checkbox input {
  margin-top: 4px;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-budget-checkbox span {
  flex: 1;
  min-width: 0;
}

.form-field-micro-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

dialog form select[multiple] {
  width: 100%;
  max-height: 9.5rem;
  padding: 8px 10px;
  border-radius: 10px;
  line-height: 1.4;
  background: var(--surface);
}

.form-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.form-hint strong {
  color: var(--ink);
  font-weight: 650;
}

.password-criteria {
  list-style: none;
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  line-height: 1.45;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
}

.password-criteria--profile {
  grid-column: 1 / -1;
  margin-top: 0;
}

.password-criteria li {
  margin: 0;
  color: var(--muted);
}

.password-criteria li::before {
  content: "○ ";
  font-weight: 700;
}

.password-criteria li.is-met {
  color: #047857;
}

.password-criteria li.is-met::before {
  content: "✓ ";
  color: #047857;
}

.user-mobile-only-details {
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.user-mobile-only-details .form-hint + .form-hint {
  margin-top: 6px;
}

.user-mobile-only-details code {
  font-size: 0.92em;
}

.password-form-message {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.password-form-message.is-error {
  color: #991b1b;
}

.password-form-message.is-success {
  color: #047857;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 16px 22px 20px;
}

.dialog-actions > div {
  display: flex;
  gap: 10px;
}

.app-signature {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.app-signature strong {
  display: block;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 13px;
}

.app-signature span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.contracts-view-grid {
  grid-template-columns: minmax(0, 1fr);
}

.contracts-view-hint {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 4px;
}

.contracts-view-hint strong {
  color: var(--ink);
  font-weight: 650;
}

.contracts-by-type {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.reference-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: stretch;
}

.reference-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.reference-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--softer);
  border-bottom: 1px solid var(--line);
}

.reference-card-head span {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reference-card-head strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.reference-card-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reference-card-head .reference-add-button {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--primary);
  font-weight: 700;
}

.reference-card-head .reference-add-button:hover,
.reference-card-head .reference-add-button:focus {
  border-color: var(--primary);
  color: var(--primary-hover);
}

.reference-card-issues.is-clean .reference-card-head strong {
  color: var(--green);
}

.reference-card ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.reference-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.reference-card li:first-child {
  border-top: 0;
}

.reference-card li span {
  color: var(--ink);
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reference-card li strong {
  color: var(--muted-strong);
  font-size: 12px;
}

.reference-card li small {
  grid-column: 1 / -1;
  color: var(--muted);
  line-height: 1.4;
}

.reference-card-contracts .row-action {
  grid-column: 2;
  justify-self: end;
}

.reference-card-issues li {
  grid-template-columns: minmax(0, 1fr) auto;
}

/* Etat vide propre pour "Aucun point bloqueur" */
.reference-card-issues .reference-ok {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  color: var(--green);
  font-weight: 600;
}

.reference-card-issues .reference-ok-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  background: var(--green-bg);
  border: 1px solid rgba(21, 128, 61, 0.25);
  border-radius: 50%;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

/* Boutons "Modifier" / "Corriger" dans les cartes de la vue Contrats : plus discrets */
.reference-card .row-action {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
  min-height: 26px;
  padding: 0 8px;
}

.reference-card li:hover .row-action,
.reference-card .row-action:focus {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.reference-card-issues .row-action {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.reference-empty,
.reference-ok {
  display: block !important;
  color: var(--muted);
  font-style: italic;
}

.contract-type-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.contract-type-head {
  padding: 12px 16px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  font-weight: 750;
  font-size: 15px;
}

.contract-type-head span {
  display: block;
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.contract-sub {
  border-bottom: 1px solid var(--line);
}

.contract-sub:last-child {
  border-bottom: none;
}

.contract-sub-head {
  padding: 10px 16px;
  background: #fafcfd;
  border-bottom: 1px solid var(--line);
}

.contract-sub-head strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.contract-sub .table-wrap {
  margin: 0;
}

.contract-sub table {
  min-width: 640px;
}

.form-grid .inline-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}

.form-grid .inline-checkbox input {
  margin-top: 3px;
  flex-shrink: 0;
}

.asset-budget-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.contract-sub-head-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contract-invoice-meta {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
}

.contract-invoice-meta strong {
  color: var(--ink);
  font-weight: 650;
}

@media print {
  body {
    background: #fff;
  }

  .sidebar,
  .topbar-actions,
  .toolbar,
  dialog {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  main {
    padding: 0;
    overflow: visible;
  }

  .content-grid,
  .metrics {
    break-inside: avoid;
  }

  .panel,
  .metrics article {
    box-shadow: none;
  }

  .app-signature {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 8px;
    background: #fff;
  }
}

@media (max-width: 1100px) {
  .reference-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-guide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .reference-quality-grid {
    grid-template-columns: 1fr;
  }
}

/* auto-fit gere deja le responsive de la grille metrics */

@media (max-width: 719px) {
  body.si-root .sidebar nav.tagotac-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 14px 16px;
  }

  .brand {
    padding-bottom: 12px;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-section {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-section-title {
    display: none;
  }

  .sidebar-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    margin-top: 4px;
    padding-top: 12px;
  }

  .sidebar-foot span,
  .sidebar-foot strong {
    display: none;
  }

  .sidebar-foot .sidebar-currency-label .field-label-with-help {
    display: inline-flex !important;
  }

  .sidebar-foot small {
    margin-top: 0;
    font-size: 11px;
    line-height: 1.3;
  }

  .logout-btn {
    margin-top: 0;
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
  }

  .metrics,
  .toolbar,
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .suppliers-manage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .suppliers-manage-grid .sites-side-panel {
    position: static;
  }

  .about-hero,
  .about-panel {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .panel.wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  main {
    padding: 16px;
  }

  .topbar,
  .topbar-actions,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .toolbar,
  .content-grid,
  .form-grid,
  .about-grid,
  .about-flow-legend,
  .intranet-toolbar {
    grid-template-columns: 1fr;
  }

  .suppliers-hero {
    grid-template-columns: 1fr;
  }

  .suppliers-hero-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .ref-manage-row.vendor-row {
    flex-wrap: wrap;
  }

  .vendor-row-actions {
    justify-content: flex-start;
  }

  .about-hero {
    padding: 22px;
  }

  .profile-hero,
  .profile-card {
    border-radius: 16px;
    padding: 16px;
  }

  .profile-hero-card,
  .profile-identity-head,
  .profile-role-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .profile-detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-permission-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-access-request {
    grid-column: 2;
    justify-self: flex-start;
  }

  .span-2 {
    grid-column: span 1;
  }
}

/* Referentiels — page Fournisseurs & sites */
.panel-subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.suppliers-manage-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.suppliers-manage-grid .sites-side-panel {
  position: sticky;
  top: 18px;
}

.suppliers-page .panel.wide.suppliers-hero {
  margin-bottom: 16px;
  padding: 0;
  overflow: visible;
}

.suppliers-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.85fr);
  gap: 0;
  align-items: stretch;
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.suppliers-hero-copy {
  padding: 22px 24px 24px;
  background: linear-gradient(135deg, #0f2740 0%, #173d52 52%, var(--surface) 100%);
  color: #e8eef4;
  overflow: visible;
}

.suppliers-hero-eyebrow {
  color: #fbbf79;
}

.suppliers-hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.suppliers-hero-lead {
  margin: 0 0 14px;
  font-size: 0.96rem;
  line-height: 1.55;
  color: rgba(232, 238, 244, 0.92);
  max-width: 44rem;
}

.suppliers-hero-list {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(232, 238, 244, 0.88);
  font-size: 0.9rem;
  line-height: 1.5;
}

.suppliers-hero-list li + li {
  margin-top: 6px;
}

.suppliers-hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  overflow: visible;
}

.suppliers-hero-aside-lead {
  margin: 12px 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted-strong);
}

.suppliers-hero-steps {
  margin: 0;
  padding-left: 1.15rem;
  text-align: left;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted-strong);
  align-self: stretch;
}

.suppliers-hero-steps li + li {
  margin-top: 6px;
}

.vue360-logo {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--accent) 0%, #9a3412 100%);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  box-shadow:
    0 10px 28px rgba(194, 65, 12, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.vue360-logo--compact {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.15rem;
}

.help-bubble-wrap--on-hero {
  vertical-align: middle;
}

.help-bubble-wrap--on-hero .help-bubble-tip {
  z-index: 4000;
}

.vendor-row-clickable {
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background 0.12s ease;
}

.vendor-row-clickable:hover,
.vendor-row-clickable:focus-visible {
  outline: none;
  background: rgba(30, 58, 95, 0.06);
}

.ref-manage-row.vendor-row:has(.vendor-row-clickable:hover) {
  border-color: var(--accent-soft);
}

.reference-manage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.ref-manage-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.ref-manage-row.vendor-row {
  flex-wrap: nowrap;
}

.reference-manage-list--sites .ref-manage-row {
  align-items: stretch;
  flex-direction: column;
}

.reference-manage-list--sites .danger-text-button {
  align-self: flex-start;
}

.reference-manage-list--vendors .ref-manage-main {
  min-width: 0;
  flex: 1;
}

.ref-manage-main strong {
  display: block;
  font-size: 1rem;
}

.ref-manage-meta {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.ref-manage-empty {
  margin: 0;
  line-height: 1.5;
}

.field-hint {
  display: block;
  margin: 4px 0 6px;
  line-height: 1.45;
  font-weight: 500;
}

/* Aide contextuelle : bulle ? + infobulle */
.field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

label > .field-label-with-help {
  margin-bottom: 2px;
}

.help-bubble-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.help-bubble {
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.95);
  background: radial-gradient(circle at 30% 25%, #ffffff 0%, var(--softer) 45%, #e8eef4 100%);
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.help-bubble:hover,
.help-bubble:focus-visible {
  outline: none;
  background: var(--accent-bg);
  border-color: var(--accent);
  color: var(--accent-hover);
  box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.2);
}

.help-bubble-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(260px, calc(100vw - 48px));
  padding: 10px 12px;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 3000;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.help-bubble-tip--wide {
  width: min(320px, calc(100vw - 48px));
}

.help-bubble-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #0f172a;
}

.help-bubble-wrap:is(:hover, :focus-within) .help-bubble-tip {
  opacity: 1;
  visibility: visible;
}

.help-bubble-wrap--tip-below .help-bubble-tip {
  bottom: auto;
  top: calc(100% + 10px);
}

.help-bubble-wrap--tip-below .help-bubble-tip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #0f172a;
}

/* Variante pied de barre laterale (fond sombre) */
.help-bubble--on-dark {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.help-bubble--on-dark:hover,
.help-bubble--on-dark:focus-visible {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(253, 224, 71, 0.85);
  color: #fffbeb;
}

.help-bubble-wrap--on-dark .help-bubble-tip {
  bottom: calc(100% + 12px);
}

.danger-text-button:not(:disabled) {
  color: var(--red);
  border-color: #f0c4c4;
}

.danger-text-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.vendor-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.vendor-row-actions .danger-text-button {
  padding: 6px 10px;
}

.vendor-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.vendor-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.vendor-tag-category {
  color: var(--teal);
  background: rgba(14, 118, 109, 0.08);
  border-color: rgba(14, 118, 109, 0.25);
}

.vendor-tag-status {
  border-width: 0;
}

.vendor-status-active {
  color: #146c5a;
  background: #dff7f1;
}

.vendor-status-inactive {
  color: #6c1462;
  background: #f8e9f7;
}

.vendor-status-under_evaluation {
  color: #8c5a14;
  background: #fff4e6;
}

.ref-manage-contact {
  font-size: 13px;
  margin-top: 6px;
  color: var(--muted);
}

.vendor-contact-fieldset {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.form-grid-inline {
  gap: 10px !important;
}

.vendor360-dialog {
  width: min(96vw, 1080px);
  max-height: 92vh;
  border-radius: 12px;
  border: none;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
}

.vendor360-dialog[open] {
  display: flex;
}

.vendor360-dialog::backdrop {
  background: rgba(20, 32, 45, 0.45);
}

.vendor360-dialog > .dialog-head {
  padding: 16px 18px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  background: var(--surface);
  z-index: 2;
}

.dialog-head--vendor360 {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dialog-head--vendor360 .icon-button {
  margin-left: auto;
}

.vendor360-dialog-title {
  min-width: 0;
  flex: 1;
}

.vendor360-dialog-title h2 {
  margin: 2px 0 6px;
  line-height: 1.1;
}

.vendor360-dialog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.vendor360-head-muted {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.dialog-lead {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted-strong);
  font-weight: 500;
  max-width: 42rem;
}

.vendor360-quick-actions {
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-bg) 0%, var(--surface) 100%);
  flex: 0 0 auto;
  z-index: 1;
}

.vendor360-quick-lead {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-strong);
}

.vendor360-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
}

.vendor360-quick-buttons .primary-button {
  margin-left: auto;
}

@media (max-width: 640px) {
  .vendor360-quick-buttons .primary-button {
    margin-left: 0;
    width: 100%;
  }

  .vendor360-quick-buttons .ghost-button {
    flex: 1 1 auto;
  }
}

.vendor360-dialog .dialog-actions {
  padding: 12px 18px;
  margin: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  flex: 0 0 auto;
  background: var(--surface);
  z-index: 2;
}

.vendor360-body {
  padding: 16px 18px;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.vendor360-loading {
  margin: 0;
}

.vendor360-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  align-items: start;
}

.vendor360-coords-panel {
  position: sticky;
  top: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.vendor360-coords-panel .eyebrow {
  margin-top: 0;
}

.vendor360-coords-panel p {
  margin: 0 0 0.75rem;
}

.vendor360-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.vendor360-contact-block,
.vendor360-notes {
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.vendor360-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin-bottom: 16px;
  overflow: visible;
}

.vendor360-kpis article {
  position: relative;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: visible;
}

.vendor360-kpi-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  max-width: 100%;
}

.vendor360-kpis article > span:not(.vendor360-kpi-label) {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.vendor360-kpis article strong {
  display: block;
  font-size: 1.2rem;
  margin: 6px 0;
}

.vendor360-kpis article small {
  color: var(--muted);
}

.vendor360-kpis .help-bubble-tip,
.vendor360-layout .help-bubble-tip {
  z-index: 5000;
}

.vendor360-details {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.vendor360-details summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 12px;
  list-style-position: outside;
}

.vendor360-details summary:hover {
  background: var(--soft);
}

.vendor360-details .vendor360-mini-table {
  margin: 0;
  padding: 0 8px 8px;
}

.vendor360-mini-table table {
  font-size: 13px;
}

@media (max-width: 760px) {
  .vendor360-layout {
    grid-template-columns: 1fr;
  }

  .vendor360-coords-panel {
    position: static;
  }
}

/* Mise en avant Vue 360 fournisseur */
.nav-item.nav-item-highlight {
  padding-bottom: 8px;
}

.nav-item.nav-item-highlight:not(.active) {
  background: rgba(255, 255, 255, 0.03);
}

.nav-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.nav-item-text {
  flex: 1;
  text-align: left;
}

.nav-pill {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.22);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.nav-item-highlight.active .nav-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fef3c7;
  border-color: rgba(255, 255, 255, 0.25);
}

.nav-item-sub {
  display: block;
  width: 100%;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.metrics article.metric-highlight-360 {
  background: linear-gradient(145deg, var(--accent-bg) 0%, var(--surface) 55%);
  border-color: var(--accent-soft);
}

.metrics article.metric-highlight-360::before {
  opacity: 1;
  width: 4px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
}

.metrics article.metric-highlight-360 strong {
  color: var(--accent-hover);
}

.suppliers-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Securite : #suppliersView n'a plus la classe suppliers-page sur <section> (evite conflit avec .hidden) */
.suppliers-page.hidden,
#suppliersView.hidden {
  display: none;
}

.vendor-row-actions .vue360-btn {
  flex-shrink: 0;
}

/* ============================================================
   Sélecteur d'utilisateur pour la vue admin "Mes permissions"
   ============================================================ */
.profile-permissions-user-selector {
  min-width: 240px;
}
.profile-permissions-user-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d6d8e3;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #1a1f3a;
  cursor: pointer;
}
.profile-permissions-user-select:focus {
  outline: none;
  border-color: #c85b36;
  box-shadow: 0 0 0 3px rgba(200, 91, 54, 0.15);
}

/* ============================================================
   Utilitaires UI (kickers, icônes Lucide)
   ============================================================ */
.ui-kicker,
.voyage-card-kicker.ui-kicker {
  margin: 0 0 6px;
  color: var(--muted, #64748b);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lucide-icon {
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* ============================================================
   Page Support & contact
   ============================================================ */
.support-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 0;
}

/* Hero */
.support-hero {
  background: linear-gradient(135deg, #1a1f3a 0%, #2a3559 100%);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 36px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: center;
}
.support-hero__main { min-width: 0; }
.support-hero__eyebrow {
  color: #c85b36;
}
.support-hero__eyebrow.ui-kicker {
  margin-bottom: 10px;
}
.support-hero__title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.support-hero__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
}
.support-hero__card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  backdrop-filter: blur(4px);
}
.support-hero__card-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 8px;
}
.support-hero__card-email {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  margin-bottom: 10px;
  word-break: break-all;
}
.support-hero__card-email:hover { color: #c85b36 !important; }
.support-hero__card-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

/* Section titles */
.support-section-title {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
  color: #1a1f3a;
  display: flex;
  align-items: center;
  gap: 12px;
}
.support-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #ececf2 0%, transparent 100%);
}

/* Canaux de contact (grille 4) */
.support-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.support-channel {
  background: #fff;
  border: 1px solid #ececf2;
  border-radius: 12px;
  padding: 20px;
  transition: all .2s;
}
.support-channel:hover {
  border-color: #c85b36;
  box-shadow: 0 8px 24px rgba(26, 31, 58, 0.08);
  transform: translateY(-2px);
}
.support-channel__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.support-channel__icon .lucide-icon {
  width: 1.35rem;
  height: 1.35rem;
}
.support-channel h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #1a1f3a;
}
.support-channel__primary {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.support-channel__primary a {
  color: #c85b36;
  text-decoration: none;
}
.support-channel__primary a:hover { text-decoration: underline; }
.support-channel__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6a7095;
}

/* SLA */
.support-sla {
  background: #fff;
  border: 1px solid #ececf2;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}
.support-sla__row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #ececf2;
}
.support-sla__row:last-child { border-bottom: 0; }
.support-sla__badge {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.support-sla__row--critical .support-sla__badge { background: #a50e0e; }
.support-sla__row--major    .support-sla__badge { background: #b06000; }
.support-sla__row--minor    .support-sla__badge { background: #137333; }
.support-sla__body {
  flex: 1;
  padding: 18px 22px;
  min-width: 0;
}
.support-sla__body strong {
  display: block;
  margin-bottom: 4px;
  color: #1a1f3a;
  font-size: 14px;
}
.support-sla__body p {
  margin: 0;
  color: #6a7095;
  font-size: 13px;
  line-height: 1.55;
}

/* Ressources */
.support-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}
.support-resource {
  background: #f7f8fc;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}
.support-resource__icon {
  font-size: 28px;
  margin-bottom: 10px;
  line-height: 1;
}
.support-resource__icon .lucide-icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--primary, #1e3a5f);
}
.support-resource h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #1a1f3a;
}
.support-resource p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #6a7095;
}

/* Produit */
.support-product {
  background: #fff;
  border: 1px solid #ececf2;
  border-radius: 12px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}
.support-product__head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1f3a;
}
.support-product__body p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #4a4e6c;
}
.support-product__tags { margin-bottom: 16px; }
.support-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #f7f8fc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #4a4e6c;
  margin-right: 6px;
  letter-spacing: 0.5px;
}
.support-product__legal {
  font-size: 12px !important;
  color: #999 !important;
  border-top: 1px solid #ececf2;
  padding-top: 12px;
  margin-bottom: 0 !important;
}
.support-product__legal a { color: #c85b36; }

/* Responsive */
@media (max-width: 800px) {
  .support-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .support-product { grid-template-columns: 1fr; gap: 16px; }
  .support-sla__row { flex-direction: column; }
  .support-sla__badge { width: 100%; padding: 10px; }
}
