/* tradeportpilot.com — thème « nouvelle génération » (2026-10-23).
   Chargé après styles.css et pilot.css : il redéfinit l'identité (bleu nuit, bleu pétrole), la structure de
   l'application (menu latéral sur grand écran), la typographie, les surfaces et les composants. Aucune police ni
   ressource externe : les polices sont celles du système (Segoe UI Variable sous Windows 11). Les couleurs d'état
   restent toujours accompagnées d'un texte. */

:root {
  --navy-950: #0a182b;
  --navy-900: #0f2440;
  --navy: #142d4e;
  --navy-700: #1e3c66;
  --navy-500: #3d5b84;
  --navy-200: #c9d5e5;
  --navy-100: #e5ebf3;
  --navy-50: #f2f5f9;
  --petrol-700: #00525a;
  --petrol: #006d77;
  --petrol-500: #0b838e;
  --petrol-300: #5fb7be;
  --petrol-100: #d8eff1;
  --petrol-50: #edf8f9;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #202b3a;
  --ink-soft: #3a4656;
  --muted: #5d6878;
  --line: #e2e7ee;
  --line-strong: #cfd7e2;
  --primary: var(--petrol);
  --primary-hover: var(--petrol-700);
  --primary-soft: var(--petrol-100);

  --ok: #15703f;
  --ok-soft: #e3f4ea;
  --warn: #8a5300;
  --warn-soft: #fcf1dc;
  --bad: #b02a22;
  --bad-soft: #fdeceb;
  --info: #1f5aa0;
  --info-soft: #e7f0fb;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-xs: 0 1px 2px rgba(15, 36, 64, 0.06);
  --shadow: 0 1px 2px rgba(15, 36, 64, 0.05), 0 4px 12px -2px rgba(15, 36, 64, 0.06);
  --shadow-md: 0 2px 4px rgba(15, 36, 64, 0.05), 0 12px 24px -6px rgba(15, 36, 64, 0.12);
  --shadow-lg: 0 8px 16px -4px rgba(15, 36, 64, 0.1), 0 28px 56px -12px rgba(15, 36, 64, 0.28);
  --ring: 0 0 0 4px rgba(0, 109, 119, 0.18);

  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --side: 268px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- base -------------------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "tnum" 0, "ss01" 1;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--navy);
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.05rem);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.14rem;
  font-weight: 650;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
}

a {
  color: var(--petrol);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--petrol-700);
}

::selection {
  background: var(--petrol-100);
  color: var(--navy-900);
}

:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 2px;
  border-radius: 6px;
}

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

/* --- structure : menu latéral (grand écran) -------------------------------------------------- */

@media (min-width: 1100px) {
  body {
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "side banner"
      "side main"
      "side footer";
    min-height: 100vh;
  }

  .demo-banner {
    grid-area: banner;
  }

  .main {
    grid-area: main;
    width: 100%;
  }

  .footer {
    grid-area: footer;
  }

  .topbar {
    grid-area: side;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 22px 16px 18px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
  }

  .topbar .brand {
    padding: 4px 10px 22px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .topbar .nav {
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    padding-top: 8px;
  }

  .topbar .nav a {
    width: 100%;
  }

  #who {
    margin-top: 16px;
    text-align: left;
  }

  body.is-auth {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "banner"
      "main"
      "footer";
  }
}

.topbar {
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(95, 183, 190, 0.16), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff;
  border-bottom: 0;
}

body.is-auth .topbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ffffff 0%, #d8eff1 100%);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45), inset 0 -2px 0 rgba(0, 109, 119, 0.25);
}

.brand__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand__tag {
  margin-top: 2px;
  color: #9fb4cf;
  font-family: var(--font);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #c3d1e3;
  font-size: 0.94rem;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav a.is-active {
  background: linear-gradient(90deg, rgba(95, 183, 190, 0.22), rgba(95, 183, 190, 0.06));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--petrol-300);
}

.nav__icon {
  flex: none;
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav a.is-active .nav__icon {
  opacity: 1;
  color: var(--petrol-300);
}

.nav__group {
  margin: 14px 12px 4px;
  color: #7f97b6;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #e6edf6;
  text-decoration: none;
}

.who:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.who__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--petrol-500), var(--navy-500));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.who__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.3;
}

