/* Site getlanti.com — styles partagés (jetons de docs/DESIGN.md, composants feutrés).
   Les pages d'accueil ajoutent accueil.css. Aucune ressource externe. */

@font-face {
  /* Repli arrondi auto-hébergé (SIL OFL, voir fonts/OFL-nunito.txt) : Safari utilise SF Rounded. */
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-wght.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Jour — « feutre au soleil » */
  --fond: #FBF3E6;
  --surface: #FFFAF2;
  --surface-enfoncee: #F4E6D2;
  --couture: #E3CDB2;
  --texte: #3B2A21;
  --texte-2: #6B5243;
  --abricot: #B8672F;
  --sur-abricot: #FFF8EE;
  /* Liens dans le texte : abricot assombri pour 4,5:1 sur crème et sur miel */
  --lien: #85461A;
  --sauge: #5E7353;
  --sur-sauge: #FFF8EE;
  --sos: #B84A3A;
  --sur-sos: #FFF8EE;
  --or: #E9B347;
  --lueur: #FFE7A8;
  --turquoise: #2A7F86;
  --peche: #F8D9BE;
  --creme: #FFF6E8;
  --ombre: 90 58 34;
  /* Laines de l'écharpe (LantiKit MeteoInterieure), identiques jour et nuit */
  --laine-orage: #8F87B5;
  --laine-pluie: #8FB3D1;
  --laine-nuages: #A8BFA1;
  --laine-eclaircie: #F2B399;
  --laine-soleil: #F2D17A;

  --police: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rayon-petit: 12px;
  --rayon-panneau: 26px;
  --rayon-feuille: 34px;
  --ombre-feutre: 0 6px 14px rgb(var(--ombre) / .16);
  --gouttiere: clamp(16px, 4.5vw, 56px);
  --largeur: 1240px;
  --mesure: 68ch;
  color-scheme: light;
}

/* « Nuit au Saule » : encre, lanterne, lune. Utilisé par la section de nuit et le pied de page. */
.nuit {
  --fond: #161D2C;
  --surface: #222B3E;
  --surface-enfoncee: #2C3750;
  --couture: #3E4B68;
  --texte: #F6EBDD;
  --texte-2: #C9BBA9;
  --abricot: #F2A76E;
  --sur-abricot: #2A1B12;
  --lien: #F2A76E;
  --sauge: #A9BF9B;
  --sur-sauge: #2A1B12;
  --sos: #F08A73;
  --sur-sos: #2A1B12;
  --or: #F6CD62;
  --lueur: #FFD978;
  --turquoise: #6FCFD2;
  --peche: #3A3350;
  --creme: #2A3348;
  --ombre: 5 8 15;
  /* L'ombre se recalcule ici : une variable composée est figée là où elle est déclarée. */
  --ombre-feutre: 0 6px 14px rgb(5 8 15 / .45);
  color-scheme: dark;
  background: var(--fond);
  color: var(--texte);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 450;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--abricot);
  overflow-x: clip;
}

::selection { background: var(--lueur); color: #3B2A21; }

[hidden] { display: none !important; }
figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  margin: 0;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4.25rem); }
h2 { font-size: clamp(1.95rem, 1.3rem + 2.4vw, 3.3rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); font-weight: 800; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: .9em; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.prose a, .lien {
  color: var(--lien);
  font-weight: 700;
  text-decoration-color: color-mix(in srgb, var(--lien) 45%, transparent);
}
.prose a:hover, .lien:hover { text-decoration-color: currentColor; }
.prose a.pastille { color: var(--sur-abricot); text-decoration: none; font-weight: 800; }
.prose a.pastille--douce { color: var(--sur-sauge); }

:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 3px;
  border-radius: 10px;
}

.icone { width: 1.25em; height: 1.25em; flex: none; }

