* { box-sizing: border-box; }

:root {
  --green-dark: #1B5E2C;
  --green-primary: #3B8C33;
  --green-light: #E7E2D3;
  --green-pale: #F4F9E8;
  --orange: #EF7D1A;
  --orange-light: #FF9800;
  --cream: #FFFDF2;
  --white: #FFFFFF;
  --text-dark: #1B5E2C;
  --text-muted: #5B7A5E;
  --wood-light: #C98A4A;
  --wood-dark: #8B542C;
  --border-soft: rgba(27, 94, 44, 0.14);
  --shadow-soft: 0 12px 35px rgba(23, 77, 37, 0.12);
  --shadow-card: 0 8px 30px rgba(23, 77, 37, 0.10);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* alias vers l'ancien système de tokens, pour ne pas tout réécrire */
  --bg: var(--green-pale);
  --surface: var(--white);
  --surface-alt: var(--green-light);
  --line: var(--border-soft);
  --ink: var(--text-dark);
  --muted: var(--text-muted);
  --accent: var(--green-primary);
  --accent-deep: var(--green-dark);
  --accent-ink: var(--white);
  --gold: var(--orange);
  --gold-ink: var(--green-dark);
  --gold-soft: var(--green-light);
  --terracotta: var(--orange-light);
  --terracotta-soft: #FFE8CC;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green-pale: #10190f;
    --white: #1b2618;
    --green-light: #22301d;
    --border-soft: #3c4d32;
    --text-dark: #f1f3e8;
    --text-muted: #aebb9f;
    --green-primary: #4fae66;
    --green-dark: #7ed492;
    --orange: #ff9d3d;
    --orange-light: #ffb35c;
    --shadow-soft: 0 12px 35px rgba(0,0,0,0.4);
    --shadow-card: 0 8px 30px rgba(0,0,0,0.35);
  }
}

html { background: var(--bg); }

body {
  margin: 0;
  font-family: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
}

.entete {
  background:
    linear-gradient(115deg, rgba(255,255,255,0.16) 0%, transparent 32%),
    radial-gradient(130% 160% at 20% -20%, color-mix(in srgb, var(--gold) 35%, transparent), transparent 55%),
    linear-gradient(160deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--accent-ink);
  padding: 1.8rem 1.25rem 1.7rem;
  text-align: center;
  position: relative;
  border-bottom: 5px solid var(--gold);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,0.4);
  overflow: hidden;
}
.entete::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/portrait-hero.jpeg") center 20% / cover no-repeat;
  opacity: 0.10;
  filter: grayscale(100%);
  mix-blend-mode: luminosity;
  pointer-events: none;
}
.entete > * { position: relative; z-index: 1; }

.whatsapp-flottant {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 50;
}
.whatsapp-flottant svg { width: 1.7rem; height: 1.7rem; fill: white; }

/* --- Hero (page d'accueil uniquement) --- */
.hero-accueil {
  background: var(--green-pale);
  padding: 3.2rem 1.3rem 2.4rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  overflow: hidden;
}
.hero-accueil::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/portrait-hero.jpeg") center 15% / cover no-repeat;
  opacity: 0.09;
  filter: grayscale(100%);
  mix-blend-mode: luminosity;
  pointer-events: none;
}
.hero-accueil > * { position: relative; z-index: 1; }
.bascule-langue--hero {
  position: absolute;
  top: 1.1rem;
  inset-inline-end: 1.1rem;
  color: var(--green-dark);
  border-color: var(--border-soft);
}
.motif--hero { color: var(--green-primary); opacity: 0.8; }

