/* Site de Calocia (présentation dans index.html, pages « aliments », pages légales) : style « magazine »,
   titres en Fraunces, filets fins plutôt que des cartes. Copié dans public/site/ par scripts/aliments.mjs.
   Tout est rangé sous .site : la présentation partage sa page avec l'application, qui ne doit rien en recevoir.
   Lecture en lignes pour les chiffres : libellé à gauche, valeur alignée à droite, chiffres en couleur. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/site/polices/fraunces.woff2) format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/site/polices/fraunces-italique.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 500; font-display: swap; src: url(/site/polices/barlow-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url(/site/polices/barlow-600.woff2) format('woff2'); }

.site {
  --fond: #f7f2ec;
  --carte: #fffdfa;
  --texte: #2b2521;
  --doux: #6f645c;
  --ligne: #e2d6c9;
  --accent: #852a3e;
  --accent-doux: #f1e2e3;
  --prot: #3f7d4f;
  --gluc: #a86f12;
  --lip: #6f5aa3;
  --sur-accent: #fff; /* texte sur l'accent (boutons) */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --etroit: 'Barlow Semi Condensed', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
  background: var(--fond);
  color: var(--texte);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
/* .clair : toujours en clair (présentation, guides, aliments, pages légales : comme la page d'accueil) */
@media (prefers-color-scheme: dark) {
  .site:not(.clair) {
    --fond: #191614;
    --carte: #24201d;
    --texte: #f2ebe4;
    --doux: #a89d93;
    --ligne: #3a332e;
    --accent: #e08aa0;
    --accent-doux: #3b2629;
    --prot: #7cc08c;
    --gluc: #e2b45c;
    --lip: #b3a2dc;
    --sur-accent: #191614;
    color-scheme: dark;
  }
  .site:not(.clair) .logo-clair { display: none; }
  .site:not(.clair) .logo-sombre { display: block; }
}
body.site { margin: 0; }
.site *, .site *::before, .site *::after { box-sizing: border-box; }
.site a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.site p, .site li { overflow-wrap: anywhere; }
.site :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Titres ---- */
.site h1, .site h2, .site h3 { font-family: var(--serif); font-weight: 450; text-wrap: balance; color: var(--texte); letter-spacing: -0.01em; }
.site h1 { font-size: clamp(2.3rem, 8vw, 3.4rem); line-height: 1.04; margin: 6px 0 16px; font-variation-settings: 'opsz' 96; }
.site h2 { font-size: clamp(1.5rem, 4.6vw, 1.9rem); line-height: 1.15; margin: 0 0 14px; }
.site h3 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 4px; }
.site h1 em, .site h2 em { font-style: italic; color: var(--accent); }
/* petit titre en capitales au-dessus d'un titre */
.surtitre {
  display: block; margin: 0 0 6px;
  font: 600 0.78rem/1.3 var(--etroit); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}
.chapo { font-size: 1.15rem; line-height: 1.55; color: var(--doux); margin: 0 0 20px; }
.chapo strong { color: var(--texte); }
.note { color: var(--doux); font-size: 0.92rem; margin: 6px 0; }

