/* Site de présentation de RaceHub (src/site) : identité de la planche (brand/README.md), comme le site de l'API. */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --orange: #FF5A00;      /* Orange Racing : accent, action */
  --orange-soft: #FF7A33;
  --night: #0B1021;       /* Bleu Nuit : fond */
  --night-2: #121A30;     /* cartes */
  --night-3: #1A2340;
  --white: #FFFFFF;       /* Blanc Tech : texte */
  --graphite: #667085;    /* Gris Graphite : bordures, décor (pas de texte : 3,8:1) */
  --muted: #98A2B3;       /* texte secondaire (7,3:1 sur le fond) */
  --line: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font: 400 17px/1.6 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
a { color: var(--orange-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; }
code { background: var(--night-3); padding: 0.1em 0.4em; border-radius: 6px; }
pre {
  margin: 0; padding: 20px 22px; overflow-x: auto;
  background: #070A16; border: 1px solid var(--line); border-radius: var(--radius);
  line-height: 1.55; color: #D9DEE8;
}
pre code { background: none; padding: 0; font-size: 14px; }
.k { color: var(--orange-soft); }
.c { color: var(--muted); }

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

/* En-tête */
.top { position: relative; z-index: 2; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.top .logo img { height: 34px; width: auto; }
.top nav { display: flex; gap: 28px; font-weight: 500; font-size: 15px; }
.top nav a { color: var(--white); text-decoration: none; opacity: 0.85; }
.top nav a:hover, .top nav a[aria-current] { opacity: 1; color: var(--orange-soft); }

/* Sillages : les lignes de la planche, en fond */
.trails { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.trails svg { position: absolute; right: -10%; bottom: -8%; width: 90%; height: auto; opacity: 0.55; }

/* Accueil */
.hero { position: relative; padding: 72px 0 96px; }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow {
  display: flex; align-items: center; gap: 16px; margin: 0 0 28px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::after { content: ""; flex: 0 0 80px; height: 1px; background: var(--graphite); opacity: 0.6; }
.hero h1 {
  margin: 0; font-weight: 700; font-size: clamp(40px, 7vw, 76px); line-height: 1.04; letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; font-weight: 700; color: var(--orange); }
.hero h1 span { display: block; font-style: italic; font-weight: 500; }
.hero p.lead { max-width: 620px; margin: 28px 0 36px; font-size: 19px; color: #D9DEE8; }
.hero p.lead strong { color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--orange); color: var(--night); }
.btn-primary:hover { background: var(--orange-soft); color: var(--night); }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

section.block { padding: 72px 0; border-top: 1px solid var(--line); position: relative; }
.block h2 {
  display: flex; align-items: center; gap: 18px; margin: 0 0 12px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--white);
}
.block h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.block .intro { max-width: 680px; margin: 0 0 36px; color: var(--muted); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--night-2), rgba(18, 26, 48, 0.6));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card h3 { margin: 16px 0 6px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 30px; height: 30px; stroke: var(--white); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card .icon { stroke: var(--orange); }

.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { position: relative; padding-top: 22px; border-top: 2px solid var(--night-3); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; margin-bottom: 10px; font-weight: 700; font-size: 14px; letter-spacing: 0.12em; color: var(--orange);
}
.step:first-child { border-top-color: var(--orange); }
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; gap: 40px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.split ul { margin: 0; padding: 0; list-style: none; }
.split li { position: relative; padding: 0 0 14px 28px; color: #D9DEE8; }
.split li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px;
  border-right: 2.5px solid var(--orange); border-top: 2.5px solid var(--orange); transform: rotate(45deg) scale(0.75); }


/* Pages de texte (robot, documentation) */
.page { padding: 48px 0 96px; position: relative; }
.page .wrap { max-width: 860px; position: relative; z-index: 1; }
.page h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -0.015em; }
.page h1 + p { margin: 0 0 40px; font-size: 19px; color: #D9DEE8; }
.page h2 { margin: 48px 0 14px; font-size: 22px; font-weight: 700; }
.page h2::before { content: ""; display: block; width: 36px; height: 3px; margin-bottom: 14px; background: var(--orange); border-radius: 2px; }
.page h3 { margin: 28px 0 8px; font-size: 17px; }
.page p, .page li { color: #D9DEE8; }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 6px; }
.page pre { margin: 16px 0 8px; }
.table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.table td:first-child { white-space: nowrap; }
.method { display: inline-block; min-width: 58px; font-weight: 700; font-size: 12px; color: var(--orange-soft); }
.note { padding: 18px 22px; border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line); border-left: 3px solid var(--orange); }

/* Lien d'évitement */
.skip { position: absolute; left: -9999px; top: 12px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--orange); color: var(--night); font-weight: 700; text-decoration: none; }
.skip:focus { left: 16px; }

/* En-tête : appel à l'espace organisateurs */
.top nav { align-items: center; }
.top nav a.nav-cta { opacity: 1; padding: 8px 16px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; }
.top nav a.nav-cta:hover { border-color: var(--orange); color: var(--white); }
.top nav a.lang { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; padding: 6px 10px; border-radius: 8px; background: var(--night-3); }

/* Accueil : texte et téléphone côte à côte */
.hero-small { padding: 56px 0 80px; }
.hero-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) 320px; align-items: center; }
.hero-small h1 { font-size: clamp(36px, 5.6vw, 60px); }

