/* =========================================================================
   Mosane — design system partagé
   Refonte 2026-09-30. Objectif : code propre, une seule source de style,
   accessibilite WCAG 2.1 AA garantie (contrastes verifies a l'outil axe).
   Typo : Fraunces (display, serif editoriale) + DM Sans (texte).
   Palette : creme chaud, vert profond, brun chaud (decoratif).
   ========================================================================= */

/* ── Polices auto-hebergees (RGPD : aucune requete CDN tiers) ─────────────
   Les fichiers .woff2 vivent dans site/fonts/. Les pages doivent inclure
   les <link rel="preload"> pour fraunces-700 et dm-sans-400.            */
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg: #faf8f5;          /* fond creme */
  --surface: #ffffff;     /* cartes */
  --ink: #1a1814;         /* texte principal, contraste ~15:1 sur bg */
  --muted: #57534c;       /* texte secondaire, contraste ~6.9:1 sur bg (AA petit texte) */
  --accent: #33553a;      /* vert profond, ~7.5:1 sur bg, 8:1 en fond avec texte blanc */
  --accent-deep: #24402a; /* vert tres profond (sections foncees) */
  --accent-soft: #e7efe5; /* vert tres clair (chips, encadres) */
  --warm: #9e6d4a;        /* brun chaud DECORATIF uniquement (barres, degrades) */
  --warm-ink: #895223;    /* brun chaud pour TEXTE, ~5.6:1 sur bg (AA) */
  --warm-soft: #f5ede4;
  --border: #d8d2c8;
  --danger-soft: #fdeede; /* fond alerte douce (obligation legale) */
  --danger-ink: #8a3f12;  /* texte alerte, contraste AA sur danger-soft et bg */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 8px;
  --maxw: 940px;
  --shadow: 0 1px 2px rgba(26,24,20,0.04), 0 4px 16px rgba(26,24,20,0.05);
}

/* ── Reset leger ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  padding: 0 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Accessibilite : lien d'evitement + focus visible ────────────────── */
.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none; z-index: 300;
  transition: top 140ms ease;
}
.skip-link:focus { top: 8px; }

a { color: var(--accent); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn-primary:focus-visible {
  outline: 3px solid var(--warm-ink);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ── Layout ──────────────────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 44px 0 80px; }

/* ── Header + nav ────────────────────────────────────────────────────── */
.site-header {
  display: flex; align-items: baseline; gap: 10px 18px; flex-wrap: wrap;
  margin-bottom: 48px;
}
.brand {
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px;
  color: var(--accent); text-decoration: none;
}
.tagline { color: var(--muted); font-size: 0.9rem; line-height: 1.4; flex: 1 1 240px; }
.site-nav {
  display: flex; gap: 22px; flex-wrap: wrap;
  width: 100%; margin-top: 12px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.site-nav a {
  font-size: 0.9rem; color: var(--muted);
  text-decoration: none; font-weight: 600;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* ── Typographie de contenu ──────────────────────────────────────────── */
h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800; line-height: 1.04; letter-spacing: -1.6px;
  color: var(--ink); max-width: 20ch; margin-bottom: 20px;
  font-optical-sizing: auto;
}
h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2.05rem);
  font-weight: 700; line-height: 1.12; letter-spacing: -0.6px;
  color: var(--ink); margin: 56px 0 18px; font-optical-sizing: auto;
}
h2::after {
  content: ""; display: block;
  width: 56px; height: 4px; margin-top: 12px;
  border-radius: 2px; background: var(--warm);
}
h3 {
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 6px; font-optical-sizing: auto;
}
p { margin-bottom: 16px; }
.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 4px 0 44px; }
.hero-bar {
  width: 48px; height: 3px; margin-bottom: 20px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--warm) 100%);
}
.overline {
  display: block; margin-bottom: 14px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--warm-ink);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.chip {
  display: inline-block; padding: 4px 12px;
  border: 1px solid var(--accent); border-radius: 20px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft);
}
.promise {
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
  margin: 22px 0 26px; padding: 14px 20px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

/* ── Boutons + CTA ───────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block; padding: 14px 30px;
  background: var(--accent); color: #fff; text-decoration: none;
  border-radius: 6px; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.2px;
  transition: background 180ms ease, transform 160ms ease;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.cta-block { margin: 8px 0 0; }
.cta-block .secondary { margin-top: 13px; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ── Grilles cartes ──────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 720px) { .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.card .price { color: var(--accent); font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 0.93rem; color: var(--muted); margin: 0; }
.tag {
  display: inline-block; margin-bottom: 10px; padding: 2px 9px;
  border-radius: 4px; background: var(--accent-soft);
  font-size: 0.78rem; font-weight: 700; color: var(--accent);
}
.verbatim { font-style: italic; color: var(--muted); margin: 6px 0 8px; }
.result { margin-top: 10px; font-weight: 600; color: var(--ink); font-size: 0.9rem; }

/* ── Encadres d'information et de tarif ──────────────────────────────── */
.note {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 16px 20px; margin: 28px 0; border-radius: 0 6px 6px 0; font-size: 0.95rem;
}
.note.warm { background: var(--warm-soft); border-left-color: var(--warm-ink); }

/* ── Bloc phare : offre accessibilite (obligation legale) ────────────── */
.spotlight {
  margin: 40px 0; padding: 28px 28px 30px;
  border: 1px solid var(--border); border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--accent-soft) 100%);
  box-shadow: var(--shadow);
}
.badge-legal {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px;
  border-radius: 20px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.3px;
  color: var(--danger-ink); background: var(--danger-soft);
  border: 1px solid #f0c9a6;
}
.spotlight h2 { margin-top: 6px; }
.spotlight h2::after { display: none; }

