/* Mise en page : colonne de 1080 px, en-tête sobre, héros en deux colonnes (texte et fiche de délai), principes en
   registre réglé, fonctions en grille, bandeau de confidentialité, appel au pilote. Tokens de DESIGN.md. */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --ink: #16211d;
  --muted: #55625d;
  --rule: #d9dfdb;
  --seal: #1e5a49;
  --seal-ink: #ffffff;
  --seal-soft: #e3eee8;
  --brass: #7d5200;
  --brass-soft: #f5ead2;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 6px;
  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.05rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #151d1a;
    --ink: #e7ece9;
    --muted: #9fada7;
    --rule: #28332f;
    --seal: #7cc3a8;
    --seal-ink: #0f1513;
    --seal-soft: #1a2d26;
    --brass: #e8b85a;
    --brass-soft: #2f2610;
    color-scheme: dark;
  }
}
[lang="ar"] {
  --display: "Noto Naskh Arabic", "Traditional Arabic", "Times New Roman", serif;
  --body: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { 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(--bg); color: var(--ink); font: 400 var(--step-0) / 1.65 var(--body); }
[lang="ar"] body, body[dir="rtl"] { line-height: 1.85; }
a { color: var(--seal); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--seal); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--seal); color: var(--seal-ink); padding: 8px 12px; z-index: 20; }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: var(--step-1); font-weight: 600; }
.brand svg { flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-inline-start: auto; font-size: var(--step--1); }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav .lang { color: var(--seal); font-weight: 600; }

.hero .container { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: clamp(48px, 8vw, 96px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--seal); }
[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); }
.hero h1 { font-size: var(--step-3); margin-top: 14px; }
.hero .lede { margin-top: 20px; font-size: var(--step-1); line-height: 1.6; color: var(--ink); max-width: 38em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-block; padding: 12px 20px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 1px solid var(--seal); }
.button.primary { background: var(--seal); color: var(--seal-ink); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { color: var(--seal); background: transparent; }
.button.secondary:hover { background: var(--seal-soft); }

/* Signature : la fiche de calcul d'un délai, telle que l'application la montre. */
.sheet { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(22, 33, 29, 0.45); overflow: hidden; }
.sheet figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--rule); font-family: var(--display); font-weight: 600; font-size: var(--step-0); }
.chip { font-family: var(--body); font-size: 0.78rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; color: var(--brass); background: var(--brass-soft); white-space: nowrap; }
.sheet dl { margin: 0; display: grid; }
.sheet .row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 14px; padding: 12px 18px; border-bottom: 1px dashed var(--rule); }
.sheet .row:last-child { border-bottom: 0; }
.sheet dt { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.sheet dd { margin: 0; font-size: var(--step--1); line-height: 1.5; }
.sheet .note { padding: 12px 18px; background: var(--brass-soft); color: var(--ink); font-size: 0.86rem; line-height: 1.5; }

section.block { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); }
section.block h2 { font-size: var(--step-2); max-width: 24em; }

.register { margin: 32px 0 0; display: grid; }
.register div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 8px 40px; padding-block: 20px; border-top: 1px solid var(--rule); }
.register div:last-child { border-bottom: 1px solid var(--rule); }
.register dt { font-family: var(--display); font-weight: 600; font-size: var(--step-1); line-height: 1.35; }
.register dd { margin: 0; color: var(--muted); max-width: 40em; }

.features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.features li { background: var(--surface); padding: 22px 22px 26px; display: grid; gap: 8px; align-content: start; }
.features h3 { font-size: var(--step-1); }
.features p { color: var(--muted); font-size: var(--step--1); line-height: 1.6; }

.secrecy { background: var(--seal-soft); }
.secrecy .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px 56px; align-items: start; }
.secrecy .lede { margin-top: 14px; color: var(--muted); }
.secrecy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.secrecy li { position: relative; padding-inline-start: 26px; }
.secrecy li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.62em; width: 12px; height: 2px; background: var(--seal); }
.secrecy .note { grid-column: 1 / -1; font-size: var(--step--1); color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; }

.pilot .container > div { max-width: 46em; display: grid; gap: 14px; }
.pilot .contact { margin-top: 10px; padding: 18px 20px; border: 1px solid var(--seal); border-radius: var(--radius); background: var(--surface); display: grid; gap: 6px; }
.pilot .address { font-family: var(--display); font-size: var(--step-1); font-weight: 600; word-break: break-word; user-select: all; }

.site-footer { border-top: 1px solid var(--rule); padding-block: 28px 40px; color: var(--muted); font-size: var(--step--1); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }

.legal-page .container { max-width: 760px; padding-block: 56px 80px; display: grid; gap: 28px; }
.legal-page h1 { font-size: var(--step-3); }
.legal-page section { display: grid; gap: 10px; }
.legal-page h2 { font-size: var(--step-1); }
.legal-page p { color: var(--ink); }
.stack { display: grid; gap: 12px; }

@media (max-width: 860px) {
  .hero .container, .secrecy .container { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .register div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .features { grid-template-columns: minmax(0, 1fr); }
  .sheet .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .nav { margin-inline-start: 0; }
}
