/* Zidny — Thé vert Tafilalet et Al Arsan */
:root {
  --green: #1F3A1E;
  --green-d: #132612;
  --olive: #2C4A26;
  --yellow: #F2C230;
  --gold: #D9A93A;
  --gold-d: #7A5410;
  --brown: #4A2610;
  --accent: #C8452A;
  --orange: #E07A3A;
  --wood: #D9B27C;
  --iron: #4E4E4A;
  --label: #2F6B3F;
  --red: #E91C2B;
  --cream: #FBF4E2;
  --ink: #1A1F14;
  --muted: #5B6150;
  --wa: #1FAF57;
  --radius: 20px;
  --font: "Archivo", system-ui, Arial, sans-serif;
  --slab: "Alfa Slab One", "Rockwell", Georgia, serif;
  --caps: "Cinzel", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 16px;
}
html[lang="ar"] { --font: "Cairo", "Archivo", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 8px;
  padding-bottom: 12vh; /* remonte légèrement le bloc au-dessus du centre */
  background: var(--green);
  transition: clip-path .9s var(--ease), visibility 0s .9s;
  clip-path: inset(0 0 0 0);
}
.loader.done { clip-path: inset(0 0 100% 0); visibility: hidden; }
.loader-svg { width: 130px; }
.loader-pot { transform-origin: 90px 70px; animation: pour 1.4s var(--ease) forwards; }
.loader-stream { stroke-dasharray: 80; stroke-dashoffset: 80; animation: stream 1.4s .3s forwards; }
.loader-tea { animation: fill 1.1s .55s var(--ease) forwards; }
.loader-logo { width: min(40vw, 170px); height: auto; aspect-ratio: 1457 / 1449; animation: logoIn .9s .1s cubic-bezier(.3, 1.6, .5, 1) both; }
.loader-name { margin: 6px 0 4px; color: var(--yellow); font-weight: 900; font-size: clamp(1.4rem, 7vw, 2.2rem); letter-spacing: .12em; line-height: 1; animation: riseIn .7s .35s var(--ease) both; }
.loader-tag { margin: 4px 0 0; color: #fff; font-weight: 800; font-size: clamp(1.1rem, 5vw, 1.5rem); animation: riseIn .7s .9s var(--ease) both; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes logoIn { from { opacity: 0; transform: scale(.4) rotate(-25deg); } }
@keyframes pour { 0% { transform: rotate(0); } 40%, 85% { transform: rotate(-22deg); } 100% { transform: rotate(0); } }
@keyframes stream { 0% { stroke-dashoffset: 80; } 30%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -80; } }
@keyframes fill { to { transform: translateY(-42px); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Barre de progression & curseur ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--red); transform-origin: 0 50%; transform: scaleX(0);
}
html[dir="rtl"] .progress { transform-origin: 100% 50%; }
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    display: block; position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: var(--yellow); box-shadow: 0 0 0 2px rgba(19, 38, 18, .45);
    transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s;
  }
  /* au survol d'un bouton : un anneau qui laisse le texte lisible */
  .cursor.big { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: transparent; border: 2px solid var(--yellow); }
}