/* ---- En-tête ---- */
.tete {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1080px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  border-bottom: 1px solid var(--ligne);
}
.tete-logo { display: block; line-height: 0; }
.tete-logo img { height: 26px; width: auto; }
.logo-sombre { display: none; }
.tete { position: relative; }
.tete .bouton { padding: 7px 16px; font-size: 0.95rem; }
.tete-actions { display: flex; align-items: center; gap: 8px; }
/* grand écran : les six pages en ligne */
.tete-liens { display: none; }
.tete-liens a { color: var(--texte); text-decoration: none; font-size: 0.95rem; padding: 6px 0; white-space: nowrap; }
.tete-liens a:hover { color: var(--accent); }
.tete-liens a[aria-current='page'] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
/* petit écran : menu dépliant, sous l'en-tête, sur toute la largeur */
.tete-menu summary {
  list-style: none; cursor: pointer; display: grid; place-items: center;
  width: 44px; height: 44px; margin: -6px 0; border-radius: 999px; color: var(--texte);
}
.tete-menu summary::-webkit-details-marker { display: none; }
.tete-menu summary:hover { background: var(--accent-doux); }
.tete-menu svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tete-menu .fermer, .tete-menu[open] .ouvrir { display: none; }
.tete-menu[open] .fermer { display: block; }
.tete-menu nav {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20;
  background: var(--fond); border-bottom: 2px solid var(--texte);
  padding: 4px 16px 12px; box-shadow: 0 18px 30px -18px rgb(43 37 33 / 0.35);
}
.tete-menu nav a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--ligne);
  color: var(--texte); text-decoration: none; font: 400 1.15rem/1.3 var(--serif);
}
.tete-menu nav a:last-child { border-bottom: none; }
.tete-menu nav a::after { content: '→'; color: var(--accent); font-family: system-ui, sans-serif; }
.tete-menu nav a[aria-current='page'] { color: var(--accent); }
/* bouton en contour : même forme que .bouton, sans fond */
.bouton.contour { background: transparent; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.bouton.contour:hover { background: var(--accent-doux); filter: none; }
.tete-aliments { display: none !important; }
@media (min-width: 560px) { .tete-aliments { display: inline-block !important; } }
@media (min-width: 1140px) {
  .tete-liens { display: flex; align-items: center; gap: 22px; margin-left: auto; margin-right: 6px; }
  .tete-menu { display: none; }
}

/* ---- Colonnes ---- */
.colonne { max-width: 680px; margin: 0 auto; padding: 28px 16px 56px; }
.large { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.site section { margin: 36px 0; }

/* fil d'Ariane */
.fil { font: 600 0.78rem/1.4 var(--etroit); letter-spacing: 0.14em; text-transform: uppercase; color: var(--doux); margin: 0 0 8px; }
.fil a { color: var(--accent); text-decoration: none; }

/* ---- Bouton ---- */
.bouton {
  display: inline-block; text-align: center; text-decoration: none !important;
  background: var(--accent); color: var(--sur-accent) !important;
  font: 600 1.05rem/1.2 var(--etroit); letter-spacing: 0.03em;
  padding: 14px 28px; border-radius: 999px;
}
.bouton:hover { filter: brightness(1.08); }
.bouton.clair { background: var(--fond); color: var(--accent) !important; }

/* ---- Blocs de chiffres : filet épais au-dessus, pas de boîte ---- */
.carte { border-top: 2px solid var(--texte); padding-top: 14px; }
.carte h2 { font-size: 1.3rem; }
.repere { background: var(--accent-doux); border-top: none; padding: 18px 20px; border-radius: 4px; }
.repere p { margin: 0; }
.ligne { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 1.05rem; }
.ligne span:first-child { flex: none; }
.pointilles { flex: 1; min-width: 16px; border-bottom: 2px dotted var(--ligne); transform: translateY(-4px); }
.ligne strong { font-family: var(--etroit); font-weight: 600; font-size: 1.3rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prot { color: var(--prot); }
.gluc { color: var(--gluc); }
.lip { color: var(--lip); }

/* ---- Classements ---- */
.classement { list-style: none; counter-reset: rang; margin: 0; padding: 0; border-top: 2px solid var(--texte); }
.classement li {
  counter-increment: rang;
  display: grid; grid-template-columns: 2.2em 1fr auto; column-gap: 8px; align-items: baseline;
  padding: 12px 4px; border-bottom: 1px solid var(--ligne);
}
.classement li::before { content: counter(rang); grid-row: span 2; color: var(--accent); font: italic 400 1.35rem/1 var(--serif); }
.classement li a { font-weight: 600; text-decoration: none; color: var(--texte); min-width: 0; }
.classement li a:hover, .classement li a:focus-visible { text-decoration: underline; }
.classement li strong { font-family: var(--etroit); font-weight: 600; font-size: 1.3rem; white-space: nowrap; }
.classement li small { grid-column: 2 / 4; color: var(--doux); font-size: 0.88rem; }
.classement li.actuel { background: var(--accent-doux); }

/* ---- Encadré Calocia, en bas des pages ---- */
.calocia { margin: 48px 0 32px; background: var(--accent); color: #fff; padding: 26px 22px; border-radius: 4px; }
.calocia h2 { color: #fff; margin-bottom: 8px; }
.calocia p { margin: 0 0 18px; color: #f5e6e9; }
.calocia .bouton { background: #fff; color: #852a3e !important; }

/* ---- Pied de page ---- */
.pied { border-top: 1px solid var(--ligne); padding-top: 16px; margin-top: 40px; color: var(--doux); font-size: 0.88rem; }
.pied a { color: var(--doux); }
.pied p { margin: 0 0 8px; }

/* ---- Pages légales ---- */
.legal h2 { margin-top: 36px; }
.legal h3 { font-family: inherit; font-weight: 600; font-size: 1rem; margin: 22px 0 4px; letter-spacing: 0; }
.maj { color: var(--doux); font-size: 0.9rem; margin-top: 0; }
.essentiel { background: var(--accent-doux); border-radius: 4px; padding: 14px 18px; }

/* ================= Présentation (index.html) ================= */
/* La une : photo puis texte sur téléphone, côte à côte sur grand écran */
.une { display: grid; gap: 0; margin: 0 !important; }
/* mobile : photo en bandeau, pour que le repas en chiffres et « Commencer » tiennent dans le premier écran */
.une-photo { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: #ebe2d9; }
.une-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.une-texte { padding: 22px 16px 8px; }
.une-texte .chapo { font-size: 1.2rem; }
/* un repas en chiffres, juste sous le chapô : la photo du dîner de la démonstration et ses valeurs */
.une-repas { margin: 0 0 22px; padding: 4px 0 6px; border-top: 2px solid var(--texte); border-bottom: 1px solid var(--ligne); max-width: 440px; }
.une-repas figcaption { display: flex; align-items: center; gap: 12px; padding: 10px 0 6px; }
.une-repas img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex: none; }
.une-repas figcaption span { display: flex; flex-direction: column; color: var(--doux); font-size: 0.92rem; line-height: 1.35; }
.une-repas figcaption strong { color: var(--texte); font-weight: 600; font-size: 1rem; }
.une-repas .ligne { padding: 3px 0; }
.une-petit { display: block; margin-top: 12px; font-size: 0.85rem; color: var(--doux); }
@media (min-width: 860px) {
  .une { grid-template-columns: 1.05fr 1fr; align-items: center; max-width: 1080px; margin: 0 auto !important; padding: 40px 16px 0; gap: 56px; }
  .une-texte { order: -1; padding: 0; }
  .une-photo { aspect-ratio: 4 / 5; border-radius: 4px; }
}

/* sommaire numéroté : 01, 02… */
.sommaire { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--texte); counter-reset: n; }
.sommaire li { counter-increment: n; display: grid; grid-template-columns: 3rem 1fr; padding: 18px 0; border-bottom: 1px solid var(--ligne); }
.sommaire li::before { content: counter(n, decimal-leading-zero); font: italic 400 1.5rem/1.1 var(--serif); color: var(--accent); }
.sommaire p { margin: 0; color: var(--doux); }
@media (min-width: 860px) {
  .sommaire { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* citation en grand */
.citation { margin: 48px 0 !important; padding: 0 0 28px; border-bottom: 1px solid var(--ligne); }
.citation blockquote { margin: 0 0 12px; font: italic 400 clamp(1.6rem, 5.4vw, 2.3rem)/1.2 var(--serif); color: var(--accent); text-wrap: balance; }
.citation p { margin: 0; color: var(--doux); max-width: 620px; }

/* guides : liste de liens avec flèche */
.guides { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--texte); }
.guides a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ligne); color: var(--texte); text-decoration: none; font: 400 1.2rem/1.3 var(--serif); }
.guides a::after { content: '→'; color: var(--accent); font-family: system-ui, sans-serif; }
.guides a:hover { color: var(--accent); }
@media (min-width: 860px) {
  .guides { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
}

/* démonstration en vidéo : le téléphone à gauche (au-dessus sur mobile), les trois étapes à côté */
.demo { display: grid; gap: 20px; justify-items: center; }
.demo-video { margin: -8% 0; width: min(92%, 360px); }
/* la vidéo a son propre fond beige autour du téléphone : on ne garde que le téléphone */
.demo-video video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; clip-path: inset(6.2% 12.8% 6.4% 12.8% round 10% / 5.6%); }
.demo-texte { width: 100%; }
.etapes { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--texte); counter-reset: e; }
.etapes li { counter-increment: e; display: grid; grid-template-columns: 2.2rem 1fr; padding: 12px 0; border-bottom: 1px solid var(--ligne); color: var(--doux); }
.etapes li::before { content: counter(e); font: italic 400 1.35rem/1.2 var(--serif); color: var(--accent); }
.etapes p { margin: 0; }
.etapes strong { color: var(--texte); font-weight: 600; }
@media (min-width: 860px) {
  .demo { grid-template-columns: 340px 1fr; gap: 56px; align-items: center; justify-items: start; }
  .demo-video { width: 100%; margin: -6% 0; }
}

/* citation accompagnée d'une photo */
.citation img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; border-radius: 4px; margin-bottom: 20px; }
@media (min-width: 860px) {
  .citation { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
  .citation img { aspect-ratio: 1; margin: 0; }
}

/* ================= Pages produit et guides (scripts/pages.mjs) ================= */
/* une liste de lignes chiffrées : filet épais au-dessus, comme les classements */
.lignes { border-top: 2px solid var(--texte); padding-top: 4px; margin: 4px 0 8px; }
.note + .lignes { margin-top: 10px; }
/* valeurs en mots : même corps pour toute la liste, retour à la ligne aligné à droite */
.lignes.en-mots .ligne strong { font-size: 1.08rem; line-height: 1.3; white-space: normal; text-align: right; min-width: 0; }
.lignes.en-mots .pointilles { min-width: 12px; }
.liste-site { padding-left: 1.2rem; margin: 0; }
.liste-site li { margin: 8px 0; }
.liste-site li::marker { color: var(--accent); }
/* journée type : un repas par bloc, filet fin */
.repas { border-top: 1px solid var(--ligne); padding: 14px 0 4px; }
.repas:first-of-type { border-top: 2px solid var(--texte); margin-top: 16px; }
.repas h3 { margin: 0 0 2px; }
.repas .note { margin: 0 0 8px; }
.repas .lignes { border-top: none; padding-top: 0; }
.faq { border-bottom: 1px solid var(--ligne); padding: 12px 0; }
.faq:first-of-type { border-top: 2px solid var(--texte); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq summary::marker { color: var(--accent); }
.faq p { margin: 8px 0 0; color: var(--doux); }
/* photo d'une page : après le chapô, entière (pas de recadrage) */
.page-photo { margin: 0 0 8px; }
.page-photo img { display: block; width: 100%; height: auto; border-radius: 4px; }
