/* Swappit — site vitrine / liste d'attente
   Direction : sombre, photographique, typographique. Un seul accent (orange),
   une grotesque à caractère pour les titres, aucune icône décorative. */

:root {
  color-scheme: dark;
  --paper: #121315;
  --ink: #f3f2ee;
  --ink-2: #a9a8a2;
  --ink-3: #74736e;
  --line: #2b2c30;
  --band: #191a1d;
  --accent: #ff6b00;
  --accent-deep: #ff7d1f;
  --accent-tint: rgba(255, 107, 0, 0.14);
  --device: #2a2c33;
  --night: #0a0b0d;
  --danger: #ff7a55;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Instrument Sans", "Segoe UI", system-ui, sans-serif;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 22px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swap: cubic-bezier(0.34, 1.3, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Typographie ---------- */
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.02;
  font-variation-settings: "opsz" 96;
  margin: 0;
}
.display--xl { font-size: clamp(2.5rem, 5.9vw, 5rem); }
.display--l { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.display--m { font-size: clamp(1.25rem, 1.7vw, 1.45rem); letter-spacing: -0.015em; line-height: 1.15; font-variation-settings: "opsz" 24; }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.5; color: var(--ink-2); margin: 0; max-width: 34em; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
.label {
  font-family: var(--text);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- En-tête ---------- */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(140%) blur(10px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.head-link { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink-2); padding: 10px 0; }
.head-link:hover { color: var(--ink); }
@media (max-width: 480px) { .head-link { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 120px); }
.hero .wrap { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; align-items: center; }
.hero__copy { grid-column: 1 / span 12; }
.hero__visual { grid-column: 1 / span 12; }
.hero__copy .lede { margin-top: 28px; }
.hero__form { margin-top: 36px; }
@media (min-width: 900px) {
  .hero__copy { grid-column: 1 / span 7; }
  .hero__visual { grid-column: 8 / span 5; }
}

/* ---------- Formulaire ---------- */
.signup { max-width: 540px; }
.signup__row { display: flex; gap: 10px; }
.signup input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  transition: border-color 0.2s;
}
.signup input[type="email"]::placeholder { color: var(--ink-3); }
.signup input[type="email"]:hover { border-color: #45464b; }
.signup input[type="email"]:focus { border-color: var(--ink); outline: none; }
.signup input[type="email"][aria-invalid="true"] { border-color: var(--danger); }
.btn {
  height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-out);
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.signup__hint { margin: 12px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.signup__status { margin: 12px 0 0; font-size: 0.95rem; min-height: 1.4em; }
.signup__status[data-state="done"] { color: var(--ink); font-weight: 500; }
.signup__status[data-state="error"] { color: var(--danger); }
.signup.is-done .signup__row, .signup.is-done .signup__hint { display: none; }
.signup.is-done .signup__status { padding: 18px 20px; background: var(--accent-tint); border-radius: 14px; }
.hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; }
@media (max-width: 520px) {
  .signup__row { flex-direction: column; }
  .btn { width: 100%; }
}

/* ---------- Signature : l'échange ---------- */
.swap {
  --card: 44%;
  --gap: 12%;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.68;
  max-width: 560px;
  margin-left: auto;
}
.swap__card {
  position: absolute;
  top: 6%;
  left: 0;
  width: var(--card);
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1b1c20;
  padding: 10px 10px 14px;
  transform: translateX(calc(var(--x) * (100% + (var(--gap) / var(--card)) * 100%)));
  transition: transform 0.75s var(--ease-swap), box-shadow 0.4s;
  will-change: transform;
}
.swap__card[data-x="1"] { --x: 1; }
.swap__card[data-x="0"] { --x: 0; }
.swap__card.is-moving { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55); z-index: 2; }
.swap__img { position: relative; aspect-ratio: 1 / 1; border-radius: calc(var(--radius) - 10px); overflow: hidden; background: var(--band); }
.swap__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s; }
.swap__img img.is-hidden { opacity: 0; }
.swap__who { margin: 12px 4px 0; display: flex; flex-direction: column; gap: 2px; }
.swap__name { font-weight: 600; font-size: 0.95rem; line-height: 1.2; transition: opacity 0.3s; }
.swap__place { font-size: 0.82rem; color: var(--ink-2); line-height: 1.2; transition: opacity 0.3s; }
.swap__who.is-fading .swap__name, .swap__who.is-fading .swap__place { opacity: 0; }
.swap__arrows {
  position: absolute;
  left: 50%;
  top: calc(6% + var(--card) * 0.5);
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  color: var(--accent);
  transition: transform 0.75s var(--ease-swap);
  z-index: 3;
}
.swap__arrows.is-flipped { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) {
  .swap__card, .swap__arrows, .swap__img img { transition: none; }
}