.visuellement-cache {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pastille.lien-evitement {
  position: absolute;
  left: 16px; top: -80px;
  z-index: 50;
}
.pastille.lien-evitement:focus { top: 16px; }

.contenant {
  width: 100%;
  max-width: calc(var(--largeur) + 2 * var(--gouttiere));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

/* ---------- La couture : pointillé intérieur cousu main ---------- */
.cousu { position: relative; }
.cousu::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px dashed var(--couture);
  border-radius: inherit;
  pointer-events: none;
}

/* ---------- Pastilles : toute action et toute navigation ---------- */
.pastille {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 52px;
  padding: .7em 1.45em;
  border: 0;
  border-radius: 999px;
  background: var(--abricot);
  color: var(--sur-abricot);
  font: 800 1.1875rem/1.1 var(--police);
  text-decoration: none;
  box-shadow: var(--ombre-feutre);
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .18s;
}
.pastille::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px dashed currentColor;
  border-radius: inherit;
  opacity: .42;
  pointer-events: none;
}
.pastille:hover { filter: brightness(.93); }
.pastille:active { transform: scale(.96); filter: brightness(.86); }
.pastille--douce { background: var(--sauge); color: var(--sur-sauge); }
.pastille--sos { background: var(--sos); color: var(--sur-sos); }
.pastille--compacte { min-height: 46px; padding: .6em 1.15em; font-size: 1.0625rem; }
.pastille[aria-current="page"] { box-shadow: inset 0 3px 6px rgb(0 0 0 / .22); filter: brightness(.9); }

/* Puce : information non actionnable (capsule crème, icône or) */
.puce {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .5em 1.05em;
  border-radius: 999px;
  background: var(--creme);
  color: var(--texte);
  font-weight: 750;
  font-size: 1rem;
  line-height: 1.2;
  box-shadow: var(--ombre-feutre);
}
.puce .icone { color: var(--or); }
.puce::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.5px dashed var(--couture);
  border-radius: inherit;
  pointer-events: none;
}

/* Panneau de feutre */
.panneau {
  position: relative;
  background: var(--surface);
  color: var(--texte);
  border-radius: var(--rayon-panneau);
  box-shadow: var(--ombre-feutre);
  padding: clamp(22px, 3vw, 38px);
}
.panneau::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed var(--couture);
  border-radius: calc(var(--rayon-panneau) - 6px);
  pointer-events: none;
}

/* ---------- En-tête ---------- */
.entete {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
}
.marque {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: 48px;
  padding: 2px 18px 2px 2px;
  border-radius: 999px;
  background: var(--creme);
  box-shadow: var(--ombre-feutre);
  color: var(--texte);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}
.marque img { width: 44px; height: 44px; border-radius: 12px; box-shadow: var(--ombre-feutre); }
.entete nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Pied de page ---------- */
.pied {
  background: var(--fond);
  color: var(--texte);
  padding-block: clamp(40px, 6vw, 72px) 36px;
}
.pied-haut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pied nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pied-bas {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px dashed var(--couture);
  color: var(--texte-2);
  font-size: .95rem;
  display: grid;
  gap: .6em;
}
.pied-bas p { max-width: 72ch; }
.pied-bas p + p { margin-top: 0; }

/* ---------- Pages de lecture (conditions, confidentialité, aide) ---------- */
.page-lecture { background: var(--fond); }
.titre-lecture {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(16px, 4vw, 48px);
  padding-block: clamp(24px, 5vw, 64px) clamp(24px, 4vw, 48px);
}
.titre-lecture .chapeau { margin-top: 18px; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--texte-2); max-width: 56ch; }
.titre-lecture img { width: clamp(120px, 18vw, 220px); margin-bottom: -18px; filter: drop-shadow(0 8px 10px rgb(var(--ombre) / .18)); }
.date-vigueur { margin-top: 14px; }

.essentiel { margin-bottom: clamp(32px, 5vw, 56px); }
.essentiel h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: 16px; }
.essentiel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 78ch; }
.encart-crise p { max-width: 78ch; }
.essentiel li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.essentiel li .icone { color: var(--sauge); margin-top: .2em; }

.sommaire { margin-bottom: clamp(36px, 5vw, 60px); }
.sommaire h2 { font-size: 1.15rem; margin-bottom: 14px; color: var(--texte-2); }
.sommaire ol { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }

.lecture {
  display: grid;
  grid-template-columns: minmax(0, var(--mesure));
  gap: 0;
  padding-bottom: clamp(48px, 8vw, 96px);
}
.prose h2 {
  font-size: clamp(1.45rem, 1.2rem + .9vw, 1.95rem);
  margin: 2.4em 0 .6em;
  scroll-margin-top: 24px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.6em 0 .45em; }
