/*
 * @file site.css
 * @brief Système de design partagé de wegrowtoday.com : charte Grow (crème, encre, vert Grow), titres Bricolage Grotesque
 * et accent Lora italique (polices OFL sous-ensemblées en woff2), clair et sombre, sans script. Chargé par toutes les
 * pages : jetons, base, en-tête, typographie, boutons de store, pied de page, puis la mise en page des pages de texte
 * (`.doc` : confidentialité, conditions, assistance, suppression du compte, 404), puis le sélecteur de langue et la
 * suggestion de langue (voir i18n.js). La page d'accueil ajoute `home.css`.
 */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/site/BricolageGrotesque-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/assets/site/Lora-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --cream: #fcf9f2;
  --cream-2: #f4efe3;
  --surface: #ffffff;
  --ink: #121a16;
  --muted: #4a5650;
  --line: #e5dfd0;
  --green: #0b7a57;
  --green-ink: #0b7a57;
  --glow: #0e9f6e;
  --on-green: #fcf9f2;
  --shadow: 0 1px 2px rgba(18, 26, 22, .06), 0 12px 32px rgba(18, 26, 22, .08);
  --radius: 22px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --accent: "Lora", Georgia, "Times New Roman", serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #0e1512;
    --cream-2: #131d19;
    --surface: #17221d;
    --ink: #eef3ef;
    --muted: #aebab3;
    --line: #26342d;
    --green-ink: #5fd3a6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* En-tête */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--cream) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -.02em; }
.brand::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); }
.top nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav .cta { color: var(--on-green); background: var(--green); padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.top nav .cta:hover { color: var(--on-green); background: #096a4b; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (max-width: 719px) { .top nav .hide-sm { display: none; } }

/* Typo */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(42px, 7.4vw, 84px); }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
em.hl { font-family: var(--accent); font-style: italic; font-weight: 400; color: var(--green-ink); letter-spacing: -.01em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--green-ink); background: color-mix(in srgb, var(--glow) 12%, transparent); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 36em; margin: 22px 0 0; }
.section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 19px; margin: 16px 0 0; }

/* Boutons de store et boutons */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 22px 10px 18px; border-radius: 16px; background: var(--ink); color: var(--cream); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.store:hover { transform: translateY(-2px); }
.store svg { width: 28px; height: 28px; flex: none; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 12px; opacity: .8; }
.store strong { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.store.alt { background: var(--green); color: var(--on-green); }
@media (prefers-reduced-motion: reduce) { .store { transition: none; } .store:hover { transform: none; } }
.fine { font-size: 14px; color: var(--muted); margin: 16px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; background: var(--green); color: var(--on-green); }
.btn:hover { background: #096a4b; color: var(--on-green); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--cream-2); color: var(--ink); }

/* Pied de page */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot p { margin: 0; }
.foot .copy { margin-top: 10px; }

/* Petits écrans : les deux boutons de store côte à côte. */
@media (max-width: 479px) {
  .stores { flex-wrap: nowrap; gap: 10px; }
  .store { flex: 1 1 0; min-width: 0; padding: 10px 12px; gap: 8px; justify-content: center; }
  .store svg { width: 22px; height: 22px; }
  .store strong { font-size: 16px; white-space: nowrap; }
  .store small { font-size: 11px; white-space: nowrap; }
}

/* Pages de texte (.doc) : confidentialité, conditions, assistance, suppression du compte, 404. */
.doc { position: relative; padding: 48px 0 72px; overflow-x: clip; }
.doc::before { content: ""; position: absolute; top: -220px; right: -180px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 18%, transparent), transparent); pointer-events: none; z-index: -1; }
.doc .wrap { max-width: 820px; }
@media (min-width: 960px) { .doc { padding-top: 72px; } }
.doc h1 { font-size: clamp(38px, 6.4vw, 64px); }
.doc h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; margin: 48px 0 14px; }
.doc h3 { font-size: 20px; margin: 30px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 14px 0; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--green-ink); }
.doc strong { font-weight: 650; }
.doc section[lang] + section[lang] { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 56px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 18px 0 0; }
.doc .lang { margin: 18px 0 0; font-size: 15px; }
.doc .lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; }
.doc .lang a:hover { border-color: var(--green-ink); color: var(--green-ink); }
.doc .notice { background: color-mix(in srgb, #e0a100 14%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, #e0a100 40%, var(--line)); border-radius: 16px; padding: 12px 16px; font-size: 15px; margin: 24px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.doc th, .doc td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.doc th { font-weight: 600; background: var(--cream-2); }
.doc tr:last-child td { border-bottom: 0; }
.doc .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.doc a { overflow-wrap: anywhere; }

/* Langues : sélecteur d'en-tête (menu <details>, utilisable sans script) et suggestion unique (ajoutée par i18n.js). */
.lang-switch { position: relative; }
.lang-switch summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; user-select: none; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; opacity: .7; }
.lang-switch[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang-switch summary:hover { border-color: var(--green-ink); }
.lang-switch summary svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); z-index: 6; }
.top nav .lang-switch a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: 10px; color: var(--ink); font-size: 15px; }
.top nav .lang-switch a:hover { background: var(--cream-2); }
.top nav .lang-switch a[aria-current="true"] { color: var(--green-ink); font-weight: 600; }
.top nav .lang-switch a[aria-current="true"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); }
@media (max-width: 719px) { .top nav { gap: 10px; } .lang-switch summary { padding: 6px 10px; } }
.lang-banner { position: fixed; z-index: 8; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 560px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 14px 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); font-size: 16px; }
.lang-banner p { margin: 0; font-weight: 600; }
.lang-banner div { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-banner .btn { min-height: 42px; padding: 8px 16px; font-size: 15px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.not-found[hidden] { display: none; }
.not-found + .not-found { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 48px; }
