/* ══════════════════════════════════════════════════════════════════
   Site « Cahier » — landing et guide utilisateur.
   Même direction que l'application (« Correction » : encre sur papier,
   surligneur jaune) ; jetons recopiés de packages/ui/src/jetons.css.
   Autonome : aucun CDN, polices locales (licences OFL dans polices/).
   ══════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("polices/BricolageGrotesque-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("polices/FamiljenGrotesk-Variable.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("polices/DMMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("polices/DMMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --fond: #E6E7E2;
  --feuille: #FBFBF8;
  --creux: #F1F2EC;
  --encre: #13160F;
  --encre2: #5D6356;
  --encre3: #8E9487;
  --trait: #D2D5CB;
  --trait2: #E4E6DD;
  --stabilo: #F4E04D;
  --stabilo-pale: #FAF0A8;
  --rouge: #BE3A2B;
  --vert: #3B7A4A;
  --titres: "Bricolage Grotesque", system-ui, sans-serif;
  --interface: "Familjen Grotesk", system-ui, sans-serif;
  --chiffres: "DM Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--interface);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--titres); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 0.5em; }
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(24px, 4vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
a { color: inherit; }
code, .num { font-family: var(--chiffres); font-size: 0.92em; }
code { background: var(--creux); border: 1px solid var(--trait2); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }

.sobre { color: var(--encre2); }
.fin { font-size: 13px; color: var(--encre3); }

/* ── surligneur : le geste signature ── */
.stab { position: relative; display: inline-block; white-space: nowrap; }
.stab::before {
  content: "";
  position: absolute;
  left: -4px; right: -4px; top: 14%; bottom: 4%;
  background: var(--stabilo);
  border-radius: 44% 56% 48% 52% / 60% 40% 62% 38%;
  transform: rotate(-0.6deg);
  z-index: -1;
}

/* ── structure ── */
.enveloppe { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

header.site {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 0;
}
header.site .logo { font-family: var(--titres); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; text-decoration: none; }
header.site nav { margin-left: auto; display: flex; gap: 22px; }
header.site nav a { text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--encre2); }
header.site nav a:hover { color: var(--encre); }

/* ── héros ── */
.heros { padding: 48px 0 64px; text-align: center; }
.heros p.accroche { font-size: clamp(17px, 2.4vw, 21px); color: var(--encre2); max-width: 640px; margin: 0 auto 30px; }
.heros .capture-heros {
  margin-top: 48px;
  border: 1px solid var(--trait);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(19, 22, 15, 0.22);
  overflow: hidden;
  background: var(--feuille);
}
.heros .capture-heros img { display: block; width: 100%; height: auto; }

/* ── boutons ── */
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 8px;
  font-weight: 700; font-size: 15.5px; text-decoration: none;
  border: 1px solid transparent;
}
.btn.pri { background: var(--encre); color: var(--feuille); }
.btn.pri:hover { background: #000; }
.btn.sec { background: var(--feuille); border-color: var(--trait); }
.btn.sec:hover { border-color: var(--encre2); background: var(--creux); }
.btn .sous { display: block; font-weight: 400; font-size: 11.5px; opacity: 0.75; }

/* ── bandeau « 100 % local » ── */
.bandeau {
  background: var(--feuille);
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
  padding: 56px 0;
}
.bandeau .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 30px; }
.bandeau .trio h3 { margin-bottom: 6px; }
.bandeau .trio p { color: var(--encre2); font-size: 15px; margin: 0; }

/* ── sections fonctionnalités alternées ── */
.fonctions { padding: 24px 0; }
.fonction {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: center; padding: 56px 0;
}
.fonction:nth-child(even) .visuel { order: -1; }
.fonction .visuel img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--trait); border-radius: 10px;
  background: var(--feuille);
  box-shadow: 0 18px 50px rgba(19, 22, 15, 0.14);
}
.fonction p { color: var(--encre2); }
.fonction .lab {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--rouge); display: block; margin-bottom: 10px;
}

