/* Darwin — feuille de style unique du site public (SPEC 9.1).
   Sombre d'abord, quasi monochrome, un seul accent. Aucune ressource externe : Geist
   (OFL, variable, sous-ensemble latin) hébergée sur le site. Mobile d'abord, CSS seul. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"),
    url("/static/fonts/geist-latin-wght-normal.woff2") format("woff2");
}

/* Sombre (référence) */
:root {
  color-scheme: dark light;
  --bg: #08090a;
  --surface: #0f1011;
  --surface-2: #16171a;
  --text: #f7f8f8;
  --text-2: #a2a6ad;
  --text-3: #8a8f98;
  --border: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 16%);
  --accent: #635bff;
  --accent-hover: #574fe6;
  --accent-ink: #ffffff;
  --accent-text: #9d98ff;
  --accent-line: rgb(157 152 255 / 30%);
  --accent-wash: rgb(99 91 255 / 10%);
  --halo: rgb(99 91 255 / 22%);
  --halo-2: rgb(157 152 255 / 8%);
  --grid: rgb(255 255 255 / 6%);
  --header: rgb(8 9 10 / 72%);
  --bar: rgb(15 16 17 / 82%);
  --mesh-opacity: 0.55;
  --card-glow: 0 0 0 1px rgb(99 91 255 / 18%), 0 12px 40px -12px rgb(99 91 255 / 35%);
  --btn-shadow: 0 0 0 1px rgb(255 255 255 / 10%) inset, 0 6px 20px -6px rgb(99 91 255 / 60%);
  --warn-bg: rgb(250 204 21 / 10%);
  --warn-text: #fde68a;
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 68rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Clair */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f6f7;
    --text: #0a0a0b;
    --text-2: #52525b;
    --text-3: #62666d;
    --border: rgb(0 0 0 / 9%);
    --border-strong: rgb(0 0 0 / 18%);
    --accent-text: #5851ff;
    --accent-line: rgb(88 81 255 / 30%);
    --accent-wash: rgb(99 91 255 / 7%);
    --halo: rgb(99 91 255 / 13%);
    --halo-2: rgb(99 91 255 / 5%);
    --grid: rgb(0 0 0 / 5%);
    --header: rgb(255 255 255 / 75%);
    --bar: rgb(255 255 255 / 85%);
    --mesh-opacity: 0.4;
    --card-glow: 0 0 0 1px rgb(99 91 255 / 14%), 0 12px 32px -14px rgb(99 91 255 / 30%);
    --btn-shadow: 0 0 0 1px rgb(255 255 255 / 12%) inset, 0 4px 14px -4px rgb(99 91 255 / 45%);
    --warn-bg: #fff7d6;
    --warn-text: #5c4300;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  overflow-x: clip;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

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

h1, h2, h3 { font-weight: 600; color: var(--text); text-wrap: balance; margin: 0; }

svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

.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;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 0.55rem 0.85rem; border-radius: 8px;
}
.skip:focus { top: 0.75rem; }

.num { font-variant-numeric: tabular-nums; }

/* En-tête collant translucide */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header { background: var(--header); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); }
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 1.6rem; height: 1.6rem; border-radius: 7px; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.brand-icon svg { width: 1rem; height: 1rem; }
.site-nav { display: flex; gap: 0.25rem; }
.site-nav a { color: var(--text-2); font-size: 0.875rem; padding: 0.35rem 0.65rem; border-radius: 8px; transition: color 160ms var(--ease), background-color 160ms var(--ease); }
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav .nav-how { display: none; }

.draft { margin: 1rem 0 0; padding: 0.65rem 0.9rem; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn-text); font-size: 0.85rem; }

main { padding-block: 1.25rem 4rem; }

