/* Golden Dates — Deglet Nour premium de Jemna.
   Identité sombre-or : bois sombre + or, comme l'affiche de la marque.
   Thème clair forcé pour le corps, sections sombres pour l'identité. */
:root {
  color-scheme: light;
  --gold: #c9a227;
  --gold-light: #d4af37;
  --gold-soft: #f3e9c8;
  --green: #1a3a2a;
  --green-deep: #122b1e;
  --dark: #171208;
  --dark-2: #221a10;
  --ivory: #faf6ee;
  --cream: #f5efe0;
  --ink: #2b2118;
  --muted: #6f6252;
  --line: #e7ddc8;
  --card: #ffffff;
  --danger: #b3261e;
  --ok: #0e7a55;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(43, 33, 24, 0.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .serif { font-family: "Playfair Display", Georgia, "Times New Roman", serif; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.eyebrow {
  text-align: center; text-transform: uppercase; letter-spacing: 3px;
  color: var(--gold); font-weight: 700; font-size: 12px; margin: 0 0 8px;
}
h2 { font-size: 30px; line-height: 1.2; text-align: center; margin: 0 0 6px; color: var(--green-deep); }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 28px; }
section { padding: 56px 0 8px; }
.gold-rule { width: 64px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); margin: 14px auto 0; border-radius: 2px; }

