/* DA « vrai brut » — palette kraft/terracotta de la page d'origine (décision David 26/07 :
   la DA du 24/07 est abandonnée, retour à celle de l'ancienne version). */
:root {
  --paper: #fbf7f0;
  --paper-raised: #fffdf9;
  --ink: #22384a;
  --ink-soft: #51636f;
  --muted: #8a96a0;
  --line: #e5dccc;
  --line-dark: #d3c7b2;
  --relay: #c05a2e;
  --relay-dark: #9e4721;
  --signal: #d9a441;
  --signal-soft: #f6e3d7;
  --navy: #1b2b3a;
  --blue-soft: #f4ede1;
  --success: #3e7c5b;
  --success-soft: #e4efe7;
  --danger: #a43b35;
  --danger-soft: #f7e5e1;
  --shadow: 0 1px 2px rgba(34, 56, 74, 0.05), 0 14px 34px -18px rgba(34, 56, 74, 0.22);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --utility: ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

/* L'attribut hidden doit TOUJOURS gagner, même contre un display posé par une classe
   (bug 28/07 : le loader de l'espace ne disparaissait jamais). */
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 86% 5%, rgba(192, 90, 46, 0.08), transparent 25rem);
  z-index: -1;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.shell-narrow {
  width: min(720px, calc(100% - 36px));
  margin-inline: auto;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(154, 171, 186, 0.55);
  background: rgba(243, 246, 250, 0.9);
  backdrop-filter: blur(14px);
}

.nav-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 640;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 9px;
  border-radius: 999px;
  background: var(--relay);
  box-shadow: inset 7px 0 0 var(--signal);
  transform: rotate(-4deg);
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links > a:not(.button) {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-links > a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--relay);
  box-shadow: 0 9px 24px -16px rgba(217, 67, 56, 0.8);
  color: #fff;
  cursor: pointer;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  background: var(--relay-dark);
  box-shadow: 0 12px 30px -16px rgba(217, 67, 56, 0.9);
  transform: translateY(-1px);
}

.button.secondary {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: none;
  color: var(--ink);
}

.button.secondary:hover {
  background: #fff;
}

.button.dark {
  background: var(--navy);
}

.button.small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.86rem;
}

.button.block {
  width: 100%;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--relay-dark);
  font-family: var(--utility);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 18px;
  height: 5px;
  border-radius: 999px;
  background: var(--relay);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: -0.045em;
  line-height: 1.03;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.65rem, 7vw, 5.3rem);
  font-weight: 560;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  font-weight: 560;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

p {
  margin: 0 0 14px;
}

.hero {
  padding: clamp(58px, 10vw, 124px) 0 72px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
}

.hero h1 {
  max-width: 12ch;
  margin-top: 18px;
}

.hero h1 em {
  color: var(--relay);
  font-style: normal;
}

.lede {
  max-width: 58ch;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.fine-print {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.82rem;
}

.relay-board {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.board-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px dashed var(--line-dark);
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.69rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.relay-lane {
  display: grid;
  grid-template-columns: 1fr 54px 1fr;
  gap: 11px;
  align-items: center;
  margin-top: 36px;
}

.lane-person {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.lane-person.owner {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.lane-label {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.owner .lane-label {
  color: #b9c6d5;
}

.lane-person strong {
  display: block;
  margin-top: 8px;
  font-size: 0.96rem;
}

.baton {
  position: relative;
  width: 54px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--signal) 0 24%, var(--relay) 24%);
  box-shadow: 0 8px 18px -10px rgba(158, 71, 33, 0.6);
  transform: rotate(-6deg);
}

.protocol-list {
  display: grid;
  gap: 9px;
  margin-top: 30px;
}

.protocol-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
}

.protocol-row .check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 800;
}

.protocol-row small {
  color: var(--muted);
}

.section {
  padding: clamp(70px, 9vw, 110px) 0;
}

.section.white {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.section.navy {
  background: var(--navy);
  color: #fff;
}

.section.navy .eyebrow {
  color: var(--signal);
}

.section.navy .eyebrow::before {
  background: var(--signal);
}

.section-copy {
  max-width: 690px;
}

.section-copy h2 {
  margin-top: 14px;
}

.section-copy > p {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.navy .section-copy > p {
  color: #c5d0dc;
}

.domain-grid,
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 38px;
}

.domain-card,
.step-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.domain-card {
  min-height: 208px;
  padding: 22px;
}

.domain-card .domain-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: var(--signal-soft);
  font-family: var(--utility);
  font-size: 0.72rem;
  font-weight: 750;
}

.domain-card p,
.step-card p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.91rem;
}

.step-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.step-card {
  min-height: 215px;
  padding: 19px;
  box-shadow: none;
}

.step-number {
  margin-bottom: 34px;
  color: var(--relay);
  font-family: var(--utility);
  font-size: 0.76rem;
  font-weight: 800;
}

.price-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(26px, 6vw, 78px);
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid #68809a;
  border-radius: 18px;
  background: #16304f;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0;
  font-family: var(--display);
  font-size: clamp(3.2rem, 7vw, 5.5rem);
  font-weight: 620;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.price small {
  color: #aebdcb;
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 550;
  letter-spacing: 0;
}

