/* e-logis — site public */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #0b0f14;
  --ink-2: #121821;
  --ink-3: #1b2430;
  --line-dark: rgba(255, 255, 255, 0.08);
  --text-on-dark: #e8edf3;
  --muted-on-dark: #94a1b2;

  --paper: #f4f6f9;
  --surface: #ffffff;
  --line: #e2e7ee;
  --text: #0f1720;
  --muted: #5b6878;

  --accent: #ffb020;
  --accent-ink: #1a1203;
  --accent-soft: rgba(255, 176, 32, 0.14);
  --signal: #3aa0ff;
  --danger: #e5484d;
  --ok: #2fbf71;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(15, 23, 32, 0.04), 0 8px 24px -12px rgba(15, 23, 32, 0.18);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(255, 176, 32, .6); }
.btn--accent:hover { background: #ffc04d; }
.btn--ghost { color: var(--text-on-dark); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.03); }
.btn--ghost:hover { border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.07); }
.btn--ghost-dark { color: var(--text); border-color: var(--line); background: var(--surface); }
.btn--ghost-dark:hover { border-color: #c8d0db; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(11, 15, 20, .78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
  color: var(--text-on-dark);
}
.topbar__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
.brand__mark rect { fill: var(--accent); }
.brand__mark path { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand__name { font: 700 20px/1 var(--font-display); letter-spacing: -0.03em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--muted-on-dark); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .15s; }
.nav a:hover { color: var(--text-on-dark); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.lang {
  min-width: 40px; height: 38px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text-on-dark);
  font: 600 13px/1 var(--font-body); letter-spacing: .04em; cursor: pointer;
}
.lang:hover { border-color: rgba(255,255,255,.4); }

