/* =====================================================================
   mallard.css — socle commun du site mallardapp.app (9 pages FR/EN/ES).
   Une seule source de vérité : tokens (palette, espacement, typo) et
   composants partagés (nav, eyebrow, cartes, encarts, kit store).
   Chaque page garde en <style> local ce qui lui est propre
   (hero, fiche imprimable, générateur…), chargé APRÈS ce fichier.
   Palette figée, pas de mode sombre, aucune police externe.
   ===================================================================== */

:root {
  /* ---- Palette (inchangée, non négociable) ---- */
  --teal: #156b5e;
  --teal-deep: #0b3d37;
  --bill: #f2b134;
  --bill-press: #e0a226;
  --cream: #f7f4ec;
  --ink: #14201c;
  --muted: #4a564f;
  --line: rgba(20, 32, 28, 0.12);
  --card: #ffffff;
  --maxw: 1080px;
  --radius: 16px;

  /* Ombre allégée : une marque calme ne flotte pas — mais les cartes
     doivent rester lisibles sur les écrans qui délavent le crème. */
  --shadow: 0 1px 2px rgba(11, 61, 55, 0.05), 0 10px 28px rgba(11, 61, 55, 0.07);

  /* ---- Échelle d'espacement — remplace les valeurs magiques ---- */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  /* ---- Échelle typographique (corps : 17px, inchangé) ---- */
  --text-sm: 14px;
  --text-base: 17px;
  --text-lg: 19px;
  --h1-size: clamp(1.9rem, 4.4vw, 2.6rem);
  --h2-size: clamp(1.35rem, 2.4vw, 1.6rem);
  --h3-size: 1.2rem;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", sans-serif;
  line-height: 1.6;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
}
h1 {
  font-size: var(--h1-size);
}
h2 {
  font-size: var(--h2-size);
}
h3 {
  font-size: var(--h3-size);
}
p {
  margin: 0;
}
a {
  color: var(--teal);
}
img,
svg {
  max-width: 100%;
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
a:focus-visible,
button:focus-visible,
[role="link"]:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Barre de navigation commune (sticky) ----------
   Marque à gauche, liens de pages, puis langue + CTA Play à droite.
   Sur mobile elle redevient statique : les liens restent visibles
   mais la barre ne mange pas l'écran en permanence. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-nav .nav-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s3) 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  row-gap: var(--s2);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-deep);
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-brand svg {
  width: 30px;
  height: 17px;
  display: block;
  flex: 0 0 auto;
}
.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  row-gap: var(--s2);
}
.nav-left {
  gap: var(--s5);
}
.site-nav nav {
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
}
.site-nav .lang {
  gap: var(--s2);
}
.site-nav a:not(.nav-brand):not(.nav-cta):not(.lang-flag) {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.site-nav a:not(.nav-brand):not(.nav-cta):not(.lang-flag):hover {
  color: var(--teal);
}
.site-nav a[aria-current="page"] {
  color: var(--teal) !important;
}
.nav-cta {
  background: var(--teal);
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.nav-cta:hover {
  background: var(--teal-deep);
}
@media (max-width: 700px) {
  .site-nav {
    position: static;
  }
}

/* ---------- Bascule de langue (drapeaux, en ligne) ---------- */
.lang {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.lang-flag {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.lang-flag svg {
  display: block;
  width: 22px;
  height: 15px;
  border-radius: 2.5px;
}
.lang a.lang-flag {
  opacity: 0.5;
}
.lang a.lang-flag:hover,
.lang a.lang-flag:focus-visible {
  opacity: 1;
}

/* ---------- Eyebrow de section — unifié + signature « bec » ----------
   Un seul style pour tout le site : label haut-de-casse teal, souligné
   d'un court trait jaune (le bec du canard). Centré par défaut
   (sections de l'accueil), variante --left pour la prose. */
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::after {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--bill);
  margin: var(--s2) auto 0;
}
.eyebrow--left::after {
  margin-left: 0;
}

/* ---------- Cartes & encarts ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow);
}
/* Encart discret pour la prose (mise en retrait d'un paragraphe clé). */
.callout {
  background: rgba(21, 107, 94, 0.06);
  border: 1px solid rgba(21, 107, 94, 0.14);
  border-radius: 12px;
  padding: var(--s4) var(--s5);
}
/* Bloc de contraste deux tons (ex. confidentialité :
   « ce qui part » / « ce qui ne part jamais »). */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin: var(--s5) 0;
}
.duo-item {
  border-radius: var(--radius);
  padding: var(--s4) var(--s5);
}
.duo-item.duo-light {
  background: var(--card);
  border: 1px solid var(--line);
}
.duo-item.duo-dark {
  background: var(--teal-deep);
  color: var(--cream);
}
.duo-item.duo-dark a {
  color: var(--bill);
}
.duo-item p {
  margin: var(--s2) 0 0;
}
.duo-item ul {
  margin: var(--s2) 0 0;
  padding-left: 20px;
}
.duo-item li {
  margin: var(--s1) 0;
}
@media (max-width: 640px) {
  .duo {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gabarit « prose » (praticiens, confidentialité…) ----------
   Colonne de lecture 720px, titres qui tranchent, respiration
   hiérarchisée : grands intervalles avant les h2, serré à l'intérieur. */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s7) 22px var(--s9);
}
.prose h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin: var(--s2) 0;
}
.prose .lede {
  font-size: var(--text-lg);
  color: var(--muted);
  margin: 0 0 var(--s6);
}
.prose h2 {
  margin: var(--s8) 0 var(--s4);
}
.prose h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--bill);
  margin-top: var(--s3);
}
.prose p {
  margin: 0 0 var(--s4);
}
.prose ul {
  padding-left: 22px;
  margin: 0 0 var(--s4);
}
.prose li {
  margin: var(--s2) 0;
}
.prose .card,
.prose .callout,
.prose .duo {
  margin-top: var(--s5);
  margin-bottom: var(--s5);
}
.prose footer {
  margin-top: var(--s8);
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
}

/* ---------- Pied de page (base commune) ---------- */
footer {
  color: var(--muted);
  font-size: 15px;
}
footer a {
  color: var(--teal-deep);
  font-weight: 600;
}

/* ---------- Kit « store » (CTA Google Play + QR) ---------- */
.store {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 13px;
  position: relative;
}
.store-btn svg.play {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.82;
  line-height: 1.2;
}
.store-btn b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.qr-box {
  width: 72px;
  height: 72px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box img {
  width: 100%;
  height: 100%;
  display: block;
}
.qr small {
  font-size: 11.5px;
  color: var(--muted);
}
.store-note {
  margin-top: var(--s4);
  font-size: var(--text-sm);
  color: var(--muted);
}
.store-note a {
  color: var(--teal-deep);
  font-weight: 600;
}

/* ---------- Divers ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