.hero-texte { text-align: center; max-width: 30rem; }
.hero-titre {
  font-family: "Rubik", sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0.4rem 0 0.5rem;
}
.hero-titre-chiffre { color: var(--orange); }
.hero-titre-mot { color: var(--green-dark); }
.hero-sous-titre {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.hero-intro {
  margin: 0.8rem 0 0;
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-etrog-bloc {
  width: 100%;
  display: flex;
  justify-content: center;
  animation: apparition-etrog 0.9s ease both;
}
.hero-etrog {
  width: 62%;
  max-width: 15rem;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 1.2rem 1.6rem rgba(27, 94, 44, 0.28));
}
@keyframes apparition-etrog {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-etrog-bloc { animation: none; }
}

@media (min-width: 640px) {
  .hero-accueil { flex-direction: row; text-align: start; padding: 3.5rem 2.5rem; gap: 2.5rem; }
  .hero-texte { text-align: start; }
  .hero-etrog { width: 100%; }
}

/* --- Sections produits : rythme varié, pas de carte uniforme --- */
.section-vedette {
  background: var(--white);
  padding: 1.6rem 1.3rem;
  margin: 0;
}
.section-vedette h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-dark);
  margin: 0 0 0.2rem;
}
.section-vedette-desc {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ligne-produit--vedette { padding: 0.85rem 0; }
.ligne-produit--vedette .nom-produit { font-size: 1.02rem; font-weight: 600; }

.section-simple {
  background: var(--green-pale);
  padding: 1.5rem 1.3rem;
}
.section-simple h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}

.section-etrog {
  background: var(--white);
  padding: 1.8rem 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.section-etrog-photo img {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0.8rem 1.1rem rgba(27, 94, 44, 0.22));
}
.section-etrog-contenu { width: 100%; }
.section-etrog-contenu h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green-dark);
  margin: 0 0 0.2rem;
  text-align: center;
}
.section-etrog-contenu .section-vedette-desc { text-align: center; }
@media (min-width: 640px) {
  .section-etrog { flex-direction: row; align-items: flex-start; text-align: start; }
  .section-etrog-contenu h2, .section-etrog-contenu .section-vedette-desc { text-align: start; }
}

.bascule-langue {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1.1rem;
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--accent-ink) 55%, transparent);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  opacity: 0.92;
}
.bascule-langue:active { background: rgba(255,255,255,0.15); }

.motif { display: block; margin: 0 auto 0.6rem; opacity: 0.92; }

.photo-heros {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 auto 0.85rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid color-mix(in srgb, var(--gold) 75%, var(--accent-ink) 25%);
  box-shadow: 0 8px 22px -8px rgba(0,0,0,0.45), 0 0 0 6px color-mix(in srgb, var(--accent-ink) 14%, transparent);
}

.entete h1 {
  font-family: "Rubik", sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.2rem;
  text-wrap: balance;
}
.entete .sous-titre {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.88;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.intro {
  max-width: 480px;
  margin: 1.1rem auto 0;
  padding: 0 1.25rem;
  color: var(--accent-ink);
  opacity: 0.94;
  font-size: 0.95rem;
  line-height: 1.55;
  text-wrap: balance;
}

.contenu { padding: 1.1rem 1rem 2rem; max-width: 480px; margin: 0 auto; }

.signification {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.3rem;
}
.signification h2 {
  font-family: "Rubik", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  color: var(--accent-deep);
}
.signification p {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}
.signification p:last-of-type { margin-bottom: 0; }

.kashrout-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.3rem;
  margin: 0.3rem 0 0.9rem;
}
.kashrout-logos img { height: 3.6rem; width: auto; }

.kashrout-sous-titre {
  font-style: italic;
  color: var(--gold-ink) !important;
  font-weight: 600;
}
.kashrout-certificats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.kashrout-certificats img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.info-dates {
  background: linear-gradient(135deg, var(--gold-soft), color-mix(in srgb, var(--terracotta-soft) 60%, var(--gold-soft)));
  border: none;
  border-radius: 22px;
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-ink);
  margin-bottom: 1.3rem;
  line-height: 1.6;
  box-shadow: var(--shadow-card);
}
.info-dates strong { font-weight: 800; }