.who__org {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who__role {
  color: #9fb4cf;
  font-size: 0.76rem;
}

/* Petits écrans : barre supérieure, navigation qui défile. */
@media (max-width: 1099px) {
  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 18px;
    gap: 10px 18px;
    box-shadow: 0 6px 20px -10px rgba(10, 24, 43, 0.6);
  }

  .brand__tag {
    display: none;
  }

  .topbar .nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    scrollbar-width: none;
  }

  .nav a {
    white-space: nowrap;
    padding: 7px 11px;
  }

  .nav__group {
    display: none;
  }

  #who {
    margin-left: auto;
  }

  .who {
    padding: 4px 10px 4px 4px;
  }

  .who__role {
    display: none;
  }
}

/* --- zone principale ---------------------------------------------------------------------------- */

.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px clamp(16px, 3vw, 44px) 56px;
}

.view {
  animation: tp-rise 0.32s var(--ease) both;
}

.view > * + * {
  margin-top: 22px;
}

@keyframes tp-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.footer {
  padding: 18px 24px 26px;
  color: #8a94a3;
  font-size: 0.82rem;
}

.demo-banner {
  position: static;
  flex-wrap: nowrap;
  padding: 7px 18px;
  font-size: 0.84rem;
}

.demo-banner > * {
  flex: none;
}

.demo-banner span {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-banner[data-mode="real_only"] {
  background: linear-gradient(90deg, var(--navy-50), var(--petrol-50));
  border-bottom: 1px solid var(--line);
  color: var(--navy-700);
}

.demo-banner[data-mode="real_only"] strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.demo-banner[data-mode="real_only"] strong::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--petrol);
  box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.18);
}

/* --- en-têtes de page ---------------------------------------------------------------------------- */

.breadcrumb ol {
  font-size: 0.86rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--petrol);
  text-decoration: underline;
}

.page-head {
  align-items: flex-end;
  gap: 16px 28px;
}

.page-head .lead,
.lead {
  margin-top: 6px;
  color: var(--muted);
  font-size: 1.02rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--petrol);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.page-meta {
  margin-top: 8px;
  font-size: 0.92rem;
}

.ref {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--navy-50);
  color: var(--navy-700);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* --- surfaces ------------------------------------------------------------------------------------ */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

.card__title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.06rem;
}

.card > *:not(:first-child) {
  margin-top: 14px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--petrol), var(--petrol-300));
  opacity: 0.85;
}

.stat__value {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat__label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* --- boutons ------------------------------------------------------------------------------------- */

.btn {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease), color 0.15s var(--ease);
}