.included {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.included li {
  position: relative;
  padding-left: 25px;
  color: #d9e2ea;
  font-size: 0.92rem;
}

.included li::before {
  position: absolute;
  left: 0;
  color: var(--signal);
  content: "✓";
  font-weight: 800;
}

.guarantee {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 219, 112, 0.5);
  border-radius: 10px;
  background: rgba(255, 219, 112, 0.08);
  color: #f7e9b7;
  font-size: 0.85rem;
}

.faq {
  margin-top: 32px;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 19px 38px 19px 0;
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  position: absolute;
  top: 18px;
  right: 4px;
  color: var(--relay);
  content: "+";
  font-family: var(--display);
  font-size: 1.35rem;
}

.faq details[open] summary::after {
  content: "−";
}

.faq-answer {
  max-width: 65ch;
  padding: 0 0 22px;
  color: var(--ink-soft);
}

.footer {
  padding: 48px 0 70px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer a {
  color: var(--ink-soft);
}

.app-main {
  padding: clamp(42px, 8vw, 82px) 0 90px;
}

.app-heading {
  margin-bottom: 30px;
}

.app-heading h1 {
  max-width: 15ch;
  margin-top: 14px;
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.app-heading p {
  max-width: 60ch;
  margin-top: 18px;
  color: var(--ink-soft);
}

.panel {
  padding: clamp(22px, 5vw, 38px);
}

.panel + .panel {
  margin-top: 16px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 26px;
}

.progress span {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.progress span.active {
  background: var(--relay);
}

.choice-grid {
  display: grid;
  gap: 11px;
  margin-top: 22px;
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-box {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.choice input:checked + .choice-box {
  border-color: var(--relay);
  box-shadow: 0 0 0 3px rgba(255, 92, 77, 0.12);
  transform: translateX(3px);
}

.choice-dot {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--line-dark);
  border-radius: 50%;
  background: #fff;
}

.choice input:checked + .choice-box .choice-dot {
  border: 5px solid var(--relay);
}

.choice-box small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.field {
  margin-top: 18px;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 760;
}

.field input,
.field select {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  border-color: var(--relay);
  outline: 3px solid rgba(255, 92, 77, 0.12);
}

.field-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.notice {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-soft);
  color: #29496d;
  font-size: 0.87rem;
}

.notice.warning {
  border-color: #e5c25e;
  background: var(--signal-soft);
  color: #644f13;
}

.notice.success {
  border-color: #9ccdb9;
  background: var(--success-soft);
  color: #145d46;
}

.notice.danger {
  border-color: #e5aaa5;
  background: var(--danger-soft);
  color: var(--danger);
}

.error {
  display: none;
  margin-top: 14px;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 650;
}

.error.visible {
  display: block;
}

.diagnostic-step[hidden] {
  display: none;
}

.result-card {
  padding: clamp(24px, 5vw, 42px);
  border: 2px solid var(--navy);
  border-radius: 14px;
  background: #fff;
}

.result-label {
  color: var(--relay-dark);
  font-family: var(--utility);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.result-card h2 {
  margin-top: 13px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.result-card p {
  margin-top: 16px;
  color: var(--ink-soft);
}

.share-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 20px;
}

.share-box input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink-soft);
}

.status-line {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.status-line:last-child {
  border-bottom: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--line-dark);
  border-radius: 50%;
}

.status-line.done .status-dot {
  border-color: var(--success);
  background: var(--success);
}

.status-line strong {
  display: block;
  font-size: 0.91rem;
}

.status-line small {
  color: var(--muted);
}

.moment {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.moment + .moment {
  margin-top: 10px;
}

.moment-time {
  color: var(--relay-dark);
  font-family: var(--utility);
  font-size: 0.69rem;
  font-weight: 750;
  text-transform: uppercase;
}

.moment h3 {
  margin-top: 7px;
  font-size: 1.05rem;
}

.moment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip-button {
  padding: 7px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
}

.chip-button:hover {
  border-color: var(--relay);
  color: var(--relay-dark);
}

.loading {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.loading::before {
  width: 28px;
  height: 9px;
  border-radius: 999px;
  background: var(--relay);
  content: "";
  animation: shuttle 900ms ease-in-out infinite alternate;
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ops-table th,
.ops-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ops-table th {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.66rem;
  text-transform: uppercase;
}

@keyframes shuttle {
  from { transform: translateX(-24px) rotate(-6deg); }
  to { transform: translateX(24px) rotate(6deg); }
}

@media (max-width: 860px) {
  .hero-grid,
  .price-panel {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 14ch;
  }

  .relay-board {
    max-width: 560px;
    transform: none;
  }

  .step-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 690px) {
  .nav-links > a:not(.button) {
    display: none;
  }

  .domain-grid,
  .step-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    min-height: 0;
  }

  .step-number {
    margin-bottom: 20px;
  }

  .relay-lane {
    grid-template-columns: 1fr;
  }

  .baton {
    margin: -1px auto;
    transform: rotate(90deg);
  }

  .relay-board::after {
    display: none;
  }

  .share-box {
    grid-template-columns: 1fr;
  }

  .panel-header {
    display: block;
  }
}

:focus-visible {
  outline: 3px solid rgba(255, 92, 77, 0.4);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
