:root {
  --bg: #07090d;
  --bg-2: #0d1118;
  --panel: #111823;
  --panel-2: #151f2b;
  --panel-3: #e8e1d2;
  --ink: #f4efe5;
  --ink-dark: #0b0f14;
  --muted: rgba(244, 239, 229, 0.66);
  --muted-dark: #69717d;
  --line: rgba(244, 239, 229, 0.12);
  --line-dark: rgba(11, 15, 20, 0.12);
  --teal: #30b6a6;
  --teal-soft: rgba(48, 182, 166, 0.14);
  --gold: #c8a44d;
  --copper: #b87945;
  --red: #d85f5f;
  --blue: #5b7cfa;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Libre Baskerville", Georgia, serif;
}

[hidden] { display: none !important; }

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Les panneaux décoratifs en plein bord (.portal-entry::before et consorts)
   débordent volontairement de `main` avec un inset négatif en vw. Au-delà du
   bord droit du viewport ce débordement n'est plus visible : il ne produisait
   qu'une barre de défilement horizontale de 32 px.
   `clip` le coupe au bord sans créer de conteneur de défilement, donc les
   en-têtes en `position: sticky` continuent de se coller au viewport — ce que
   `overflow: hidden` casserait. Posé sur la racine et non sur `body` : depuis
   `body`, la valeur serait propagée au viewport et l'élément retomberait à
   `visible`. */
html {
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 280px),
    linear-gradient(90deg, rgba(200,164,77,0.055) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(200,164,77,0.045) 0 1px, transparent 1px),
    var(--bg);
  background-size: auto, 56px 56px, 56px 56px, auto;
  font-family: var(--sans);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7,9,13,0.1), rgba(7,9,13,0.86));
  z-index: -1;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(7, 9, 13, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.portal-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-nav a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255,255,255,0.055);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink-dark);
  background: linear-gradient(135deg, var(--gold), var(--teal));
  border-radius: var(--radius);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--ink-dark);
  background: var(--gold);
  border-color: var(--gold);
  letter-spacing: 0.01em;
  box-shadow: 0 10px 30px rgba(200, 164, 77, 0.18);
}

.btn-primary:hover {
  background: #d7b768;
  border-color: #d7b768;
}

.btn-dark {
  color: var(--ink);
  background: #0b0f14;
  border-color: rgba(244,239,229,0.14);
}

.btn-light {
  color: var(--ink);
  background: rgba(255,255,255,0.075);
  border-color: var(--line);
}

.full {
  width: 100%;
}

main {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
}

.signal,
.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(48, 182, 166, 0.24);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--serif);
  letter-spacing: 0;
}

h1 {
  margin: 20px 0 18px;
  max-width: 710px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.1;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.mission-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin: 30px 0;
}

.market-strip,
.expert,
.command-section {
  display: grid;
  grid-template-columns: minmax(270px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: linear-gradient(135deg, rgba(17,24,35,0.98), rgba(11,15,20,0.98));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.market-strip p,
.expert p,
.command-copy p {
  margin: 0;
  color: var(--muted);
}

.metric-tile.strong {
  background: linear-gradient(180deg, rgba(48,182,166,0.18), rgba(255,255,255,0.045));
}

.metric-tile.alert {
  background: linear-gradient(180deg, rgba(216,95,95,0.18), rgba(255,255,255,0.045));
}

.section {
  padding: 58px 0;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head.compact {
  margin-bottom: 20px;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
}

.cabinet-section {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 5vw, 68px);
  border: 1px solid rgba(200,164,77,0.22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(200,164,77,0.16), transparent 20rem),
    linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
    rgba(10, 17, 26, 0.88);
  box-shadow: 0 28px 100px rgba(0,0,0,0.22);
}

.cabinet-intro {
  display: grid;
  gap: 16px;
}

.cabinet-intro h2 {
  max-width: 620px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.cabinet-intro p {
  max-width: 560px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 16px;
}

.cabinet-intro .btn {
  width: fit-content;
}

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cabinet-card {
  min-height: 240px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
}

.cabinet-card-highlight {
  transform: translateY(-12px);
  border-color: rgba(48,182,166,0.32);
  background: linear-gradient(160deg, rgba(48,182,166,0.16), rgba(255,255,255,0.04));
}

.cabinet-number {
  color: var(--gold);
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
}

.cabinet-card h3 {
  margin: 34px 0 12px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.15;
}

.cabinet-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: grid;
  gap: 12px;
  min-height: 218px;
  padding: 18px;
  text-align: left;
  color: var(--ink);
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(48,182,166,0.34);
}

.service-card.active {
  color: var(--ink-dark);
  background: var(--panel-3);
  border-color: rgba(200,164,77,0.5);
}

.service-card strong {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.18;
}

.service-card small {
  color: inherit;
  opacity: 0.7;
  font-size: 13px;
}

.service-tag {
  width: fit-content;
  padding: 5px 8px;
  color: var(--gold);
  background: rgba(200,164,77,0.1);
  border: 1px solid rgba(200,164,77,0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.service-card.active .service-tag {
  color: var(--ink-dark);
  background: rgba(11,15,20,0.06);
  border-color: rgba(11,15,20,0.12);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: stretch;
}

.instant-panel,
.result-panel,
.dash-tile {
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
}

.instant-panel,
.result-panel {
  padding: 24px;
}

.diagnostic-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.diagnostic-form label,
.auth-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.diagnostic-form .full-field,
.diagnostic-form .btn {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(7,9,13,0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

input::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  color: var(--ink-dark);
  background: var(--gold);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,164,77,0.12);
}

.result-panel {
  display: grid;
  gap: 18px;
}

.status-pill {
  width: fit-content;
  padding: 6px 9px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(48,182,166,0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-panel h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  margin: 0 auto;
  border-radius: 50%;
  color: var(--ink);
  background:
    radial-gradient(circle at center, var(--bg) 0 58%, transparent 59%),
    conic-gradient(var(--teal) 0 72%, rgba(244,239,229,0.12) 72% 100%);
}

.score-ring span {
  margin-top: 12px;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}


.result-note {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 239, 229, 0.14);
  border-radius: 14px;
  background: rgba(244, 239, 229, 0.055);
  color: rgba(244, 239, 229, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.result-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.result-list div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.result-list dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-list dd {
  margin: 4px 0 0;
  font-size: 14px;
}

.expert {
  margin-top: 20px;
}

.expert h2 {
  color: var(--ink);
}

.appointment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.appointment p,
.appointment .btn {
  grid-column: 1 / -1;
}

.slot {
  min-height: 50px;
  color: var(--ink);
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.slot.active {
  color: var(--ink-dark);
  background: var(--gold);
}

.proof-flow {
  padding: 58px 0 14px;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-steps div {
  min-height: 150px;
  padding: 18px;
  background: rgba(255,255,255,0.045);
  border-right: 1px solid var(--line);
}

.flow-steps div:last-child {
  border-right: 0;
}

.flow-steps strong,
.flow-steps span {
  display: block;
}

.flow-steps strong {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flow-steps span {
  color: var(--muted);
  font-size: 14px;
}

.dashboard {
  padding-bottom: 90px;
}

body:not(.is-authenticated) #dashboard.section {
  padding: 34px 0 42px;
}

body:not(.is-authenticated) #dashboard .section-head[data-public-block] {
  max-width: 720px;
  margin-bottom: 14px;
}

body:not(.is-authenticated) #dashboard .section-head[data-public-block] h2 {
  max-width: 680px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
}

body:not(.is-authenticated) #dashboard .section-head[data-public-block] p {
  max-width: 660px;
  font-size: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dash-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 178px;
  padding: 20px;
  isolation: isolate;
}

.dash-tile::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -58px;
  z-index: -1;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--metric-glow, rgba(200,164,77,.14));
  filter: blur(2px);
}

.dash-tile[data-metric-tone="teal"] { --metric-glow: rgba(48,182,166,.17); }
.dash-tile[data-metric-tone="copper"] { --metric-glow: rgba(184,121,69,.18); }
.dash-tile[data-metric-tone="blue"] { --metric-glow: rgba(91,124,250,.17); }

.dash-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-tile strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dash-tile-head > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: rgba(244,239,229,.46);
  border: 1px solid rgba(244,239,229,.12);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 11px;
}

.dash-tile > span {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 900;
  line-height: 1;
}

.dash-tile small {
  color: var(--muted);
  font-size: 13px;
}

.client-console {
  margin-top: 16px;
  padding: 18px;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

body.is-authenticated [data-public-lock],
body.is-authenticated [data-public-block],
body:not(.is-authenticated) [data-private-block] {
  display: none !important;
}

.client-command-center {
  position: relative;
  overflow: hidden;
  margin: 0 0 20px;
  border: 1px solid rgba(200,164,77,.25);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 8%, rgba(48,182,166,.20), transparent 22rem),
    radial-gradient(circle at 5% 115%, rgba(200,164,77,.15), transparent 20rem),
    linear-gradient(140deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 56%),
    rgba(6,12,19,.94);
  box-shadow: 0 30px 110px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}

.client-command-center::after {
  content: "GENESIS VERIFIED";
  position: absolute;
  top: 26px;
  right: -18px;
  color: rgba(244,239,229,.035);
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .8;
  pointer-events: none;
  white-space: nowrap;
}

.client-command-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
}

.client-command-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.client-command-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(48,182,166,.12), 0 0 24px rgba(48,182,166,.7);
}

.client-command-copy h2 {
  max-width: 760px;
  margin: 14px 0 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.01;
  letter-spacing: -.045em;
}

.client-command-copy p {
  max-width: 760px;
  margin: 0;
  color: rgba(244,239,229,0.74);
  font-size: 15px;
}

.client-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.client-focus-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 210px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: rgba(3,8,14,.60);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}

.client-focus-label,
.console-eyebrow,
.priority-label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.client-focus-card > strong {
  max-width: 270px;
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.15;
}

.client-focus-card > span:not(.client-focus-label) {
  color: var(--muted);
  font-size: 12px;
}

.client-focus-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: auto;
}

.client-focus-progress,
.dossier-progress {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
}

.client-focus-progress > span,
.dossier-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #73e0d1);
  box-shadow: 0 0 18px rgba(48,182,166,.4);
  transition: width .5s ease;
}

.client-focus-meter b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
}

.client-lifecycle {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.1);
  list-style: none;
}

.client-lifecycle li {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 18px clamp(16px, 2vw, 28px);
  color: rgba(244,239,229,.42);
  border-right: 1px solid rgba(255,255,255,.09);
}

.client-lifecycle li:last-child { border-right: 0; }

.client-lifecycle small {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
}

.client-lifecycle span,
.client-lifecycle b,
.client-lifecycle em { display: block; }
.client-lifecycle b { color: inherit; font-size: 12px; }
.client-lifecycle em { margin-top: 2px; font-size: 10px; font-style: normal; }
.client-lifecycle li.is-complete,
.client-lifecycle li.is-active { color: var(--ink); }

.client-lifecycle li.is-complete small {
  color: var(--ink-dark);
  border-color: var(--teal);
  background: var(--teal);
}

.client-lifecycle li.is-active {
  background: linear-gradient(180deg, rgba(200,164,77,.11), transparent);
}