/* ── Formulaire ──────────────────────────────────────────────────────── */
.form {
  margin-top: 22px; display: flex; flex-direction: column; gap: 10px; max-width: 480px;
}
.form label { font-size: 0.9rem; font-weight: 600; }
.form input, .form select, .form textarea {
  border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 14px; font-family: inherit; font-size: 0.95rem;
  background: var(--surface); color: var(--ink); width: 100%;
}
.form select { cursor: pointer; }
.form textarea { min-height: 90px; resize: vertical; }
.form button {
  align-self: flex-start; padding: 11px 24px;
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  font-family: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.form button:hover { background: var(--accent-deep); }

/* ── Section CTA foncee ──────────────────────────────────────────────── */
.cta-section {
  margin-top: 60px; padding: 40px 36px; border-radius: 12px;
  background: var(--accent-deep); color: #f3efe6;
}
.cta-section h2 { margin: 0 0 12px; color: #fff; }
.cta-section h2::after { display: none; }
.cta-section p { color: #ded9cd; }
.cta-section .btn-primary { background: #fff; color: var(--accent-deep); }
.cta-section .btn-primary:hover { background: #ece6d7; }
.cta-section a { color: #f3efe6; }
.cta-section .secondary, .cta-section .secondary a { color: #c8c1b2; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.9rem;
}
.site-footer a { color: var(--muted); }
.footer-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; color: var(--ink); }

/* ── CTA collant mobile ──────────────────────────────────────────────── */
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--accent); padding: 12px 20px; z-index: 200;
  text-align: center; box-shadow: 0 -2px 8px rgba(0,0,0,0.16);
}
.sticky-cta a { color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; }
@media (max-width: 639px) {
  .sticky-cta { display: block; }
  body { padding-bottom: 60px; }
}

/* ── Contenu long (pages legales, FAQ, articles fiscaux) ─────────────── */
.content { max-width: 70ch; }
.content h2 { margin-top: 44px; }
.content h3 { margin-top: 26px; font-size: 1.08rem; }
.content ul, .content ol { margin: 0 0 16px 1.3rem; }
.content li { margin-bottom: 6px; }
.content li::marker { color: var(--warm-ink); }
table { border-collapse: collapse; width: 100%; margin: 20px 0; font-size: 0.94rem; }
caption { text-align: left; color: var(--muted); font-size: 0.88rem; margin-bottom: 8px; }
th, td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
tbody tr:nth-child(even) { background: #f3efe9; }
blockquote {
  margin: 16px 0; padding: 12px 18px; color: var(--muted);
  border-left: 3px solid var(--warm-ink); background: var(--warm-soft);
  border-radius: 0 6px 6px 0;
}
details {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; margin-bottom: 12px; background: var(--surface);
}
details summary { font-weight: 700; cursor: pointer; }
details summary:focus-visible { outline: 3px solid var(--warm-ink); outline-offset: 2px; }
details[open] summary { margin-bottom: 8px; }

/* ── Respect des preferences de mouvement ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