/* Boutons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0 1.15rem; border-radius: 10px; border: 0;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 550; font-size: 0.95rem; letter-spacing: -0.01em;
  box-shadow: var(--btn-shadow); cursor: pointer;
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button:active { transform: scale(0.98); }
.button:visited { color: var(--accent-ink); }
.button svg { width: 1rem; height: 1rem; }
.button--outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.button--outline:hover { background: var(--surface-2); }
.button--outline:visited { color: var(--text); }
.button--block { display: flex; width: 100%; min-height: 3rem; font-size: 1rem; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: 0.3rem 0.55rem; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-2);
}
.badge--accent { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-wash); }
.badge .dot { width: 0.4rem; height: 0.4rem; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* Accueil : hero */
.hero { position: relative; isolation: isolate; text-align: center; padding-block: 3.5rem 3rem; }
.hero-bg {
  position: absolute; z-index: -1; pointer-events: none;
  top: -5rem; left: 50%; width: 100vw; height: calc(100% + 7rem); transform: translateX(-50%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 20%, #000 20%, transparent 75%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 40% at 50% 30%, var(--halo), transparent 70%),
    radial-gradient(ellipse 30% 30% at 62% 18%, var(--halo-2), transparent 70%);
}
.hero .badge { background: var(--bg); }
.hero h1 {
  margin: 1.25rem auto 0; max-width: 13ch;
  font-size: clamp(2.4rem, 9.5vw, 4.5rem); font-weight: 650; line-height: 1.02; letter-spacing: -0.05em;
}
.hero p { margin: 1.1rem auto 0; max-width: 34rem; color: var(--text-2); font-size: clamp(1rem, 2.6vw, 1.175rem); letter-spacing: -0.01em; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.9rem; }

/* Comment ça marche */
.section-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-3); margin: 0 0 0.75rem; letter-spacing: 0; }
.steps { list-style: none; margin: 0 0 3.5rem; padding: 0; display: grid; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step { padding: 1.1rem 1.15rem 1.2rem; }
.step + .step { border-top: 1px solid var(--border); }
.step-n { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; margin-bottom: 0.6rem; }
.step h3 { font-size: 0.975rem; letter-spacing: -0.015em; margin-bottom: 0.25rem; }
.step p { margin: 0; color: var(--text-2); font-size: 0.9rem; line-height: 1.5; }

/* Catalogue */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.375rem; letter-spacing: -0.035em; }
.count { margin: 0; color: var(--text-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.875rem; }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--card-glow); }
.card:focus-within { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.card-body { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.95rem 1rem 1rem; flex: 1; }
.card-title { font-size: 1rem; line-height: 1.35; letter-spacing: -0.02em; }
.card-title a { color: var(--text); }
.card-title a:hover { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-title a:focus-visible { outline: none; }
.card-excerpt {
  margin: 0; color: var(--text-2); font-size: 0.875rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 0.6rem; display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.meta { margin: 0; color: var(--text-3); font-size: 0.8125rem; display: flex; flex-wrap: wrap; gap: 0 0.4rem; }
.meta span + span::before { content: "·"; margin-right: 0.4rem; }
.card-price { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Zone maillée dérivée du slug */
.mesh {
  position: relative; height: 6rem; overflow: hidden; isolation: isolate;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.mesh > svg.mesh-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: var(--mesh-opacity); transition: opacity 180ms var(--ease); }
.card:hover .mesh > svg.mesh-art { opacity: calc(var(--mesh-opacity) + 0.15); }
.mesh::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px); background-size: 12px 12px;
}
.mesh-icon {
  position: absolute; left: 0.75rem; top: 0.75rem;
  width: 1.85rem; height: 1.85rem; border-radius: 8px; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-2);
}
.mesh-icon svg { width: 0.95rem; height: 0.95rem; }
.mesh .badge { position: absolute; right: 0.75rem; top: 0.75rem; background: var(--bg); }

.empty {
  display: grid; justify-items: center; gap: 0.3rem; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 3rem 1.5rem;
}
.empty-icon { width: 2.5rem; height: 2.5rem; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--border-strong); color: var(--text-3); margin-bottom: 0.5rem; }
.empty-icon svg { width: 1.15rem; height: 1.15rem; }
.empty h3 { font-size: 1rem; letter-spacing: -0.015em; }
.empty p { margin: 0; color: var(--text-2); font-size: 0.9rem; }

/* Fiche produit */
.back { display: inline-flex; align-items: center; gap: 0.2rem; color: var(--text-2); font-size: 0.875rem; margin-bottom: 1rem; }
.back svg { width: 1rem; height: 1rem; }
.back:hover { color: var(--text); text-decoration: none; }

.product {
  display: grid; gap: 1.25rem;
  grid-template-areas: "banner" "head" "panel" "desc";
}
.product > .mesh { grid-area: banner; height: 7rem; border: 1px solid var(--border); border-radius: var(--radius); }
.product-head { grid-area: head; display: grid; gap: 0.75rem; }
.product-head h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 650; line-height: 1.08; letter-spacing: -0.045em; }
.product-head .lead { margin: 0; color: var(--text-2); font-size: 1rem; }
.panel {
  grid-area: panel; align-self: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem; display: flex; flex-direction: column; gap: 0.9rem;
}
.price-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.price { margin: 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.vat { margin: 0; font-size: 0.8125rem; color: var(--text-3); }
.fineprint { margin: 0; font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; }
.fineprint a { color: var(--text-2); text-decoration: underline; text-underline-offset: 0.15em; }
.facts { list-style: none; margin: 0; padding: 0.9rem 0 0; border-top: 1px solid var(--border); display: grid; gap: 0.6rem; }
.facts li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; color: var(--text-2); line-height: 1.45; }
.facts svg { width: 1rem; height: 1rem; flex: none; color: var(--text-3); margin-top: 0.1rem; }
.format { margin: 0; }
.soon { margin: 0; display: flex; align-items: center; justify-content: center; min-height: 3rem; border-radius: 10px; border: 1px solid var(--accent-line); background: var(--accent-wash); color: var(--accent-text); font-weight: 500; font-size: 0.95rem; }
.panel .button--block { display: none; }
.has-buybar .panel .price-row { display: none; }