/* ---------- En-tête ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  color: var(--cream);
  transition: background .4s, color .4s, transform .4s var(--ease), padding .4s;
}
.topbar.solid { background: rgba(251, 244, 226, .92); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 8px; }
.topbar.hide { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-inline-end: auto; }
.brand-logo { width: 34px; height: 34px; transition: transform .6s var(--ease); }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.08); }
.brand-name { font-weight: 900; font-size: 20px; letter-spacing: -.01em; }
.nav { display: none; gap: 22px; }
.nav a { text-decoration: none; font-weight: 500; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.lang {
  border: 1.5px solid currentColor; background: transparent; border-radius: 999px;
  padding: 5px 11px; font-weight: 700; font-size: 14px; cursor: pointer; display: flex; gap: 3px; align-items: center;
}
.lang-sep { opacity: .4; }
html[lang="fr"] .lang-ar, html[lang="ar"] .lang-fr { opacity: .45; }
.lang-ar { font-family: "Cairo", sans-serif; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px; border-radius: 999px; border: 0;
  font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(255, 255, 255, .25); transform: translateX(-101%); transition: transform .5s var(--ease);
}
html[dir="rtl"] .btn::before { transform: translateX(101%); }
.btn:hover::before { transform: translateX(0); }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.btn-lg { min-height: 60px; padding: 18px 36px; font-size: 18px; }
.btn-red { background: var(--red); color: #fff; }
.btn-gold { background: var(--gold); color: var(--green-d); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(251, 244, 226, .6); }
.btn-line { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn-line::before { background: var(--green); }
.btn-line:hover { color: var(--cream); }
.btn-wa { background: var(--wa); color: #fff; width: 100%; }
.btn-wa svg { width: 24px; height: 24px; fill: currentColor; }
.arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  color: var(--cream); background: var(--green);
  display: flex; align-items: flex-end;
}
.scene { position: absolute; inset: 0; }
.scene-svg { width: 100%; height: 100%; display: block; }
.leaves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stars circle { fill: #FFF1C9; animation: twinkle 3s ease-in-out infinite; }
.stars circle:nth-child(2n) { animation-delay: 1.2s; }
.stars circle:nth-child(3n) { animation-delay: 2.1s; }
@keyframes twinkle { 50% { opacity: .2; } }
.sun { transform-origin: 520px 520px; animation: sunPulse 6s ease-in-out infinite; }
@keyframes sunPulse { 50% { transform: scale(1.06); } }
.palm-l { transform-origin: 80px 900px; animation: sway 7s ease-in-out infinite; }
.palm-r { transform-origin: 780px 900px; animation: sway 8s ease-in-out infinite reverse; }
@keyframes sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.6deg); } }
.caravan { animation: walk 38s linear infinite; }
.caravan use { animation: bob .9s ease-in-out infinite alternate; transform-box: fill-box; }
.caravan use:nth-child(2) { animation-delay: .3s; }
.caravan use:nth-child(3) { animation-delay: .6s; }
@keyframes walk { from { transform: translate(-220px, 668px); } to { transform: translate(860px, 650px); } }
@keyframes bob { to { transform: translateY(-2.5px); } }

.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 96px var(--gutter) 72px;
  display: grid; justify-items: center; text-align: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 6px 14px; border-radius: 999px; background: rgba(13, 30, 14, .55);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: ping 1.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(233, 28, 43, .7); } 100% { box-shadow: 0 0 0 10px rgba(233, 28, 43, 0); } }
.hero-title { margin: 0; line-height: .9; font-weight: 900; letter-spacing: -.03em; text-shadow: 0 4px 30px rgba(13, 30, 14, .5); }
.hero-title .split { display: block; font-size: clamp(2.2rem, 10vw, 4.5rem); }
html[lang="ar"] .hero-title { letter-spacing: 0; line-height: 1.15; }
.hero-ref { margin: 10px 0 0; font-size: 15px; color: rgba(251, 244, 226, .85); }
.hero-ref strong { color: #fff; }

.hero-product { position: relative; margin: 26px 0 10px; width: min(62vw, 300px); perspective: 900px; }
.tilt { position: relative; transform-style: preserve-3d; transition: transform .2s; animation: float 5s ease-in-out infinite; border-radius: 8px; }
@keyframes float { 50% { translate: 0 -12px; } }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hero-box { display: block; width: 100%; height: auto; aspect-ratio: 7 / 10; border-radius: 8px; box-shadow: 0 30px 60px -20px rgba(8, 20, 9, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.shine {
  position: absolute; inset: 0; border-radius: 8px; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 45%, transparent 60%);
  background-size: 250% 100%; animation: shine 4.5s ease-in-out infinite 1.5s; mix-blend-mode: soft-light;
}
@keyframes shine { 0% { background-position: 120% 0; } 40%, 100% { background-position: -60% 0; } }
.steam { position: absolute; left: 50%; top: -60px; width: 80px; height: 70px; translate: -50% 0; }
.steam i {
  position: absolute; bottom: 0; width: 10px; height: 60px; border-radius: 50%;
  border-left: 3px solid rgba(251, 244, 226, .55); filter: blur(1px);
  animation: steam 3s ease-in-out infinite; opacity: 0;
}
.steam i:nth-child(1) { left: 18px; }
.steam i:nth-child(2) { left: 36px; animation-delay: 1s; }
.steam i:nth-child(3) { left: 54px; animation-delay: 2s; }
@keyframes steam { 0% { transform: translateY(20px) scaleY(.6); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-30px) scaleY(1.1) skewX(-12deg); opacity: 0; } }
.price-badge {
  position: absolute; right: -24px; bottom: 16%; width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: 0;
  background: var(--red); color: #fff; transform: rotate(-12deg);
  box-shadow: 0 12px 30px -8px rgba(8, 20, 9, .6);
}
html[dir="rtl"] .price-badge { right: auto; left: -24px; transform: rotate(12deg); }
.price-badge::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px dashed rgba(233, 28, 43, .8); animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.price-num { display: flex; align-items: flex-start; justify-content: center; line-height: 1; }
.price-num b { font-size: 52px; font-weight: 900; }
.price-num small { font-size: 22px; font-weight: 800; margin-top: 6px; }
.price-unit { font-size: 11px; font-weight: 700; line-height: 1.15; padding: 0 12px; }
.hero-cta { display: grid; gap: 10px; width: 100%; max-width: 420px; margin-top: 18px; }
.scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: 16px; translate: -50% 0; width: 24px; height: 38px; border: 2px solid rgba(251, 244, 226, .6); border-radius: 14px; display: none; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cream); animation: wheel 1.6s infinite; }
@keyframes wheel { to { transform: translateY(12px); opacity: 0; } }

/* ---------- Bandeau ---------- */
.marquee-wrap { overflow: hidden; margin-top: -24px; padding: 12px 0; position: relative; z-index: 4; }
.marquee { background: var(--red); color: #fff; overflow: hidden; padding: 14px 0; transform: rotate(-1.5deg) scale(1.06); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: marquee 28s linear infinite; font-weight: 900; text-transform: uppercase; font-size: 18px; white-space: nowrap; }
html[lang="ar"] .marquee-track { text-transform: none; font-size: 19px; }
.marquee-track b { color: var(--yellow); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee-track { animation-name: marqueeRtl; }
@keyframes marqueeRtl { to { transform: translateX(50%); } }

/* ---------- Sections génériques ---------- */
section { position: relative; }
.kicker { margin: 0 0 8px; color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 15px; }
.h2 { margin: 0 0 14px; font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.02; font-weight: 900; letter-spacing: -.02em; color: var(--green); }
html[lang="ar"] .h2 { line-height: 1.3; letter-spacing: 0; }
.h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--green); }
.lead { margin: 0; font-size: 18px; color: var(--muted); max-width: 36em; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin: 14px auto 0; max-width: 40em; }