.erreur {
  background: #fbe4e2;
  border: 1px solid #d99a8f;
  color: #7d2c1f;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.categorie {
  background: var(--surface);
  border: none;
  border-radius: 26px;
  padding: 1.1rem 1.2rem 0.5rem;
  margin-bottom: 1.3rem;
  box-shadow: var(--shadow-card);
}
.categorie-entete {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}
.icone-categorie {
  flex: none;
  width: 3rem;
  height: 3rem;
  color: var(--accent-ink);
  margin-top: 0.1rem;
  background: linear-gradient(150deg, var(--gold), var(--terracotta));
  border-radius: 50%;
  padding: 0.55rem;
  box-shadow: var(--shadow-card);
}
.icone-categorie svg { width: 100%; height: 100%; }
.categorie h2 {
  font-family: "Rubik", sans-serif;
  font-size: 1.18rem;
  margin: 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.categorie-description {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

.ligne-produit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}
.ligne-produit:first-of-type { border-top: none; }

.nom-produit { flex: 1; font-size: 0.95rem; line-height: 1.35; }
.produit-description { display: block; margin-top: 0.2rem; font-size: 0.78rem; color: var(--muted); font-style: italic; }
.prix {
  display: block;
  color: var(--gold-ink);
  font-size: 0.86rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 0.1rem;
}

.pas-a-pas {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
}
.pas-a-pas button {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.pas-a-pas button:active { box-shadow: inset 0 0 0 1.5px var(--border-soft); }
.pas-a-pas button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.champ-quantite {
  width: 2.6rem;
  padding: 0.4rem 0.2rem;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  border: none;
  border-radius: 10px;
  text-align: center;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border-soft);
}

.infos-client {
  background: var(--surface);
  border: none;
  border-radius: 26px;
  padding: 1.1rem 1.2rem;
  margin: 1.6rem 0 1.3rem;
  box-shadow: var(--shadow-card);
  position: relative;
}
.infos-client h2 {
  font-family: "Rubik", sans-serif;
  font-size: 1.18rem;
  margin: 0 0 0.7rem;
}
.infos-client label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.infos-client input, .infos-client textarea {
  width: 100%;
  padding: 0.65rem 0.7rem;
  margin-top: 0.3rem;
  font-size: 1rem;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  box-shadow: inset 0 0 0 1.5px var(--border-soft);
  resize: vertical;
}
.infos-client input.champ-erreur {
  background: #fbe4e2;
  box-shadow: inset 0 0 0 2px #d99a8f;
}
.infos-client input:focus-visible, .infos-client textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.mode-paiement {
  background: var(--surface);
  border: none;
  border-radius: 24px;
  padding: 1rem 1.2rem;
  margin: 0 0 1.3rem;
  box-shadow: var(--shadow-card);
  position: relative;
}
.champ-creneau {
  width: 100%;
  padding: 0.75rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--border-soft);
}
.champ-creneau-horaire { margin-top: 0.6rem; }
.champ-creneau:disabled { opacity: 0.5; }

.mode-paiement legend {
  font-family: "Rubik", sans-serif;
  font-size: 1.05rem;
  padding: 0 0.3rem;
}
.mode-paiement label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.2rem;
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}
.mode-paiement label:first-of-type { border-top: none; }

.bouton-principal {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 999px;
  margin: 0.6rem 0 1.2rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-card);
}
.bouton-principal:active { box-shadow: inset 0 0 0 1.5px var(--border-soft); }
.bouton-principal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lien-retour {
  display: block;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 2rem;
  font-size: 0.92rem;
}

.table-recap {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.1rem;
  background: var(--surface);
  border: none;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.table-recap td, .table-recap th {
  padding: 0.6rem 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  text-align: start;
}
.table-recap tr:first-child td, .table-recap tr:first-child th { border-top: none; }
.table-recap td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-ink); white-space: nowrap; }

.total {
  font-family: "Rubik", sans-serif;
  font-size: 1.5rem;
  text-align: end;
  margin: 0 0 1.2rem;
  padding: 1.05rem 1.2rem;
  background: linear-gradient(135deg, var(--gold-soft), color-mix(in srgb, var(--terracotta-soft) 55%, var(--gold-soft)));
  border: none;
  border-radius: 22px;
  color: var(--gold-ink);
  box-shadow: var(--shadow-card);
}
.total strong { font-variant-numeric: tabular-nums; }

.qr-commande {
  display: block;
  margin: 0 auto 1.1rem;
  background: var(--surface);
  border: none;
  border-radius: 22px;
  padding: 0.7rem;
  box-shadow: var(--shadow-card);
}

.numero-commande {
  font-size: 1.05rem;
  background: var(--surface);
  border: none;
  border-radius: 18px;
  padding: 0.8rem 1.1rem;
  margin: 0 0 1.1rem;
  box-shadow: var(--shadow-card);
}
.numero-commande strong { font-variant-numeric: tabular-nums; color: var(--accent); }

.bouton-lien { display: block; text-align: center; text-decoration: none; }

.bandeau-succes {
  background: var(--green-light);
  color: var(--accent-deep);
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.8rem;
}

h2 { text-wrap: balance; }