/* cadre téléphone en CSS pur */
.telephone {
  width: min(300px, 80%); margin: 0 auto;
  border: 10px solid var(--encre); border-radius: 34px;
  overflow: hidden; background: var(--feuille);
  box-shadow: 0 24px 60px rgba(19, 22, 15, 0.25);
}
.telephone img { display: block; width: 100%; height: auto; }

/* ── téléchargement ── */
.telecharger {
  background: var(--encre); color: var(--feuille);
  padding: 64px 0; text-align: center;
}
.telecharger h2 { color: var(--feuille); }
.telecharger p { color: rgba(251, 251, 248, 0.75); max-width: 560px; margin: 0 auto 26px; }
.telecharger .btn.pri { background: var(--stabilo); color: var(--encre); }
.telecharger .btn.pri:hover { background: var(--stabilo-pale); }
.telecharger .btn.sec { background: transparent; border-color: rgba(251, 251, 248, 0.4); color: var(--feuille); }
.telecharger .btn.sec:hover { border-color: var(--feuille); background: rgba(251, 251, 248, 0.08); }
.avertissement {
  max-width: 620px; margin: 26px auto 0;
  background: rgba(251, 251, 248, 0.08);
  border: 1px solid rgba(251, 251, 248, 0.2);
  border-radius: 8px; padding: 14px 18px;
  font-size: 14px; color: rgba(251, 251, 248, 0.85);
  text-align: left;
}

/* ── pied ── */
footer.site { padding: 36px 0 48px; text-align: center; color: var(--encre3); font-size: 13.5px; }
footer.site a { color: var(--encre2); }

/* ══════════════ guide ══════════════ */

.guide-page { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; padding: 24px 0 80px; }
.sommaire { position: sticky; top: 24px; font-size: 14px; }
.sommaire .lab { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--encre2); display: block; margin-bottom: 10px; }
.sommaire ol { list-style: none; margin: 0; padding: 0; }
.sommaire li { margin-bottom: 7px; }
.sommaire a { text-decoration: none; color: var(--encre2); }
.sommaire a:hover { color: var(--encre); }

article.guide { max-width: 720px; }
article.guide section { margin-bottom: 56px; }
article.guide h2 { border-bottom: 2px solid var(--encre); padding-bottom: 8px; margin-top: 0; }
article.guide h2 .no { font-family: var(--chiffres); color: var(--encre3); font-weight: 500; margin-right: 10px; }
article.guide figure { margin: 22px 0; }
article.guide figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--trait); border-radius: 8px; background: var(--feuille);
}
article.guide figure.mobile img { width: min(280px, 100%); margin: 0 auto; border-radius: 22px; border-width: 6px; border-color: var(--encre); }
article.guide figcaption { font-size: 13px; color: var(--encre3); margin-top: 8px; text-align: center; }
article.guide .astuce {
  background: var(--stabilo-pale); border: 1px solid #E3D67C;
  border-radius: 8px; padding: 13px 16px; font-size: 15px; margin: 18px 0;
}
article.guide .attention {
  background: #F7E9E7; border: 1px solid #E4C0BB;
  border-radius: 8px; padding: 13px 16px; font-size: 15px; margin: 18px 0;
}
article.guide ol.pas { padding-left: 22px; }
article.guide ol.pas li { margin-bottom: 8px; }
dl.faq dt { font-weight: 700; margin-top: 18px; }
dl.faq dd { margin: 4px 0 0; color: var(--encre2); }

/* ── responsive ── */
@media (max-width: 860px) {
  .guide-page { grid-template-columns: 1fr; }
  .sommaire { position: static; }
}
@media (max-width: 720px) {
  .fonction { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .fonction:nth-child(even) .visuel { order: 0; }
  .bandeau .trio { grid-template-columns: 1fr; }
  header.site nav { gap: 14px; }
}

/* ── impression (guide.pdf) ── */
@page { margin: 16mm; }
@media print {
  body { background: #fff; font-size: 12.5px; }
  header.site, .sommaire, .retour-haut { display: none; }
  .guide-page { display: block; padding: 0; }
  article.guide { max-width: none; }
  article.guide section { page-break-inside: avoid; margin-bottom: 26px; }
  article.guide figure img { box-shadow: none; }
  a { text-decoration: none; }
}