/* ---------- Offre ---------- */
.offer { padding: 64px var(--gutter) 24px; }
.offer-card {
  max-width: 760px; margin: 0 auto; text-align: center; padding: 34px 18px;
  border-radius: var(--radius); background: var(--green); color: var(--cream);
  position: relative; overflow: hidden;
}
.offer-card::before {
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(242, 194, 48, .5) 80%, transparent 90%);
  animation: spin 7s linear infinite;
}
.offer-card::after { content: ""; position: absolute; inset: 3px; border-radius: calc(var(--radius) - 3px); background: var(--green); }
.offer-card > * { position: relative; z-index: 1; }
.offer-card .kicker { color: var(--yellow); }
.offer-title { margin: 0 0 20px; font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 900; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; direction: ltr; }
.cd { background: rgba(251, 244, 226, .08); border-radius: 14px; padding: 14px 4px 10px; display: grid; gap: 2px; overflow: hidden; }
.cd-num { font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 900; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; display: inline-block; }
.cd-num.tick { animation: tick .45s var(--ease); }
@keyframes tick { 0% { transform: translateY(-60%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cd-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .75; }
html[lang="ar"] .cd-lbl { letter-spacing: 0; font-size: 13px; }
.offer-end { margin: 16px 0 0; font-weight: 600; color: rgba(251, 244, 226, .8); }

/* ---------- Produit ---------- */
.product { padding: 56px var(--gutter); max-width: 1180px; margin: 0 auto; display: grid; gap: 32px; }
.product-media { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.product-media img { width: 100%; height: 115%; object-fit: cover; }
.tag { position: absolute; top: 14px; inset-inline-start: 14px; background: var(--cream); color: var(--green); font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.features { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.feat { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: #fff; transition: transform .35s var(--ease); }
.feat:hover { transform: translateX(6px); }
html[dir="rtl"] .feat:hover { transform: translateX(-6px); }
.feat-ico { flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--green); display: grid; place-items: center; }
.feat-ico svg { width: 28px; height: 28px; fill: none; stroke: var(--yellow); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.feat b { display: block; color: var(--green); }
.feat small { color: var(--muted); font-size: 14px; }
.feat.in .feat-ico svg * { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.4s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Scène 3D : formats et prix ---------- */
.stack { padding: 64px var(--gutter) 56px; background: var(--green-d); color: var(--cream); text-align: center; overflow: hidden; }
.stack .h2 { color: var(--cream); }
.stack .kicker { color: var(--yellow); }
.stack-lead { margin: 0 auto 18px; max-width: 30em; color: rgba(251, 244, 226, .8); font-size: 17px; }
.tabs { position: relative; display: inline-grid; grid-template-columns: repeat(3, 1fr); width: min(100%, 420px); padding: 5px; border-radius: 999px; background: rgba(251, 244, 226, .08); }
.tabs button { position: relative; z-index: 1; border: 0; background: transparent; color: var(--cream); font-weight: 800; padding: 12px 6px; border-radius: 999px; cursor: pointer; transition: color .35s; }
.tabs button[aria-selected="true"] { color: var(--green-d); }
.tabs-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px; background: var(--yellow); overflow: hidden; transition: transform .55s cubic-bezier(.5, 1.6, .4, 1); }
html[dir="rtl"] .tabs-ind { left: auto; right: 5px; }
.tabs-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }
html[dir="rtl"] .tabs-prog { transform-origin: 100% 50%; }
.tabs-prog.run { animation: prog var(--dur, 4s) linear forwards; }
@keyframes prog { to { transform: scaleX(1); } }

.stage3d { position: relative; height: min(92vw, 380px); max-width: 680px; margin: 10px auto 0; perspective: 1400px; perspective-origin: 50% 15%; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.stage3d:active { cursor: grabbing; }
.iso { position: absolute; z-index: 1; left: 50%; top: 74%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-36deg); animation: isoSway 10s ease-in-out infinite; }
.iso.dragging { animation: none; }
@keyframes isoSway { 0%, 100% { transform: rotateX(-24deg) rotateY(-36deg); } 50% { transform: rotateX(-22deg) rotateY(-22deg); } }
.ground { position: absolute; z-index: 0; left: 50%; top: 74%; width: 72%; height: 50px; translate: -50% -40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .5), transparent); pointer-events: none; }

/* pas d'opacité sur un élément 3D : elle l'aplatit (la boîte apparaîtrait d'abord en 2D) */
.cub { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.cub > i { position: absolute; left: 0; top: 0; display: block; backface-visibility: hidden; }
.cub.drop { visibility: hidden; }
.kraft > .fr, .kraft > .bk { background: #C8955A; }
.kraft > .rt { background: #A47440; }
.kraft > .lf { background: #B8854C; }
.kraft > .tp { background: linear-gradient(90deg, transparent 42%, #E8C995 42% 58%, transparent 58%), #DDB07A; }
.kraft > .fr::after, .kraft > .rt::after { content: ""; position: absolute; left: 16%; right: 16%; top: 30%; height: 34%; border-radius: 2px; background: linear-gradient(#1F3A1E 0 66%, #F6C46A 66% 80%, #1F3A1E 80%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.kraft > .rt::after { filter: brightness(.82); }
.kraft.big > .fr::after, .kraft.big > .rt::after { display: none; }
.kraft.open > i { backface-visibility: visible; }
.kraft > .fl { background: #D9A869; transform-origin: 50% 0; transition: transform .7s cubic-bezier(.3, 1.5, .5, 1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.kraft > .fl-s { background: #C99A5E; }
.kraft > .floor { background: #6E4A24; }
.lbl3d { position: absolute; inset: 18% 12%; display: grid; place-content: center; gap: 4px; border: 3px solid #1F3A1E; border-radius: 6px; color: #1F3A1E; font-weight: 900; line-height: 1.05; text-align: center; }
.lbl3d b { font-size: 1.9em; letter-spacing: .02em; }
.lbl3d small { font-size: .8em; font-weight: 800; }
.tea > .fr, .tea > .bk { background: #3A0F1E; }
.tea > .fr svg, .tea > .bk svg { width: 100%; height: 100%; display: block; }
.tea > .rt, .tea > .lf { background: linear-gradient(#3A0F1E 0 12%, #C99A32 30%, #F0C443 50%, #E58A4E 100%); }
.tea > .rt { filter: brightness(.8); }
.tea > .tp { background: #4E1622; }
.wood > i { background: #9C6B35; }
.wood > .tp { background: repeating-linear-gradient(90deg, #B07D43 0 12%, #8E5F2E 12% 14%); }
.wood > .rt { background: #7E5428; }
.film > i { background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 40%, rgba(255, 255, 255, .16) 60%, rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.film > i { opacity: 0; transition: opacity 1s .2s; }
.film.on > i { opacity: 1; }

.sign { position: absolute; right: 2%; top: 26px; z-index: 2; padding: 8px 14px 6px; background: #FFFDF6; color: #1A1F14; border-radius: 4px; font-family: "Caveat", cursive; line-height: .95; display: grid; opacity: 0; transform-origin: 50% -26px; transform: rotate(6deg) scale(.6); transition: opacity .4s, transform .6s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.sign::before { content: ""; position: absolute; left: 50%; top: -26px; width: 2px; height: 26px; background: rgba(251, 244, 226, .5); }
.sign b { font-size: 32px; font-weight: 700; direction: ltr; unicode-bidi: isolate; }
.sign span { font-size: 18px; }
.sign.on { opacity: 1; transform: rotate(6deg); animation: swing 3.2s ease-in-out infinite .6s; }
@keyframes swing { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-3deg); } }
html[dir="rtl"] .sign { right: auto; left: 2%; }

.drag-hint { position: absolute; right: 0; bottom: 2%; margin: 0; font-size: 12px; opacity: .6; }
html[dir="rtl"] .drag-hint { right: auto; left: 0; }

.stack-info { display: grid; justify-items: center; gap: 2px; max-width: 520px; margin: 4px auto 0; }
.stack-pill { margin: 0; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; padding: 4px 10px; border-radius: 99px; background: var(--red); color: #fff; }
html[lang="ar"] .stack-pill { letter-spacing: 0; font-size: 13px; }
.stack-name { margin: 8px 0 0; font-size: 22px; font-weight: 800; }
.stack-name small { font-size: 15px; font-weight: 500; opacity: .75; }
.stack-price { margin: 0; font-size: clamp(3rem, 15vw, 4.6rem); line-height: 1; font-weight: 900; color: var(--yellow); font-variant-numeric: tabular-nums; }
.stack-note { margin: 4px 0 0; opacity: .75; font-size: 15px; }
.story-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; margin: 16px 0; direction: ltr; }
.story-stats > div { background: rgba(251, 244, 226, .07); border-radius: 14px; padding: 10px 4px; display: grid; }
.stat-num { font-size: clamp(1.15rem, 5vw, 1.6rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.stat-lbl { font-size: 13px; opacity: .8; }
.stack .btn { width: 100%; max-width: 420px; }
.stack-fine { color: rgba(251, 244, 226, .65); }

/* ---------- Devis ---------- */
.quote { padding: 56px var(--gutter) 72px; background: #fff; }
.quote-head { max-width: 640px; margin: 0 auto 26px; text-align: center; }
.quote-head .lead { margin: 0 auto; }
.quote-form { max-width: 560px; margin: 0 auto; display: grid; gap: 18px; }
.field { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.field legend, .lbl { font-weight: 800; color: var(--green); padding: 0; margin-bottom: 8px; }
.lbl { margin: 0; }
.seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--cream); border-radius: 999px; padding: 5px; }
.seg label { position: relative; z-index: 1; cursor: pointer; text-align: center; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 11px 4px; border-radius: 999px; font-weight: 800; transition: color .35s; }
.seg input:checked + span { color: var(--cream); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }
.seg-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 999px; background: var(--green); transition: transform .5s cubic-bezier(.5, 1.6, .4, 1); }
html[dir="rtl"] .seg-ind { left: auto; right: 5px; }
.seg-help { margin: 0; font-size: 14px; color: var(--muted); text-align: center; }
.stepper { display: grid; grid-template-columns: 56px 1fr 56px; border-radius: 16px; background: var(--cream); overflow: hidden; }
.step { border: 0; background: transparent; font-size: 26px; font-weight: 700; color: var(--green); cursor: pointer; transition: background .2s, transform .15s; }
.step:hover { background: rgba(31, 58, 30, .08); }
.step:active { transform: scale(.88); }
.stepper input { border: 0; background: transparent; text-align: center; font-size: 26px; font-weight: 900; color: var(--green); padding: 12px 0; width: 100%; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.total { display: grid; justify-items: center; padding: 18px; border-radius: var(--radius); background: var(--green); color: var(--cream); }
.total span { font-size: 14px; opacity: .8; }
.total-num { font-size: clamp(2.4rem, 11vw, 3.6rem); font-weight: 900; color: var(--yellow); line-height: 1.05; font-variant-numeric: tabular-nums; }
.total-num.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }
.total small { opacity: .75; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: grid; justify-items: center; gap: 2px; padding: 16px 8px; border-radius: 16px; background: var(--cream); text-align: center; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .3s, transform .3s var(--ease), background .3s; }
.choice svg { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linejoin: round; margin-bottom: 4px; transition: transform .4s var(--ease); }
.choice b { color: var(--green); }
.choice small { font-size: 13px; color: var(--muted); }
.choice input:checked + span { box-shadow: inset 0 0 0 2px var(--green); background: #fff; transform: translateY(-2px); }
.choice input:checked + span svg { transform: scale(1.12) rotate(-6deg); }
.choice input:focus-visible + span { outline: 3px solid var(--gold); }
.field input[type="text"], .field textarea {
  width: 100%; border: 2px solid #E4DCC3; border-radius: 14px; background: var(--cream);
  padding: 14px 16px; font-size: 16px; transition: border-color .25s, background .25s;
}
.field input[type="text"]:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.err { display: none; margin: 0; color: var(--red); font-size: 14px; font-weight: 600; }
.field.invalid .err { display: block; }
.field.invalid input { border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#cityField { transition: opacity .3s; }
#cityField.off { display: none; }

/* ---------- Galerie ---------- */
.gallery { padding: 64px 0; overflow: hidden; }
.gallery-head { text-align: center; padding: 0 var(--gutter); }
.gallery-track { display: flex; gap: 14px; padding: 12px var(--gutter) 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 72vw; max-width: 360px; margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 2 / 3; scroll-snap-align: center; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.shot:hover img { transform: scale(1.06); }
.steps { list-style: none; margin: 34px auto 0; padding: 0 var(--gutter); max-width: 1180px; display: grid; gap: 12px; counter-reset: s; }
.stepi { display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: #fff; }
.stepi-n { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--green-d); font-weight: 900; font-size: 20px; }
.stepi b { color: var(--green); }
.stepi small { color: var(--muted); font-size: 14px; }

/* ---------- Livraison ---------- */
.ship { padding: 24px var(--gutter) 56px; }
.ship-card { max-width: 900px; margin: 0 auto; display: grid; gap: 18px; align-items: center; padding: 26px; border-radius: var(--radius); background: var(--yellow); }
.ship-card p { margin: 0 0 16px; color: #2A2410; }
.ship-map { width: 180px; margin: 0 auto; overflow: visible; }
.france { fill: var(--cream); stroke: var(--green); stroke-width: 2; stroke-linejoin: round; }
.route { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-dasharray: 5 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.pin { fill: var(--red); }
.city circle { fill: var(--green); }
.pin-pulse { fill: var(--red); transform-origin: 138.3px 152.6px; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3.4); opacity: 0; } }

/* ---------- FAQ ---------- */
.faq { padding: 40px var(--gutter) 56px; max-width: 760px; margin: 0 auto; }
.acc { display: grid; gap: 10px; }
.acc details { background: #fff; border-radius: 16px; overflow: hidden; }
.acc summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 18px; font-weight: 800; color: var(--green); position: relative; }
html[dir="rtl"] .acc summary { padding: 18px 18px 18px 54px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: 18px; width: 22px; height: 22px; margin-top: -11px;
  background: linear-gradient(var(--green), var(--green)) center / 14px 2.5px no-repeat, linear-gradient(var(--green), var(--green)) center / 2.5px 14px no-repeat;
  border-radius: 50%; transition: transform .4s var(--ease);
}
.acc details[open] summary::after { transform: rotate(135deg); }
.acc-body { padding: 0 18px 18px; color: var(--muted); }
.acc-body p { margin: 0; }

/* ---------- Final ---------- */
.final { padding: 80px var(--gutter) 100px; text-align: center; background: var(--green); color: var(--cream); overflow: hidden; }
.final-title { margin: 0 0 26px; font-size: clamp(2.6rem, 13vw, 6rem); font-weight: 900; line-height: 1; letter-spacing: -.03em; color: var(--yellow); }
html[lang="ar"] .final-title { letter-spacing: 0; line-height: 1.3; }
.final-wa { margin: 20px 0 0; opacity: .85; }
.wa-link { font-weight: 800; color: var(--yellow); text-underline-offset: 4px; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }

.footer { padding: 26px var(--gutter) calc(96px + env(safe-area-inset-bottom)); text-align: center; background: var(--green-d); color: rgba(251, 244, 226, .8); font-size: 14px; }
.footer p { margin: 4px 0; }
.foot-small { font-size: 12px; opacity: .7; }

/* ---------- Dock mobile ---------- */
.dock {
  position: fixed; z-index: 55; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 56px 1fr; gap: 8px;
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.dock.show { transform: none; }
.dock-wa { display: grid; place-items: center; border-radius: 18px; background: var(--wa); }
.dock-wa svg { width: 26px; height: 26px; fill: #fff; }
.dock-cta { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 0 18px; min-height: 56px; border-radius: 18px; background: var(--green); color: var(--cream); text-decoration: none; font-weight: 700; box-shadow: 0 10px 30px -10px rgba(8, 20, 9, .6); }
html[dir="rtl"] .dock-cta { padding: 0 18px 0 8px; }
.dock-cta b { background: var(--gold); color: var(--green-d); border-radius: 12px; padding: 10px 18px; }

/* ---------- Animations d'apparition (état initial posé par JS) ---------- */
.js .reveal, .js .reveal-up { opacity: 0; transform: translateY(34px); }
.js .reveal-clip > img { clip-path: inset(100% 0 0 0); }
.js .in { opacity: 1 !important; transform: none !important; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal-clip.in > img { clip-path: inset(0 0 0 0); transition: clip-path 1.3s var(--ease), transform 1.2s var(--ease); }
.split .ch { display: inline-block; will-change: transform; }

/* ---------- Tablette et plus ---------- */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .nav { display: flex; }
  .hero-inner { grid-template-columns: 1.1fr .9fr; text-align: start; justify-items: start; align-items: center; padding-top: 120px; padding-bottom: 110px; column-gap: 40px; }
  .hero-inner > * { grid-column: 1; }
  .hero-product { grid-column: 2; grid-row: 1 / span 5; width: min(34vw, 340px); justify-self: center; }
  .hero-cta { grid-template-columns: auto auto; max-width: none; }
  .scroll-hint { display: block; }
  .product { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; padding-block: 96px; }
  .gallery-track { justify-content: center; overflow: visible; }
  .shot { flex: 0 1 320px; }
  .shot:nth-child(2) { margin-top: 60px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .stepi { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 6px; }
  .stepi-n { grid-row: auto; }
  .ship-card { grid-template-columns: 220px 1fr; padding: 40px; }
  .dock { display: none; }
  .footer { padding-bottom: 30px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .caravan { transform: translate(300px, 660px); }
  .js .reveal, .js .reveal-up { opacity: 1; transform: none; }
  .js .reveal-clip > img { clip-path: none; }
}

/* Montants toujours lus de gauche à droite, y compris en arabe */
.price-num, .total-num, .cd-num { direction: ltr; unicode-bidi: isolate; }

/* ---------- Devis intégré à la section formats ---------- */
.quote-card { max-width: 600px; margin: 26px auto 0; padding: 26px 18px 22px; border-radius: 24px; background: var(--cream); color: var(--ink); text-align: start; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); scroll-margin-top: 80px; }
.quote-card .quote-head { text-align: center; margin: 0 auto 18px; }
.quote-card .kicker { color: var(--red); }
.quote-title { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 900; color: var(--green); line-height: 1.1; }
.quote-lead { margin: 6px 0 0; color: var(--muted); }
.quote-card .field input[type="text"], .quote-card .field textarea, .quote-card .stepper, .quote-card .choice > span { background: #fff; }
.quote-card .lbl small { font-weight: 500; color: var(--muted); }
.stack-info { margin-top: 0; }
@media (min-width: 768px) { .quote-card { padding: 34px 34px 28px; } }

/* ---------- Le rituel : mosaïque vivante ---------- */
.ritual { padding: 64px var(--gutter) 72px; overflow: hidden; }
.ritual-head { text-align: center; max-width: 680px; margin: 0 auto 26px; }
.ritual-head .lead { margin: 0 auto; }
.ritual-title { margin: 0 0 10px; font-size: clamp(2.6rem, 12vw, 5.2rem); line-height: .95; font-weight: 900; letter-spacing: -.03em; color: var(--green); }
html[lang="ar"] .ritual-title { letter-spacing: 0; line-height: 1.25; }
.ritual-title .ch { display: inline-block; }
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 21vw; grid-auto-flow: dense; gap: 10px; max-width: 1180px; margin: 0 auto; }
.tile { position: relative; grid-row: span 2; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--green); cursor: zoom-in; isolation: isolate; clip-path: inset(0 0 0 0 round 18px); }
.tile.tall { grid-row: span 3; }
.tile.wide { grid-column: span 2; grid-row: span 3; }
.tile img { translate: 0 var(--py, 0); position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; transform: scale(1.06); transition: transform 1.1s var(--ease), filter .6s; will-change: transform; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 55%, rgba(8, 20, 9, .55)); opacity: .9; transition: opacity .5s; pointer-events: none; }
.tile-cap { position: absolute; z-index: 2; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 4px 10px 2px; border-radius: 4px; background: #FFFDF6; color: var(--ink); font-family: "Caveat", cursive; font-weight: 700; font-size: 20px; line-height: 1.1; text-align: start; transform: rotate(-3deg); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
html[dir="rtl"] .tile-cap { left: auto; right: 10px; transform: rotate(3deg); font-family: "Cairo", sans-serif; font-size: 15px; font-weight: 800; padding: 4px 10px; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.14); }
.tile:hover .tile-cap { transform: rotate(0) translateY(-4px) scale(1.06); }
.tile:hover::after { opacity: .5; }
/* apparition en cascade : balayage diagonal puis zoom arrière */
.js .tile { clip-path: polygon(0 0, 0 0, 0 0, 0 0); }
.js .tile.in { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1); }
.js .tile img { transform: scale(1.3); }
.js .tile.in img { transform: scale(1.06); transition: transform 1.6s cubic-bezier(.2, .8, .2, 1); }
.js .tile.in:hover img { transform: scale(1.14); transition-duration: 1.1s; }
.js .tile .tile-cap { opacity: 0; transform: translateY(16px) rotate(-8deg); }
.js .tile.in .tile-cap { opacity: 1; transform: rotate(-3deg); transition: opacity .4s .7s, transform .7s .7s cubic-bezier(.3, 1.6, .5, 1); }
@media (min-width: 768px) {
  .mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 110px; gap: 14px; }
  .tile-cap { font-size: 24px; left: 14px; bottom: 14px; }
}
@media (min-width: 1100px) { .mosaic { grid-auto-rows: 130px; } }

/* ---------- Visionneuse ---------- */
.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(8, 18, 9, .95); padding: 56px 12px 40px; opacity: 0; transition: opacity .35s; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-fig { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 960px; width: 100%; }
.lb-fig img { max-width: 100%; max-height: 72svh; border-radius: 12px; object-fit: contain; transform: scale(.92); opacity: 0; transition: transform .5s var(--ease), opacity .35s; }
.lightbox.open .lb-fig img.ready { transform: none; opacity: 1; }
.lb-fig figcaption { display: grid; gap: 2px; text-align: center; color: var(--cream); }
.lb-fig b { font-size: 20px; color: var(--yellow); }
.lb-fig span { font-size: 15px; opacity: .8; }
.lb-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(251, 244, 226, .12); color: var(--cream); font-size: 30px; line-height: 1; cursor: pointer; }
html[dir="rtl"] .lb-close { right: auto; left: 12px; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 64px; border: 0; border-radius: 14px; background: rgba(251, 244, 226, .1); color: var(--cream); font-size: 36px; cursor: pointer; }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
html[dir="rtl"] .lb-prev { left: auto; right: 8px; } html[dir="rtl"] .lb-next { right: auto; left: 8px; }
.lb-count { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); margin: 0; color: rgba(251, 244, 226, .6); font-size: 13px; direction: ltr; }
@media (prefers-reduced-motion: reduce) {
  .js .tile, .js .tile img, .js .tile .tile-cap { clip-path: none; opacity: 1; transform: none; }
}

/* ===================== Thème Tafilalet / Al Arsan ===================== */
/* Texture de feuilles de thé séchées sur les fonds verts (comme la boîte Tafilalet) */
.hero, .stack, .final, .footer, .offer-card::after, .ref-taf, .total, .loader {
  background-image:
    radial-gradient(rgba(122, 160, 70, .2) 1px, transparent 1.7px),
    radial-gradient(rgba(5, 14, 6, .35) 1px, transparent 1.7px);
  background-size: 7px 9px, 11px 6px;
  background-position: 0 0, 3px 4px;
}

/* Titres façon boîte Tafilalet, petites capitales façon étiquette Al Arsan */
.h2, .ritual-title, .final-title, .offer-title, .quote-title { font-family: var(--slab); font-weight: 400; letter-spacing: 0; }
.kicker { color: var(--accent); font-family: var(--caps); font-weight: 700; letter-spacing: .16em; }
.final-title { color: var(--yellow); -webkit-text-stroke: 6px var(--brown); paint-order: stroke fill; }
.offer-title { color: var(--yellow); }
html[lang="ar"] .h2, html[lang="ar"] .ritual-title, html[lang="ar"] .final-title, html[lang="ar"] .offer-title,
html[lang="ar"] .quote-title, html[lang="ar"] .kicker { font-family: var(--font); font-weight: 900; letter-spacing: 0; }

/* Boutons */
.btn-gold { background: var(--yellow); color: var(--brown); box-shadow: inset 0 0 0 2px var(--brown); }
.btn-wood { color: #1A1F14; background: repeating-linear-gradient(176deg, #DDB884 0 10px, #CFA36C 10px 11px, #DDB884 11px 20px); box-shadow: inset 0 0 0 3px var(--iron); }

/* Bandeau défilant jaune Tafilalet */
.marquee { background: var(--yellow); color: var(--green-d); }
.marquee-track b { color: var(--accent); }
html:not([lang="ar"]) .marquee-track { font-family: var(--slab); font-weight: 400; letter-spacing: .02em; }

/* Haut de page */
.hero-title { text-shadow: none; }
.hero-title .hero-name {
  display: block; font-family: var(--slab); font-weight: 400; line-height: 1; letter-spacing: .01em;
  font-size: clamp(3rem, 14vw, 6.4rem); color: var(--yellow);
  -webkit-text-stroke: 7px var(--brown); paint-order: stroke fill;
  filter: drop-shadow(0 6px 18px rgba(5, 14, 6, .6));
}
.hero-title .hero-sub {
  display: block; margin-top: 8px; font-family: var(--slab); font-weight: 400; letter-spacing: .04em;
  font-size: clamp(1.4rem, 6vw, 2.4rem); color: #E0552A; -webkit-text-stroke: 4px var(--yellow); paint-order: stroke fill;
}
html[lang="ar"] .hero-title .hero-name, html[lang="ar"] .hero-title .hero-sub { font-family: "Cairo", sans-serif; font-weight: 900; }
.hero-ref { font-family: var(--caps); font-weight: 600; letter-spacing: .05em; }
html[lang="ar"] .hero-ref { font-family: var(--font); letter-spacing: 0; }
.eyebrow { background: rgba(13, 30, 14, .6); color: var(--yellow); }
.price-badge { background: var(--accent); }
.price-badge::before { border-color: rgba(242, 194, 48, .8); }

/* Boîte Tafilalet en vrai cube 3D */
.hero-product { --s: min(52vw, 240px); width: var(--s); height: var(--s); margin: 44px 0 30px; perspective: 1100px; }
.hero-product::after { content: ""; position: absolute; left: 50%; bottom: -30px; width: 140%; height: 44px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(5, 14, 6, .6), transparent); z-index: -1; pointer-events: none; }
.hero-product .tilt { width: 100%; height: 100%; transform-style: preserve-3d; border-radius: 0; }
.cube { position: relative; width: var(--s); height: var(--s); transform-style: preserve-3d; transform: rotateX(-16deg) rotateY(-32deg); animation: cubeTurn 10s ease-in-out infinite; }
@keyframes cubeTurn { 50% { transform: rotateX(-12deg) rotateY(-14deg); } }
.cf { position: absolute; inset: 0; display: block; backface-visibility: hidden; }
.cf svg { width: 100%; height: 100%; display: block; }
.cf-front { transform: translateZ(calc(var(--s) / 2)); }
.cf-back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cf-right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.78); }
.cf-left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(.86); }
.cf-top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.08); }
.steam { top: -76px; }
@media (min-width: 768px) { .hero-product { --s: min(26vw, 320px); } }

/* Les deux références */
.refs { padding: 64px var(--gutter); max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.refs-head { text-align: center; }
.ref { position: relative; display: grid; gap: 18px; padding: 22px; border-radius: 22px; overflow: hidden; scroll-margin-top: 80px; }
.ref-media { border-radius: 14px; overflow: hidden; aspect-ratio: 1 / 1; background: rgba(0, 0, 0, .15); }
.ref-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ref:hover .ref-media img { transform: scale(1.05) rotate(-1deg); }
.ref-tag { margin: 0; font-family: var(--caps); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.ref-name { margin: 6px 0 0; font-family: var(--slab); font-weight: 400; line-height: 1; font-size: clamp(2.4rem, 11vw, 3.8rem); }
.ref-sub { margin: 6px 0 12px; font-weight: 800; }
.ref-text { margin: 0 0 14px; }
.ref-specs { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ref-specs li { padding: 6px 12px; border-radius: 999px; border: 1.5px solid; font-weight: 700; font-size: 14px; }
.ref .btn { width: 100%; }
html[lang="ar"] .ref-tag, html[lang="ar"] .ref-name { font-family: var(--font); font-weight: 900; letter-spacing: 0; }
/* fiche Tafilalet : vert texturé, cadre doré */
.ref-taf { background-color: var(--olive); color: var(--cream); border: 4px solid var(--gold); box-shadow: inset 0 0 0 5px var(--olive), inset 0 0 0 7px rgba(217, 169, 58, .7); }
.ref-taf .ref-tag { color: var(--yellow); }
.ref-taf .ref-name { color: var(--yellow); -webkit-text-stroke: 6px var(--brown); paint-order: stroke fill; }
.ref-taf .ref-sub { color: #F08A5A; }
.ref-taf .ref-text { color: rgba(251, 244, 226, .88); }
.ref-taf .ref-specs li { border-color: rgba(242, 194, 48, .55); color: var(--yellow); }
/* fiche Al Arsan : caisse en bois, équerres de fer, étiquette verte */
.ref-ars { background: repeating-linear-gradient(176deg, #DDB884 0 16px, #D4AA74 16px 18px, #DDB884 18px 34px, #CFA36C 34px 36px); color: var(--ink); border: 10px solid #C99A62; padding: 26px 22px; }
.ref-ars .ref-media { border: 4px solid #9A6E3E; }
.ref-ars .ref-body { background: var(--label); color: #F4E6B8; border: 4px solid var(--gold); box-shadow: inset 0 0 0 4px var(--label), inset 0 0 0 6px #E3C46A; padding: 22px 18px; border-radius: 4px; text-align: center; }
.ref-ars .ref-tag { color: #E3C46A; }
.ref-ars .ref-name { font-family: var(--caps); font-weight: 800; color: #F4E6B8; letter-spacing: .06em; font-size: clamp(2.2rem, 10vw, 3.3rem); }
.ref-ars .ref-sub { color: var(--yellow); font-family: var(--caps); }
.ref-ars .ref-text { color: rgba(244, 230, 184, .9); }
.ref-ars .ref-specs { justify-content: center; }
.ref-ars .ref-specs li { border-color: rgba(227, 196, 106, .6); color: #F4E6B8; }
.iron {
  position: absolute; z-index: 2; width: 58px; height: 58px; pointer-events: none;
  background:
    radial-gradient(circle at 9px 9px, #A3A39B 0 4px, transparent 5px),
    radial-gradient(circle at 46px 9px, #A3A39B 0 3.5px, transparent 4.5px),
    radial-gradient(circle at 9px 46px, #A3A39B 0 3.5px, transparent 4.5px),
    linear-gradient(var(--iron), var(--iron)) 0 0 / 100% 18px no-repeat,
    linear-gradient(var(--iron), var(--iron)) 0 0 / 18px 100% no-repeat;
}
.iron.tl { top: 0; left: 0; }
.iron.tr { top: 0; right: 0; transform: scaleX(-1); }
.iron.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.iron.br { bottom: 0; right: 0; transform: scale(-1); }
@media (min-width: 768px) {
  .refs { grid-template-columns: 1.12fr .88fr; align-items: stretch; gap: 26px; }
  .refs-head { grid-column: 1 / -1; }
  .ref { align-content: start; padding: 28px; }
}

/* Sélecteur de référence dans la section formats */
.refswitch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; width: min(100%, 420px); padding: 5px; margin: 0 0 10px; border-radius: 14px; background: rgba(251, 244, 226, .08); }
.refswitch button { position: relative; z-index: 1; border: 0; background: transparent; color: var(--cream); font-family: var(--slab); font-size: 17px; padding: 12px 6px; border-radius: 10px; cursor: pointer; transition: color .35s; }
.refswitch button[aria-selected="true"] { color: var(--brown); }
html[lang="ar"] .refswitch button { font-family: var(--font); font-weight: 900; }
.refswitch-ind { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 2); border-radius: 10px; background: var(--yellow); transition: transform .55s cubic-bezier(.5, 1.6, .4, 1), background .4s; }
.refswitch.ars .refswitch-ind { background: repeating-linear-gradient(176deg, #DDB884 0 8px, #CFA36C 8px 9px); box-shadow: inset 0 0 0 3px var(--iron); }
html[dir="rtl"] .refswitch-ind { left: auto; right: 5px; }
.stack-ref { margin: 0 0 6px; font-family: var(--slab); font-size: 20px; color: var(--yellow); }
html[lang="ar"] .stack-ref { font-family: var(--font); font-weight: 900; }

/* Boîtes de la scène 3D : faces vectorielles de la référence choisie */
.tea > i { background: #2C4A26; }
.tea.ars > i { background: #D9B27C; }
.tea > i svg { width: 100%; height: 100%; display: block; }
.tea > .rt { filter: brightness(.8); }
.tea > .lf { filter: brightness(.88); }
.tea > .tp { filter: brightness(1.06); }
#iso .kraft > .fr::after, #iso .kraft > .rt::after { background: linear-gradient(#2C4A26 0 64%, #F2C230 64% 80%, #2C4A26 80%); }
#iso.iso-ars .kraft > .fr::after, #iso.iso-ars .kraft > .rt::after { background: linear-gradient(#D9B27C 0 20%, #2F6B3F 20% 80%, #D9B27C 80%); box-shadow: inset 0 0 0 2px #4E4E4A; }
.lbl3d { border-color: #1F3A1E; color: #1F3A1E; }
.lbl3d b { font-family: var(--slab); font-weight: 400; font-size: 1.3em; letter-spacing: 0; }
html[lang="ar"] .lbl3d b { font-family: var(--font); font-weight: 900; }

/* Divers */
.ship-card { background: #fff; border: 3px solid var(--gold); }
.stack-pill { background: var(--accent); }
.tabs button[aria-selected="true"] { color: var(--brown); }

/* Titres découpés : un mot ne se coupe jamais en fin de ligne */
.split .w { display: inline-block; white-space: nowrap; }
.ritual-title { font-size: clamp(2.2rem, 10.5vw, 4.6rem); }
.tile.wide.short { grid-row: span 2; }
/* En arabe, la face avant passe à droite pour laisser le badge prix sur le côté */
html[dir="rtl"] .cube { transform: rotateX(-16deg) rotateY(32deg); animation-name: cubeTurnRtl; }
@keyframes cubeTurnRtl { 50% { transform: rotateX(-12deg) rotateY(14deg); } }
/* Ordinateur : la porte se place derrière la boîte, à droite du titre */
@media (min-width: 768px) { .gate-pos { transform: translateX(190px); } }

/* Sélecteurs de la section formats : l'un sous l'autre, même forme */
.refswitch, .tabs { display: grid; margin-left: auto; margin-right: auto; border-radius: 999px; }
.refswitch { margin-bottom: 10px; }
.refswitch-ind, .refswitch button { border-radius: 999px; }

/* Fiches références : boîte vectorielle droite (rotation sur le côté uniquement) */
.ref-stage { --s: min(44vw, 210px); aspect-ratio: auto; height: calc(var(--s) * 1.55); display: grid; place-items: center; perspective: 900px; overflow: visible; position: relative; }
.ref-stage::after { content: ""; position: absolute; left: 50%; bottom: 10%; width: calc(var(--s) * 1.5); height: 34px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(5, 14, 6, .45), transparent); pointer-events: none; }
.ref-taf .ref-stage { background: radial-gradient(circle at 50% 45%, rgba(242, 194, 48, .22), transparent 65%); }
.ref-ars .ref-stage { border: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .35), transparent 65%); }
.cube-ref { z-index: 1; transform: rotateY(-24deg); animation: refTurn 9s ease-in-out infinite; }
@keyframes refTurn { 50% { transform: rotateY(-10deg); } }
html[dir="rtl"] .cube-ref { transform: rotateY(24deg); animation-name: refTurnRtl; }
@keyframes refTurnRtl { 50% { transform: rotateY(10deg); } }
@media (min-width: 768px) { .ref-stage { --s: min(18vw, 220px); } }

/* ===== Corrections de l'audit (mobile d'abord) ===== */
.nowrap { white-space: nowrap; }
/* en-tête : cibles tactiles de 44 px */
.brand { min-height: 44px; }
.lang { min-height: 44px; min-width: 56px; justify-content: center; }
.topbar .btn-sm { min-height: 44px; padding: 10px 18px; }
/* badge prix lisible */
.price-unit { font-size: 12px; }
/* fiches références : même alignement centré pour les deux */
.ref-body { text-align: center; }
.ref-specs { justify-content: center; }
.faq .h2 { text-align: center; }
.stack-ref { margin: 8px 0 2px; }
/* Ordinateur : deux premières photos hautes pour une mosaïque sans trou */
@media (min-width: 768px) { #mosaic > .tile:nth-child(-n + 2) { grid-row: span 3; } }
/* Titres et chapôs équilibrés (pas de mot seul en dernière ligne) */
h1, h2, h3, .lead, .stack-lead, .quote-lead, .ref-text, .fine { text-wrap: balance; }

/* ===== Motif zellige : étoiles à huit branches et feuille de thé (remplace le motif à points) ===== */
:root { --zellige: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2272%22 height=%2272%22 viewBox=%220 0 72 72%22%3E%3Cg fill=%22rgba(242,194,48,.035)%22 stroke=%22rgba(242,194,48,.17)%22 stroke-width=%221.1%22%3E%3Cpath d=%22M36.0,21.0 L39.6,27.2 L46.6,25.4 L44.8,32.4 L51.0,36.0 L44.8,39.6 L46.6,46.6 L39.6,44.8 L36.0,51.0 L32.4,44.8 L25.4,46.6 L27.2,39.6 L21.0,36.0 L27.2,32.4 L25.4,25.4 L32.4,27.2Z%22/%3E%3Cpath d=%22M0.0,-15.0 L3.6,-8.8 L10.6,-10.6 L8.8,-3.6 L15.0,0.0 L8.8,3.6 L10.6,10.6 L3.6,8.8 L0.0,15.0 L-3.6,8.8 L-10.6,10.6 L-8.8,3.6 L-15.0,0.0 L-8.8,-3.6 L-10.6,-10.6 L-3.6,-8.8Z%22/%3E%3Cpath d=%22M0.0,57.0 L3.6,63.2 L10.6,61.4 L8.8,68.4 L15.0,72.0 L8.8,75.6 L10.6,82.6 L3.6,80.8 L0.0,87.0 L-3.6,80.8 L-10.6,82.6 L-8.8,75.6 L-15.0,72.0 L-8.8,68.4 L-10.6,61.4 L-3.6,63.2Z%22/%3E%3Cpath d=%22M72.0,-15.0 L75.6,-8.8 L82.6,-10.6 L80.8,-3.6 L87.0,0.0 L80.8,3.6 L82.6,10.6 L75.6,8.8 L72.0,15.0 L68.4,8.8 L61.4,10.6 L63.2,3.6 L57.0,0.0 L63.2,-3.6 L61.4,-10.6 L68.4,-8.8Z%22/%3E%3Cpath d=%22M72.0,57.0 L75.6,63.2 L82.6,61.4 L80.8,68.4 L87.0,72.0 L80.8,75.6 L82.6,82.6 L75.6,80.8 L72.0,87.0 L68.4,80.8 L61.4,82.6 L63.2,75.6 L57.0,72.0 L63.2,68.4 L61.4,61.4 L68.4,63.2Z%22/%3E%3Cpath d=%22M36.0 -6.0L42.0 0.0L36.0 6.0L30.0 0.0Z%22/%3E%3Cpath d=%22M36.0 66.0L42.0 72.0L36.0 78.0L30.0 72.0Z%22/%3E%3Cpath d=%22M0.0 30.0L6.0 36.0L0.0 42.0L-6.0 36.0Z%22/%3E%3Cpath d=%22M72.0 30.0L78.0 36.0L72.0 42.0L66.0 36.0Z%22/%3E%3C/g%3E%3Cg stroke=%22rgba(242,194,48,.12)%22 stroke-width=%221%22%3E%3Cpath d=%22M36.0 21.0V15.0%22/%3E%3Cpath d=%22M36.0 51.0V57.0%22/%3E%3Cpath d=%22M21.0 36.0H15.0%22/%3E%3Cpath d=%22M51.0 36.0H57.0%22/%3E%3C/g%3E%3Cg transform=%22translate(36.0 36.0) rotate(-35)%22%3E%3Cpath d=%22M-6 0Q0 -4.5 6 0Q0 4.5 -6 0Z%22 fill=%22rgba(242,194,48,.16)%22/%3E%3Cpath d=%22M-5 0H5%22 stroke=%22rgba(19,38,18,.5)%22 stroke-width=%22.7%22/%3E%3C/g%3E%3Cg transform=%22translate(0.0 0.0) rotate(-35)%22%3E%3Cpath d=%22M-6 0Q0 -4.5 6 0Q0 4.5 -6 0Z%22 fill=%22rgba(242,194,48,.16)%22/%3E%3Cpath d=%22M-5 0H5%22 stroke=%22rgba(19,38,18,.5)%22 stroke-width=%22.7%22/%3E%3C/g%3E%3Cg transform=%22translate(0.0 72.0) rotate(-35)%22%3E%3Cpath d=%22M-6 0Q0 -4.5 6 0Q0 4.5 -6 0Z%22 fill=%22rgba(242,194,48,.16)%22/%3E%3Cpath d=%22M-5 0H5%22 stroke=%22rgba(19,38,18,.5)%22 stroke-width=%22.7%22/%3E%3C/g%3E%3Cg transform=%22translate(72.0 0.0) rotate(-35)%22%3E%3Cpath d=%22M-6 0Q0 -4.5 6 0Q0 4.5 -6 0Z%22 fill=%22rgba(242,194,48,.16)%22/%3E%3Cpath d=%22M-5 0H5%22 stroke=%22rgba(19,38,18,.5)%22 stroke-width=%22.7%22/%3E%3C/g%3E%3Cg transform=%22translate(72.0 72.0) rotate(-35)%22%3E%3Cpath d=%22M-6 0Q0 -4.5 6 0Q0 4.5 -6 0Z%22 fill=%22rgba(242,194,48,.16)%22/%3E%3Cpath d=%22M-5 0H5%22 stroke=%22rgba(19,38,18,.5)%22 stroke-width=%22.7%22/%3E%3C/g%3E%3C/svg%3E"); }
.hero, .stack, .final, .footer, .offer-card::after, .ref-taf, .total, .loader {
  background-image: var(--zellige);
  background-size: 72px 72px;
  background-position: center top;
}
.total { background-size: 56px 56px; }
/* Badge prix et boutons : coupures équilibrées */
.price-unit { text-wrap: balance; padding: 0 10px; }
.btn > span { text-wrap: balance; }
.btn-wa { padding-left: 18px; padding-right: 18px; }
/* Pas de mot seul en dernière ligne */
p, li, summary, figcaption { text-wrap: pretty; }
.tile-cap { text-wrap: balance; }
/* Fiche Al Arsan plus aérée sur petit écran (le bouton tient sur une ligne) */
@media (max-width: 380px) {
  .ref-ars { padding: 18px 12px; border-width: 8px; }
  .ref-ars .ref-body { padding: 20px 12px; }
  .ref .btn { padding-left: 16px; padding-right: 16px; }
}
/* En-tête au-dessus du haut de page après un léger défilement */
.topbar.glass { background: rgba(19, 38, 18, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 8px; box-shadow: 0 1px 0 rgba(242, 194, 48, .25); }
.foot-copy { display: block; margin-top: 2px; }
