/* =========================================================
   Preston · site vitrine heypreston.fr (P4-2)
   Feuille unique, commune à toutes les pages.
   Habillage du 3 oct. 2026 : même direction que l'app
   (Maison, variante Tomate, encre « prune douce », Figtree),
   jetons recopiés de pb_public/scorta-d.css §1.
   ⚠ règle recopiée dans pb_public/scorta-d.css (jetons de couleur, logo §23) :
   le site et l'app ne partagent pas de fichier ; changer une couleur = les deux.
   Aucune ressource externe : Figtree est servie depuis polices/
   (licence SIL OFL 1.1, polices/LICENCE_Figtree_OFL.md).
   Aucune règle ne dépend de JavaScript.
   ========================================================= */

/* ---------- 0. Police : Figtree variable (300 à 900), latin + latin étendu ---------- */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("polices/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("polices/figtree-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Tokens : thème clair ---------- */
:root {
  --pn-fond: #FBF6EE;         /* crème */
  --pn-surface: #FFFFFF;
  --pn-creux: #F3ECE0;
  --pn-bordure: #E8DFD1;
  --pn-texte: #3A2F33;        /* prune douce, jamais noir */
  --pn-texte-doux: #6B6367;   /* 5,8:1 sur blanc, 5:1 sur --pn-creux */
  --pn-accent: #B5401E;       /* tomate foncée : liens, textes d'accent (5,6:1) */
  --pn-vif: #F27046;          /* tomate vive : boutons principaux, logo */
  --pn-sur-vif: #2A2326;      /* texte posé sur --pn-vif (5,2:1), jamais du blanc */
  --pn-sauge: #5E7A48;        /* soutien : coches */
  --pn-succes: #2F7A45;
  --pn-succes-fond: #E3EFE5;
  --pn-alerte: #8A5A0B;
  --pn-alerte-fond: #F6EBD3;
  --pn-danger: #B5401E;
  --pn-danger-fond: #F8E2D9;
  --pn-tomate-doux: #FDE7DC;  /* bandeau du haut des pages (texte prune 11:1, gris 4,8:1) */
  --pn-sauge-doux: #E6EDDC;   /* fond de section en soutien (texte prune 10:1, gris 4,7:1) */
  --pn-police-texte: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pn-police-titre: var(--pn-police-texte);
  --pn-police-ticket: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; /* facture de l'illustration, adresse email */
  --pn-rayon: 12px;
  --pn-rayon-grand: 18px;
  color-scheme: light;
}

/* ---------- 2. Pas de thème sombre sur la vitrine ----------
   Décision de Vincent (3 oct.) : le site est toujours clair (la version sombre faisait terne). L'app garde ses deux thèmes. */

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pn-fond);
  color: var(--pn-texte);
  font-family: var(--pn-police-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
h1, h2, h3 {
  font-family: var(--pn-police-titre);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .35em; }
a { color: var(--pn-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pn-texte); outline-offset: 3px; border-radius: 4px; }

.enveloppe { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.enveloppe.etroit { max-width: 780px; }
@media (min-width: 768px) { .enveloppe { padding: 0 32px; } }

.cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saut {
  position: absolute; left: 16px; top: -120px; z-index: 20;
  background: var(--pn-vif); color: var(--pn-sur-vif);
  padding: 12px 16px; border-radius: var(--pn-rayon); font-weight: 600;
}
.saut:focus { top: 8px; }

/* ---------- 4. En-tête et navigation (sans JavaScript) ---------- */
.entete { background: var(--pn-tomate-doux); }
.entete-ligne {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; padding-top: 8px; padding-bottom: 6px;
}
.logo {
  display: inline-flex; align-items: center; min-height: 48px;
  font-size: 2rem; color: var(--pn-texte); text-decoration: none;
}
.logo:hover { text-decoration: none; }
/* Logo provisoire « preston » (le dessin final viendra du graphiste) : « prest » en encre, « on » en tomate,
   le « o » = disque tomate avec une feuille d'olive découpée, qui laisse voir le fond.
   ⚠ règle recopiée dans pb_public/scorta-d.css §23 (.sc-logo). */
.marque-logo {
  display: inline-flex; align-items: baseline; font-family: var(--pn-police-texte); font-weight: 900;
  letter-spacing: -0.05em; line-height: 1; color: var(--pn-texte); white-space: nowrap;
}
.marque-logo .o {
  display: inline-block; width: .56em; height: .56em; margin: 0 .01em 0 .025em; background: var(--pn-vif);
  -webkit-mask: url("logo-o.svg") center / contain no-repeat;
          mask: url("logo-o.svg") center / contain no-repeat;
}
.marque-logo .on { color: var(--pn-vif); }
.nav { order: 3; width: 100%; }
.nav ul { list-style: none; margin: 0 0 0 -6px; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.nav li + li { margin-top: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  color: var(--pn-texte-doux); font-weight: 500; font-size: 1rem; text-decoration: none;
  border-radius: var(--pn-rayon);
}
.nav a:hover { color: var(--pn-texte); text-decoration: underline; }
.nav a[aria-current="page"] {
  color: var(--pn-texte); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--pn-vif); text-decoration-thickness: 3px; text-underline-offset: 8px;
}
.entete-cta { order: 2; }
@media (min-width: 900px) {
  .entete-ligne { flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }
  .nav { order: 0; width: auto; flex: 1 1 auto; }
  .nav ul { justify-content: center; margin-left: 0; }
  .nav a { padding: 0 12px; }
  .entete-cta { order: 0; }
}

/* ---------- 5. Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 20px; border-radius: var(--pn-rayon);
  border: 2px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none;
}
.bouton:hover { text-decoration: underline; text-underline-offset: 4px; }
.bouton.principal { background: var(--pn-vif); color: var(--pn-sur-vif); }
.bouton.secondaire { background: var(--pn-surface); color: var(--pn-texte); border-color: var(--pn-texte); }
.bouton.petit { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 1em; }
.boutons .bouton { flex: 1 1 220px; }
@media (min-width: 600px) { .boutons .bouton { flex: 0 0 auto; } }

/* ---------- 6. Sections ---------- */
.hero, .intro-page { background: var(--pn-tomate-doux); }
.hero { padding: 32px 0 48px; }
@media (min-width: 768px) { .hero { padding: 56px 0 72px; } }
.intro-page { padding: 40px 0 32px; }
@media (min-width: 768px) { .intro-page { padding: 64px 0 40px; } }
/* Accueil : texte et photo côte à côte sur ordinateur, photo sous les boutons sur téléphone */
.hero-grille { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 960px) { .hero-grille { grid-template-columns: 1.1fr .9fr; gap: 48px; } }
.hero .photo { margin: 0; }
.section { padding: 48px 0; }
@media (min-width: 768px) { .section { padding: 72px 0; } }
.section.creux { background: var(--pn-creux); }
.section.sauge { background: var(--pn-sauge-doux); }
.section.serree { padding-top: 32px; }
.chapo { font-size: 1.15rem; max-width: 40em; }
@media (min-width: 768px) { .chapo { font-size: 1.3rem; } }
.petit { font-size: .92rem; color: var(--pn-texte-doux); }
.surtitre {
  font-family: var(--pn-police-texte); font-size: .85rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--pn-accent); margin-bottom: .75em;
}
.lien-fort { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.section-titre { margin-top: 1.5em; font-size: 1.6rem; }
.boutons-bas, .aide-suite { margin-top: 24px; }

/* ---------- 7. Grilles et cartes ---------- */
.grille { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grille-2 { grid-template-columns: repeat(2, 1fr); }
  .grille-3 { grid-template-columns: repeat(3, 1fr); }
}
.carte {
  background: var(--pn-surface); border: 1px solid var(--pn-bordure);
  border-radius: var(--pn-rayon-grand); padding: 20px;
}
.carte > :last-child { margin-bottom: 0; }
.carte h2 { font-size: 1.4rem; }
.carte h3 { margin-bottom: .35em; }
.carte.benefice { border-top: 4px solid var(--pn-vif); }
.carte.large { grid-column: 1 / -1; }
.etiquette {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--pn-texte-doux);
  background: var(--pn-creux); padding: 2px 10px; border-radius: 999px;
}
.deux-colonnes { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; margin-bottom: 24px; }
@media (min-width: 960px) { .deux-colonnes { grid-template-columns: 1fr 1fr; gap: 48px; } }

/* ---------- 8. Listes ---------- */
.etapes { list-style: none; padding: 0; margin: 0 0 1em; counter-reset: etape; display: grid; gap: 20px; }
.etapes li { counter-increment: etape; position: relative; padding-left: 56px; margin: 0; min-height: 40px; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--pn-vif); color: var(--pn-sur-vif);
  font-family: var(--pn-police-texte); font-weight: 800; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center;
}
.etapes h3 { font-size: 1.15rem; margin: 7px 0 .25em; }
.etapes p { margin: 0; color: var(--pn-texte-doux); }
.etapes.simple li { padding-top: 7px; }