.client-lifecycle li.is-active small {
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(200,164,77,.08);
}

body.protected-session::after {
  content: attr(data-watermark);
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 9999;
  max-width: min(42vw, 520px);
  padding: 9px 12px;
  border: 1px solid rgba(200,164,77,0.20);
  border-radius: 999px;
  background: rgba(6, 11, 18, 0.36);
  color: rgba(244,239,229,0.32);
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(10px);
}

.audit-workspace,
.client-console,
.auth-card,
.payment-card {
  -webkit-user-select: none;
  user-select: none;
}
.audit-workspace input,
.audit-workspace textarea,
.audit-workspace select,
.client-console input,
.client-console textarea,
.client-console select,
.auth-card input,
.payment-card input {
  -webkit-user-select: text;
  user-select: text;
}

.client-console-head,
.client-dossier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.client-console-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.client-console-head strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-console-head > div .console-eyebrow {
  display: block;
  margin-bottom: 3px;
}

.client-console-head span,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.client-dossier-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.client-dossier {
  min-height: 72px;
  padding: 12px;
  background: rgba(7,9,13,0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.client-dossier strong,
.client-dossier span {
  display: block;
}

.client-dossier strong {
  font-size: 14px;
}

.client-dossier span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.client-dossier-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dossier-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .52fr);
  gap: 24px;
  align-items: stretch;
  min-height: 220px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.022)),
    rgba(5,10,16,.78);
  border-radius: 20px;
}

.dossier-card-main {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
}

.dossier-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dossier-card .dossier-number {
  margin: 0;
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dossier-status {
  margin: 0 !important;
  padding: 5px 9px;
  color: var(--teal) !important;
  border: 1px solid rgba(48,182,166,.24);
  border-radius: 999px;
  background: rgba(48,182,166,.08);
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dossier-card.status-draft .dossier-status {
  color: var(--gold) !important;
  border-color: rgba(200,164,77,.24);
  background: rgba(200,164,77,.08);
}

.dossier-card.status-validated .dossier-status {
  color: #78dfb3 !important;
  border-color: rgba(120,223,179,.26);
  background: rgba(120,223,179,.09);
}

.dossier-card-main > strong {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.2;
}

.dossier-organization { margin: 0 !important; }

.dossier-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.dossier-progress-line b {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  text-align: right;
}

.dossier-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.dossier-facts span {
  margin: 0;
  padding: 6px 9px;
  color: rgba(244,239,229,.62);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  font-size: 10px;
}

.dossier-facts b { color: var(--ink); }
.dossier-facts .needs-attention {
  color: #e5b07d;
  border-color: rgba(184,121,69,.25);
  background: rgba(184,121,69,.08);
}

.dossier-card-next {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 22px;
  border-left: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.025);
}

.dossier-card-next > small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dossier-card-next > strong {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.4;
}

.dossier-card-next .client-dossier-actions { margin-top: 10px; }
.dossier-card-next .btn {
  flex: 1 1 auto;
  padding: 10px 12px;
  font-size: 10px;
}

.portfolio-priority {
  border-color: rgba(184,121,69,.25);
  background:
    radial-gradient(circle at 95% 0, rgba(184,121,69,.11), transparent 18rem),
    rgba(8,15,24,.78);
}

.priority-card {
  border-color: rgba(184,121,69,.20);
  background: rgba(184,121,69,.055);
}

.priority-card .priority-label { margin: 0 0 4px; }

.dossier-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  min-height: 250px;
  padding: 34px;
  border: 1px dashed rgba(200,164,77,.28);
  border-radius: 20px;
  background: radial-gradient(circle at 10% 10%, rgba(200,164,77,.09), transparent 18rem);
}

.dossier-empty-state > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--gold);
  border: 1px solid rgba(200,164,77,.28);
  border-radius: 50%;
  font-family: var(--serif);
}

.dossier-empty-state > strong {
  font-family: var(--serif);
  font-size: 24px;
}

.dossier-empty-state p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
}

.account-security {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  gap: 28px;
  align-items: start;
  margin-top: 16px;
  padding: 24px;
  border: 1px solid rgba(91,124,250,.23);
  border-radius: 22px;
  background:
    radial-gradient(circle at 5% 0, rgba(91,124,250,.12), transparent 18rem),
    rgba(8,15,24,.78);
}

.account-security h3 {
  margin: 7px 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.16;
}

.account-security-copy p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.account-password-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-password-form label {
  display: grid;
  gap: 6px;
  color: rgba(244,239,229,.78);
  font-size: 11px;
  font-weight: 800;
}

.account-password-form input {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  outline: 0;
  background: rgba(3,8,14,.65);
}

.account-password-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(48,182,166,.12);
}