/* ---------- Héros ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(58,160,255,.16), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,176,32,.12), transparent 60%),
    var(--ink);
  color: var(--text-on-dark);
  padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 128px);
  isolation: isolate;
}
.hero__grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%);
}
.hero__circuit { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__circuit .trace path { fill: none; stroke: rgba(148,161,178,.22); stroke-width: 1.5; }
.hero__circuit .pulse path {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 60 1400; stroke-dashoffset: 1460;
  animation: pulse 7s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255,176,32,.8));
}
.hero__circuit .pulse path:nth-child(2) { animation-delay: -2.4s; stroke: var(--signal); filter: drop-shadow(0 0 6px rgba(58,160,255,.8)); }
.hero__circuit .pulse path:nth-child(3) { animation-delay: -4.8s; animation-duration: 9s; }
.hero__circuit .nodes circle { fill: var(--ink); stroke: rgba(148,161,178,.5); stroke-width: 1.5; }
@keyframes pulse { to { stroke-dashoffset: 0; } }

.hero__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line-dark); background: rgba(255,255,255,.04);
  color: var(--muted-on-dark); font-size: 13px; font-weight: 500; letter-spacing: .02em;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47,191,113,.18); }
.hero h1 { margin-top: 22px; font-size: clamp(38px, 6.2vw, 68px); font-weight: 700; max-width: 14ch; }
.lead { margin-top: 22px; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted-on-dark); max-width: 56ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin: 46px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--line-dark);
}
.hero__facts li { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 4px; }
.hero__facts li + li { padding-left: 16px; border-left: 1px solid var(--line-dark); }
.hero__facts strong { font: 700 22px/1.1 var(--font-display); color: var(--text-on-dark); }
.hero__facts span { font-size: 13.5px; color: var(--muted-on-dark); line-height: 1.4; }

.ticket {
  position: relative;
  background: linear-gradient(180deg, rgba(27,36,48,.92), rgba(18,24,33,.92));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06);
  transform: rotate(1.2deg);
}
.ticket::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,176,32,.5), transparent 35%, transparent 65%, rgba(58,160,255,.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.ticket__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ticket__ref { font: 600 14px/1 var(--font-mono); color: var(--text-on-dark); letter-spacing: .02em; }
.badge { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.badge--found { background: rgba(47,191,113,.14); color: #6ee7a8; border: 1px solid rgba(47,191,113,.3); }
.ticket__rows { margin: 18px 0 0; display: grid; gap: 0; }
.ticket__rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px dashed rgba(255,255,255,.1); }
.ticket__rows dt { color: var(--muted-on-dark); font-size: 13.5px; }
.ticket__rows dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; }
.ticket__bar { margin-top: 18px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ticket__bar span { display: block; height: 100%; width: 72%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ffd27a); }
.ticket__foot { margin-top: 12px; font-size: 12.5px; color: var(--muted-on-dark); letter-spacing: .02em; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--dark { background: var(--ink); color: var(--text-on-dark); }
.section__head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.kicker {
  font: 600 12.5px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: #b7791f; display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.section--dark .kicker { color: var(--accent); }
.section__head h2, .request__aside h2 { margin-top: 16px; font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; }
.section__lead { margin-top: 16px; color: var(--muted); font-size: 17px; }

/* ---------- Cartes domaines ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #cfd7e2; box-shadow: 0 1px 2px rgba(15,23,32,.04), 0 24px 40px -20px rgba(15,23,32,.28); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--ink); margin-bottom: 20px;
}
.card__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 22px; font-weight: 700; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.tags { list-style: none; padding: 0; margin: 18px 0 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: #344150; }
.card__cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: 600 14.5px/1 var(--font-body); color: var(--text);
}
.card__cta::after { content: "→"; transition: transform .15s ease; }
.card__cta:hover::after { transform: translateX(4px); }
.card__cta::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ---------- Étapes ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step {
  position: relative; padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line-dark);
}
.step__num { font: 700 14px/1 var(--font-mono); color: var(--accent); letter-spacing: .08em; }
.step h3 { margin-top: 22px; font-size: 21px; font-weight: 600; }
.step p { margin-top: 10px; color: var(--muted-on-dark); font-size: 15px; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -18px; width: 18px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ---------- Formulaire ---------- */
.request { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.request__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.request__aside > p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 17px; }
.checklist { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; font-size: 15px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b7791f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.form, .success {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(20px, 3.5vw, 36px);
}
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form fieldset + fieldset { margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line); }
.form legend { font: 600 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 18px; float: left; width: 100%; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field--qty { grid-column: span 1; }
.field label, .label { font-size: 14px; font-weight: 600; color: #233040; }
.req { color: #b7791f; }
.field input:not([type="radio"]):not([type="file"]), .field textarea {
  width: 100%; font: 16px/1.4 var(--font-body); color: var(--text);
  padding: 13px 14px; border: 1px solid #d4dbe4; border-radius: 12px; background: #fbfcfd;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--signal); background: #fff; box-shadow: 0 0 0 4px rgba(58,160,255,.15); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(229,72,77,.12); }
#part_number { font-family: var(--font-mono); letter-spacing: .02em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input, .segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid #d4dbe4; border-radius: 999px; background: #fbfcfd;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.chip span:hover { border-color: #aab6c5; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span, .segmented input:focus-visible + span { outline: 3px solid var(--signal); outline-offset: 2px; }
.chips.is-invalid .chip span { border-color: var(--danger); }

.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; gap: 4px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.segmented label { position: relative; }
.segmented span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: 4px 8px;
  border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .15s;
}
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,32,.12); }
.segmented__stop input:checked + span { background: var(--danger); color: #fff; }

.drop {
  position: relative; display: grid; place-items: center; min-height: 132px;
  border: 1.5px dashed #c3ccd8; border-radius: 14px; background: #fbfcfd; cursor: pointer; overflow: hidden;
  transition: border-color .15s, background-color .15s;
}
.drop:hover { border-color: var(--signal); background: #f5faff; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(58,160,255,.15); }
.drop__empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; font-weight: 500; pointer-events: none; }
.drop__empty svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.drop__preview { width: 100%; max-height: 260px; object-fit: contain; background: #0b0f14; pointer-events: none; }
.drop.has-photo .drop__empty { display: none; }
.link-btn { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--danger); font: 600 14px/1 var(--font-body); cursor: pointer; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__footer { margin-top: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.form__error { width: 100%; padding: 12px 14px; border-radius: 12px; background: #fff1f1; border: 1px solid #f8c7c9; color: #a3242a; font-size: 14.5px; }
.form__note { font-size: 13px; color: var(--muted); }
.btn .spinner { width: 18px; height: 18px; border: 2.5px solid rgba(26,18,3,.25); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.success { text-align: center; padding-block: clamp(40px, 6vw, 64px); }
.success__icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(47,191,113,.12); }
.success__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success h3 { font-size: 28px; }
.success p { margin-top: 10px; color: var(--muted); }
.success__ref { font: 700 clamp(24px, 4vw, 34px)/1.2 var(--font-mono) !important; color: var(--text) !important; letter-spacing: .04em; margin-top: 14px !important; }
.success__small { font-size: 14px; }
.success .btn { margin-top: 26px; }

/* ---------- Pied de page ---------- */
.footer { background: var(--ink); color: var(--muted-on-dark); padding: 48px 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line-dark); }
.brand--footer { color: var(--text-on-dark); }
.footer__tag { margin-top: 14px; font-size: 14px; max-width: 48ch; }
.footer__links { display: flex; gap: 24px; align-items: flex-start; }
.footer__links a { color: var(--text-on-dark); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.footer__links a:hover { color: var(--accent); }
.footer__legal { padding-top: 20px; font-size: 13px; }

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .ticket { max-width: 440px; transform: none; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request { grid-template-columns: 1fr; }
  .request__aside { position: static; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar__actions { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .step:not(:last-child)::after { display: none; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .form fieldset { grid-template-columns: 1fr; }
  .hero__facts { grid-template-columns: 1fr; }
  .hero__facts li + li { padding-left: 0; border-left: 0; }
  .hero__facts li { flex-direction: row; align-items: baseline; gap: 10px; padding-top: 14px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .segmented span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__circuit .pulse { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}