/* ---------- Comment ça marche ---------- */
.how { padding: clamp(56px, 8vw, 120px) 0; background: var(--band); }
.how__head { max-width: 640px; }
.how__head .lede { margin-top: 18px; }
.steps { display: grid; gap: 28px; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); column-gap: 32px; } }
.step { display: flex; flex-direction: column; gap: 18px; }
.step__text { display: flex; flex-direction: column; gap: 8px; }
.step__num { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink-3); letter-spacing: 0; }
.step__sub { margin: 0; font-size: 0.98rem; color: var(--ink-2); line-height: 1.5; }
.device { width: 100%; padding: 9px; border-radius: 40px; background: var(--device); box-shadow: 0 1px 0 rgba(255,255,255,0.14) inset, 0 0 0 1px rgba(255,255,255,0.05), 0 24px 48px rgba(0,0,0,0.4); }
.device img { width: 100%; border-radius: 31px; }
@media (max-width: 719px) {
  .steps { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 76vw; max-width: 340px; scroll-snap-align: start; }
}

/* ---------- Détails ---------- */
.details { padding: clamp(56px, 8vw, 120px) 0; }
.details__grid { display: grid; gap: 48px; margin-top: clamp(36px, 5vw, 64px); }
@media (min-width: 900px) { .details__grid { grid-template-columns: repeat(3, 1fr); column-gap: 32px; } }
.detail { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: start; }
.detail .device { padding: 6px; border-radius: 26px; }
.detail .device img { border-radius: 20px; }
.detail__text { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.detail__text p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
@media (min-width: 900px) { .detail { grid-template-columns: 1fr; gap: 20px; } .detail .device { width: 150px; } }

/* ---------- Clôture ---------- */
.close { background: var(--night); color: #fff; padding: clamp(64px, 9vw, 140px) 0 0; border-top: 1px solid var(--line); }
.close .display { color: #fff; }
.close .lede { color: rgba(255, 255, 255, 0.68); }
.close__grid { display: grid; gap: 40px; align-items: end; }
@media (min-width: 900px) { .close__grid { grid-template-columns: 1.1fr 1fr; column-gap: 64px; } }
.close .signup input[type="email"] { background: transparent; border-color: rgba(255, 255, 255, 0.22); color: #fff; }
.close .signup input[type="email"]::placeholder { color: rgba(255, 255, 255, 0.45); }
.close .signup input[type="email"]:focus { border-color: #fff; }
.close .signup__hint { color: rgba(255, 255, 255, 0.6); }
.close .signup__status[data-state="done"] { color: #fff; }
.close .signup.is-done .signup__status { background: rgba(255, 255, 255, 0.08); }
.site-foot { margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.6); }
.site-foot nav { display: flex; gap: 24px; }
.site-foot a { text-decoration: none; color: rgba(255, 255, 255, 0.75); }
.site-foot a:hover { color: #fff; }

/* ---------- Pages légales ---------- */
.legal { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 120px); }
.legal .wrap { max-width: 760px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--ink-3); font-size: 0.9rem; margin: 0 0 32px; }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.015em; margin: 40px 0 12px; }
.legal p, .legal li { color: #c8c7c1; line-height: 1.65; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal .back { display: inline-block; margin-bottom: 32px; text-decoration: none; font-weight: 500; color: var(--ink-2); }
.legal .back:hover { color: var(--ink); }
.legal-foot { border-top: 1px solid var(--line); }
.legal-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-top: 24px; padding-bottom: 32px; font-size: 0.9rem; color: var(--ink-2); }
.legal-foot a { text-decoration: none; color: var(--ink-2); }
.legal-foot a:hover { color: var(--ink); }

/* ---------- Apparition ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s var(--ease-out) forwards; }
  .rise:nth-child(2) { animation-delay: 0.08s; }
  .rise:nth-child(3) { animation-delay: 0.16s; }
  .rise:nth-child(4) { animation-delay: 0.24s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
