/* Cadence — Legal pages stylesheet
 * Chambre 2046 — v1.4
 * Source de vérité : BRAND.md à la racine du repo
 */

:root {
  --bg-deep: #080608;
  --bg-main: #0F0A0C;
  --bg-card: #1A1012;
  --ink: #E8DCC8;
  --ink-sec: #B8A99A;
  --ink-ter: #8A6F6A;
  --red: #A0282F;
  --jade: #2B6B5C;
  --tungsten: #E8B64A;
  --rule: #2C1D20;

  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg-main);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.01em;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Grain film 35mm — signature technique §4 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.91  0 0 0 0 0.86  0 0 0 0 0.78  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 32px 96px;
  position: relative;
  z-index: 2;
}

@media (max-width: 640px) {
  .wrap { padding: 48px 20px 72px; }
}

/* Letterbox cinématique — signature technique §4 */
.letterbox-top,
.letterbox-bottom {
  position: fixed;
  left: 0;
  right: 0;
  height: 16px;
  background: var(--bg-deep);
  z-index: 5;
  pointer-events: none;
}

.letterbox-top { top: 0; }
.letterbox-bottom { bottom: 0; }

@media (max-width: 640px) {
  .letterbox-top,
  .letterbox-bottom { height: 8px; }
}

/* Eyebrow */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-ter);
  margin-bottom: 24px;
  font-variant-numeric: tabular-nums;
}

/* Titres */
h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 7vw, 56px);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.2;
  color: var(--ink);
  margin: 56px 0 20px;
  letter-spacing: -0.005em;
}

h2:first-of-type { margin-top: 0; }

h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  margin: 28px 0 8px;
  letter-spacing: 0.005em;
}

/* Lede */
.lede {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-sec);
  margin-bottom: 12px;
  max-width: 52ch;
}

.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-ter);
  margin-top: 24px;
  font-variant-numeric: tabular-nums;
}

/* Filet décoratif */
.rule {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 48px 0;
}

/* Corps */
p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-sec);
  margin-bottom: 14px;
  max-width: 62ch;
}

p strong {
  color: var(--ink);
  font-weight: 500;
}

/* Listes */
ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
}

li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-sec);
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  max-width: 62ch;
}

li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-ter);
}

/* Listes ordonnées */
ol {
  list-style: none;
  padding: 0;
  margin: 14px 0 18px;
  counter-reset: list;
}

ol > li {
  counter-increment: list;
  padding-left: 32px;
}

ol > li::before {
  content: counter(list, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-ter);
  position: absolute;
  left: 0;
  top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Tables */
.data-table {
  width: 100%;
  margin: 18px 0 24px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-sec);
}

.data-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-ter);
  padding-bottom: 8px;
}

.data-table td:first-child {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  width: 32%;
}

/* Callouts */
.callout {
  border-left: 2px solid var(--jade);
  padding: 18px 22px;
  margin: 28px 0;
  background: rgba(43, 107, 92, 0.06);
}

.callout.red {
  border-left-color: var(--red);
  background: rgba(160, 40, 47, 0.06);
}

.callout .label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 8px;
}

.callout.red .label {
  color: var(--red);
}

.callout p {
  color: var(--ink);
  margin-bottom: 0;
}

/* Liens */
a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 200ms ease;
}

a:hover {
  border-bottom-color: var(--ink);
}

a:focus-visible {
  outline: 2px solid var(--tungsten);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Définitions (CGU) */
dl.terms {
  margin: 20px 0;
}

dl.terms dt {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  font-size: 14px;
  margin-top: 14px;
  margin-bottom: 4px;
}

dl.terms dd {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
  margin-left: 0;
  max-width: 62ch;
}

/* Bouton de contact */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 14px 22px;
  text-decoration: none;
  transition: background-color 200ms ease, color 200ms ease;
  margin: 12px 0;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg-main);
  border-bottom: 1px solid var(--ink);
}

/* Footer */
footer {
  margin-top: 96px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-ter);
}

.footer-nav a {
  color: var(--ink-ter);
  border-bottom: none;
  margin-right: 18px;
}

.footer-nav a:hover { color: var(--ink); }

.footer-lang {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-ter);
}

.footer-lang a { color: var(--ink-ter); border-bottom: none; }
.footer-lang a:hover { color: var(--ink); }
.footer-lang .current { color: var(--ink); }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