/* Téléphone : une recherche dans une application */
.phone { width: 300px; justify-self: end; padding: 12px; border-radius: 40px; background: #05070F; border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.03); }
.phone-screen { border-radius: 30px; padding: 22px 16px 18px; background: linear-gradient(180deg, #141C33, #0E1428); min-height: 470px; }
.phone-search { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: #0A0F20; border: 1px solid var(--orange); font-size: 15px; font-weight: 600; }
.phone-search .i { width: 18px; height: 18px; stroke: var(--muted); }
.phone-search span::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--orange); }
.phone-card { margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--night-2); border: 1px solid var(--line); }
.phone-kicker { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.phone-title { margin: 6px 0 0; font-size: 19px; font-weight: 700; }
.phone-meta { margin: 2px 0 12px; font-size: 13px; color: var(--muted); }
.phone-map { width: 100%; height: auto; border-radius: 12px; background:
  linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px) 0 0 / 24px 24px, #0A0F20; }
.phone-route { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14px; }
.phone-route span { color: #D9DEE8; }
.phone-source { margin: 6px 0 14px; font-size: 12px; color: var(--muted); }
.phone-btn { display: block; padding: 11px; border-radius: 999px; background: var(--orange); color: var(--night); font-weight: 700; font-size: 14px; text-align: center; }
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Le problème */
.problem { display: grid; gap: 40px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.problem .big { margin: 0; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.45; font-weight: 500; }
.problem .big strong { color: var(--orange-soft); font-weight: 700; }
.problem p:last-child { margin: 0; color: var(--muted); }

/* Deux publics */
.audiences { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.audience { display: flex; flex-direction: column; padding: 32px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 90, 0, 0.10), rgba(18, 26, 48, 0.5) 45%); }
.audience .icon { stroke: var(--orange); width: 34px; height: 34px; }
.audience h3 { margin: 18px 0 8px; font-size: 24px; }
.audience > p { margin: 0 0 20px; color: #D9DEE8; }
.ticks { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: #D9DEE8; }
.ticks .i { color: var(--orange); margin-top: 3px; }
.ticks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.more { margin-top: auto; font-weight: 700; text-decoration: none; }
.hint { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* Étapes */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow li { position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -14px; width: 10px; height: 10px; z-index: 1;
  border-top: 2px solid var(--orange); border-right: 2px solid var(--orange); transform: rotate(45deg); }
.flow-n { display: block; font-weight: 700; font-size: 14px; letter-spacing: 0.12em; color: var(--orange); }
.flow h3 { margin: 10px 0 6px; font-size: 18px; }
.flow p { margin: 0; color: var(--muted); font-size: 15px; }

/* Liste numérotée (intégration) */
.numbered { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 14px; }
.numbered li, .split .numbered li { counter-increment: n; position: relative; padding: 0 0 0 44px; color: #D9DEE8; }
.numbered li::before, .split .numbered li::before { content: counter(n); border: 0; transform: none; position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--night-3); color: var(--orange); font-weight: 700; font-size: 14px; }

/* Preuve de propriété */
.code-card .code-label { margin: 0 0 10px; color: var(--muted); font-size: 15px; }

/* Questions fréquentes */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--night-2); }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--orange); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 22px 20px; color: #D9DEE8; }

/* Appels à l'action */
.cta-band { background: radial-gradient(ellipse at 20% 0%, rgba(255, 90, 0, 0.16), transparent 60%); }
.cta-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cta { padding: 32px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(18, 26, 48, 0.7); }
.cta h3 { margin: 0 0 8px; font-size: 22px; }
.cta p { margin: 0 0 22px; color: #D9DEE8; }
.cta-single { text-align: center; }
.cta-single h3 { margin: 0 0 24px; font-size: clamp(24px, 3vw, 34px); }
.cta-single .actions { justify-content: center; }

/* Pied de page */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; gap: 32px; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
footer img { height: 26px; width: auto; }
.foot-brand p { margin: 14px 0 0; max-width: 300px; }
footer nav { display: flex; flex-direction: column; gap: 10px; }
footer nav p { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--white); }
footer a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
footer a:hover { color: var(--white); }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .phone { justify-self: center; }
  .flow-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-4 li:nth-child(2)::after { display: none; }
  footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .problem, .audiences, .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li::after { display: none; }
  .ticks-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .top .wrap { height: 68px; gap: 12px; }
  .top .logo img { height: 24px; }
  .top nav { gap: 14px; font-size: 13px; }
  .top nav .optional, .top nav a.nav-cta { display: none; }
  .hero, .hero-small { padding: 36px 0 56px; }
  .grid, .flow-4 { grid-template-columns: minmax(0, 1fr); }
  .flow-4 li::after { display: none; }
  section.block { padding: 52px 0; }
  .audience, .cta { padding: 24px; }
  .phone { width: 100%; max-width: 300px; }
  footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .top nav a, .faq summary::after { transition: background-color 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s; }
}
