/* Vocab — site vitrine, direction « Carnet »
   Couleurs, typographie et espacements repris de src/theme/theme.ts : à garder synchronisés à la main. */

/* ---------- Polices (auto-hébergées, sous-ensemble latin) ---------- */
@font-face { font-family: "Literata"; src: url("../fonts/literata-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Jetons ---------- */
:root {
  color-scheme: light dark;
  --bg: #F5F0E6;
  --surface: #FBF8F2;
  --text: #1F1A14;
  --text-2: #5A5046;
  --muted: #736757;
  --border: #DDD3C2;
  --accent: #8A2C35;
  --accent-hover: #6E222A;
  --on-accent: #FBF8F2;
  --accent-soft: #F3D9DB;
  --success: #3E6B48;
  --danger: #B42318;
  --mark: #EFE1C6;
  --night-bg: #17140F;
  --night-surface: #2E2820;
  --night-text: #EFE8DA;
  --night-text-2: #BDB3A3;
  --night-border: #3A332A;
  --night-accent: #E3929A;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --r-sm: 4px; --r-md: 12px; --r-pill: 999px;
  --wrap: 1120px;
  --shadow-lift: 0 24px 60px rgba(31, 26, 20, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140F;
    --surface: #211D17;
    --text: #EFE8DA;
    --text-2: #BDB3A3;
    --muted: #948A7B;
    --border: #3A332A;
    --accent: #E3929A;
    --accent-hover: #EDB0B6;
    --on-accent: #17140F;
    --accent-soft: #3A2427;
    --success: #8DBF97;
    --danger: #F08A80;
    --mark: #4A3E2A;
    --night-bg: #0F0D0A;
    --night-surface: #2A251E;
    --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.5);
  }
  .phone { background: #2E2820; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: var(--s-5); }
mark.todo { background: var(--mark); color: var(--text); padding: 0 4px; border-radius: var(--r-sm); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 10;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); color: var(--bg); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--s-5); }
.narrow { max-width: 760px; margin: 0 auto; padding-inline: var(--s-5); }

.kicker { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.kicker--accent { color: var(--accent); }
.lead { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--text-2); max-width: 34em; }
.h2 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.75rem); line-height: 1.15; }
.section { padding-block: var(--s-9); }
.section-head { display: flex; flex-direction: column; gap: var(--s-3); max-width: 640px; margin-bottom: var(--s-7); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 28px; border-radius: var(--r-pill);
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 150ms, color 150ms, border-color 150ms;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { border-color: var(--text); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- En-tête ---------- */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-5); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.5rem; letter-spacing: -0.01em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
.site-nav a:not(.btn) {
  min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center;
  font-size: 0.9375rem; font-weight: 500; color: var(--text); text-decoration: none;
}
.site-nav a:not(.btn):hover { text-decoration: underline; }

/* ---------- Accueil (héros) ---------- */
.hero { padding-block: 72px 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__title { font-size: clamp(2.625rem, 1.6rem + 3.6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.015em; }
.hero__visual { flex: 0 1 300px; min-width: 0; margin-inline: auto; }

.phone { width: 300px; max-width: 100%; margin-inline: auto; padding: 10px; border-radius: 40px; background: var(--text); box-shadow: var(--shadow-lift); }
.phone img { width: 100%; border-radius: 31px; }
.phone--night { background: var(--night-surface); box-shadow: none; }

/* ---------- Article de dictionnaire ---------- */
.entry-band { background: var(--surface); border-block: 1px solid var(--border); }
.entry { padding-block: 72px; display: flex; flex-direction: column; gap: 18px; }
.entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--text); }
.entry__word { font-family: var(--serif); font-weight: 600; font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem); line-height: 1.1; }
.entry__pos { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--text-2); }
.entry ol { margin: 0; padding: 0; list-style: none; counter-reset: def; display: flex; flex-direction: column; gap: 18px; }
.entry li { counter-increment: def; display: flex; gap: var(--s-4); font-family: var(--serif); font-size: 1.3125rem; line-height: 1.6; }
.entry li::before { content: counter(def) "."; font-weight: 600; color: var(--accent); }
.entry .domain { font-style: italic; color: var(--muted); }