.btn:hover {
  border-color: var(--navy-200);
  background: var(--navy-50);
  color: var(--navy);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(180deg, var(--petrol-500) 0%, var(--petrol) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 82, 90, 0.3), 0 6px 16px -6px rgba(0, 109, 119, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn--primary:hover {
  border-color: transparent;
  background: linear-gradient(180deg, var(--petrol) 0%, var(--petrol-700) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 82, 90, 0.35), 0 10px 22px -8px rgba(0, 109, 119, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn--small {
  min-height: 32px;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.86rem;
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.btn--ghost:hover {
  background: var(--navy-50);
  color: var(--navy);
}

.btn--danger {
  border-color: #efc9c6;
  color: var(--bad);
}

.btn--danger:hover {
  border-color: var(--bad);
  background: var(--bad-soft);
  color: var(--bad);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* --- badges : une pastille, toujours avec son texte ------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.005em;
}

.badge--ok::before,
.badge--warn::before,
.badge--bad::before,
.badge--info::before,
.badge--primary::before,
.badge--progress::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--primary {
  background: var(--petrol-100);
  color: var(--petrol-700);
}

.badge--muted {
  background: var(--surface);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* --- formulaires ------------------------------------------------------------------------------ */

.input,
select.input,
textarea.input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.input:hover {
  border-color: var(--navy-200);
}

.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--petrol);
  box-shadow: var(--ring);
}

.field label,
.field__head label {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--petrol);
}

/* --- notes et avertissements ------------------------------------------------------------------ */

.notice {
  padding: 12px 16px;
  border: 1px solid transparent;
  border-left-width: 3px;
  border-radius: 12px;
  font-size: 0.94rem;
}

.notice--info {
  border-color: #d3e3f6;
  border-left-color: var(--info);
}

.notice--ok {
  border-color: #cfe9da;
  border-left-color: var(--ok);
}

.notice--warn {
  border-color: #f1dfb8;
  border-left-color: #d08a00;
}

.notice--bad {
  border-color: #f3cfcc;
  border-left-color: var(--bad);
}

.notice--note {
  border-color: var(--line);
  border-left-color: var(--navy);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

/* --- tableaux ------------------------------------------------------------------------------------ */

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.table {
  font-size: 0.93rem;
}

.table th,
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf1f5;
}

.table thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table tbody tr {
  transition: background 0.12s var(--ease);
}

.table tbody tr:hover {
  background: #f7fafc;
}

.table .cell-main a,
.table th[scope="row"] a {
  color: var(--navy);
  font-weight: 650;
  text-decoration: none;
}

.table .cell-main a:hover,
.table th[scope="row"] a:hover {
  color: var(--petrol);
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .table--list tbody tr {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
}

/* --- détails repliables ------------------------------------------------------------------------- */

.details summary {
  color: var(--petrol);
  font-weight: 600;
  list-style-position: outside;
}

.details--tech {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* --- suivi de l'acheteur : une frise verticale ---------------------------------------------------- */

.steps {
  position: relative;
  margin: 4px 0 0;
  padding: 0;
}

.steps .step {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "dot state"
    "dot body";
  column-gap: 14px;
  row-gap: 2px;
  padding: 0 0 22px;
  border-top: 0;
}

.steps .step:last-child {
  padding-bottom: 0;
}

/* La ligne qui relie les étapes. */
.steps .step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 16px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.steps .step--done:not(:last-child)::after {
  background: linear-gradient(180deg, var(--petrol-300), var(--line));
}

/* Le repère de chaque étape : plein et coché quand c'est fait ; un anneau sinon. */
.steps .step::before {
  content: "";
  grid-area: dot;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.steps .step--done::before {
  content: "✓";
  border-color: var(--petrol);
  background: linear-gradient(180deg, var(--petrol-500), var(--petrol));
  box-shadow: 0 4px 10px -4px rgba(0, 109, 119, 0.6);
}

.steps .step--current::before {
  border-color: var(--petrol);
  box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 11px var(--petrol);
}

.steps .step--todo::before {
  border-color: #d08a00;
  box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 11px #f0b44a;
}

.step__state {
  grid-area: state;
  justify-self: start;
  margin-top: 2px;
  padding: 1px 9px;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.steps .step > div {
  grid-area: body;
}

.step strong {
  color: var(--navy);
  font-size: 1rem;
}

.step p {
  margin-top: 2px;
}

#suivi-equipe ul {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 0;
  list-style: none;
}

#suivi-equipe li {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--petrol);
  border-radius: 10px;
  background: var(--surface-2);
}

#suivi-equipe li + li {
  margin-top: 0;
}

/* --- fenêtres, messages ------------------------------------------------------------------------- */

.dialog {
  padding: 26px 28px;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: tp-pop 0.22s var(--ease) both;
}

.dialog::backdrop {
  background: rgba(10, 24, 43, 0.42);
  backdrop-filter: blur(4px);
}

@keyframes tp-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.toast {
  border-radius: 12px;
  background: var(--navy-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.empty {
  padding: 44px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(60% 80% at 50% 0%, var(--petrol-50), transparent 70%),
    var(--surface);
}

.empty__title {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.12rem;
}

/* --- tableau de bord ------------------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  border-radius: 20px;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(95, 183, 190, 0.28), transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(30, 60, 102, 0.9), transparent 70%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-900) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.025), 0 0 0 80px rgba(255, 255, 255, 0.02);
}

.hero h1 {
  color: #fff;
}

.hero .eyebrow {
  color: var(--petrol-300);
}

.hero__lead {
  max-width: 62ch;
  margin-top: 8px;
  color: #c8d6e8;
}

.hero__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero .btn:not(.btn--primary) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: none;
}

.hero .btn:not(.btn--primary):hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero .btn--primary {
  background: linear-gradient(180deg, #ffffff, #e6f3f4);
  color: var(--navy);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}

.hero .btn--primary:hover {
  background: #fff;
  color: var(--petrol-700);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .kpis,
  .ranking-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .stat {
    padding: 14px 14px 12px;
  }

  .stat__value {
    font-size: 1.45rem;
  }

  .hero {
    padding: 22px 20px;
    border-radius: 16px;
  }
}

/* --- page de connexion ---------------------------------------------------------------------------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  min-height: min(720px, calc(100vh - 160px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 46px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(95, 183, 190, 0.32), transparent 60%),
    radial-gradient(60% 70% at 0% 100%, rgba(30, 60, 102, 0.95), transparent 70%),
    linear-gradient(150deg, var(--navy) 0%, var(--navy-950) 100%);
  color: #fff;
}

.auth__brand::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 56px rgba(255, 255, 255, 0.025), 0 0 0 112px rgba(255, 255, 255, 0.018);
}

.auth__title {
  max-width: 18ch;
  margin-top: 26px;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.auth__title em {
  color: var(--petrol-300);
  font-style: normal;
}

.auth__lead {
  max-width: 46ch;
  margin-top: 14px;
  color: #c8d6e8;
  font-size: 1.02rem;
}

.auth__points {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth__points li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  color: #dbe5f1;
  font-size: 0.94rem;
}

.auth__points strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
}

.auth__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--petrol-300);
}

.auth__icon svg {
  width: 18px;
  height: 18px;
}

.auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(24px, 4vw, 56px);
}

.auth__panel > * + * {
  margin-top: 16px;
}

.auth__panel h1 {
  font-size: 1.9rem;
}

.auth__panel .btn--primary {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: 1rem;
}

.auth__secure {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--navy-50);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.auth__secure svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--petrol);
}

@media (max-width: 860px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth__brand {
    padding: 32px 26px;
  }

  .auth__points {
    display: none;
  }
}

/* --- offres et dossier --------------------------------------------------------------------------- */

.offer-card {
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}

.offer-card:hover {
  box-shadow: var(--shadow-md);
}

.offer-card__head h3 {
  color: var(--navy);
  font-size: 1.05rem;
}

.table--offers thead th {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.table--offers thead th.is-preferred {
  background: var(--petrol-50);
  box-shadow: inset 0 3px 0 var(--petrol);
}

.timeline > li {
  position: relative;
  padding-left: 22px;
}

.timeline > li::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 2px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--petrol);
  border-radius: 50%;
  background: var(--surface);
}

/* --- mouvement réduit ----------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .view,
  .dialog {
    animation: none;
  }

  * {
    transition: none !important;
  }
}

/* Un indicateur dont la valeur est une phrase (dernière étape, prochaine action) : une taille de texte, pas de chiffre. */
#dossier .ranking-summary .stat__value {
  font-size: 1.12rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Classement : avec le menu latéral, la largeur utile ne suffit pas au tableau complet avant 1600 px ;
   les lignes deviennent des fiches, comme sur tablette (mêmes cellules, mêmes rôles pour les lecteurs d'écran). */
@media (min-width: 1100px) and (max-width: 1599px) {
  .table-wrap--ranking {
    overflow-x: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .table--ranking {
    display: block;
  }

  .table--ranking thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .table--ranking tbody {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
    gap: 14px;
  }

  .table--ranking tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 16px;
    align-content: start;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .table--ranking tbody th,
  .table--ranking tbody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .table--ranking td[data-label]::before {
    content: attr(data-label);
    content: attr(data-label) / "";
  }

  .table--ranking td.c-pick::before {
    content: none;
  }

  .table--ranking .c-name { order: -1; font-size: 1.02rem; }
  .table--ranking .c-rank { order: 1; }
  .table--ranking .c-score { order: 2; }
  .table--ranking .c-verif { order: 3; grid-column: 1 / -1; }
  .table--ranking .c-points { order: 4; grid-column: 1 / -1; }
  .table--ranking .c-choice { order: 5; grid-column: 1 / -1; }
  .table--ranking .c-pick { order: 6; grid-column: 1 / -1; }

  .table--ranking .rank,
  .table--ranking .cell-main,
  .table--ranking .c-verif,
  .table--ranking .c-points,
  .table--ranking .c-choice {
    width: auto;
    min-width: 0;
  }

  .table--ranking .pick {
    display: flex;
    justify-content: center;
    padding: 10px 12px;
  }
}