/* ---------- Sections sombres ---------- */
.dark-section {
  background: var(--dark);
  color: #f3ead2;
  margin: 56px -18px 0;
  padding: 56px 18px 64px;
}
.dark-section h2 { color: #fdf6df; }
.dark-section .section-sub { color: #cbbd97; }
.dark-section .eyebrow { color: var(--gold-light); }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--dark); }
.hero .shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 0%, rgba(201,162,39,.16), transparent 60%), linear-gradient(180deg, rgba(23,18,8,.4), rgba(23,18,8,.92)); }
.hero .inner { position: relative; padding: 48px 18px 52px; text-align: center; }
.brand-poster {
  width: min(340px, 78vw); margin: 0 auto 18px; border-radius: 18px;
  border: 2px solid rgba(212,175,55,.55);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.hero h1 { font-size: 42px; line-height: 1.08; margin: 10px 0 12px; font-weight: 700; }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero .lede { max-width: 560px; margin: 0 auto 22px; font-size: 17px; color: #f3ead2; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-block; border: none; cursor: pointer; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 13px 26px; border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #241a05; box-shadow: 0 8px 20px rgba(201,162,39,.45); }
.btn-gold:hover { box-shadow: 0 10px 26px rgba(201,162,39,.6); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-deep); }
.trust-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.trust-item {
  background: rgba(255,255,255,.10); border: 1px solid rgba(212,175,55,.4);
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; color: #fdf8ea;
}
.stats-strip { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 30px; }
.stats-strip .stat { text-align: center; }
.stats-strip .stat b { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 26px; color: var(--gold-light); }
.stats-strip .stat span { font-size: 12.5px; color: #e9dfc4; }

/* ---------- Commande au kilo ---------- */
.product-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.product-hero img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; border: 2px solid var(--gold-soft); flex: 0 0 auto; }
.product-hero h3 { margin: 0 0 6px; font-size: 23px; color: var(--green-deep); }
.product-hero p.desc { margin: 0; font-size: 14.5px; color: var(--muted); }
.kg-box { background: var(--cream); border: 1.5px solid var(--gold-soft); border-radius: 14px; padding: 16px; margin: 18px 0 6px; }
.kg-box > label { margin-top: 0; }
.kg-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--gold); border-radius: 999px; overflow: hidden; background: #fff; }
.kg-stepper button {
  width: 52px; height: 52px; border: none; background: var(--green); color: var(--gold-light);
  font-size: 26px; font-weight: 700; cursor: pointer; line-height: 1;
}
.kg-stepper button:hover { background: var(--green-deep); }
.kg-stepper button:disabled { opacity: .4; cursor: default; }
.kg-stepper input {
  width: 76px; height: 52px; border: none; text-align: center; font-size: 24px; font-weight: 800;
  background: #fff; color: var(--green-deep); -moz-appearance: textfield; appearance: textfield;
}
.kg-stepper input::-webkit-outer-spin-button, .kg-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kg-unit { font-weight: 800; font-size: 18px; color: var(--green-deep); padding: 0 14px 0 2px; }
.tier-rule { font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
.rate-line { font-size: 15.5px; margin: 4px 0 0; color: var(--ink); }
.rate-line b { color: var(--green-deep); font-size: 18px; }

/* ---------- Order form ---------- */
.order-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h3 { margin: 0 0 14px; font-size: 22px; color: var(--green-deep); }
.fieldset-title { font-weight: 800; color: var(--green-deep); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin: 18px 0 10px; }
.fieldset-title:first-child { margin-top: 0; }
label { display: block; font-weight: 600; font-size: 14.5px; margin: 12px 0 5px; }
.req { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.22); }
textarea { resize: vertical; min-height: 72px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.summary { position: sticky; top: 16px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.summary .line span:first-child { color: var(--muted); }
.summary .line.total { border-bottom: none; padding-top: 12px; font-size: 19px; font-weight: 800; color: var(--green-deep); }
.summary .line.total b { font-family: "Playfair Display", Georgia, serif; font-size: 24px; }
.summary .free { color: var(--ok); font-weight: 700; }
.submit-btn { width: 100%; margin-top: 16px; padding: 15px; font-size: 17px; }
.error { color: var(--danger); font-weight: 600; font-size: 14.5px; margin-top: 12px; min-height: 20px; }
.cod-note { text-align: center; font-size: 13.5px; color: var(--muted); margin: 10px 0 0; }

/* ---------- Confirmation ---------- */
#confirmation { display: none; }
#confirmation.show { display: block; }
.confirm-card { border: 2px solid var(--gold); background: linear-gradient(180deg, #fffdf5, #fff); }
.confirm-head { display: flex; gap: 14px; align-items: flex-start; }
.confirm-head .check {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; flex: 0 0 auto;
}
.confirm-head h2 { text-align: left; margin: 0; font-size: 24px; }
.confirm-head p { margin: 4px 0 0; color: var(--muted); }
.ref-box { background: var(--green); color: #fff; border-radius: 12px; padding: 14px 18px; margin: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ref-box .ref-label { font-size: 13px; opacity: .85; }
.ref-box .ref { font-family: "Playfair Display", Georgia, serif; font-size: 24px; font-weight: 700; color: var(--gold-light); letter-spacing: 1px; }
.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.kv b { color: var(--green-deep); }
.wa-main {
  display: block; text-align: center; margin-top: 18px; padding: 13px; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 700; text-decoration: none; font-size: 15.5px;
}

/* ---------- Features / story / gallery / steps / reviews / FAQ ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 16px; text-align: center; box-shadow: var(--shadow); }
.feature.dark { background: var(--dark-2); border-color: rgba(212,175,55,.35); }
.feature.dark h3 { color: var(--gold-light); }
.feature.dark p { color: #cbbd97; }
.feature .ico { font-size: 30px; }
.feature h3 { margin: 10px 0 6px; font-size: 18px; color: var(--green-deep); }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--gold-soft); box-shadow: var(--shadow); }
.story-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; padding: 0; }
.story-card.dark { background: var(--dark-2); border-color: rgba(212,175,55,.35); }
.story-card img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.story-card .txt { padding: 28px; }
.story-card .txt p { color: #cbbd97; }
.story-card.dark .txt h2 { color: #fdf6df; }
.made-in { font-family: "Playfair Display", Georgia, serif; font-size: 20px; color: var(--gold-light) !important; margin-top: 18px !important; }
.banner-section { padding: 56px 0 0; }
.banner-img { width: 100%; border-radius: var(--radius); border: 2px solid var(--gold-soft); box-shadow: var(--shadow); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; box-shadow: var(--shadow); }
.step-num {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--green); color: var(--gold-light); font-family: "Playfair Display", Georgia, serif;
  font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 0 0 6px; font-size: 18px; color: var(--green-deep); }
.step p { margin: 0; font-size: 14px; color: var(--muted); }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.review .stars { color: var(--gold); letter-spacing: 2px; font-size: 17px; }
.review p { margin: 10px 0; font-style: italic; color: var(--ink); }
.review .who { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 15px 18px; font-weight: 700; color: var(--green-deep); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--gold); font-size: 20px; line-height: 1; }
.faq-item[open ] summary::after { content: "−"; }
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
footer { margin-top: 64px; background: var(--dark); color: #e9dfc4; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; padding: 38px 0 30px; }
footer strong { color: #fff; letter-spacing: 2px; }
footer a { color: var(--gold-light); }
.foot-contacts { font-size: 14.5px; line-height: 1.9; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 14px 0 20px; text-align: center; font-size: 13px; opacity: .75; }

@media (max-width: 860px) {
  .order-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
  .features { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .story-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .reviews { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .hero h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .product-hero { flex-direction: column; text-align: center; }
  .product-hero img { width: 200px; height: 200px; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .hero .inner { padding: 36px 16px 40px; }
  .stats-strip { gap: 18px; }
}

/* ---------- Avis clients (dynamique) ---------- */
.story-tagline { font-family: "Playfair Display", Georgia, serif; font-size: 20px; color: var(--gold); font-style: italic; margin: 4px 0 14px; }
.reviews-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.reviews-layout .card { text-align: left; }
.qr-card { text-align: center; }
.qr-card img { width: 180px; height: 180px; border-radius: 12px; }
.qr-card p { margin: 10px 0 4px; }
.stars-input { display: flex; gap: 2px; margin: 6px 0 14px; }
.stars-input button {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  font-size: 30px; line-height: 1; color: #d8cdb4;
}
.stars-input button.on { color: var(--gold); }
.stars-input button:hover { transform: scale(1.15); }
.review .stars .off { color: #d8cdb4; }
/* ---------- Adresse précise (localités + code postal) ---------- */
.hidden { display: none !important; }
input[readonly] { background: #f6f1e3; color: #3a2d1c; font-weight: 600; letter-spacing: .06em; }
select:disabled { background: #f6f1e3; color: #8a7a5f; cursor: not-allowed; }
#localities-status { min-height: 0; }
@media (max-width: 860px) {
  .reviews-layout { grid-template-columns: 1fr; }
}

/* ---------- Paiement en ligne (carte / PayPal) ---------- */
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.pay-option {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 0; cursor: pointer; background: #fff;
  transition: border-color .15s, background .15s;
}
.pay-option:hover { border-color: var(--gold); }
.pay-option:has(input:checked) { border-color: var(--gold); background: #fffdf3; box-shadow: 0 0 0 1px var(--gold); }
.pay-option input { width: auto; margin: 0; accent-color: var(--gold); }
.pay-option .pay-ico { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.pay-option .pay-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pay-option .pay-txt b { font-size: 15px; color: var(--green-deep); }
.pay-option .pay-txt small { font-size: 13px; color: var(--muted); font-weight: 400; }
#sum-usd-line b { color: var(--gold); }

/* ---------- Sélecteur de langue ---------- */
/* En haut du hero : trois boutons (العربية / English / Français).
   Le choix est mémorisé (localStorage) et appliqué sans rechargement. */
.lang-bar { position: relative; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: 14px 0 0; }
.lang-btn {
  background: rgba(255,255,255,.08); color: #f3ead2;
  border: 1.5px solid rgba(212,175,55,.5); border-radius: 999px;
  padding: 7px 16px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.lang-btn:hover { border-color: var(--gold-light); color: #fff; }
.lang-btn.active { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #241a05; border-color: var(--gold-light); }

/* ---------- RTL (arabe) ---------- */
/* L'arabe s'écrit de droite à gauche : le document passe en dir="rtl" et
   la mise en page se miroite (flex/grid suivent la direction). Quelques
   ajustements : pas d'espacement entre les lettres arabes (il casserait
   les liaisons), et les titres alignés à gauche passent à droite. */
[dir="rtl"] .eyebrow, [dir="rtl"] .fieldset-title { letter-spacing: normal; }
[dir="rtl"] .confirm-head h2 { text-align: right; }
[dir="rtl"] .reviews-layout .card h3 { text-align: right !important; }
[dir="rtl"] .story-card .txt .story-eyebrow, [dir="rtl"] .story-card .txt .story-h2 { text-align: right; }
[dir="rtl"] .faq-item summary::after { float: left; }
[dir="rtl"] .kg-unit { padding: 0 2px 0 14px; }
[dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { text-align: right; }
.story-card .txt .story-eyebrow, .story-card .txt .story-h2 { text-align: left; }

/* ---------- Logos de paiement (marques officielles) ---------- */
/* Les logos sont des fichiers SVG locaux (public/logo-*.svg), sur fond
   blanc pour rester lisibles — jamais d'image externe. */
.pay-logos { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; background: #fff; border: 1px solid #e8e2d2; border-radius: 8px; padding: 5px 8px; }
.pay-logo { height: 20px; width: auto; display: block; }
.pay-logo-paypal { height: 18px; }
.accept-strip { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.accept-strip-foot { justify-content: flex-start; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(201,162,39,.35); }
.accept-label { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.accept-badge { display: inline-flex; align-items: center; background: #fff; border: 1px solid #e8e2d2; border-radius: 8px; padding: 5px 9px; }
.accept-logo { height: 20px; width: auto; display: block; }
