/* Site EcoEat : pages légales et présentation. Couleurs tirées du logo officiel. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f8f5;
  --border: #dfe5dc;
  --text: #1a1c1a;
  --text-2: #4f574d;
  --green: #2e7d32;
  --orange: #b04e0a;
  --todo-bg: #fff4d6;
  --todo-border: #e8b923;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f120f;
    --surface: #1a1f19;
    --border: #2f372d;
    --text: #eef2ec;
    --text-2: #b7c0b4;
    --green: #7cc47f;
    --orange: #ffa94d;
    --todo-bg: #3a3016;
    --todo-border: #b8901c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

header.site {
  border-bottom: 1px solid var(--border);
}

header.site .inner,
footer.site .inner,
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

header.site .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand .eco {
  color: var(--green);
}

.brand .eat {
  color: var(--orange);
}

main {
  padding-top: 32px;
  padding-bottom: 48px;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 8px;
}

h2 {
  font-size: 21px;
  margin: 36px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  margin: 20px 0 4px;
}

.updated {
  color: var(--text-2);
  font-size: 14px;
  margin: 0 0 24px;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}

.summary ol,
.summary ul {
  margin: 4px 0;
  padding-left: 20px;
}

/* Informations à compléter avant publication. */
.todo {
  background: var(--todo-bg);
  border: 1px dashed var(--todo-border);
  border-radius: 6px;
  padding: 0 6px;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}

.table-wrap {
  overflow-x: auto;
}

th,
td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  padding: 8px 10px 8px 0;
}

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-2);
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--text-2);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 8px;
}

/* Page d'accueil */
.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero img {
  width: min(320px, 80%);
  height: auto;
}

.hero p {
  font-size: 19px;
  color: var(--text-2);
  max-width: 560px;
  margin: 16px auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.steps div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
}

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  color: var(--text-2);
}

/* Page d'un plat partagé (plat.php) */
.dish-page {
  text-align: center;
  max-width: 560px;
}

.dish-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 8px;
}

.dish-meta,
.dish-cook,
.dish-help,
.dish-tagline {
  color: var(--text-2);
}

.dish-price {
  font-size: 22px;
  color: var(--orange);
}

.dish-off {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.button {
  display: inline-block;
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 28px;
  margin: 16px 0 8px;
  text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Page d'accueil (vitrine)                                            */
/* ------------------------------------------------------------------ */
.home header.site .inner,
.home footer.site .inner,
.landing {
  max-width: 1080px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  font-size: 15px;
}

.top-nav a {
  color: var(--text-2);
  text-decoration: none;
}

.top-nav .lang-switch {
  border: 1px solid var(--text-2);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 13px;
}

.top-nav .nav-cta {
  color: #ffffff;
  background: var(--green);
  border-radius: 999px;
  padding: 8px 16px;
}

.top-nav .nav-account {
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 999px;
  padding: 6px 14px;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding: 24px 0 8px;
}

.eyebrow {
  color: var(--green);
  font-weight: 700;
  margin: 0 0 8px;
}

.hero-split h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.lead {
  font-size: 19px;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.phone {
  width: 100%;
  max-width: 340px;
  height: auto;
  justify-self: center;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(27, 94, 32, 0.25), 0 0 0 1px var(--border);
}

.phone.small {
  max-width: 260px;
}

.section-title {
  border-top: none;
  font-size: clamp(24px, 3.4vw, 32px);
  margin-top: 56px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 40px 0 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 36px;
  color: var(--green);
}

.stats span {
  color: var(--text-2);
}

.stats > div {
  flex: 1 1 140px;
}

.stats .stats-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-2);
}

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: center;
}

.how p {
  color: var(--text-2);
}

.cooks {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 32px;
}

.checks {
  list-style: none;
  padding: 0;
}

.checks li {
  position: relative;
  padding: 6px 0 6px 32px;
}

.checks li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--green);
  font-weight: 800;
}