.prose p, .prose li { color: var(--texte); }
.prose ul, .prose ol { padding-left: 1.3em; margin: .8em 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--abricot); }
.prose strong { font-weight: 800; }
.prose .note {
  margin-top: 1em;
  padding: 16px 20px;
  border-radius: var(--rayon-petit);
  background: var(--surface-enfoncee);
  color: var(--texte);
}

.tableau-donnees {
  width: 100%;
  margin: 1.1em 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.tableau-donnees caption { text-align: left; font-weight: 800; margin-bottom: .5em; }
.tableau-donnees th, .tableau-donnees td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 2px dashed var(--couture);
}
.tableau-donnees thead th { background: var(--surface-enfoncee); font-weight: 800; }
.tableau-donnees thead th:first-child { border-top-left-radius: var(--rayon-petit); }
.tableau-donnees thead th:last-child { border-top-right-radius: var(--rayon-petit); }
.tableau-donnees tbody th { font-weight: 800; width: 34%; }
.tableau-donnees td { font-variant-numeric: tabular-nums; }
.tableau-aide tbody th { width: 20%; }
.tableau-aide td:first-of-type { white-space: nowrap; }

/* Questions fréquentes (details natifs) */
.faq { display: grid; gap: 12px; margin-top: 1em; }
.faq details {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--ombre-feutre);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icone { color: var(--abricot); transition: transform .2s; }
.faq details[open] summary .icone { transform: rotate(180deg); }
.faq .reponse { padding: 0 20px 20px; }

.encart-crise {
  position: relative;
  border-radius: var(--rayon-panneau);
  background: var(--sos);
  color: var(--sur-sos);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--ombre-feutre);
}
.encart-crise::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 2px dashed currentColor;
  opacity: .4;
  border-radius: calc(var(--rayon-panneau) - 6px);
  pointer-events: none;
}
.encart-crise h2 { margin: 0 0 .5em; color: inherit; }
.encart-crise a { color: inherit; }

@media (max-width: 700px) {
  .titre-lecture { grid-template-columns: 1fr; }
  .titre-lecture img { grid-row: 1; width: 120px; margin-bottom: 0; }
  .tableau-donnees thead { display: none; }
  .tableau-donnees tr { display: grid; padding: 12px 0; border-bottom: 2px dashed var(--couture); }
  .tableau-donnees th, .tableau-donnees td { border: 0; padding: 4px 0; width: auto; }
  .entete { padding-block: 12px; }
  .marque { font-size: 1.35rem; }
  .marque img { width: 40px; height: 40px; }
}

/* Mode sombre pour les pages de lecture : mêmes jetons « nuit au Saule » que l'app. */
@media (prefers-color-scheme: dark) {
  .page-lecture {
    --fond: #161D2C;
    --surface: #222B3E;
    --surface-enfoncee: #2C3750;
    --couture: #3E4B68;
    --texte: #F6EBDD;
    --texte-2: #C9BBA9;
    --abricot: #F2A76E;
    --sur-abricot: #2A1B12;
    --lien: #F2A76E;
    --sauge: #A9BF9B;
    --sur-sauge: #2A1B12;
    --sos: #F08A73;
    --sur-sos: #2A1B12;
    --or: #F6CD62;
    --turquoise: #6FCFD2;
    --creme: #2A3348;
    --ombre: 5 8 15;
    --ombre-feutre: 0 6px 14px rgb(5 8 15 / .45);
    color-scheme: dark;
  }
}

/* Page introuvable (404), bilingue */
.perdu {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(32px, 7vw, 96px);
}
.perdu img { width: 100%; filter: drop-shadow(0 12px 12px rgb(var(--ombre) / .2)); }
.perdu-langues { display: grid; gap: 40px; }
.perdu h1, .perdu h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.8rem); }
.perdu p { margin: 14px 0 22px; color: var(--texte-2); max-width: 44ch; }
.perdu section + section { padding-top: 32px; border-top: 2px dashed var(--couture); }
@media (max-width: 700px) {
  .perdu { grid-template-columns: 1fr; }
  .perdu img { width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