.description { grid-area: desc; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.preview { margin: 0 0 1.75rem; display: grid; gap: 0.5rem; justify-items: start; }
.preview img { display: block; width: 100%; max-width: 34rem; height: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.preview figcaption { font-size: 0.8125rem; color: var(--text-3); }
.description > h2 { font-size: 0.8125rem; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-bottom: 0.9rem; }

/* Barre d'achat collante (mobile) */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.25rem calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .buybar { background: var(--bar); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); }
}
.buybar-price { display: flex; flex-direction: column; min-width: 0; }
.buybar-price strong { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.buybar-price span { font-size: 0.6875rem; color: var(--text-3); line-height: 1.3; }
.buybar .button { flex: 1; min-height: 2.9rem; max-width: 15rem; margin-left: auto; }
body.has-buybar { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }

/* Texte long : description de l'agent, pages légales */
.prose { font-size: 0.975rem; line-height: 1.7; color: var(--text-2); max-width: 42rem; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--text); letter-spacing: -0.02em; }
.prose h2 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }
.prose h3 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.prose h4, .prose h5, .prose h6 { font-size: 0.975rem; margin: 1.25rem 0 0.35rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose li::marker { color: var(--text-3); }
.prose a { text-decoration: underline; text-underline-offset: 0.15em; }
.prose blockquote { margin-left: 0; padding: 0.1rem 0 0.1rem 1rem; border-left: 2px solid var(--border-strong); color: var(--text-3); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--border); padding: 0.05em 0.35em; border-radius: 6px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.9rem 1rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 0.45rem 0.7rem; text-align: left; }

.legal article { max-width: 44rem; margin-inline: auto; padding-top: 1rem; }
.legal .prose { max-width: none; }
.legal h1 { font-size: clamp(1.75rem, 5.5vw, 2.25rem); font-weight: 650; line-height: 1.12; letter-spacing: -0.045em; margin-bottom: 1.75rem; color: var(--text); }
.legal .prose h2 { font-size: 1.05rem; }
.legal .form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.1rem; font-size: 0.925rem; }
.legal .form p:last-child { margin-bottom: 0; }

/* Remerciement, erreurs */
.notice { position: relative; isolation: isolate; max-width: 28rem; margin: 2.5rem auto 0; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 2.25rem 1.5rem; }
.notice::before { content: ""; position: absolute; inset: -40% -20% auto; height: 80%; z-index: -1; background: radial-gradient(ellipse at 50% 50%, var(--halo), transparent 70%); pointer-events: none; }
.notice-icon { width: 2.75rem; height: 2.75rem; margin: 0 auto 1rem; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--accent-line); background: var(--accent-wash); color: var(--accent-text); }
.notice-icon svg { width: 1.3rem; height: 1.3rem; }
.notice h1 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.04em; margin-bottom: 0.5rem; }
.notice p { margin: 0 0 0.75rem; color: var(--text-2); }
.notice .button { margin-top: 0.5rem; min-width: 13rem; }
.notice small { color: var(--text-3); }

/* Pied de page */
footer { border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 1.5rem; padding-block: 2rem 2.25rem; font-size: 0.8125rem; color: var(--text-3); line-height: 1.6; }
.footer-grid p { margin: 0 0 0.35rem; }
.footer-id { color: var(--text-2); }
.footer-title { color: var(--text); font-weight: 500; margin-bottom: 0.5rem !important; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.footer-col a { color: var(--text-3); }
.footer-col a:hover { color: var(--text); }
.footer-main .brand { margin-bottom: 0.5rem; }

@media (min-width: 40rem) {
  .wrap { padding-inline: 2rem; }
  .site-nav .nav-how { display: inline; }
  .hero { padding-block: 5.5rem 4.5rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step { padding: 1.35rem 1.4rem 1.45rem; }
  .step + .step { border-top: 0; border-left: 1px solid var(--border); }
  .product > .mesh { height: 8.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
}

@media (min-width: 60rem) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product {
    grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem 3rem;
    grid-template-areas: "banner banner" "head panel" "desc panel";
  }
  .panel { position: sticky; top: 4.75rem; }
  .panel .button--block { display: flex; }
  .has-buybar .panel .price-row { display: flex; }
  .buybar { display: none; }
  body.has-buybar { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:active { transform: none; }
}

@media print {
  .site-header, .buybar, .skip, .panel .button, .hero-bg { display: none; }
  body { background: #fff; color: #000; padding: 0; }
}