/* ---------- Étapes ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: var(--s-3); padding-top: 20px; border-top: 1px solid var(--text); }
.steps li::before { content: counter(step) "."; font-family: var(--serif); font-weight: 600; font-size: 2.5rem; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 1.5rem; line-height: 1.3; }
.steps p { font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); }

/* ---------- Visite (onglets) ---------- */
.night { background: var(--night-bg); color: var(--night-text); }
.night .kicker { color: var(--night-accent); }
.night a { color: var(--night-accent); }
.tour { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-7) var(--s-8); }
.tour__body { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tour__media { flex: 0 1 300px; margin-inline: auto; }
.tablist { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tab {
  min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid var(--night-border); background: transparent; color: var(--night-text);
  font: 600 0.9375rem/1 var(--sans); cursor: pointer;
}
.tab:hover { border-color: var(--night-text); }
.tab[aria-selected="true"] { background: var(--night-text); border-color: var(--night-text); color: var(--night-bg); }
.night :focus-visible { outline-color: var(--night-accent); }
.panel { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-7) var(--s-8); }
.panel + .panel { margin-top: var(--s-8); padding-top: var(--s-8); border-top: 1px solid var(--night-border); }
.js .panel + .panel { margin-top: 0; padding-top: 0; border-top: 0; }
.panel[hidden] { display: none; }
.panel__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--night-border); }
.panel__text h3 { font-size: 1.875rem; line-height: 1.2; }
.panel__text > p { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.6; color: var(--night-text-2); }
.panel__points { margin: 0; padding: 0; list-style: none; counter-reset: pt; }
.panel__points li { counter-increment: pt; display: flex; gap: 14px; padding: var(--s-3) 0; border-bottom: 1px solid var(--night-border); }
.panel__points li::before { content: counter(pt) "."; font-family: var(--serif); font-weight: 600; color: var(--night-accent); }
.panel .phone { flex: 0 1 300px; }

/* ---------- Principes ---------- */
.screens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-7) var(--s-6); }
.screens figure { margin: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.screens .phone { width: 240px; }
.screens figcaption { font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); }
.screens figcaption strong { display: block; font-family: var(--serif); font-size: 1.375rem; line-height: 1.3; color: var(--text); margin-bottom: var(--s-1); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 0 40px; }
.principles li { display: flex; flex-direction: column; gap: var(--s-2); padding-block: var(--s-5); border-top: 1px solid var(--border); }
.principles h3 { font-size: 1.375rem; line-height: 1.3; }
.principles p { font-size: 1.0625rem; line-height: 1.6; color: var(--text-2); }