.fee-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.fee-cards div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.fee-cards strong {
  display: block;
  font-size: 32px;
  color: var(--orange);
}

.fee-cards span,
.muted {
  color: var(--text-2);
}

details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
  background: var(--surface);
}

summary {
  cursor: pointer;
  font-weight: 700;
}

.waitlist {
  margin-top: 56px;
  padding: 32px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #2e7d32, #1b5e20);
  color: #ffffff;
  text-align: center;
}

.waitlist h2 {
  border: none;
  margin-top: 0;
  font-size: 28px;
}

.waitlist a {
  color: #ffffff;
}

#waitlist-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 8px;
}

#waitlist-form input {
  font: inherit;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  min-width: 0;
}

#waitlist-form input[name='email'] {
  flex: 1 1 260px;
  max-width: 360px;
}

#waitlist-form input[name='postal_code'] {
  flex: 0 1 150px;
}

#waitlist-form .hp {
  display: none;
}

#waitlist-form .button {
  margin: 0;
  background: var(--orange);
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.form-note {
  font-size: 13px;
  opacity: 0.85;
}

.form-result {
  font-weight: 700;
}

.form-result.error {
  color: #ffd6c2;
}

.contact {
  text-align: center;
  margin-top: 32px;
}

@media (max-width: 760px) {
  .top-nav a:not(.nav-cta):not(.lang-switch):not(.nav-account) {
    display: none;
  }

  /* Menu sur une seule ligne : boutons compacts, jamais coupés en deux. */
  header.site .inner {
    gap: 10px;
  }

  .top-nav {
    gap: 8px;
    font-size: 14px;
  }

  .top-nav a {
    white-space: nowrap;
  }

  .top-nav .nav-account,
  .top-nav .nav-cta {
    padding: 7px 13px;
  }

  .hero-split,
  .cooks {
    grid-template-columns: 1fr;
  }

  .hero-split .phone {
    max-width: 280px;
  }

  .how,
  .stats,
  .fee-cards {
    grid-template-columns: 1fr;
  }
}

/* Petit téléphone : « Être prévenu » est déjà le premier bouton de la page, juste en dessous. */
@media (max-width: 520px) {
  .top-nav .nav-cta {
    display: none;
  }
}

/* « Envie d'un bon plat ? » : le parcours du voisin qui a faim, juste après le haut de page. */
.hungry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  background: var(--surface);
  border-radius: 20px;
  padding: 28px 32px;
}

.hungry p {
  font-size: 1.08rem;
  line-height: 1.55;
}

.hungry .checks li {
  padding: 8px 0 8px 32px;
}

@media (max-width: 760px) {
  .hungry {
    grid-template-columns: 1fr;
    padding: 22px 18px;
    gap: 12px;
  }
}

/* ---------- Guides pratiques ---------- */
.guide-lead { font-size: 1.12rem; line-height: 1.6; }
.guide .eyebrow { margin-bottom: 4px; }
.guide h2 { margin-top: 32px; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; line-height: 1.55; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 3px; }
.guide .tip, .guide .warn { padding: 14px 16px; border-radius: 12px; line-height: 1.55; margin: 16px 0; }
.guide .tip { background: var(--surface); border-left: 4px solid var(--green); }
.guide .warn { background: var(--todo-bg); border-left: 4px solid var(--orange); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 24px 0; }
.guide-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; }
.guide-card:hover { border-color: var(--green); }
.guide-card span { font-size: 1.8rem; }
.guide-card b { font-size: 1.05rem; line-height: 1.3; }
.guide-card small { opacity: .75; line-height: 1.45; }
.guide-grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.allergen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 20px 0; }
.allergen-grid div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); line-height: 1.45; font-size: .95rem; }
.allergen-grid b { display: block; margin-bottom: 4px; }
.guide-disclaimer { margin-top: 40px; font-size: .85rem; opacity: .75; line-height: 1.5; }

/* Accueil : les 5 guides sur une seule ligne quand la largeur le permet. */
#guides .guide-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