.aussi { margin: 24px 0 0; max-width: 46em; color: var(--pn-texte-doux); }
.aussi strong { color: var(--pn-texte); }

.coches { list-style: none; padding: 0; display: grid; gap: 10px 24px; }
@media (min-width: 720px) { .coches { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .coches.trois { grid-template-columns: repeat(3, 1fr); } }
.coches li { position: relative; padding-left: 32px; margin: 0; }
.coches li::before {
  content: ""; position: absolute; left: 6px; top: .25em;
  width: 8px; height: 14px; border: solid var(--pn-sauge); border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* ---------- 9. Illustration « la facture qui devient du stock » ---------- */
.illu-cadre { margin: 0; }
.illu { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: center; }
@media (min-width: 720px) { .illu { grid-template-columns: 1fr 64px 1fr; } }
.illu-facture {
  background: var(--pn-surface); color: var(--pn-texte);
  border: 1px solid var(--pn-bordure); border-radius: 4px;
  padding: 16px; font-family: var(--pn-police-ticket); font-size: .8rem; line-height: 1.45;
  transform: rotate(-1.5deg);
}
.illu-tete {
  display: flex; justify-content: space-between; gap: 8px;
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--pn-texte);
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}
.illu-ligne { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--pn-bordure); }
.illu-ligne:last-child { border-bottom: 0; }
.illu-fleche {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--pn-accent); font-size: .8rem; font-weight: 600; text-align: center; line-height: 1.25; padding: 8px 0;
}
.illu-fleche svg { width: 36px; height: 36px; transform: rotate(90deg); }
@media (min-width: 720px) { .illu-fleche svg { transform: none; } }
.illu-stock { background: var(--pn-surface); border: 1px solid var(--pn-bordure); border-radius: var(--pn-rayon-grand); padding: 14px 16px; }
.illu-stock-titre {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9rem; color: var(--pn-texte-doux); margin-bottom: 6px;
}
.illu-produit {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--pn-bordure); font-size: .95rem; font-weight: 600;
}
.illu-produit .qte { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--pn-succes); white-space: nowrap; }
.illu-legende { font-size: .88rem; color: var(--pn-texte-doux); margin-top: 18px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap; line-height: 1.5;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.succes { color: var(--pn-succes); background: var(--pn-succes-fond); }

/* ---------- 10. Textes à compléter par Vincent : [crochets] surlignés ---------- */
mark.a-completer {
  background: var(--pn-alerte-fond); color: var(--pn-texte);
  padding: 0 .25em; border-radius: 3px; border-bottom: 2px dashed var(--pn-alerte);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.bloc-a-completer {
  background: var(--pn-alerte-fond); color: var(--pn-texte);
  border: 2px dashed var(--pn-alerte); border-radius: var(--pn-rayon);
  padding: 12px 16px; font-size: .95rem;
}
.bloc-a-completer > :last-child { margin-bottom: 0; }
.bloc-a-completer ul { margin-top: .5em; }
.emplacement { text-align: center; padding: 28px 16px; }

/* Photo d'illustration */
.photo { margin: 24px 0 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: var(--pn-rayon-grand); }
.photo figcaption { margin-top: 8px; font-size: .85rem; color: var(--pn-texte-doux); }

/* ---------- 11. Questions fréquentes (details) ---------- */
.faq details { background: var(--pn-surface); border: 1px solid var(--pn-bordure); border-radius: var(--pn-rayon); margin-bottom: 10px; }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  display: flex; align-items: center; min-height: 56px; padding: 14px 52px 14px 16px;
  font-weight: 600; font-size: 1.05rem; line-height: 1.35; border-radius: var(--pn-rayon);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-family: var(--pn-police-texte); font-size: 1.5rem; line-height: 1; color: var(--pn-accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq .reponse { padding: 0 16px 16px; }
.faq .reponse > :last-child { margin-bottom: 0; }

/* ---------- 12. Appel à l'action (bloc tomate vive, texte prune) ---------- */
.appel { background: var(--pn-vif); color: var(--pn-sur-vif); border-radius: var(--pn-rayon-grand); padding: 32px 20px; }
@media (min-width: 768px) { .appel { padding: 48px; } }
.appel p { max-width: 40em; }
.appel .boutons { margin-bottom: 0; }
.appel .bouton.principal { background: var(--pn-sur-vif); color: var(--pn-vif); }
.appel .bouton.secondaire { background: transparent; color: var(--pn-sur-vif); border-color: var(--pn-sur-vif); }
.appel :focus-visible { outline-color: var(--pn-sur-vif); }

/* ---------- 13. Contact ---------- */
.email-bloc { background: var(--pn-surface); border: 1px solid var(--pn-bordure); border-radius: var(--pn-rayon-grand); padding: 20px; margin-bottom: 24px; }
.email-bloc > :last-child { margin-bottom: 0; }
.email {
  display: block; margin: 4px 0 16px;
  font-family: var(--pn-police-ticket); font-size: clamp(1.15rem, 5.5vw, 1.6rem); font-weight: 600;
  color: var(--pn-texte); -webkit-user-select: all; user-select: all; overflow-wrap: anywhere;
}

/* ---------- 14. Pages légales ---------- */
.legal h2 { font-size: 1.5rem; margin-top: 1.6em; }
.legal dl { margin: 0 0 1em; }
.legal dt { font-weight: 600; margin-top: .75em; }
.legal dd { margin: 0; }

/* ---------- 15. Pied de page ---------- */
.pied { margin-top: 48px; border-top: 1px solid var(--pn-bordure); padding: 32px 0 40px; font-size: .95rem; color: var(--pn-texte-doux); }
.pied p { margin-bottom: .6em; }
.pied .marque { color: var(--pn-texte); }
.pied .marque-logo { font-size: 1.35rem; }
.pied ul { list-style: none; padding: 0; margin: 4px 0 8px -8px; display: flex; flex-wrap: wrap; }
.pied li + li { margin-top: 0; }
.pied ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--pn-texte); }

/* ---------- 16. Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .illu-facture { transform: none; }
}