/* ---------- Mot du jour ---------- */
.word-of-day { background: var(--surface); border-top: 1px solid var(--border); }
.word-of-day .narrow { padding-block: 88px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.word-of-day__word { font-family: var(--serif); font-weight: 600; font-size: clamp(2.5rem, 1.9rem + 2vw, 3.75rem); line-height: 1.1; }
.word-of-day__pos { font-family: var(--serif); font-style: italic; font-size: 1.0625rem; color: var(--muted); }
.word-of-day blockquote { margin: 0; font-family: var(--serif); font-size: 1.3125rem; line-height: 1.6; color: var(--text-2); max-width: 28em; }

/* ---------- Bêta ---------- */
.beta { background: #8A2C35; color: #FBF8F2; }
.beta .wrap { padding-block: var(--s-9); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-7) var(--s-8); }
.beta__text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.beta .kicker { color: #F3D9DB; }
.beta__text p:not(.kicker) { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.6; color: #F3D9DB; max-width: 28em; }
.beta :focus-visible { outline-color: #FBF8F2; }
.beta-card {
  flex: 1 1 400px; min-width: 0; max-width: 520px; padding: var(--s-6);
  border-radius: var(--r-md); background: #FBF8F2; color: #1F1A14; box-shadow: 0 20px 50px rgba(31, 26, 20, 0.25);
}
.beta-card :focus-visible { outline-color: #8A2C35; }
.form { display: flex; flex-direction: column; gap: var(--s-3); }
.form label { font-size: 0.875rem; font-weight: 600; }
.form input[type="email"] {
  width: 100%; min-height: 52px; padding: 0 20px; border-radius: var(--r-md);
  border: 1px solid #DDD3C2; background: #F5F0E6; color: #1F1A14; font: 400 1.0625rem/1.4 var(--serif);
}
.form input[type="email"]::placeholder { color: #736757; }
.form input[aria-invalid="true"] { border-color: #B42318; }
.form .btn--primary { background: #8A2C35; color: #FBF8F2; }
.form .btn--primary:hover { background: #6E222A; }
.form .btn[disabled] { opacity: 0.7; cursor: progress; }
.form__hint { font-size: 0.8125rem; line-height: 1.5; color: #736757; }
.form__error { font-size: 0.875rem; line-height: 1.5; color: #B42318; }
.form__error:empty { display: none; }
.form-success { display: flex; flex-direction: column; gap: var(--s-2); }
.form-success h3 { font-size: 1.5rem; line-height: 1.3; color: #3E6B48; }
.form-success p { font-size: 1rem; line-height: 1.6; color: #5A5046; }
.form-success[hidden] { display: none; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .wrap { padding-block: var(--s-6) 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4) var(--s-6); font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.site-footer .brand-mini { font-family: var(--serif); font-style: italic; font-weight: 600; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-4); }
.site-footer ul a { color: var(--muted); }
.site-footer ul a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- Pages légales ---------- */
.doc-hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.doc-hero .wrap { padding-block: 72px var(--s-8); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-5) var(--s-7); }
.doc-hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.doc-hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.doc-hero h1 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem); line-height: 1.05; letter-spacing: -0.01em; }
.doc-hero__mark { font-family: var(--serif); font-style: italic; font-size: 180px; line-height: 0.8; color: var(--accent); }

.doc { padding-block: 56px var(--s-9); display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-7) var(--s-8); }
.doc__aside { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 28px; }
.doc__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.toc-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { min-height: 44px; display: flex; align-items: center; gap: var(--s-3); border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.toc a:hover { color: var(--accent); }
.toc .n { width: 18px; font-family: var(--serif); font-weight: 600; color: var(--accent); }
.aside-note { padding: 20px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.aside-note strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.0625rem; }
.aside-note p { font-size: 0.875rem; color: var(--text-2); }

.prose p, .prose li { font-family: var(--serif); font-size: 1.125rem; line-height: 1.7; }
.clause { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 var(--s-2); padding-top: 28px; border-top: 1px solid var(--text); }
.clause__n { font-family: var(--serif); font-weight: 600; font-size: 2.5rem; line-height: 1; color: var(--accent); }
.clause__body { display: flex; flex-direction: column; gap: var(--s-4); }
.clause__body h2 { font-size: 1.75rem; line-height: 1.25; }
.sub { display: flex; flex-direction: column; gap: 6px; padding-block: var(--s-4); border-bottom: 1px solid var(--border); }
.sub:last-child { border-bottom: 0; }
.sub h3 { font-size: 1.25rem; line-height: 1.4; }
.sub h3 .letter { color: var(--accent); font-style: italic; }

.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: var(--s-3); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px; display: flex; flex-direction: column; gap: var(--s-3); }
.card svg { width: 26px; height: 26px; stroke: var(--accent); }
.card p { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.55; }

.facts { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-2) var(--s-5); }
.facts > div { display: flex; flex-wrap: wrap; gap: 2px 20px; padding-block: 14px; border-bottom: 1px solid var(--border); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { flex: 0 0 150px; font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); }
.facts dd { flex: 1 1 260px; min-width: 0; margin: 0; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); font: 500 0.875rem/1.2 var(--sans); }
.callout-night { padding: 20px var(--s-5); border-radius: var(--r-md); background: var(--night-bg); color: var(--night-text); }
.callout-night a { color: var(--night-accent); }

.legal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: var(--s-5); }
.legal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 28px 28px var(--s-3); }
.legal-card__head { display: flex; align-items: baseline; gap: 14px; padding-bottom: var(--s-4); border-bottom: 1px solid var(--text); }
.legal-card__head .clause__n { font-size: 2rem; }
.legal-card__head h2 { font-size: 1.625rem; line-height: 1.25; }
.legal-card .facts { background: none; border: 0; padding: 0; border-radius: 0; }
.legal-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: var(--s-6) var(--s-8); }
.small-italic { font-style: italic; font-size: 1rem !important; color: var(--muted); }

/* ---------- 404 ---------- */
.notfound { padding-block: 120px; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5); }

@media print {
  .site-header nav, .skip-link, .beta, .tablist { display: none !important; }
  body { background: #fff; color: #000; }
}

.bref-title { font-size: 1.625rem; margin-bottom: 20px; }
.cards-3 { list-style: none; margin: 0; padding: 0; }
.tablist[hidden] { display: none; }