.account-password-submit {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

.account-password-status {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.account-password-status.success { color: var(--teal); }
.account-password-status.error { color: #e5a16f; }

.representation-desk { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 28px; margin: 24px 0; padding: 24px; border: 1px solid rgba(86, 197, 182, .28); border-radius: 18px; background: rgba(8,15,24,.78); }
.representation-desk h3 { margin: 7px 0 10px; font-family: var(--serif); font-size: 25px; line-height: 1.16; }
.representation-copy p, .representation-card p { margin: 0; color: var(--muted); font-size: 13px; }
.representation-panels, .representation-list { display: grid; gap: 10px; }
.representation-invite, .representation-card { display: grid; gap: 10px; padding: 14px; border: 1px solid rgba(117, 160, 194, .26); border-radius: 12px; background: rgba(3,8,14,.55); }
.representation-invite label { display: grid; gap: 6px; color: rgba(244,239,229,.78); font-size: 12px; font-weight: 800; }
.representation-invite input { width: 100%; min-height: 42px; padding: 8px 10px; color: var(--ink); border: 1px solid rgba(117, 160, 194, .45); border-radius: 8px; background: rgba(3,8,14,.65); }
.representation-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.representation-card strong { display: block; font-size: 14px; }
.representation-portfolio-count { display: block; margin-top: 7px; color: rgba(244,239,229,.68); font-size: 12px; }
.client-dossier.mandate-focus { outline: 2px solid rgba(86, 197, 182, .8); box-shadow: 0 0 0 5px rgba(86, 197, 182, .12); }
.representation-actions, .representation-invite-submit { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.representation-banner { margin: 0 0 14px; padding: 12px 14px; color: var(--ink); border-radius: 10px; background: rgba(86, 197, 182, .15); }

@media (max-width: 900px) { .representation-desk { grid-template-columns: 1fr; } .representation-card, .representation-invite-submit { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; } }

@media (max-width: 900px) {
  .account-security { grid-template-columns: 1fr; }
  .account-password-form { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .account-security { padding: 18px; }
  .account-password-submit {
    align-items: stretch;
    flex-direction: column;
  }
}

.client-dossier-actions a {
  color: var(--ink-dark);
  text-decoration: none;
  padding: 6px 9px;
  background: var(--gold);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 42px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.admin-page .section-head h1,
.legal-shell h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-login label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.audit-workspace { margin-top: 28px; padding: 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(8,18,31,.82); }
.audit-workspace[hidden] { display: none; }
.audit-metadata { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; align-items: end; margin: 20px 0; }
.audit-metadata label { display: grid; gap: 7px; font-size: .78rem; font-weight: 700; }
.audit-metadata input, .audit-metadata select, .audit-requirement select, .audit-requirement textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #101d2d; color: #f8fafc; padding: 11px; }
.audit-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 18px 0; }
.audit-summary div { padding: 16px; border-radius: 12px; background: rgba(255,255,255,.06); }
.audit-summary strong, .audit-summary span { display: block; }
.audit-summary strong { font-size: 1.6rem; }
.audit-summary span { color: #a8b4c3; font-size: .78rem; }
/* Trois lectures distinctes : préparation, couverture probatoire, écarts critiques.
   La tuile d'écarts vire au rouge dès le premier blocage, quel que soit le reste. */
.audit-scores .audit-score { display: grid; align-content: start; gap: 6px; padding: 18px; border: 1px solid rgba(255,255,255,.1); }
.audit-scores .audit-score span { font-weight: 800; color: #d7e2ef; font-size: .84rem; }
.audit-scores .audit-score small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.audit-scores .audit-score em { display: block; margin-top: 4px; color: rgba(244,239,229,.55); font-size: .74rem; font-style: normal; line-height: 1.4; }
.audit-scores .audit-score.is-blocking { border-color: rgba(216,95,95,.45); background: rgba(216,95,95,.10); }
.audit-scores .audit-score.is-blocking strong { color: #ffb4b4; }
.audit-readiness { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); color: var(--muted); font-size: .86rem; line-height: 1.5; }
.audit-readiness.is-blocked { background: rgba(216,95,95,.12); border: 1px solid rgba(216,95,95,.32); color: #ffc9c9; font-weight: 700; }
.audit-decision-gates { display: grid; grid-template-columns: .7fr .9fr 2.4fr; gap: 12px; margin: 0 0 18px; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.045); }
.audit-decision-gates > div { display: grid; gap: 4px; }
.audit-decision-gates strong { font-size: 1.25rem; color: #f8fafc; }
.audit-decision-gates span { color: var(--muted); font-size: .78rem; }
.favorable-conditions { display: flex; flex-wrap: wrap; gap: 7px; align-content: start; }
.favorable-conditions span { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.06); color: #d7e2ef; }
.favorable-conditions .passed { background: rgba(83,185,154,.13); color: var(--green); }
.favorable-conditions .failed { background: rgba(239,107,104,.12); color: #ffb4b4; }
.automatic-opinion-note { grid-column: 1 / -1; margin: 2px 0 0; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: .78rem; }
.audit-requirements { display: grid; gap: 12px; }
.audit-requirement.progressive-locked {
  border-style: dashed;
  opacity: .72;
}
.audit-requirement.progressive-locked strong,
.audit-requirement.progressive-locked span {
  color: rgba(244,239,229,0.58);
}
.audit-save-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 16px 0; padding: 14px; border-radius: 10px; background: rgba(83,185,154,.1); }
.audit-requirement { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; align-items: stretch; padding: 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; }
.audit-requirement small, .audit-requirement span { display: block; color: #a8b4c3; }
.audit-requirement-overview { display: grid; grid-template-columns: minmax(0,1fr) minmax(170px,.3fr); gap: 18px; align-items: start; }
.audit-requirement-overview > div:first-child { display: grid; gap: 5px; }
.audit-requirement-overview > div:first-child > strong { font-size: 1.08rem; }
.audit-verdict-chip { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.045); }
.audit-verdict-chip strong { color: var(--paper); }
.audit-upload-panel { display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(48,182,166,.24); border-radius: 12px; background: rgba(48,182,166,.055); }
.audit-upload-heading { display: grid; gap: 4px; }
.audit-upload-heading > strong { font-size: 1.02rem; }
.audit-upload-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 14px; align-items: stretch; }
.audit-upload-grid > * { min-width: 0; }
.audit-file-label { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px dashed rgba(255,255,255,.2); border-radius: 10px; background: rgba(7,16,28,.55); }
.audit-file-label > span { color: var(--paper); font-weight: 800; }
.audit-file-label input { width: 100%; padding: 9px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: #101d2d; color: var(--paper); }
.evidence-mode { display: grid; gap: 8px; min-width: 0; width: 100%; max-width: 100%; margin: 0; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; }
.evidence-mode legend { padding: 0 6px; color: var(--paper); font-size: .82rem; font-weight: 800; }
.evidence-mode-option { display: flex; min-width: 0; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; background: rgba(255,255,255,.035); cursor: pointer; }
.evidence-mode-option:has(input:checked) { border-color: rgba(48,182,166,.7); background: rgba(48,182,166,.1); }
.evidence-mode-option input[type="radio"] { flex: 0 0 18px; width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 3px 0 0; padding: 0; accent-color: var(--teal); }
.evidence-mode-option span { display: grid; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.evidence-mode-option strong { color: var(--paper); }
.evidence-mode-option small { line-height: 1.4; }
.audit-optional-context { padding: 10px 12px; border-radius: 9px; background: rgba(255,255,255,.035); }
.audit-optional-context summary { cursor: pointer; color: #d7e2ef; font-weight: 700; }
.audit-optional-context[open] { display: grid; gap: 10px; }
.audit-optional-context label { display: grid; gap: 7px; }
.audit-submit-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.audit-requirement .evidence-guidance { margin-top: 8px; color: rgba(244,239,229,0.68); font-size: .82rem; line-height: 1.45; }
.audit-requirement .evidence-guidance b { color: var(--gold); }
.audit-requirement .applicability-reason { margin-top: 8px; color: rgba(48,182,166,0.76); font-size: .82rem; line-height: 1.4; }
.evidence-intelligence.strong b { color: var(--green); }
.evidence-intelligence.acceptable b { color: var(--gold); }
.evidence-intelligence.weak b { color: var(--red); }
.applicability-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; }
.applicability-fields legend { padding: 0 7px; color: #d7e2ef; }
.applicability-fields label { display: flex; align-items: center; gap: 8px; }
.applicability-fields input { width: auto; }
.audit-requirement textarea { min-height: 70px; resize: vertical; }
.evidence-save-status { white-space: nowrap; padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); font-size: .76rem; font-weight: 800; }
.evidence-save-status.dirty { background: rgba(200,164,77,.13); color: var(--gold); }
.evidence-save-status.attention { background: rgba(239,107,104,.12); color: #ffb4b4; }
.evidence-save-status.saving { background: rgba(48,182,166,.14); color: var(--teal); }
.evidence-save-status.saved { background: rgba(31,110,86,.14); color: var(--green); }
.audit-requirement.requires-answer { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(169,96,28,.16); }
.audit-open { cursor: pointer; }
.proof-matrix-workspace, .corrective-workspace { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.preaudit-workbench { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.preaudit-workbench[hidden] { display: none; }
.preaudit-human-gate { padding: 6px 9px; border-radius: 999px; background: rgba(242,166,90,.16); color: #ffd49e; font-size: .76rem; font-weight: 800; }
.preaudit-disclaimer { padding: 12px 14px; border: 1px solid rgba(242,166,90,.28); border-radius: 10px; color: #f4dfbd; line-height: 1.5; }
.preaudit-frameworks, .preaudit-controls, .preaudit-trace-list { display: grid; gap: 10px; margin: 14px 0; }
.preaudit-framework, .preaudit-control, .preaudit-evidence, .preaudit-trace-row { padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.035); }
.preaudit-framework { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-left: 4px solid var(--orange); }
.preaudit-framework.confirmed { border-left-color: var(--green); }
.preaudit-framework strong, .preaudit-framework span, .preaudit-framework p, .preaudit-control strong, .preaudit-control span, .preaudit-evidence strong, .preaudit-evidence span, .preaudit-evidence code { display: block; }
.preaudit-framework span, .preaudit-control span, .preaudit-evidence span { color: var(--muted); font-size: .8rem; }
.preaudit-framework p, .preaudit-control p { margin: 7px 0; color: #d7e2ef; line-height: 1.45; }
.preaudit-control { border-left: 3px solid var(--gold); }
.preaudit-control small, .preaudit-evidence code { color: var(--gold); font-size: .76rem; }
.preaudit-guidance { color: #d8f1e8 !important; }
.preaudit-registry, .preaudit-trace { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.preaudit-registry h4, .preaudit-trace h4 { margin: 0 0 6px; }
.preaudit-registry > p, .preaudit-trace > p { color: var(--muted); line-height: 1.45; }
.preaudit-available { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.preaudit-available span { color: var(--muted); font-size: .8rem; }
.preaudit-trace-row { display: grid; grid-template-columns: 1.2fr 1fr .8fr .8fr 1fr; gap: 10px; align-items: center; }
.preaudit-trace-row span { color: var(--muted); font-size: .8rem; }
.preaudit-audit-trail { display: grid; gap: 4px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.025); color: var(--muted); font-size: .76rem; }
.preaudit-audit-trail span { display: block; }
.proof-matrix-list { display: grid; gap: 10px; margin-top: 16px; }
.proof-matrix-row { display: grid; grid-template-columns: .7fr 1.25fr 1.25fr 1fr 1fr .75fr; gap: 12px; align-items: start; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--gold); border-radius: 12px; background: rgba(255,255,255,.035); }
.proof-matrix-row.status-demontre { border-left-color: var(--green); }
.proof-matrix-row.status-non_conforme, .proof-matrix-row.status-non_recevable { border-left-color: var(--red); }
.proof-matrix-row.status-partiel, .proof-matrix-row.status-declaratif { border-left-color: var(--orange); }
.proof-matrix-row small, .proof-matrix-code span, .proof-matrix-status span { display: block; color: var(--muted); font-size: .76rem; }
.proof-matrix-row p { margin: 4px 0 0; color: #d7e2ef; font-size: .84rem; line-height: 1.45; }
.proof-matrix-code strong, .proof-matrix-status strong { display: block; color: #f8fafc; }
.proof-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.proof-chip-list span { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: #d7e2ef; font-size: .74rem; }
.proof-chip-list .muted { color: var(--muted); background: rgba(255,255,255,.04); }
.action-counters { display: grid; text-align: right; }
.action-counters span { color: var(--orange); }
.action-create { display: grid; grid-template-columns: 2fr .8fr 1fr .8fr auto; gap: 12px; align-items: end; margin: 18px 0; }
.action-create label, .corrective-action label { display: grid; gap: 7px; font-size: .78rem; font-weight: 700; }
.action-create input, .action-create select, .corrective-action input, .corrective-action select, .corrective-action textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #101d2d; color: #f8fafc; padding: 10px; }
.corrective-actions { display: grid; gap: 12px; }
.corrective-action { padding: 16px; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--gold); border-radius: 12px; }
.corrective-action.overdue { border-left-color: var(--red); }
.corrective-action.closed { opacity: .72; border-left-color: var(--green); }
.corrective-action-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.corrective-action-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr .8fr .8fr .8fr; gap: 10px; align-items: end; }
.corrective-action-closure { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.review-workspace { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.review-member-form, .review-comment-form, .review-decision { display: grid; grid-template-columns: 1.5fr .8fr auto; gap: 12px; align-items: end; margin: 16px 0; }
.review-comment-form, .review-decision { grid-template-columns: .7fr 2fr auto; }
.review-workspace label { display: grid; gap: 7px; font-size: .78rem; font-weight: 700; }
.review-workspace input, .review-workspace select, .review-workspace textarea { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #101d2d; color: #f8fafc; padding: 10px; }
.review-members, .review-comments, .review-versions { display: grid; gap: 8px; margin: 12px 0; }
.review-member, .review-comment, .review-version { display: flex; justify-content: space-between; gap: 14px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.05); }
.review-comment.open { border-left: 4px solid #f2a65a; }
.review-comment.resolved { border-left: 4px solid #53b99a; opacity: .75; }
.review-controls { display: flex; gap: 10px; margin: 16px 0; }
.review-journey { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.review-journey li { display: flex; min-width: 0; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.035); color: var(--muted); }
.review-journey li > span { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); font-weight: 900; }
.review-journey li div { min-width: 0; }
.review-journey strong, .review-journey small { display: block; overflow-wrap: anywhere; }
.review-journey li.done { border-color: rgba(83,185,154,.35); background: rgba(83,185,154,.09); }
.review-journey li.done > span { color: #07110f; background: var(--green); }
.review-journey li.current { border-color: rgba(200,164,77,.48); background: rgba(200,164,77,.10); }
.review-journey li.current > span { color: #07110f; background: var(--gold); }
.review-journey li.attention { border-color: rgba(239,107,104,.42); background: rgba(239,107,104,.09); }
.review-journey li.attention > span { color: #07110f; background: #ffb4b4; }
.genesis-review-case, .genesis-review-decision { margin: 12px 0; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.04); }
.genesis-review-case p, .genesis-review-decision p { margin: 6px 0; }
.genesis-review-case small { color: var(--muted); }
.genesis-review-requests { display: grid; gap: 10px; margin: 14px 0; }
.genesis-review-requests h4 { margin: 0; }
.genesis-review-request { display: grid; gap: 10px; min-width: 0; padding: 14px; border: 1px solid rgba(239,107,104,.26); border-radius: 10px; background: rgba(239,107,104,.07); }
.genesis-review-request.responded { border-color: rgba(200,164,77,.34); background: rgba(200,164,77,.08); }
.genesis-review-request.resolved { border-color: rgba(83,185,154,.34); background: rgba(83,185,154,.08); }
.genesis-review-request label { display: grid; gap: 6px; }
.genesis-review-request textarea { min-height: 90px; resize: vertical; }
.genesis-review-request blockquote { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--teal); background: rgba(0,0,0,.16); }
.review-correction-guidance { margin: 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(200,164,77,.08); }
.review-request-status { color: #ffb4b4; }
.review-submit-status { min-height: 24px; margin: -4px 0 16px; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.04); }
.review-submit-status:empty { display: none; }
.review-submit-status.ready { color: #f4e6b8; background: rgba(200,164,77,.12); }
.review-submit-status.pending { color: var(--teal); background: rgba(48,182,166,.10); }
.review-submit-status.success { color: var(--green); background: rgba(83,185,154,.12); }
.review-submit-status.attention, .review-submit-status.error { color: #ffb4b4; background: rgba(239,107,104,.12); }
.validated-download { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 16px 0 22px; padding: 16px; border-radius: 10px; background: rgba(83,185,154,.12); border: 1px solid rgba(83,185,154,.25); }
.validated-download div { display: grid; gap: 5px; }
.validated-download span { color: var(--muted); font-size: .86rem; }
.share-workspace { margin-top: 30px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.12); }
.share-create-form { display: grid; grid-template-columns: .8fr 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; margin: 16px 0; }
.share-create-form label { display: grid; gap: 7px; font-size: .78rem; font-weight: 700; }
.share-create-form input, .share-create-form select { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: #101d2d; color: #f8fafc; padding: 10px; }
.share-create-form .check-label { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.share-create-form .check-label input { width: auto; }
.share-result { padding: 16px; border-radius: 10px; background: rgba(83,185,154,.12); overflow-wrap: anywhere; }
.share-list { display: grid; gap: 8px; margin-top: 12px; }
.share-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.05); }
.share-item.revoked { opacity: .6; }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.pricing-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(10,22,36,.72); }
.pricing-card.featured { border-color: var(--gold); box-shadow: 0 12px 36px rgba(200,164,77,0.12); }
.pricing-card.active { outline: 2px solid var(--gold); outline-offset: 3px; }
.pricing-card h3 { margin: 0; font-size: 1.35rem; }
.pricing-card .price strong { display: block; font-size: 2.2rem; }
.pricing-card .price span, .pricing-note { color: #a8b4c3; }
.pricing-card ul { flex: 1; margin: 0; padding-left: 20px; line-height: 1.8; }
.pricing-note { margin-top: 16px; text-align: center; }
.payment-card { max-width: 560px; }
.payment-line, .payment-total { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.payment-line strong { text-align: right; }
.payment-features { display: grid; gap: 8px; padding: 16px 0; color: #c7d1dd; }
.payment-features span::before { content: "✓"; color: #53b99a; margin-right: 8px; }
.payment-total { align-items: end; margin-bottom: 16px; }
.payment-total strong { font-size: 2rem; }
@media (max-width: 980px) { .audit-metadata, .audit-requirement { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .audit-requirement { grid-template-columns: 1fr; } .audit-requirement-overview, .audit-upload-grid { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .action-create, .corrective-action-grid, .corrective-action-closure { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .review-member-form, .review-comment-form, .review-decision { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .review-journey { grid-template-columns: 1fr; } .review-controls { align-items: stretch; flex-direction: column; } }
@media (max-width: 980px) { .share-create-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .audit-metadata, .audit-summary, .audit-requirement, .action-create, .corrective-action-grid, .corrective-action-closure, .review-member-form, .review-comment-form, .review-decision, .share-create-form { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .preaudit-framework { align-items: stretch; flex-direction: column; } .preaudit-trace-row { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .audit-save-bar { align-items: stretch; flex-direction: column; } }
@media (max-width: 640px) { .audit-submit-row { align-items: stretch; flex-direction: column; } .audit-submit-row .btn { width: 100%; } .audit-upload-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .validated-download { align-items: stretch; flex-direction: column; } }

.legal-shell {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.legal-shell .brand {
  margin-bottom: 42px;
}

.legal-shell section {
  margin-top: 18px;
  padding: 22px;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-shell h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.legal-shell p {
  margin-bottom: 0;
  color: var(--muted);
}

/* Les pages légales contiennent des tableaux (finalités, sous-traitants) qui
   rendaient en style navigateur par défaut, illisibles sur fond sombre. */
.legal-shell table { width: 100%; margin: 14px 0; border-collapse: collapse; font-size: 14px; }
.legal-shell caption { margin-bottom: 8px; color: var(--gold); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.legal-shell th, .legal-shell td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-shell th { background: rgba(255,255,255,.05); color: var(--ink); font-weight: 800; }
.legal-shell td { color: var(--muted); }
.legal-shell td code { color: var(--teal); }

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.legal-nav a {
  color: var(--ink-dark);
  text-decoration: none;
  padding: 10px 12px;
  background: var(--gold);
  border-radius: var(--radius);
  font-weight: 900;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 20px;
  background: rgba(7,9,13,0.72);
  backdrop-filter: blur(12px);
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(450px, 100%);
  min-height: 0;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-bottom: 0;
  font-size: 30px;
}

.auth-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-name-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.auth-mode-tab {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(244,239,229,0.72);
  font-weight: 800;
  cursor: pointer;
}

.auth-mode-tab.active {
  background: linear-gradient(135deg, var(--gold), #f0c963);
  color: #0b0f16;
}

.auth-mode-help {
  padding: 10px 12px;
  border: 1px solid rgba(48,182,166,0.20);
  border-radius: 14px;
  background: rgba(48,182,166,0.07);
}

.auth-card[data-mode="login"] [data-register-only] {
  display: none !important;
}

.optional-field {
  color: rgba(244,239,229,0.58);
  font-size: 0.84em;
  font-weight: 700;
}

.field-help {
  margin: -4px 0 2px;
  color: rgba(244,239,229,0.62);
  font-size: 13px;
  line-height: 1.45;
}

.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-actions .demo-auth {
  grid-column: 1 / -1;
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 20px;
}

.upload-guide {
  padding: 22px;
  border: 1px solid rgba(55, 185, 169, 0.38);
  border-radius: 16px;
  background: rgba(55, 185, 169, 0.07);
}

.upload-guide h3 { margin: 8px 0 10px; }
.upload-guide ol { margin: 0 0 16px; padding-left: 20px; }
.upload-guide li { margin: 8px 0; line-height: 1.55; }
.upload-guide .text-link { display: inline-block; margin-left: 14px; color: var(--teal); font-weight: 800; }

@media (max-width: 1060px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-nav {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .hero,
  .workspace,
  .market-strip,
  .expert,
  .command-section,
  .sample-lab {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .dash-grid,
  .command-grid,
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-steps div:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 24px, 1220px);
  }

  .hero {
    padding-top: 38px;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 390px;
  }

  .mission-row,
  .service-grid,
  .dash-grid,
  .diagnostic-form,
  .admin-login,
  .command-grid,
  .flow-steps,
  .appointment,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .client-console-head,
  .client-dossier,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .mission-row span,
  .flow-steps div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mission-row span:last-child,
  .flow-steps div:last-child {
    border-bottom: 0;
  }

  h1 {
    font-size: 40px;
  }
}

body.portal-home {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.98) 0%, rgba(7, 9, 13, 0.9) 42%, rgba(7, 9, 13, 0.48) 100%),
    linear-gradient(180deg, rgba(200, 164, 77, 0.1), transparent 260px),
    var(--bg);
  background-color: var(--bg);
}

body.portal-home::before {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.02), rgba(7, 9, 13, 0.7)),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: auto, 78px 78px, 78px 78px;
}

.portal-header {
  background: rgba(5, 7, 11, 0.82);
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(48, 182, 166, 0.12);
}

.portal-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.72fr);
  gap: clamp(30px, 5vw, 76px);
  align-items: start;
  padding: clamp(40px, 6vh, 68px) 0 clamp(30px, 5vh, 56px);
}

.portal-copy {
  max-width: 760px;
}

.portal-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(48px, 6.4vw, 86px);
  line-height: 0.96;
  letter-spacing: -0.015em;
}

.portal-copy .lead {
  max-width: 680px;
  color: rgba(244, 239, 229, 0.76);
  font-size: clamp(17px, 1.8vw, 21px);
}

.portal-actions {
  margin: 34px 0 0;
}

.portal-access-grid {
  display: grid;
  gap: 12px;
}

.portal-access {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 136px;
  padding: 18px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  appearance: none;
  background: rgba(8, 12, 18, 0.78);
  border: 1px solid rgba(244, 239, 229, 0.14);
  border-left-width: 4px;
  border-radius: var(--radius);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.portal-access::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent 42%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.portal-access:hover {
  transform: translateY(-2px);
  background: rgba(11, 17, 25, 0.92);
}

.portal-access:hover::after {
  opacity: 1;
}

.portal-access small {
  color: var(--gold);
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portal-access strong {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.12;
}

.portal-access span {
  max-width: 34ch;
  color: rgba(244, 239, 229, 0.68);
  font-size: 13px;
  font-weight: 700;
}

.accent-gold,
.accent-teal,
.accent-blue,
.accent-red {
  border-left-color: var(--gold);
}

.portal-footer-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(244, 239, 229, 0.14);
  border-radius: var(--radius);
  background: rgba(5, 7, 11, 0.68);
}

.portal-footer-line span {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  color: var(--muted);
  border-right: 1px solid rgba(244, 239, 229, 0.12);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-align: center;
  text-transform: uppercase;
}

.portal-footer-line span:last-child {
  border-right: 0;
}

.precontrol-result {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(244, 239, 229, 0.14);
  border-left: 4px solid #c89b3c;
  border-radius: 10px;
  background: rgba(10, 15, 22, 0.58);
}

.precontrol-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.precontrol-result.verdict-compliant { border-left-color: #43c59e; }
.precontrol-result.verdict-non_compliant,
.precontrol-result.verdict-non_receivable { border-left-color: #ef6b68; }
.precontrol-result.pending { color: var(--muted); }

.precontrol-next-step {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border-radius: 9px;
}

.precontrol-next-step.action-required { background: rgba(239, 107, 104, 0.1); }
.precontrol-next-step.success { background: rgba(67, 197, 158, 0.1); }
.precontrol-next-step p { margin: 0; line-height: 1.5; }
.precontrol-action-list { display: grid; gap: 6px; margin: 2px 0 0; padding-left: 22px; }
.precontrol-action-list li { line-height: 1.45; }
.precontrol-technical-details { padding-top: 2px; }
.precontrol-technical-details > summary { cursor: pointer; color: #d7e2ef; font-weight: 750; }
.precontrol-technical-content { display: grid; gap: 9px; margin-top: 10px; }

.precontrol-finding {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.precontrol-finding.blocking { background: rgba(239, 107, 104, 0.1); }
.precontrol-finding.warning { background: rgba(200, 155, 60, 0.1); }
.precontrol-finding span,
.precontrol-result small { color: var(--muted); }

.precontrol-document-traces {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(244, 239, 229, 0.1);
  border-radius: 8px;
}

.precontrol-document-trace {
  padding: 8px 10px;
  border-left: 3px solid #ef6b68;
  background: rgba(255, 255, 255, 0.035);
}

.precontrol-document-trace.passed { border-left-color: #43c59e; }
.precontrol-document-trace summary { cursor: pointer; font-weight: 700; }
.precontrol-document-trace[open] { display: grid; gap: 6px; }
.precontrol-trace-list { display: block; }
.precontrol-trace-list.detected b { color: #43c59e; }
.precontrol-trace-list.missing b { color: #ef9a96; }
.precontrol-finding blockquote,
.precontrol-document-trace blockquote {
  margin: 4px 0;
  padding: 8px 10px;
  border-left: 2px solid rgba(200, 155, 60, 0.7);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
}

.precontrol-correction b { color: var(--paper); }

@media (max-width: 1060px) {
  .portal-header {
    align-items: center;
    flex-flow: row wrap;
  }

  .portal-entry {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 54px;
  }

  .portal-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body.portal-home {
    background:
      linear-gradient(180deg, rgba(7, 9, 13, 0.94) 0%, rgba(7, 9, 13, 0.84) 58%, rgba(7, 9, 13, 0.96) 100%),
      var(--bg);
  }

  .portal-header {
    gap: 12px;
  }

  .portal-status {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .portal-copy h1 {
    font-size: clamp(48px, 16vw, 70px);
  }

  .portal-actions,
  .portal-actions .btn,
  .portal-access-grid,
  .portal-footer-line {
    width: 100%;
  }

  .portal-actions .btn {
    flex: 1 1 210px;
  }

  .portal-access-grid,
  .portal-footer-line {
    grid-template-columns: 1fr;
  }

  .portal-footer-line span {
    border-right: 0;
    border-bottom: 1px solid rgba(244, 239, 229, 0.12);
  }

  .portal-footer-line span:last-child {
    border-bottom: 0;
  }
}

/* Statut du formulaire de diagnostic : erreurs de validation et confirmations
   affichées sous le bouton, sans détourner la modale de connexion. */
.form-status {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.form-status.error {
  color: var(--red);
  background: rgba(216, 95, 95, 0.12);
  border: 1px solid rgba(216, 95, 95, 0.35);
}

/* Finition visuelle premium — site public Genesis Verified */
/* Le décor plein écran vit dans une couche composite dédiée plutôt que dans un
   background-attachment: fixed, qui forçait un repeint plein viewport à chaque
   frame de scroll. Rendu identique, coût de scroll ramené à zéro. */
body.portal-home {
  background: var(--bg);
}

body.portal-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 4%, rgba(200,164,77,0.20), transparent 28rem),
    radial-gradient(circle at 82% 14%, rgba(48,182,166,0.18), transparent 30rem),
    linear-gradient(180deg, #06090f 0%, #08101a 46%, #05070b 100%);
}

body.portal-home::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5,7,11,0.05), rgba(5,7,11,0.82));
  background-size: 92px 92px, 92px 92px, auto;
  mask-image: linear-gradient(180deg, black 0%, rgba(0,0,0,0.78) 42%, transparent 100%);
}

.portal-header {
  min-height: 72px;
  background: rgba(5, 8, 14, 0.76);
  border-bottom-color: rgba(255,255,255,0.10);
  box-shadow: 0 12px 45px rgba(0,0,0,0.22);
}

.brand-mark {
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32), 0 12px 30px rgba(200,164,77,0.18);
}

.portal-nav {
  padding: 4px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}

.portal-nav a {
  border-radius: 999px;
}

.portal-status {
  background: rgba(48,182,166,0.10);
  border-color: rgba(48,182,166,0.22);
}

.portal-entry {
  min-height: calc(100vh - 88px);
  align-items: center;
}

.portal-entry::before {
  content: "";
  position: absolute;
  inset: 28px -4vw 0;
  z-index: -1;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.072), transparent 42%),
    rgba(255,255,255,0.018);
  box-shadow: 0 40px 130px rgba(0,0,0,0.36);
}

.signal,
.kicker {
  width: fit-content;
  padding: 7px 10px;
  color: #e9d59b;
  background: rgba(200,164,77,0.105);
  border: 1px solid rgba(200,164,77,0.22);
  border-radius: 999px;
  letter-spacing: .12em;
}

.portal-copy h1 {
  max-width: 780px;
  background: linear-gradient(180deg, #fffaf0 0%, #d9c899 58%, #8df1df 118%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 26px 80px rgba(0,0,0,0.22);
}

.portal-copy h1 span {
  display: block;
}

.portal-copy h1 span:nth-child(2) {
  white-space: nowrap;
}

.portal-copy .lead {
  color: rgba(244,239,229,0.80);
  line-height: 1.65;
}

.btn {
  border-radius: 12px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  box-shadow: 0 14px 36px rgba(200,164,77,0.18);
}

.btn-light {
  color: var(--ink);
  background: rgba(255,255,255,0.072);
  border-color: rgba(255,255,255,0.14);
}

.portal-access {
  min-height: 148px;
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), transparent 48%),
    rgba(9, 15, 24, 0.76);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 22px 70px rgba(0,0,0,0.28);
}

.portal-access:hover {
  transform: translateY(-4px);
  border-color: rgba(200,164,77,0.30);
  box-shadow: 0 28px 90px rgba(0,0,0,0.34);
}

.accent-teal { border-left-color: var(--teal); }
.accent-blue { border-left-color: var(--blue); }
.accent-red { border-left-color: var(--copper); }

.portal-footer-line {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.section {
  padding: 74px 0;
}

.section-head h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.section-head p {
  max-width: 760px;
}

.pricing-grid,
.service-grid,
.dash-grid {
  gap: 18px;
}

.pricing-card,
.service-card,
.instant-panel,
.result-panel,
.dash-tile,
.client-console,
.audit-workspace,
.legal-shell section {
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035)),
    rgba(8, 15, 24, 0.78);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 24px 90px rgba(0,0,0,0.24);
}

.pricing-card {
  position: relative;
  padding: 30px;
  overflow: hidden;
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 82% 10%, rgba(200,164,77,0.16), transparent 15rem);
  opacity: .65;
}

.pricing-card > * {
  position: relative;
}

.pricing-card.featured {
  background:
    linear-gradient(145deg, rgba(200,164,77,0.16), rgba(255,255,255,0.045)),
    rgba(9, 16, 26, 0.92);
  transform: translateY(-8px);
  box-shadow: 0 34px 110px rgba(0,0,0,0.32), 0 0 0 1px rgba(200,164,77,0.18);
}

.pricing-card .price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 58px;
}

.pricing-card .price strong {
  display: inline;
  font-size: clamp(2rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
}

.pricing-card .price span {
  font-size: .9rem;
}

.pricing-card ul {
  padding-left: 0;
  list-style: none;
}

.pricing-card li {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.pricing-card li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 900;
}

.pricing-note {
  width: fit-content;
  margin: 22px auto 0;
  padding: 10px 16px;
  border: 1px solid rgba(200,164,77,0.18);
  border-radius: 999px;
  background: rgba(200,164,77,0.075);
}

.service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1180px;
  margin-inline: auto;
}

.service-card {
  min-height: 242px;
  padding: 20px;
  border-radius: 20px;
}

.service-card.active {
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(200,164,77,0.18), rgba(48,182,166,0.08)),
    rgba(10,18,29,0.92);
  border-color: rgba(200,164,77,0.34);
}

.service-card.active .service-tag {
  color: #f4e6b8;
  background: rgba(200,164,77,0.14);
  border-color: rgba(200,164,77,0.24);
}

.workspace {
  gap: 24px;
}

.instant-panel,
.result-panel {
  padding: 30px;
}

input,
select,
textarea {
  border-radius: 12px !important;
  background: rgba(4, 9, 15, 0.78) !important;
  border-color: rgba(255,255,255,0.13) !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(200,164,77,0.58) !important;
  box-shadow: 0 0 0 4px rgba(200,164,77,0.12) !important;
}

.result-panel {
  position: sticky;
  top: 96px;
  align-self: start;
}

.score-ring {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 24px 70px rgba(48,182,166,0.12);
}

.expert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(200,164,77,0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 8%, rgba(200,164,77,0.14), transparent 20rem),
    rgba(255,255,255,0.042);
}

.appointment {
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 22px;
  background: rgba(5,10,18,0.48);
}

.slot {
  border-radius: 14px;
}

.slot.active {
  color: #0a1018;
  background: linear-gradient(135deg, #e6c976, #9fe7d9);
}

.flow-steps {
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0,0,0,0.22);
}

.flow-steps div {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
    rgba(8,15,24,0.78);
}

@media (max-width: 1120px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .pricing-card.featured {
    transform: none;
  }

  .expert,
  .workspace {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .service-grid,
  .dash-grid,
  .flow-steps {
    grid-template-columns: 1fr;
  }

  .portal-copy h1 span:nth-child(2) {
    white-space: normal;
  }

  .portal-entry::before {
    inset: 10px -12px 0;
    border-radius: 24px;
  }
}

.form-status.success {
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(48, 182, 166, 0.35);
}

/* Vie éditoriale et démonstrateurs métier */
/* Bandeau collant : fond opaque au lieu d'un backdrop-filter. Un flou de
   backdrop sur un élément sticky qui contient une piste animée en continu
   oblige le compositeur à refloutter le fond à chaque frame, en permanence.
   `contain` isole le sous-arbre, `will-change` promeut la piste sur sa couche. */
.live-ticker {
  position: sticky;
  top: 72px;
  z-index: 19;
  overflow: hidden;
  border-bottom: 1px solid rgba(200,164,77,0.16);
  background: #0a0e16;
  contain: content;
}

.ticker-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: tickerMove 36s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 28px;
  color: rgba(244,239,229,0.74);
  border-right: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-track span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(48,182,166,0.10);
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.procedure-showcase {
  position: relative;
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.procedure-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.028)),
    rgba(8,15,24,0.78);
  box-shadow: 0 24px 90px rgba(0,0,0,0.22);
}

.procedure-card::before {
  content: "";
  position: absolute;
  inset: auto 18px 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  opacity: .55;
}

.procedure-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(48,182,166,0.10);
}

.procedure-card small,
.procedure-card strong,
.procedure-card span {
  position: relative;
  display: block;
}

.procedure-card small {
  color: var(--gold);
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.procedure-card strong {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.12;
}

.procedure-card span {
  color: rgba(244,239,229,0.68);
  font-size: 14px;
}

.procedure-card.is-active {
  border-color: rgba(200,164,77,0.32);
  background:
    linear-gradient(145deg, rgba(200,164,77,0.16), rgba(48,182,166,0.07)),
    rgba(9,16,26,0.92);
}

.industrial-demo {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(420px, 1.22fr);
  gap: 28px;
  align-items: center;
  padding: 36px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 10%, rgba(200,164,77,0.14), transparent 22rem),
    radial-gradient(circle at 90% 18%, rgba(48,182,166,0.14), transparent 24rem),
    rgba(255,255,255,0.038);
  box-shadow: 0 34px 120px rgba(0,0,0,0.26);
}

.industrial-copy h2 {
  margin: 16px 0;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.industrial-copy p {
  color: rgba(244,239,229,0.74);
  font-size: 16px;
}

.demo-verdict {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(48,182,166,0.24);
  border-radius: 18px;
  background: rgba(48,182,166,0.09);
}

.demo-verdict strong {
  color: var(--teal);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.demo-verdict span {
  color: rgba(244,239,229,0.78);
  font-weight: 800;
}

.machine-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.028)),
    rgba(5,10,18,0.76);
}

.machine-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.machine-status strong,
.machine-status small {
  display: block;
}

.machine-status strong {
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.machine-status small {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(48,182,166,0.13);
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  50% { opacity: .42; transform: scale(.88); }
}

.machine-svg {
  display: block;
  width: 100%;
  height: auto;
}

.svg-tank,
.svg-unit {
  fill: rgba(12, 24, 37, .92);
  stroke: rgba(244,239,229,.18);
  stroke-width: 2;
}

.svg-label {
  fill: rgba(244,239,229,.64);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
}

.svg-pipe {
  fill: none;
  stroke: url(#pipeGlow);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 16 12;
}

.pipe-flow {
  animation: pipeFlow 1.1s linear infinite;
}

@keyframes pipeFlow {
  to { stroke-dashoffset: -56; }
}

.svg-rotor {
  stroke: var(--teal);
  stroke-width: 4;
  stroke-linecap: round;
  transform-origin: 250px 254px;
  animation: rotorSpin 2s linear infinite;
}

@keyframes rotorSpin {
  to { transform: rotate(360deg); }
}

.svg-accent {
  fill: var(--teal);
}

.svg-needle {
  stroke: var(--gold);
  stroke-width: 4;
  stroke-linecap: round;
  transform-origin: 374px 74px;
  animation: needleMove 2.8s ease-in-out infinite;
}

@keyframes needleMove {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(28deg); }
}

.scan-beam rect {
  fill: none;
  stroke: rgba(48,182,166,0.14);
  stroke-width: 1;
}

.scan-beam line {
  stroke: rgba(141,241,223,0.72);
  stroke-width: 2;
  filter: drop-shadow(0 0 10px rgba(48,182,166,0.65));
  animation: scanMove 3.2s ease-in-out infinite;
}

@keyframes scanMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(610px); }
}

.demo-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.demo-checks span {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
}

.demo-checks .ok {
  color: #9fe7d9;
  background: rgba(48,182,166,0.10);
  border: 1px solid rgba(48,182,166,0.22);
}

.demo-checks .warn {
  color: #f2d48b;
  background: rgba(200,164,77,0.10);
  border: 1px solid rgba(200,164,77,0.22);
}

/* Référentiels couverts : la colonne « déclarée » et la colonne « détectée »
   matérialisent la promesse plateforme avant toute mention d'un module. */
.frameworks-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.frameworks-column {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(8,15,24,0.72);
}

.frameworks-column.is-detected {
  border-color: rgba(48,182,166,0.28);
}

.frameworks-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(200,164,77,0.28);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frameworks-column.is-detected .frameworks-label {
  border-color: rgba(48,182,166,0.32);
  color: var(--teal);
}

.frameworks-column h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
}

.frameworks-column > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

.frameworks-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.frameworks-list li {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.frameworks-list strong {
  font-size: 15px;
}

.frameworks-list span {
  color: var(--muted);
  font-size: 13px;
}

.frameworks-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Module actif : libellé secondaire, pour qu'aucune verticale ne tienne le titre
   du formulaire principal. */
.module-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  justify-self: start;
}

.module-badge span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-badge strong {
  font-size: 14px;
}

/* Tant qu'aucun module n'est choisi, l'anneau ne doit afficher aucun score :
   le 72 % par défaut se lisait comme un résultat déjà calculé. */
.score-ring.is-idle {
  background:
    radial-gradient(circle at center, var(--bg) 0 58%, transparent 59%),
    conic-gradient(rgba(244,239,229,0.12) 0 100%);
}

.score-ring.is-idle span {
  color: var(--muted);
}

@media (max-width: 980px) {
  .frameworks-columns {
    grid-template-columns: 1fr;
  }

  .cabinet-section {
    grid-template-columns: 1fr;
  }

  .cabinet-card-highlight {
    transform: none;
  }

  .industrial-demo {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .machine-status {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .machine-status small {
    width: 100%;
    margin-left: 20px;
  }

  .procedure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .live-ticker {
    top: 0;
  }

  .ticker-track span {
    min-height: 34px;
    padding: 0 18px;
    font-size: 10px;
  }

  .procedure-grid,
  .demo-checks {
    grid-template-columns: 1fr;
  }

  .cabinet-grid {
    grid-template-columns: 1fr;
  }

  .cabinet-section {
    padding: 28px 20px;
  }
}

/* Budget de rendu : les deux sections de démonstration ne sont mises en page,
   peintes et animées que lorsqu'elles approchent du viewport. Les six
   animations infinies du démonstrateur industriel tournaient jusqu'ici en
   permanence, y compris hors écran. `contain-intrinsic-size: auto <h>`
   mémorise la hauteur réelle après le premier rendu : pas de saut d'ascenseur.

   Volontairement limité à ces deux sections : elles ne sont la cible d'aucune
   ancre. Une section atteinte par un saut instantané (#expert, #proof-flow,
   #instant) pourrait afficher une frame vide avant son premier rendu. */
.procedure-showcase,
.industrial-demo {
  content-visibility: auto;
  contain-intrinsic-size: auto 760px;
}

/* Le faisceau de scan combinait une translation animée et un drop-shadow :
   chaque frame repeignait une ombre floue. L'ombre devient statique, seul le
   transform (composité, hors thread principal) reste animé. */
.scan-beam line {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .procedure-showcase,
  .industrial-demo {
    content-visibility: visible;
  }

  .ticker-track,
  .pipe-flow,
  .svg-rotor,
  .svg-needle,
  .scan-beam line,
  .pulse-dot,
  .genesis-flow-board::before {
    animation: none;
  }
}

/* Genesis home video gallery */
.media-gallery-section {
  overflow: hidden;
}

/* Harmonized Genesis flow board */
.genesis-flow-board {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 82% 0%, rgba(200,164,77,0.16), transparent 18rem),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.028)),
    rgba(9, 16, 26, 0.92);
  box-shadow: 0 34px 110px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.04);
}
.genesis-flow-board::before {
  content: "";
  position: absolute;
  inset: auto 22px 22px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  opacity: .55;
  pointer-events: none;
}
.flow-board-header,
.flow-board-grid,
.flow-board-promise { position: relative; z-index: 1; }
.flow-board-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: start;
  margin-bottom: 20px;
}
.flow-board-header h3 {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -.025em;
}
.flow-board-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 420px;
}
.flow-board-pills span {
  border: 1px solid rgba(200,164,77,0.24);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(200,164,77,0.10);
  color: #f4e6b8;
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: none;
}
.flow-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 880px;
  margin-inline: auto;
}
.flow-board-grid article {
  position: relative;
  min-height: 158px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(10,18,29,0.78);
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.flow-board-grid article::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -54px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(48,182,166,0.08);
  pointer-events: none;
}
.flow-board-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(200,164,77,0.30);
  background:
    linear-gradient(145deg, rgba(200,164,77,0.10), rgba(48,182,166,0.045)),
    rgba(10,18,29,0.86);
  box-shadow: none;
}
.flow-board-grid small,
.flow-board-grid strong,
.flow-board-grid span { position: relative; z-index: 1; display: block; }
.flow-board-grid small {
  width: fit-content;
  height: auto;
  margin: 0 0 16px;
  padding: 5px 8px;
  border: 1px solid rgba(200,164,77,0.24);
  border-radius: 999px;
  background: rgba(200,164,77,0.12);
  color: var(--gold);
  font-family: var(--mono, "SFMono-Regular", ui-monospace, monospace);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
}
.flow-board-grid strong {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.12;
  letter-spacing: 0;
}
.flow-board-grid span {
  max-width: 34ch;
  color: rgba(244,239,229,0.68);
  font-size: 14px;
  line-height: 1.55;
}
.flow-board-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.flow-board-promise span {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 8px 12px;
  color: rgba(244,239,229,0.72);
  background: rgba(255,255,255,0.045);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 980px) {
  .flow-board-header { grid-template-columns: 1fr; }
  .flow-board-pills { justify-content: flex-start; }
  .flow-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .genesis-flow-board { border-radius: 20px; padding: 18px; }
  .flow-board-grid { grid-template-columns: 1fr; }
}

/* Cockpit client : adaptations finales, placées après les styles historiques. */
@media (max-width: 980px) {
  .client-command-main,
  .dossier-card { grid-template-columns: 1fr; }
  .dossier-card-next {
    border-top: 1px solid rgba(255,255,255,.09);
    border-left: 0;
  }
  .client-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-lifecycle li:nth-child(2) { border-right: 0; }
  .client-lifecycle li:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.09); }
}

@media (max-width: 640px) {
  .client-command-main { padding: 24px 18px; }
  .client-command-copy h2 { font-size: 35px; }
  .client-command-actions .btn { width: 100%; }
  .client-lifecycle { grid-template-columns: 1fr; }
  .client-lifecycle li {
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.09);
  }
  .client-lifecycle li:last-child { border-bottom: 0; }
  .dossier-card-main,
  .dossier-card-next { padding: 18px; }
  .dossier-card-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .dossier-facts { display: grid; }
  .client-dossier-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .client-focus-progress > span,
  .dossier-progress > span { transition: none; }
}

/* Demande d'information : remplace l'ancien lien mailto par un envoi traité par la plateforme. */
.study-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.study-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.study-form textarea {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  font: inherit;
  resize: vertical;
}

.study-form .study-wide {
  grid-column: 1 / -1;
}

.study-form .study-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.study-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.study-note a {
  color: var(--gold);
}

@media (max-width: 760px) {
  .study-form {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Habillage éditorial du site vitrine (visiteurs non connectés uniquement).
   Tronc : papier, encre, vermillon. Branches : fiches en éventail, tracé de
   la chaîne de preuve, coffre de preuves. L'espace client garde son thème.
   ========================================================================== */
body.portal-home:not(.is-authenticated) {
  --bg: #f3efe7;
  --bg-2: #ebe5d9;
  --panel: #fffdf8;
  --panel-2: #f7f3eb;
  --panel-3: #141414;
  --ink: #141414;
  --ink-dark: #f3efe7;
  --muted: #5b5750;
  --muted-dark: #5b5750;
  --line: rgba(20, 20, 20, 0.16);
  --line-dark: rgba(20, 20, 20, 0.16);
  --gold: #d2412c;
  --teal: #2f5d4a;
  --teal-soft: rgba(47, 93, 74, 0.1);
  --copper: #d2412c;
  --blue: #141414;
  --red: #d2412c;
  --radius: 0px;
  --shadow: none;
  --sans: "Inter Tight", "Inter", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ed-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --ed-soft: rgba(20, 20, 20, 0.16);
  background: #f3efe7;
  color: #141414;
  font-family: var(--sans);
}
body.portal-home:not(.is-authenticated)::before, body.portal-home:not(.is-authenticated)::after { display: none; }
body.portal-home:not(.is-authenticated) main { width: min(1200px, calc(100% - 40px)); }
body.portal-home:not(.is-authenticated) h1, body.portal-home:not(.is-authenticated) h2, body.portal-home:not(.is-authenticated) h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; color: #141414; }
body.portal-home:not(.is-authenticated) h1 i, body.portal-home:not(.is-authenticated) h2 i { color: #d2412c; }

/* Étiquettes et boutons */
body.portal-home:not(.is-authenticated) .signal, body.portal-home:not(.is-authenticated) .kicker {
  padding: 0; color: #141414; background: none; border: 0; border-radius: 0;
  font: 500 12px/1.4 var(--ed-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
body.portal-home:not(.is-authenticated) .signal b, body.portal-home:not(.is-authenticated) .kicker b { color: #d2412c; font-weight: 500; }
body.portal-home:not(.is-authenticated) .btn { border-radius: 0; box-shadow: none; font-family: var(--sans); font-weight: 600; transform: none; }
body.portal-home:not(.is-authenticated) .btn-primary, body.portal-home:not(.is-authenticated) .btn-dark { color: #f3efe7; background: #141414; border: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .btn-primary:hover, body.portal-home:not(.is-authenticated) .btn-dark:hover { background: #d2412c; border-color: #d2412c; transform: none; }
body.portal-home:not(.is-authenticated) .btn-light { color: #141414; background: transparent; border: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .btn-light:hover { color: #f3efe7; background: #141414; }

/* En-tête et bandeau */
body.portal-home:not(.is-authenticated) .portal-header { background: rgba(243, 239, 231, 0.94); border-bottom: 1px solid #141414; box-shadow: none; backdrop-filter: blur(8px); }
body.portal-home:not(.is-authenticated) .brand { color: #141414; }
body.portal-home:not(.is-authenticated) .brand-mark { color: #f3efe7; background: #141414; border-radius: 0; box-shadow: none; }
body.portal-home:not(.is-authenticated) .brand strong { font: 400 24px/1 var(--serif); }
body.portal-home:not(.is-authenticated) .brand small { color: #d2412c; font-family: var(--ed-mono); }
body.portal-home:not(.is-authenticated) .portal-nav { background: none; border: 0; border-radius: 0; }
body.portal-home:not(.is-authenticated) .portal-nav a { color: #141414; border-radius: 0; }
body.portal-home:not(.is-authenticated) .portal-nav a:hover { color: #d2412c; background: none; }
body.portal-home:not(.is-authenticated) .portal-status { color: #141414; background: none; border: 1px solid var(--ed-soft); border-radius: 0; }
body.portal-home:not(.is-authenticated) .portal-status span { background: #2f5d4a; box-shadow: none; }
body.portal-home:not(.is-authenticated) .live-ticker { background: #f3efe7; border-top: 0; border-bottom: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .live-ticker span { color: #141414; font: 400 22px/1.4 var(--serif); letter-spacing: 0; text-transform: none; }
body.portal-home:not(.is-authenticated) .live-ticker span::before { background: #d2412c; box-shadow: none; }

/* Ouverture : titre, fiches en éventail, accès */
body.portal-home:not(.is-authenticated) .portal-entry {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; min-height: 0; padding: 0;
  border-bottom: 1px solid #141414; align-items: stretch;
}
body.portal-home:not(.is-authenticated) .portal-entry::before { display: none; }
body.portal-home:not(.is-authenticated) .portal-copy { max-width: none; padding: 64px 40px 64px 0; }
body.portal-home:not(.is-authenticated) .portal-copy h1 {
  margin: 18px 0 24px; font-size: clamp(54px, 7.4vw, 110px); line-height: 0.94;
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #141414; text-shadow: none;
}
body.portal-home:not(.is-authenticated) .portal-copy .lead { color: #5b5750; font-size: 19px; max-width: 560px; }
body.portal-home:not(.is-authenticated) .ed-fan { position: relative; min-height: 470px; overflow: hidden; border-left: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .ed-sheet {
  position: absolute; left: 50%; top: 80px; width: 300px; margin-left: -150px; display: grid; gap: 0;
  padding: 20px 22px; background: #fffdf8; border: 1px solid #141414; box-shadow: 8px 8px 0 #141414;
  transition: transform 1.2s cubic-bezier(.2, .8, .2, 1);
}
body.portal-home:not(.is-authenticated) .ed-sheet strong { margin: 4px 0 10px; font: 400 24px/1.1 var(--serif); }
body.portal-home:not(.is-authenticated) .ed-kicker { font: 500 11px var(--ed-mono); letter-spacing: 0.08em; text-transform: uppercase; }
body.portal-home:not(.is-authenticated) .ed-kicker b { color: #d2412c; font-weight: 500; }
body.portal-home:not(.is-authenticated) .ed-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ed-soft); font: 13px var(--ed-mono); }
body.portal-home:not(.is-authenticated) .ed-line em { font-style: normal; }
body.portal-home:not(.is-authenticated) .ed-line .ko { color: #d2412c; }
body.portal-home:not(.is-authenticated) .ed-fan.is-open .ed-s1 { transform: translate(-108px, 46px) rotate(-7deg); }
body.portal-home:not(.is-authenticated) .ed-fan.is-open .ed-s3 { transform: translate(108px, 46px) rotate(7deg); }
body.portal-home:not(.is-authenticated) .ed-fan.is-open .ed-s2 { transform: translateY(-10px); }
body.portal-home:not(.is-authenticated) .portal-access-grid { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .portal-access {
  min-height: 0; padding: 32px 24px 44px; color: #141414; background: none; border: 0; border-right: 1px solid #141414;
  border-radius: 0; box-shadow: none; transition: background 0.35s, color 0.35s;
}
body.portal-home:not(.is-authenticated) .portal-access:last-child { border-right: 0; }
body.portal-home:not(.is-authenticated) .portal-access::after { display: none; }
body.portal-home:not(.is-authenticated) .portal-access:hover { color: #f3efe7; background: #141414; transform: none; box-shadow: none; }
body.portal-home:not(.is-authenticated) .portal-access small { color: #d2412c; font: 500 12px var(--ed-mono); letter-spacing: 0.04em; }
body.portal-home:not(.is-authenticated) .portal-access strong { font: 400 32px/1.05 var(--serif); }
body.portal-home:not(.is-authenticated) .portal-access span { color: inherit; opacity: 0.75; font-size: 14px; }
body.portal-home:not(.is-authenticated) .portal-footer-line { display: none; }

/* Sections */
body.portal-home:not(.is-authenticated) .section { padding: 90px 0; border-bottom: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .section-head h2, body.portal-home:not(.is-authenticated) .cabinet-intro h2, body.portal-home:not(.is-authenticated) .industrial-copy h2, body.portal-home:not(.is-authenticated) .expert h2 { font-size: clamp(38px, 5vw, 66px); line-height: 1; letter-spacing: -0.015em; }
body.portal-home:not(.is-authenticated) .section-head p, body.portal-home:not(.is-authenticated) .cabinet-intro p, body.portal-home:not(.is-authenticated) .industrial-copy p, body.portal-home:not(.is-authenticated) .expert p { color: #5b5750; }
body.portal-home:not(.is-authenticated) .frameworks-column, body.portal-home:not(.is-authenticated) .cabinet-card, body.portal-home:not(.is-authenticated) .pricing-card, body.portal-home:not(.is-authenticated) .procedure-card, body.portal-home:not(.is-authenticated) .machine-card, body.portal-home:not(.is-authenticated) .genesis-flow-board, body.portal-home:not(.is-authenticated) .appointment {
  color: #141414; background: #fffdf8; border: 1px solid #141414; border-radius: 0; box-shadow: none;
}
body.portal-home:not(.is-authenticated) .frameworks-column::before, body.portal-home:not(.is-authenticated) .frameworks-column::after, body.portal-home:not(.is-authenticated) .cabinet-card::before, body.portal-home:not(.is-authenticated) .cabinet-card::after,
body.portal-home:not(.is-authenticated) .pricing-card::before, body.portal-home:not(.is-authenticated) .pricing-card::after, body.portal-home:not(.is-authenticated) .procedure-card::before, body.portal-home:not(.is-authenticated) .procedure-card::after { display: none; }
body.portal-home:not(.is-authenticated) .frameworks-column.is-detected, body.portal-home:not(.is-authenticated) .cabinet-card-highlight, body.portal-home:not(.is-authenticated) .procedure-card.is-active { background: #141414; color: #f3efe7; }
body.portal-home:not(.is-authenticated) .frameworks-column.is-detected h3, body.portal-home:not(.is-authenticated) .cabinet-card-highlight h3, body.portal-home:not(.is-authenticated) .procedure-card.is-active strong { color: #f3efe7; }
body.portal-home:not(.is-authenticated) .frameworks-column.is-detected p, body.portal-home:not(.is-authenticated) .frameworks-column.is-detected span, body.portal-home:not(.is-authenticated) .cabinet-card-highlight p, body.portal-home:not(.is-authenticated) .procedure-card.is-active span { color: rgba(243, 239, 231, 0.75); }
body.portal-home:not(.is-authenticated) .frameworks-label, body.portal-home:not(.is-authenticated) .cabinet-number, body.portal-home:not(.is-authenticated) .procedure-card small, body.portal-home:not(.is-authenticated) .flow-board-grid small, body.portal-home:not(.is-authenticated) .service-tag {
  color: #d2412c; background: none; border: 0; padding: 0; font: 500 12px var(--ed-mono); letter-spacing: 0.06em; text-transform: uppercase;
}
body.portal-home:not(.is-authenticated) .frameworks-list li { border-color: var(--ed-soft); }
body.portal-home:not(.is-authenticated) .frameworks-column.is-detected .frameworks-list li { border-color: rgba(243, 239, 231, 0.2); }
body.portal-home:not(.is-authenticated) .frameworks-list strong { font-family: var(--serif); font-weight: 400; font-size: 20px; }
body.portal-home:not(.is-authenticated) .frameworks-note { color: #5b5750; }
body.portal-home:not(.is-authenticated) .frameworks-note b { color: #d2412c; }
body.portal-home:not(.is-authenticated) .cabinet-card h3, body.portal-home:not(.is-authenticated) .pricing-card h3, body.portal-home:not(.is-authenticated) .procedure-card strong { font: 400 28px/1.08 var(--serif); }
body.portal-home:not(.is-authenticated) .pricing-card.featured { border: 2px solid #d2412c; }
body.portal-home:not(.is-authenticated) .price strong { font: 400 46px/1 var(--serif); color: #141414; }
body.portal-home:not(.is-authenticated) .price span, body.portal-home:not(.is-authenticated) .pricing-card p, body.portal-home:not(.is-authenticated) .pricing-card li, body.portal-home:not(.is-authenticated) .pricing-note { color: #5b5750; }
body.portal-home:not(.is-authenticated) .demo-verdict { color: #141414; background: #fffdf8; border: 1px solid #141414; border-left: 4px solid #d2412c; border-radius: 0; }
body.portal-home:not(.is-authenticated) .machine-status, body.portal-home:not(.is-authenticated) .machine-status small { color: #141414; }
body.portal-home:not(.is-authenticated) .svg-tank, body.portal-home:not(.is-authenticated) .svg-unit { fill: #fffdf8; stroke: #141414; }
body.portal-home:not(.is-authenticated) .svg-label { fill: #141414; font-family: var(--ed-mono); }
body.portal-home:not(.is-authenticated) .svg-pipe { stroke: #141414; }
body.portal-home:not(.is-authenticated) .svg-accent, body.portal-home:not(.is-authenticated) .svg-needle { fill: #d2412c; stroke: #d2412c; }
body.portal-home:not(.is-authenticated) .svg-rotor line { stroke: #d2412c; }
body.portal-home:not(.is-authenticated) .scan-beam rect, body.portal-home:not(.is-authenticated) .scan-beam line { stroke: rgba(210, 65, 44, 0.45); }
body.portal-home:not(.is-authenticated) .demo-checks span { color: #141414; background: none; border: 1px solid #141414; border-radius: 0; }
body.portal-home:not(.is-authenticated) .demo-checks .warn { color: #d2412c; border-color: #d2412c; }
body.portal-home:not(.is-authenticated) .expert { background: none; }
body.portal-home:not(.is-authenticated) .slot { color: #141414; background: none; border: 1px solid #141414; border-radius: 0; }
body.portal-home:not(.is-authenticated) .slot.active { color: #f3efe7; background: #141414; }
body.portal-home:not(.is-authenticated) .study-form label { color: #141414; }
body.portal-home:not(.is-authenticated) .study-note a { color: #d2412c; }
body.portal-home:not(.is-authenticated) input, body.portal-home:not(.is-authenticated) select, body.portal-home:not(.is-authenticated) textarea { color: #141414 !important; background: #fffdf8 !important; border: 1px solid #141414 !important; border-radius: 0 !important; box-shadow: none !important; }
body.portal-home:not(.is-authenticated) input:focus, body.portal-home:not(.is-authenticated) select:focus, body.portal-home:not(.is-authenticated) textarea:focus { border-color: #d2412c !important; box-shadow: 0 0 0 3px rgba(210, 65, 44, 0.15) !important; }
body.portal-home:not(.is-authenticated) #dashboard.section { background: none; }
body.portal-home:not(.is-authenticated) .flow-board-header h3, body.portal-home:not(.is-authenticated) .flow-board-grid strong { font-family: var(--serif); font-weight: 400; color: #141414; }
body.portal-home:not(.is-authenticated) .flow-board-grid article { background: none; border: 0; border-right: 1px solid var(--ed-soft); border-radius: 0; }
body.portal-home:not(.is-authenticated) .flow-board-grid span { color: #5b5750; }
body.portal-home:not(.is-authenticated) .flow-board-pills span, body.portal-home:not(.is-authenticated) .flow-board-promise span { color: #141414; background: none; border: 1px solid #141414; border-radius: 0; }

/* Branche : tracé de la chaîne de preuve */
body.portal-home:not(.is-authenticated) .ed-method { display: grid; grid-template-columns: 5fr 7fr; gap: 50px; align-items: center; padding: 90px 0; border-bottom: 1px solid #141414; background: none; }
body.portal-home:not(.is-authenticated) .ed-method h2, body.portal-home:not(.is-authenticated) .ed-vault h2 { margin: 14px 0 18px; font-size: clamp(40px, 5vw, 68px); line-height: 1; }
body.portal-home:not(.is-authenticated) .ed-method p { color: #5b5750; font-size: 18px; }
body.portal-home:not(.is-authenticated) .ed-steps { list-style: none; margin: 26px 0 0; padding: 0; font-size: 15px; }
body.portal-home:not(.is-authenticated) .ed-steps li { display: grid; grid-template-columns: 48px 1fr; padding: 12px 0; border-top: 1px solid var(--ed-soft); }
body.portal-home:not(.is-authenticated) .ed-steps b { color: #d2412c; font: 500 12px var(--ed-mono); }
body.portal-home:not(.is-authenticated) .ed-plan {
  padding: 18px; background-color: #ebe5d9; border: 1px solid #141414;
  background-image: linear-gradient(var(--ed-soft) 1px, transparent 1px), linear-gradient(90deg, var(--ed-soft) 1px, transparent 1px);
  background-size: 32px 32px;
}
body.portal-home:not(.is-authenticated) .ed-plan svg { display: block; width: 100%; height: auto; }
body.portal-home:not(.is-authenticated) .ed-svg-title { font: 400 22px var(--serif); fill: #141414; }
body.portal-home:not(.is-authenticated) .ed-svg-title.is-red { fill: #d2412c; }
body.portal-home:not(.is-authenticated) .ed-cote { font: 500 11px var(--ed-mono); fill: #5b5750; }
body.portal-home:not(.is-authenticated) .ed-draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
body.portal-home:not(.is-authenticated) .ed-node { opacity: 0; }
body.portal-home:not(.is-authenticated) .ed-plan.is-drawn .ed-draw { animation: ed-draw 2.8s ease forwards; }
body.portal-home:not(.is-authenticated) .ed-plan.is-drawn .ed-node { animation: ed-appear 0.6s ease forwards; }

/* Branche : coffre de preuves */
body.portal-home:not(.is-authenticated) .ed-vault {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding: 90px 0; color: #f3efe7; background: #141414; box-shadow: 0 0 0 100vmax #141414; clip-path: inset(0 -100vmax);
}
body.portal-home:not(.is-authenticated) .ed-vault h2 { color: #f3efe7; }
body.portal-home:not(.is-authenticated) .ed-vault p { color: rgba(243, 239, 231, 0.72); font-size: 18px; max-width: 540px; }
body.portal-home:not(.is-authenticated) .ed-vault .kicker { color: rgba(243, 239, 231, 0.85); }
body.portal-home:not(.is-authenticated) .ed-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
body.portal-home:not(.is-authenticated) .ed-vault .btn-primary { color: #141414; background: #f3efe7; border-color: #f3efe7; }
body.portal-home:not(.is-authenticated) .ed-vault .btn-primary:hover { color: #f3efe7; background: #d2412c; border-color: #d2412c; }
body.portal-home:not(.is-authenticated) .ed-vault .btn-light { color: #f3efe7; border-color: rgba(243, 239, 231, 0.6); }
body.portal-home:not(.is-authenticated) .ed-vault .btn-light:hover { color: #141414; background: #f3efe7; }
body.portal-home:not(.is-authenticated) .ed-scene { display: grid; place-items: center; height: 420px; perspective: 1000px; }
body.portal-home:not(.is-authenticated) .ed-cube { position: relative; width: 210px; height: 210px; transform-style: preserve-3d; animation: ed-turn 20s linear infinite; }
body.portal-home:not(.is-authenticated) .ed-face {
  position: absolute; inset: 0; padding: 14px; overflow: hidden; word-break: break-all;
  color: rgba(243, 239, 231, 0.5); background: rgba(243, 239, 231, 0.04); border: 1px solid rgba(210, 65, 44, 0.8);
  font: 11px/1.4 var(--ed-mono);
}
body.portal-home:not(.is-authenticated) .ed-face b { display: block; margin-bottom: 8px; color: #d2412c; font-weight: 500; }
body.portal-home:not(.is-authenticated) .ed-f1 { transform: translateZ(105px); }
body.portal-home:not(.is-authenticated) .ed-f2 { transform: rotateY(90deg) translateZ(105px); }
body.portal-home:not(.is-authenticated) .ed-f3 { transform: rotateY(180deg) translateZ(105px); }
body.portal-home:not(.is-authenticated) .ed-f4 { transform: rotateY(-90deg) translateZ(105px); }
body.portal-home:not(.is-authenticated) .ed-f5 { transform: rotateX(90deg) translateZ(105px); }
body.portal-home:not(.is-authenticated) .ed-f6 { transform: rotateX(-90deg) translateZ(105px); }

/* Pied de page et fenêtre de connexion */
body.portal-home:not(.is-authenticated) .site-footer { color: #5b5750; background: none; border-top: 1px solid #141414; }
body.portal-home:not(.is-authenticated) .site-footer a { color: #141414; }
body.portal-home:not(.is-authenticated) .auth-card { color: #141414; background: #fffdf8; border: 1px solid #141414; border-radius: 0; box-shadow: 10px 10px 0 #141414; }
body.portal-home:not(.is-authenticated) .auth-card h2 { color: #141414; }
body.portal-home:not(.is-authenticated) .auth-card .close { color: #141414; background: none; border-color: #141414; border-radius: 0; }
body.portal-home:not(.is-authenticated) .auth-mode-tab { color: #141414; background: none; border: 1px solid #141414; border-radius: 0; }
body.portal-home:not(.is-authenticated) .auth-mode-tab.active { color: #f3efe7; background: #141414; }
body.portal-home:not(.is-authenticated) .auth-card label, body.portal-home:not(.is-authenticated) .auth-mode-help, body.portal-home:not(.is-authenticated) #auth-status { color: #5b5750; }

body.portal-home:not(.is-authenticated) .cabinet-section { color: #141414; background: #fffdf8; border: 1px solid #141414; border-radius: 0; box-shadow: none; }
body.portal-home:not(.is-authenticated) .frameworks-list { gap: 0; }
body.portal-home:not(.is-authenticated) .frameworks-list li { padding: 12px 0; background: none; border: 0; border-top: 1px solid var(--ed-soft); border-radius: 0; }
body.portal-home:not(.is-authenticated) .pricing-card li::before { color: #d2412c; background: none; }
body.portal-home:not(.is-authenticated) .pricing-note { color: #141414; background: none; border: 1px solid #141414; border-radius: 0; }

body.portal-home:not(.is-authenticated) .procedure-card span { color: #5b5750; }
body.portal-home:not(.is-authenticated) .procedure-card.is-active span { color: rgba(243, 239, 231, 0.75); }
body.portal-home:not(.is-authenticated) .industrial-demo { color: #141414; background: #fffdf8; border: 1px solid #141414; border-radius: 0; box-shadow: none; }
body.portal-home:not(.is-authenticated) .industrial-demo::before, body.portal-home:not(.is-authenticated) .industrial-demo::after { display: none; }
body.portal-home:not(.is-authenticated) .demo-verdict span { color: #5b5750; }
body.portal-home:not(.is-authenticated) .demo-verdict strong { color: #d2412c; }

body.portal-home:not(.is-authenticated) .expert { border: 0; border-bottom: 1px solid #141414; border-radius: 0; box-shadow: none; }
body.portal-home:not(.is-authenticated) .expert::before, body.portal-home:not(.is-authenticated) .expert::after { display: none; }

body.portal-home:not(.is-authenticated) .flow-board-grid article::before, body.portal-home:not(.is-authenticated) .flow-board-grid article::after, body.portal-home:not(.is-authenticated) .genesis-flow-board::before, body.portal-home:not(.is-authenticated) .genesis-flow-board::after { display: none; }

@keyframes ed-draw { to { stroke-dashoffset: 0; } }
@keyframes ed-appear { to { opacity: 1; } }
@keyframes ed-turn { from { transform: rotateX(-16deg) rotateY(0); } to { transform: rotateX(-16deg) rotateY(360deg); } }

@media (max-width: 900px) {
  body.portal-home:not(.is-authenticated) .portal-entry, body.portal-home:not(.is-authenticated) .ed-method, body.portal-home:not(.is-authenticated) .ed-vault { grid-template-columns: 1fr; }
  body.portal-home:not(.is-authenticated) .portal-copy { padding-right: 0; }
  body.portal-home:not(.is-authenticated) .ed-fan { border-left: 0; border-top: 1px solid #141414; }
  body.portal-home:not(.is-authenticated) .ed-sheet { width: 260px; margin-left: -130px; }
  body.portal-home:not(.is-authenticated) .ed-fan.is-open .ed-s1 { transform: translate(-70px, 40px) rotate(-7deg); }
  body.portal-home:not(.is-authenticated) .ed-fan.is-open .ed-s3 { transform: translate(70px, 40px) rotate(7deg); }
  body.portal-home:not(.is-authenticated) .portal-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.portal-home:not(.is-authenticated) .portal-access:nth-child(2n) { border-right: 0; }
  body.portal-home:not(.is-authenticated) .portal-access:nth-child(-n + 2) { border-bottom: 1px solid #141414; }
}
@media (prefers-reduced-motion: reduce) {
  body.portal-home:not(.is-authenticated) .ed-cube { animation: none; transform: rotateX(-16deg) rotateY(-28deg); }
  body.portal-home:not(.is-authenticated) .ed-draw { stroke-dashoffset: 0; }
  body.portal-home:not(.is-authenticated) .ed-node { opacity: 1; }
  body.portal-home:not(.is-authenticated) .ed-sheet { transition: none; }
}
body.portal-home:not(.is-authenticated) .optional-field { color: #5b5750; }
