/* La page publique des recettes de la semaine (app/publication.py).
   Claire et sobre : elle se lit sur un téléphone en cuisinant, et s'imprime. */

:root {
  --fond: #faf8f4;
  --carte: #ffffff;
  --texte: #1f1c18;
  --doux: #5f5850;
  --discret: #8a8279;
  --bordure: #e7e1d8;
  --accent: #b5651d;
  --accent-voile: #f6ead9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #141210;
    --carte: #1d1a17;
    --texte: #efe9e1;
    --doux: #bdb4a9;
    --discret: #8f877d;
    --bordure: #322e2a;
    --accent: #efb971;
    --accent-voile: rgba(224, 164, 88, 0.12);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

a { color: var(--accent); }

.barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
}

.marque {
  font-family: Fraunces, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--texte);
  text-decoration: none;
}

.bouton {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .bouton { color: #1a1612; } }

main { max-width: 920px; margin: 0 auto; padding: 0 16px 32px; }

h1, h2 { font-family: Fraunces, Georgia, serif; line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 4px 0 10px; }

.entete { margin: 12px 0 28px; }
.surtitre {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--discret);
}
.intro { color: var(--doux); font-size: 1.05rem; max-width: 60ch; margin: 0; }

.recette {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 20px;
}
.recette h2 { font-size: 1.45rem; margin: 0 0 6px; }
.meta { margin: 0; color: var(--doux); font-size: 0.9rem; }

.nutrition {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 16px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--bordure);
  border-bottom: 1px solid var(--bordure);
}
.nutrition span { display: block; font-size: 0.72rem; color: var(--discret); }
.nutrition strong { font-size: 1rem; color: var(--accent); }

.colonnes {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
  margin-top: 14px;
}
@media (max-width: 640px) { .colonnes { grid-template-columns: 1fr; gap: 8px; } }

.recette h3 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--discret);
  margin: 6px 0 8px;
}
.ingredients { list-style: none; margin: 0; padding: 0; }
/* Deux colonnes : un nom long passe à la ligne sous lui-même, pas sous la quantité. */
.ingredients li {
  display: grid;
  grid-template-columns: 5.2em minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
  font-size: 0.95rem;
}
.qte { color: var(--doux); white-space: nowrap; }
.etapes { margin: 0; padding-left: 1.3em; }
.etapes li { padding: 3px 0; font-size: 0.95rem; }

.note { font-size: 0.82rem; color: var(--discret); margin: 4px 0 28px; }

.appel {
  background: var(--accent-voile);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 8px 0 28px;
}
.appel h2 { margin: 0 0 6px; font-size: 1.2rem; }
.appel p { margin: 0; color: var(--doux); }

.archives h2 { font-size: 1.05rem; }
.archives ul { padding-left: 1.1em; }

.vide { padding: 48px 0 16px; }
.vide p { color: var(--doux); }

footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px 32px;
  font-size: 0.8rem;
  color: var(--discret);
}

@media print {
  .barre .bouton, .appel, .archives { display: none; }
  body { background: #fff; color: #000; }
  .recette { break-inside: avoid; border: 1px solid #ccc; }
}

/* La liste d'attente, dans l'encart d'appel. */
.attente { display: grid; gap: 12px; margin-top: 16px; }
.attente-champs { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
@media (max-width: 560px) { .attente-champs { grid-template-columns: 1fr; } }
.attente label { display: grid; gap: 4px; font-size: 0.85rem; color: var(--doux); }
.attente input[type=email], .attente input[name=prenom] {
  font: inherit;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--bordure);
  background: var(--carte);
  color: var(--texte);
}
.attente .consentement { display: flex; gap: 8px; align-items: flex-start; font-size: 0.8rem; line-height: 1.45; }
.attente .consentement input { margin-top: 3px; }
.attente .bouton { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.facultatif { color: var(--discret); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.attente-message { margin: 14px 0 0; font-weight: 500; }
.attente-erreur { color: #b42318; }
@media (prefers-color-scheme: dark) { .attente-erreur { color: #f97066; } }

/* La politique de confidentialité (app/confidentialite.py) : du texte suivi. */
.texte { max-width: 680px; padding-bottom: 16px; }
.texte h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.texte p, .texte li { line-height: 1.6; }
.texte ul { padding-left: 20px; }
.texte li { margin-bottom: 6px; }
.texte a, footer a, .consentement a { color: var(--accent); }
