:root {
  --paper: #F6EEE5;
  --blush: #EEDFD2;
  --sand: #E3CDB9;
  --mocha: #9A6A4F;
  --choc: #4A2719;
  --ink: #3A2116;
  --muted: #7B6052;
  --line: #DCC6B3;
  --wa: #1F8A4C;
  --display: "Marcellus", "Amiri", serif;
  --body: "Figtree", "Tajawal", system-ui, sans-serif;
  --radius-lg: 180px 180px 18px 18px;
}
[dir="rtl"] { --display: "Amiri", "Marcellus", serif; --body: "Tajawal", "Figtree", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--mocha); outline-offset: 3px; }
img, svg { display: block; }

/* Barre du haut */
.topbar { display: flex; justify-content: center; align-items: center; gap: 1rem; position: relative; background: var(--choc); color: #F3E6D8; font-size: .85rem; padding: .45rem 1rem; }
.topbar p { margin: 0; text-align: center; }
.lang { position: absolute; inset-inline-end: 1rem; background: none; border: 0; display: flex; gap: .4rem; font-size: .85rem; color: #CDB7A3; padding: .2rem; }
.lang span[data-lang="ar"] { font-family: "Tajawal", sans-serif; }
.lang .on { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* En-tête */
.header { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: .6rem clamp(1rem, 4vw, 3rem); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; justify-self: start; line-height: 1; color: var(--choc); }
.sprig { width: 1.6rem; height: auto; color: var(--choc); margin-bottom: -.35rem; }
.hero-text .sprig { width: 3.2rem; margin: 0 auto -1rem; display: block; }
.foot-brand .sprig { width: 2rem; margin-inline-start: 1.6rem; }
.logo-ar { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: 2.1rem; color: var(--choc); line-height: 1; }
.logo-en { font-family: "Marcellus", serif; letter-spacing: .32em; font-size: .78rem; margin-top: .15rem; margin-inline-start: .32em; }
.nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }
.nav a { text-decoration: none; font-size: .95rem; padding: .3rem 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-color: var(--mocha); }
.cart-btn { justify-self: end; position: relative; background: none; border: 0; padding: .5rem; color: var(--choc); }
.cart-count { position: absolute; top: 0; inset-inline-end: -2px; min-width: 1.15rem; height: 1.15rem; border-radius: 1rem; background: var(--choc); color: #fff; font-size: .7rem; display: grid; place-items: center; padding: 0 .25rem; }
.cart-count[hidden] { display: none; }
.cart-btn.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* Hero : l'arche */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(1.5rem, 5vw, 5rem); padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 6vw, 6rem) clamp(2rem, 5vw, 4rem); }
.hero-arch { border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; background: var(--blush); }
.hero-garments { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.hero-garments img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.hero-text { text-align: center; }
.hero-ar { font-family: "Aref Ruqaa", serif; font-weight: 700; font-size: clamp(4.5rem, 10vw, 8rem); color: var(--choc); margin: 0; line-height: 1; }
.hero h1 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin-top: .4rem; }
.hero-sub { color: var(--muted); max-width: 30ch; margin: .8rem auto 1.8rem; font-size: 1.05rem; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; background: var(--choc); color: #F8EEE4; border: 0; border-radius: 999px; padding: .85rem 1.8rem; text-decoration: none; font-weight: 500; transition: background .2s; }
.btn:hover { background: #5E3424; }
.btn-full { width: 100%; }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #18703D; }

/* Engagements */
.promises { list-style: none; margin: 0 clamp(1rem, 6vw, 6rem); padding: 1.2rem 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.promises li { display: flex; flex-direction: column; align-items: center; text-align: center; padding: .3rem 1rem; }
.promises li + li { border-inline-start: 1px solid var(--line); }
.promises strong { font-family: var(--display); font-weight: 400; font-size: 1.15rem; }
.promises span { color: var(--muted); font-size: .9rem; }

/* Collection */
.collection, .palette { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 6vw, 6rem) 0; text-align: center; }
.collection h2, .palette h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.section-sub { color: var(--muted); margin: .4rem 0 2rem; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 60rem; margin-inline: auto; gap: clamp(1rem, 2vw, 1.6rem); text-align: start; }
.card { display: flex; flex-direction: column; }
.card-media { border: 1px solid var(--line); background: var(--blush); border-radius: 160px 160px 12px 12px; padding: 0; aspect-ratio: 3 / 4; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card-media:hover img { transform: scale(1.03); }
.card-body { padding: .9rem .2rem 0; }
.card h3 { font-size: 1.2rem; }
.card h3 button { background: none; border: 0; padding: 0; text-align: start; }
.price { margin: .15rem 0 .6rem; font-weight: 600; color: var(--choc); }

.swatches { display: flex; flex-wrap: wrap; gap: .55rem; }
.sw { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid rgba(58, 33, 22, .25); background: linear-gradient(135deg, var(--c) 50%, var(--c2, var(--c)) 50%); padding: 0; box-shadow: inset 0 0 0 3px var(--paper); transition: box-shadow .15s; }
.sw.on { box-shadow: inset 0 0 0 3px var(--paper), 0 0 0 2px var(--choc); }
.swatches.small .sw { width: 1.45rem; height: 1.45rem; box-shadow: inset 0 0 0 2px var(--paper); }
.swatches.small .sw.on { box-shadow: inset 0 0 0 2px var(--paper), 0 0 0 1.5px var(--choc); }

/* Palette */
.palette-list { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem 2.2rem; max-width: 52rem; }
.palette-list li { display: flex; flex-direction: column; align-items: center; gap: .5rem; font-size: .9rem; }
.dot { width: 4rem; height: 4rem; border-radius: 50%; background: var(--c); border: 1px solid rgba(58, 33, 22, .15); }

/* Pied de page */
.footer { margin-top: clamp(3rem, 7vw, 5rem); background: var(--blush); border-top: 1px solid var(--line); padding: 3rem clamp(1rem, 6vw, 6rem) 1.5rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; }
.foot-brand p { color: var(--muted); margin: .8rem 0 0; }
.footer h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.footer p { margin: 0 0 .4rem; color: var(--muted); }
.foot-phone { font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.socials { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .85rem; text-align: center; }

.wa-float { position: fixed; bottom: 1.2rem; inset-inline-end: 1.2rem; z-index: 5; width: 3.3rem; height: 3.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

/* Dialogues */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(42, 22, 14, .45); }
.close { position: absolute; top: .6rem; inset-inline-end: .7rem; background: none; border: 0; font-size: 1.8rem; line-height: 1; width: 2.4rem; height: 2.4rem; z-index: 2; }

.product { width: min(960px, 94vw); border-radius: 18px; display: none; }
.product[open] { display: grid; grid-template-columns: 1fr 1fr; animation: rise .25s ease; }
.pd-media { position: relative; background: var(--blush); min-height: 480px; max-height: 92dvh; }
.pd-media > img { width: 100%; height: 100%; max-height: 92dvh; object-fit: cover; display: block; animation: fade .3s ease; }
.thumbs { position: absolute; bottom: .8rem; inset-inline: .8rem; display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumb { flex: none; }
.thumb { width: 3.2rem; aspect-ratio: 3 / 4; padding: 0; border: 2px solid rgba(255,255,255,.7); border-radius: 6px; overflow: hidden; background: none; opacity: .8; }
.thumb.on { border-color: var(--choc); opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product[open] { max-height: 92dvh; overflow: hidden; }
.pd-info { overflow-y: auto; }
.pd-info { padding: 2.6rem 2rem 2rem; display: flex; flex-direction: column; }
.pd-info h2 { font-size: 2rem; }
.pd-info .price { font-size: 1.2rem; }
.pd-desc { color: var(--muted); margin: 0 0 1.2rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.2rem; }
legend { padding: 0; margin-bottom: .55rem; font-size: .95rem; }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; }
.size { border: 1px solid var(--line); background: #FBF6F0; border-radius: 999px; padding: .4rem 1rem; min-width: 3rem; }
.size.on { background: var(--choc); color: #fff; border-color: var(--choc); }
.pd-buy { display: flex; gap: .8rem; margin-top: auto; padding-top: .5rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #FBF6F0; }
.qty button { background: none; border: 0; width: 2.6rem; height: 2.8rem; font-size: 1.2rem; }
.qty output { min-width: 1.5rem; text-align: center; }
.qty.sm button { width: 2rem; height: 2rem; font-size: 1rem; }
.pd-note { color: var(--muted); font-size: .85rem; margin: .8rem 0 0; }

/* Panier latéral */
.drawer { margin: 0; margin-inline-start: auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); display: none; flex-direction: column; }
.drawer[open] { display: flex; animation: slide .28s ease; }
[dir="rtl"] .drawer[open] { animation-name: slide-rtl; }
.drawer-head { position: relative; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.5rem; }
.view { flex: 1; overflow-y: auto; padding: 1.2rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.view[hidden] { display: none; }
.cart-list { list-style: none; padding: 0; margin: 0; }
.ci { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.ci-img { background: var(--blush); border-radius: 40px 40px 6px 6px; overflow: hidden; aspect-ratio: 3 / 4; }
.ci-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-info { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.ci-info small { color: var(--muted); }
.ci-end { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: .85rem; }
.cart-empty { text-align: center; margin: auto 0; }
.cart-empty[hidden], .drawer-foot[hidden] { display: none; }
.drawer-foot { margin-top: auto; padding-top: 1rem; }
.line { display: flex; justify-content: space-between; margin: 0 0 .6rem; }
.line.total { font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: .6rem; }

#viewCheckout { gap: .9rem; }
.back { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; font-size: .9rem; }
#viewCheckout label:not(.mode) { display: flex; flex-direction: column; gap: .3rem; font-size: .92rem; }
#viewCheckout input:not([type=radio]), #viewCheckout select { font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #FDF9F4; color: var(--ink); width: 100%; }
#viewCheckout [hidden] { display: none; }
[aria-invalid="true"] { border-color: #B0413E !important; }
.modes { display: grid; gap: .5rem; margin: 0; }
.mode { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; background: #FDF9F4; cursor: pointer; }
.mode:has(input:checked) { border-color: var(--choc); box-shadow: 0 0 0 1px var(--choc); }
.mode:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.mode input { accent-color: var(--choc); width: 1.1rem; height: 1.1rem; }
.mode span { display: flex; flex-direction: column; }
.mode small { color: var(--muted); }
.mode em { font-style: normal; font-weight: 600; }
.summary { background: var(--blush); border-radius: 12px; padding: .9rem 1rem .3rem; }
.form-error { color: #9E3431; margin: 0; min-height: 1.2em; font-size: .9rem; }
.sent { text-align: center; justify-content: center; gap: .6rem; }
.sent h3 { font-size: 1.7rem; }
.sent p { color: var(--muted); margin: 0; }
.sent .ref { font-weight: 600; color: var(--ink); margin: .4rem 0 1.2rem; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 1rem); background: var(--choc); color: #fff; padding: .7rem 1.3rem; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(100%); } }
@keyframes slide-rtl { from { transform: translateX(-100%); } }

/* Mobile */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .hero-text { order: -1; }
  .footer { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .header { grid-template-columns: 1fr auto; }
  .topbar { flex-direction: column; gap: .2rem; padding-block: .5rem; }
  .lang { position: static; }
  .promises { grid-template-columns: 1fr; padding: .4rem 0; }
  .promises li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .promises li { padding: .7rem; }
  .product[open] { grid-template-columns: 1fr; max-height: 92dvh; overflow-y: auto; }
  .pd-media { min-height: 0; }
  .pd-media > img { max-height: 60dvh; }
  .pd-info { padding: 1.4rem 1.2rem 1.4rem; }
  .card h3 { font-size: 1.05rem; }
  .footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.hero-en { font-family: "Marcellus", serif; letter-spacing: .4em; font-size: clamp(1.1rem, 2vw, 1.6rem); margin: .2rem 0 0; padding-inline-start: .4em; color: var(--choc); }
