/* ==========================================================================
   RIWAK AL FURQAN — رواق الفرقان
   Système de design — Fès, Maroc
   main.css : tokens, reset, typographie, layout, header/footer, composants
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* — Couleurs de marque — */
  --c-cream:        #FBF8F2;   /* fond principal, parchemin */
  --c-parchment:    #F4EDE1;   /* surfaces secondaires */
  --c-sand:         #EADFCB;   /* surfaces tertiaires */
  --c-line:         #E4D9C6;   /* filets, bordures */
  --c-line-strong:  #CDBFA6;

  --c-ink:          #17130F;   /* texte principal, noir chaud */
  --c-ink-soft:     #3D362F;   /* texte secondaire */
  --c-muted:        #7C7062;   /* texte tertiaire */

  --c-green:        #0E3229;   /* vert médina — couleur signature */
  --c-green-700:    #124237;
  --c-green-500:    #1C5A4A;
  --c-green-200:    #9DBDB0;
  --c-green-50:     #EDF3F0;

  --c-gold:         #B0863C;   /* laiton de Fès */
  --c-gold-600:     #97722F;
  --c-gold-300:     #DDBD82;
  --c-gold-50:      #FAF3E5;

  --c-terracotta:   #97452C;   /* zellige terre cuite */
  --c-success:      #1B7A4E;
  --c-success-bg:   #E9F5EE;
  --c-danger:       #A82B22;
  --c-danger-bg:    #FBECEA;
  --c-warning:      #A8730B;
  --c-warning-bg:   #FDF3E0;

  --c-white:        #FFFFFF;

  /* — Typographie — */
  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-arabic:  "Amiri", "Traditional Arabic", "Times New Roman", serif;

  /* Échelle fluide */
  --fs-3xs:  0.6875rem;                                  /* 11 */
  --fs-2xs:  0.75rem;                                    /* 12 */
  --fs-xs:   0.8125rem;                                  /* 13 */
  --fs-sm:   0.875rem;                                   /* 14 */
  --fs-base: 0.9375rem;                                  /* 15 */
  --fs-md:   1rem;                                       /* 16 */
  --fs-lg:   clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  --fs-xl:   clamp(1.25rem, 0.6vw + 1.1rem, 1.5rem);
  --fs-2xl:  clamp(1.5rem, 1.2vw + 1.2rem, 2rem);
  --fs-3xl:  clamp(1.875rem, 2vw + 1.3rem, 2.75rem);
  --fs-4xl:  clamp(2.25rem, 3.4vw + 1.3rem, 3.75rem);
  --fs-5xl:  clamp(2.75rem, 5vw + 1.2rem, 5rem);

  --lh-tight: 1.08;
  --lh-snug:  1.28;
  --lh-base:  1.62;

  --ls-wide:   0.08em;
  --ls-wider:  0.16em;
  --ls-widest: 0.24em;

  /* — Espacements — */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.25rem;
  --s-6:  1.5rem;
  --s-8:  2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;
  --section: clamp(3.5rem, 7vw, 7rem);

  /* — Rayons — */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* — Ombres (douces, jamais dures) — */
  --sh-xs: 0 1px 2px rgba(23, 19, 15, .05);
  --sh-sm: 0 2px 6px rgba(23, 19, 15, .06), 0 1px 2px rgba(23, 19, 15, .04);
  --sh-md: 0 6px 20px rgba(23, 19, 15, .08), 0 2px 6px rgba(23, 19, 15, .04);
  --sh-lg: 0 18px 48px rgba(23, 19, 15, .12), 0 4px 12px rgba(23, 19, 15, .06);
  --sh-xl: 0 32px 80px rgba(23, 19, 15, .18);
  --sh-gold: 0 8px 28px rgba(176, 134, 60, .28);

  /* — Layout — */
  --container: 1320px;
  --container-narrow: 860px;
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --header-h: 74px;
  --announce-h: 38px;

  /* — Mouvement — */
  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-in-out: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .18s var(--e-out);
  --t-base: .32s var(--e-out);
  --t-slow: .6s var(--e-out);

  --z-header: 100;
  --z-tabbar: 90;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* — Motif zellige (khatim 8 branches) — */
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23B0863C' stroke-opacity='.22' stroke-width='1'%3E%3Crect x='12.5' y='12.5' width='23' height='23'/%3E%3Crect x='12.5' y='12.5' width='23' height='23' transform='rotate(45 24 24)'/%3E%3C/g%3E%3C/svg%3E");
  --motif-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23DDBD82' stroke-opacity='.16' stroke-width='1'%3E%3Crect x='12.5' y='12.5' width='23' height='23'/%3E%3Crect x='12.5' y='12.5' width='23' height='23' transform='rotate(45 24 24)'/%3E%3C/g%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink-soft);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100dvh;
}

body.is-locked { overflow: hidden; }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
::selection { background: var(--c-green); color: var(--c-gold-300); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   3. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, .display {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--c-ink);
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h5, h6 {
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-ink);
}

.ar { font-family: var(--f-arabic); direction: rtl; unicode-bidi: isolate; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-gold-600);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.eyebrow--center::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.eyebrow--light { color: var(--c-gold-300); }

.lede {
  font-size: var(--fs-lg);
  line-height: 1.68;
  color: var(--c-ink-soft);
}
.muted { color: var(--c-muted); }
.small { font-size: var(--fs-sm); }
.tiny  { font-size: var(--fs-2xs); }

.link-underline {
  position: relative;
  display: inline-block;
  font-weight: 500;
  padding-bottom: 2px;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform var(--t-base);
}
.link-underline:hover::after { transform-origin: left; transform: scaleX(0); }

/* Ornement — étoile à 8 branches */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  color: var(--c-gold);
}
.ornament::before, .ornament::after {
  content: "";
  height: 1px;
  width: clamp(40px, 12vw, 110px);
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: .5;
}
.ornament::after { background: linear-gradient(270deg, transparent, currentColor); }

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: 1600px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section--parchment { background: var(--c-parchment); }
.section--dark {
  background: var(--c-green);
  color: var(--c-green-200);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--c-cream); }
.section--dark .muted { color: #8AA79A; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
}
.section-head__text { max-width: 62ch; }
.section-head__text > * + * { margin-top: var(--s-3); }
.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.section-head--center .section-head__text { margin-inline: auto; }

/* Un enfant de grille refuse par défaut de descendre sous sa largeur min-content :
   une image cassée ou un mot long fait alors déborder toute la page.
   min-width:0 supprime définitivement cette classe de bug. */
.grid > *, .shop > *, .pdp > *, .gallery > *, .split > *, .cartpage > *,
.checkout > *, .wizard > *, .reviews > *, .contact-grid > *, .cats > *,
.lookbook > *, .footer__top > *, .co-grid > * { min-width: 0; }

.grid { display: grid; gap: var(--s-6); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }

.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-8); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: var(--s-4);
  z-index: 999;
  background: var(--c-green);
  color: var(--c-cream);
  padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid--2 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   5. MEDIA (images + repli élégant si l'image n'existe pas encore)
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: var(--c-parchment);
  isolation: isolate;
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--motif);
  background-size: 48px 48px;
  opacity: .9;
}
.media__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
  padding: var(--s-6);
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  color: var(--c-gold-600);
  letter-spacing: .01em;
}
.media__ph span {
  font-family: var(--f-body);
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-muted);
}
.media img {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--e-out), opacity var(--t-base);
}
/* Une fois la photo chargee, le repli n'a plus de raison d'etre affiche */
.media.is-loaded .media__ph { display: none; }
.media--1-1  { aspect-ratio: 1/1; }
.media--4-5  { aspect-ratio: 4/5; }
.media--3-4  { aspect-ratio: 3/4; }
.media--2-3  { aspect-ratio: 2/3; }
.media--16-9 { aspect-ratio: 16/9; }
.media--3-2  { aspect-ratio: 3/2; }
.media--4-3  { aspect-ratio: 4/3; }
.media--zoom:hover img { transform: scale(1.055); }

/* --------------------------------------------------------------------------
   6. BOUTONS
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--c-green);
  --btn-fg: var(--c-cream);
  --btn-bd: var(--c-green);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0 var(--s-6);
  height: 50px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .02em;
  border-radius: var(--r-full);
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-base),
              background-color var(--t-base), color var(--t-base), border-color var(--t-base);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); box-shadow: var(--sh-xs); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--gold { --btn-bg: var(--c-gold); --btn-bd: var(--c-gold); --btn-fg: #fff; }
.btn--gold:hover { box-shadow: var(--sh-gold); }
.btn--ink { --btn-bg: var(--c-ink); --btn-bd: var(--c-ink); --btn-fg: var(--c-cream); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-green); --btn-bd: var(--c-line-strong); }
.btn--outline:hover { --btn-bd: var(--c-green); --btn-bg: var(--c-green); --btn-fg: var(--c-cream); }
.btn--light { --btn-bg: var(--c-cream); --btn-fg: var(--c-green); --btn-bd: var(--c-cream); }
.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; --btn-bd: transparent; padding-inline: var(--s-3); }
.btn--ghost:hover { --btn-bg: rgba(23,19,15,.05); box-shadow: none; transform: none; }
.btn--wa { --btn-bg: #1FA855; --btn-bd: #1FA855; --btn-fg: #fff; }
.btn--wa:hover { --btn-bg: #178f47; --btn-bd: #178f47; }

.btn--lg { height: 58px; padding-inline: var(--s-8); font-size: var(--fs-md); }
.btn--sm { height: 40px; padding-inline: var(--s-4); font-size: var(--fs-xs); }

/* Un bouton pleine largeur doit pouvoir passer à la ligne :
   sinon un libellé long déborde de l'écran sur mobile. */
.btn--block {
  width: 100%;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  height: auto;
  min-height: 50px;
  padding-block: 12px;
}
.btn--block.btn--lg { min-height: 58px; }
.btn--block.btn--sm { min-height: 40px; padding-block: 8px; }
.btn[disabled], .btn.is-disabled {
  opacity: .45; pointer-events: none; cursor: not-allowed;
}
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0; margin: auto;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  color: var(--c-ink);
  transition: background-color var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: rgba(23,19,15,.055); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn__badge {
  position: absolute;
  top: 3px; right: 1px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: grid; place-items: center;
  background: var(--c-gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: var(--r-full);
  border: 2px solid var(--c-cream);
  transform: scale(0);
  transition: transform var(--t-base) var(--e-spring);
}
.icon-btn__badge.is-visible { transform: scale(1); }

/* --------------------------------------------------------------------------
   7. FORMULAIRES
   -------------------------------------------------------------------------- */
.field { display: block; }
.field + .field { margin-top: var(--s-5); }
.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-ink);
  margin-bottom: var(--s-2);
}
.field__label .req { color: var(--c-danger); }
.field__hint { font-size: var(--fs-2xs); color: var(--c-muted); margin-top: var(--s-2); }
.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-2xs);
  font-weight: 500;
  color: var(--c-danger);
  margin-top: var(--s-2);
}
.field.has-error .field__error { display: flex; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
  border-color: var(--c-danger);
  background: var(--c-danger-bg);
}

.input, .select, .textarea {
  width: 100%;
  height: 52px;
  padding: 0 var(--s-4);
  background: var(--c-white);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  color: var(--c-ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.textarea { height: auto; min-height: 116px; padding: var(--s-3) var(--s-4); resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: #A69A8B; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(28, 90, 74, .12);
  outline: none;
}
.select {
  appearance: none;
  padding-right: var(--s-10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C7062' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  cursor: pointer;
}
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group .btn { border-radius: 0 var(--r-sm) var(--r-sm) 0; height: 52px; }

/* Sur écran étroit, champ et bouton s'empilent : le champ reste utilisable */
@media (max-width: 480px) {
  .input-group { flex-direction: column; gap: var(--s-2); }
  .input-group .input { border-radius: var(--r-sm); }
  .input-group .btn { border-radius: var(--r-sm); width: 100%; }
}

.field--phone .input { padding-left: 62px; }
.field--phone { position: relative; }
.field--phone .prefix {
  position: absolute;
  left: 1px; bottom: 1px;
  height: 50px;
  display: grid; place-items: center;
  padding-inline: var(--s-4);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
  border-right: 1px solid var(--c-line);
  pointer-events: none;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  cursor: pointer;
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.check input {
  appearance: none;
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-xs);
  background: var(--c-white);
  transition: all var(--t-fast);
  cursor: pointer;
}
.check input:checked {
  background: var(--c-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
  border-color: var(--c-green);
}

/* Cartes-radio (livraison, paiement, options) */
.radio-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
}
.radio-card + .radio-card { margin-top: var(--s-3); }
.radio-card:hover { border-color: var(--c-line-strong); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card__dot {
  flex: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--c-line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all var(--t-fast);
}
.radio-card__dot::after {
  content: ""; width: 9px; height: 9px;
  border-radius: 50%; background: var(--c-white);
  transform: scale(0);
  transition: transform var(--t-base) var(--e-spring);
}
.radio-card__body { flex: 1; min-width: 0; }
.radio-card__title {
  display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap;
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink);
}
.radio-card__desc { font-size: var(--fs-2xs); color: var(--c-muted); margin-top: 2px; }
.radio-card__price { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.radio-card:has(input:checked) {
  border-color: var(--c-green);
  background: var(--c-green-50);
  box-shadow: 0 0 0 1px var(--c-green);
}
.radio-card:has(input:checked) .radio-card__dot { border-color: var(--c-green); background: var(--c-green); }
.radio-card:has(input:checked) .radio-card__dot::after { transform: scale(1); }
.radio-card:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   8. BADGES / PASTILLES / PUCES
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: var(--fs-3xs);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  border-radius: var(--r-full);
  background: var(--c-sand);
  color: var(--c-ink);
  white-space: nowrap;
}
.badge--gold { background: var(--c-gold); color: #fff; }
.badge--green { background: var(--c-green); color: var(--c-gold-300); }
.badge--sale { background: var(--c-terracotta); color: #fff; }
.badge--new { background: var(--c-ink); color: var(--c-cream); }
.badge--success { background: var(--c-success-bg); color: var(--c-success); }
.badge--warn { background: var(--c-warning-bg); color: var(--c-warning); }
.badge--outline { background: transparent; border: 1px solid var(--c-line-strong); color: var(--c-muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 38px;
  padding: 0 var(--s-4);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  background: var(--c-white);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-ink-soft);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.pill:hover { border-color: var(--c-green); color: var(--c-green); }
.pill.is-active { background: var(--c-green); border-color: var(--c-green); color: var(--c-cream); }

/* --------------------------------------------------------------------------
   9. PRIX & NOTES
   -------------------------------------------------------------------------- */
.price {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.price__now {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
}
.price__was {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.price__off {
  font-size: var(--fs-3xs);
  font-weight: 700;
  color: var(--c-terracotta);
  letter-spacing: .03em;
}
.price--lg .price__now { font-size: var(--fs-2xl); font-family: var(--f-display); font-weight: 600; }
.price--lg .price__was { font-size: var(--fs-md); }

.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--c-gold); }
.stars svg { width: 14px; height: 14px; }
.rating { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-2xs); color: var(--c-muted); }

/* --------------------------------------------------------------------------
   10. CARTE PRODUIT
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
}
.card__media {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-parchment);
}
.card__media .media { border-radius: inherit; }
.card__link { position: absolute; inset: 0; z-index: 5; }
.card__flags {
  position: absolute;
  top: var(--s-3); left: var(--s-3);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}
.card__wish {
  position: absolute;
  top: var(--s-2); right: var(--s-2);
  z-index: 7;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(251,248,242,.92);
  backdrop-filter: blur(6px);
  border-radius: var(--r-full);
  color: var(--c-ink-soft);
  opacity: 0;
  transform: translateY(-4px);
  transition: all var(--t-base);
}
.card__wish svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.card__wish:hover { color: var(--c-terracotta); }
.card__wish.is-active { opacity: 1; transform: none; color: var(--c-terracotta); }
.card__wish.is-active svg { fill: currentColor; }
.card:hover .card__wish, .card:focus-within .card__wish { opacity: 1; transform: none; }

.card__quick {
  position: absolute;
  left: var(--s-3); right: var(--s-3); bottom: var(--s-3);
  z-index: 7;
  height: 44px;
  display: flex; align-items: center; justify-content: center; gap: var(--s-2);
  background: var(--c-ink);
  color: var(--c-cream);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--t-base);
}
.card__quick svg { width: 16px; height: 16px; }
.card__quick:hover { background: var(--c-green); }
.card:hover .card__quick, .card:focus-within .card__quick { opacity: 1; transform: none; }

.card__body { padding-top: var(--s-4); display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card__cat {
  font-size: var(--fs-3xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--c-muted);
}
.card__title {
  font-family: var(--f-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.24;
  color: var(--c-ink);
  letter-spacing: -.01em;
}
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: 6px; }
.card__swatches { display: flex; gap: 5px; }
.card__swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(23,19,15,.18);
  box-shadow: inset 0 0 0 1.5px var(--c-cream);
}
.card__note { font-size: var(--fs-2xs); color: var(--c-muted); display: flex; align-items: center; gap: 4px; }
.card__note svg { width: 13px; height: 13px; color: var(--c-gold); }

.card--dark .card__title { color: var(--c-cream); }
.card--dark .card__cat, .card--dark .card__note { color: #8AA79A; }
.card--dark .price__now { color: var(--c-cream); }

@media (hover: none) {
  .card__quick { opacity: 1; transform: none; }
  .card__wish { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   11. EN-TÊTE
   -------------------------------------------------------------------------- */
.announce {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  height: var(--announce-h);
  background: var(--c-green);
  color: var(--c-gold-300);
  overflow: hidden;
}
.announce__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.announce__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: .06em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--e-out), transform .5s var(--e-out);
  padding-inline: var(--s-8);
  text-align: center;
}
.announce__item.is-active { opacity: 1; transform: none; }
.announce__item svg { width: 15px; height: 15px; flex: none; }
.announce__item strong { color: var(--c-cream); font-weight: 600; }

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(251, 248, 242, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), background-color var(--t-base), box-shadow var(--t-base);
}
.header.is-stuck {
  border-bottom-color: var(--c-line);
  box-shadow: 0 1px 24px rgba(23,19,15,.05);
}
.header__inner {
  position: relative;          /* repère de positionnement des méga-menus */
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-4);
}
.header__left, .header__right { display: flex; align-items: center; gap: 2px; }
.header__right { justify-content: flex-end; }
.header__burger { display: none; }

.brand { display: inline-flex; align-items: center; gap: var(--s-3); }
.brand__mark { width: 38px; height: 38px; flex: none; color: var(--c-gold); }
.brand__text { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.brand__name {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--c-green);
  white-space: nowrap;
}
.brand__ar {
  font-family: var(--f-arabic);
  font-size: .82rem;
  color: var(--c-gold-600);
  letter-spacing: 0;
  direction: rtl;
  white-space: nowrap;
}

/* Navigation principale */
/* Les onglets occupent toute la hauteur de l'en-tête : sans cela, le curseur
   traverse une zone morte entre le lien et le panneau, qui se referme. */
.nav { display: flex; align-items: center; gap: 2px; height: var(--header-h); }
/* Les méga-menus se positionnent sur .header__inner (le conteneur de page)
   et non sur l'onglet survolé : sinon les premiers onglets ouvrent un panneau
   qui sort de l'écran par la gauche. */
.nav__item { position: static; display: flex; align-items: center; height: 100%; }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-ink);
  border-radius: var(--r-sm);
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: var(--s-3); right: var(--s-3);
  bottom: 6px;
  height: 1px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base);
}
.nav__item:hover > .nav__link, .nav__link.is-current { color: var(--c-green); }
.nav__item:hover > .nav__link::after, .nav__link.is-current::after { transform: scaleX(1); }
.nav__link .chev { width: 13px; height: 13px; opacity: .5; transition: transform var(--t-fast); }
.nav__item:hover .chev { transform: rotate(180deg); }
.nav__link--accent { color: var(--c-terracotta) !important; font-weight: 600; }

/* Méga-menu */
.mega {
  position: absolute;
  top: calc(100% + 6px);
  left: var(--gutter);
  width: min(960px, calc(100% - var(--gutter) * 2));
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: var(--s-8);
  display: grid;
  grid-template-columns: 1fr 1fr 300px;
  gap: var(--s-8);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}
/* Passerelle invisible : le curseur peut descendre du lien au panneau
   sans que le survol soit interrompu. */
.mega::before {
  content: "";
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}
.nav__item:hover .mega, .nav__item:focus-within .mega {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
}
.mega__title {
  font-size: var(--fs-3xs);
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--c-gold-600);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--c-line);
}
.mega__list li + li { margin-top: 1px; }
.mega__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 8px 10px;
  margin-inline: -10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  transition: all var(--t-fast);
}
.mega__list a:hover { background: var(--c-parchment); color: var(--c-green); padding-left: 14px; }
.mega__list a .count { font-size: var(--fs-3xs); color: var(--c-muted); }
.mega__feature {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
}
.mega__feature .media { position: absolute; inset: 0; }
.mega__feature-body {
  position: relative;
  z-index: 3;
  padding: var(--s-10) var(--s-5) var(--s-5);
  width: 100%;
  /* Voile assez dense pour que le texte reste lisible quelle que soit la photo */
  background: linear-gradient(0deg,
    rgba(10,32,26,.96) 0%,
    rgba(10,32,26,.88) 42%,
    rgba(10,32,26,.55) 72%,
    rgba(10,32,26,0) 100%);
  color: var(--c-cream);
}
.mega__feature-body h4 {
  color: var(--c-cream);
  font-size: var(--fs-lg);
  text-shadow: 0 1px 8px rgba(10,32,26,.5);
}
.mega__feature-body p {
  font-size: var(--fs-2xs);
  color: rgba(251,248,242,.86);
  margin-top: 5px;
  line-height: 1.5;
}
.mega__feature-body .btn { margin-top: var(--s-4); }

/* --------------------------------------------------------------------------
   12. RECHERCHE (overlay)
   -------------------------------------------------------------------------- */
.search {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.search.is-open { opacity: 1; visibility: visible; }
.search__scrim { position: absolute; inset: 0; background: rgba(23,19,15,.42); backdrop-filter: blur(3px); }
.search__panel {
  position: relative;
  background: var(--c-cream);
  border-bottom: 1px solid var(--c-line);
  max-height: 88dvh;
  overflow-y: auto;
  transform: translateY(-16px);
  transition: transform var(--t-base);
  box-shadow: var(--sh-lg);
}
.search.is-open .search__panel { transform: none; }
.search__bar { display: flex; align-items: center; gap: var(--s-3); padding-block: var(--s-5); }
.search__bar svg { width: 22px; height: 22px; color: var(--c-muted); flex: none; }
.search__input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 500;
  color: var(--c-ink);
  min-width: 0;
}
.search__input::placeholder { color: #B6AA99; }
.search__close { flex: none; }
.search__body { padding-bottom: var(--s-8); border-top: 1px solid var(--c-line); padding-top: var(--s-6); }
.search__section + .search__section { margin-top: var(--s-6); }
.search__label {
  font-size: var(--fs-3xs); font-weight: 700; letter-spacing: var(--ls-widest);
  text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--s-3);
}
.search__results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px,100%), 1fr)); gap: var(--s-5); }
.search__row {
  display: flex; align-items: center; gap: var(--s-4);
  padding: var(--s-2); border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.search__row:hover { background: var(--c-parchment); }
.search__row .media { width: 64px; height: 80px; flex: none; border-radius: var(--r-xs); }
.search__row-body { min-width: 0; }
.search__row-title { font-family: var(--f-display); font-size: var(--fs-md); font-weight: 600; color: var(--c-ink); }
.search__empty { padding: var(--s-8) 0; text-align: center; color: var(--c-muted); }

/* --------------------------------------------------------------------------
   13. TIROIRS (panier / menu mobile / filtres)
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  visibility: hidden;
  transition: visibility var(--t-base);
}
.drawer.is-open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(23,19,15,.45);
  opacity: 0;
  transition: opacity var(--t-base);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: min(440px, 100%);
  background: var(--c-cream);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .38s var(--e-out);
  box-shadow: var(--sh-xl);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer--left .drawer__panel { right: auto; left: 0; transform: translateX(-100%); width: min(400px, 92%); }
.drawer--left.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--c-line);
  flex: none;
}
.drawer__title {
  font-family: var(--f-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--c-ink);
  display: flex; align-items: center; gap: var(--s-2);
}
.drawer__title .count { font-family: var(--f-body); font-size: var(--fs-2xs); color: var(--c-muted); font-weight: 500; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--s-5); }
.drawer__foot { flex: none; border-top: 1px solid var(--c-line); padding: var(--s-5); background: var(--c-parchment); }

/* Menu mobile */
.mnav__group + .mnav__group { margin-top: var(--s-2); border-top: 1px solid var(--c-line); padding-top: var(--s-2); }
.mnav__link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  width: 100%;
  padding: var(--s-4) var(--s-2);
  font-family: var(--f-display);
  font-size: var(--fs-xl);
  font-weight: 500;
  color: var(--c-ink);
  text-align: left;
}
.mnav__link svg { width: 18px; height: 18px; color: var(--c-muted); transition: transform var(--t-base); }
.mnav__link[aria-expanded="true"] svg { transform: rotate(90deg); color: var(--c-gold); }
.mnav__sub { display: none; padding: 0 var(--s-2) var(--s-4); }
.mnav__sub.is-open { display: block; animation: fadeInUp .3s var(--e-out); }
.mnav__sub a {
  display: block;
  padding: 9px 0 9px var(--s-4);
  font-size: var(--fs-sm);
  color: var(--c-ink-soft);
  border-left: 1px solid var(--c-line);
}
.mnav__sub a:hover { color: var(--c-green); border-color: var(--c-gold); }

/* --------------------------------------------------------------------------
   14. LIGNE PANIER
   -------------------------------------------------------------------------- */
.line { display: flex; gap: var(--s-4); padding-block: var(--s-4); }
.line + .line { border-top: 1px solid var(--c-line); }
.line__media { width: 88px; flex: none; border-radius: var(--r-sm); overflow: hidden; }
.line__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.line__top { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; }
.line__title { font-family: var(--f-display); font-size: var(--fs-md); font-weight: 600; color: var(--c-ink); line-height: 1.25; }
.line__variant { font-size: var(--fs-2xs); color: var(--c-muted); }
.line__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-2); }
.line__remove { font-size: var(--fs-2xs); color: var(--c-muted); text-decoration: underline; text-underline-offset: 3px; }
.line__remove:hover { color: var(--c-danger); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  background: var(--c-white);
  height: 38px;
  overflow: hidden;
}
.qty button {
  width: 36px; height: 100%;
  display: grid; place-items: center;
  color: var(--c-ink-soft);
  transition: background var(--t-fast);
}
.qty button:hover { background: var(--c-parchment); color: var(--c-green); }
.qty button[disabled] { opacity: .35; pointer-events: none; }
.qty svg { width: 14px; height: 14px; }
.qty input {
  width: 34px;
  height: 100%;
  border: 0;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: transparent;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--lg { height: 50px; }
.qty--lg button { width: 46px; }
.qty--lg input { width: 42px; font-size: var(--fs-md); }

/* Barre de progression livraison offerte */
.shipbar { background: var(--c-green-50); border: 1px solid #D8E6E0; border-radius: var(--r-md); padding: var(--s-4); }
.shipbar__text { font-size: var(--fs-xs); color: var(--c-ink-soft); display: flex; align-items: center; gap: 7px; }
.shipbar__text svg { width: 16px; height: 16px; color: var(--c-green-500); flex: none; }
.shipbar__text strong { color: var(--c-green); font-weight: 700; }
.shipbar__track { height: 6px; background: #D8E6E0; border-radius: var(--r-full); margin-top: var(--s-3); overflow: hidden; }
.shipbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-green-500), var(--c-gold));
  border-radius: var(--r-full);
  width: 0;
  transition: width .6s var(--e-out);
}
.shipbar.is-complete { background: var(--c-success-bg); border-color: #C5E4D2; }

/* --------------------------------------------------------------------------
   15. NOTIFICATIONS (toasts)
   -------------------------------------------------------------------------- */
.toasts {
  position: fixed;
  bottom: var(--s-5); right: var(--s-5);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  pointer-events: none;
  max-width: min(380px, calc(100vw - 2rem));
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--c-ink);
  color: var(--c-cream);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: var(--fs-sm);
  pointer-events: auto;
  animation: toastIn .4s var(--e-spring);
}
.toast.is-out { animation: toastOut .3s var(--e-in-out) forwards; }
.toast__icon {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: var(--c-gold-300);
}
.toast__icon svg { width: 16px; height: 16px; }
.toast--success .toast__icon { background: rgba(46,182,116,.18); color: #6EE7A8; }
.toast--error .toast__icon { background: rgba(224,90,80,.2); color: #FF9B93; }
.toast__body { flex: 1; min-width: 0; }
.toast__body strong { display: block; font-weight: 600; }
.toast__body span { font-size: var(--fs-2xs); color: rgba(251,248,242,.66); }
.toast a { color: var(--c-gold-300); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; font-size: var(--fs-xs); }

@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }

/* --------------------------------------------------------------------------
   16. MODALE
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--s-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__scrim { position: absolute; inset: 0; background: rgba(23,19,15,.55); backdrop-filter: blur(4px); }
.modal__panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--c-cream);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  transform: translateY(20px) scale(.98);
  transition: transform var(--t-base);
}
.modal.is-open .modal__panel { transform: none; }
.modal__panel--wide { width: min(920px, 100%); }
.modal__close {
  position: absolute;
  top: var(--s-3); right: var(--s-3);
  z-index: 5;
  background: rgba(251,248,242,.9);
  backdrop-filter: blur(6px);
}
.modal__head { padding: var(--s-6) var(--s-6) var(--s-4); border-bottom: 1px solid var(--c-line); }
.modal__body { padding: var(--s-6); }

/* --------------------------------------------------------------------------
   17. ACCORDÉON
   -------------------------------------------------------------------------- */
.acc__item { border-bottom: 1px solid var(--c-line); }
.acc__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  text-align: left;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--c-ink);
  transition: color var(--t-fast);
}
.acc__btn:hover { color: var(--c-green); }
.acc__icon { position: relative; flex: none; width: 16px; height: 16px; }
.acc__icon::before, .acc__icon::after {
  content: ""; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}
.acc__icon::before { top: 50%; left: 0; width: 16px; height: 1.5px; transform: translateY(-50%); }
.acc__icon::after { left: 50%; top: 0; width: 1.5px; height: 16px; transform: translateX(-50%); }
.acc__btn[aria-expanded="true"] .acc__icon::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--e-out); }
.acc__panel > div { overflow: hidden; }
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__content { padding-bottom: var(--s-5); font-size: var(--fs-sm); line-height: 1.72; color: var(--c-ink-soft); }
.acc__content ul { list-style: none; display: grid; gap: 8px; margin-top: var(--s-3); }
.acc__content li { display: flex; gap: 10px; }
.acc__content li::before { content: "◆"; color: var(--c-gold); font-size: 9px; line-height: 1.9; flex: none; }

/* --------------------------------------------------------------------------
   18. FIL D'ARIANE
   -------------------------------------------------------------------------- */
.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: var(--fs-2xs);
  color: var(--c-muted);
  padding-block: var(--s-5);
}
.crumbs a:hover { color: var(--c-green); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li { display: flex; align-items: center; gap: 7px; }
.crumbs li + li::before { content: "/"; opacity: .45; }
.crumbs [aria-current] { color: var(--c-ink); font-weight: 500; }

/* --------------------------------------------------------------------------
   19. CARROUSEL
   -------------------------------------------------------------------------- */
.carousel { position: relative; }
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(258px, 1fr);
  gap: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
/* Largeur de colonne FIXE : avec minmax(0, …) les colonnes s'écrasent
   pour faire tenir toutes les cartes dans la largeur visible. */
@media (min-width: 1024px) {
  .carousel__track {
    grid-auto-columns: calc((100% - var(--s-5) * 2) / 3);
    margin-inline: 0;
    padding-inline: 0;
  }
  /* Variante 3 colonnes — textes longs (avis clients) */
  .carousel__track--3 { grid-auto-columns: calc((100% - var(--s-6) * 2) / 3); }
}
/* Au-delà, la place permet une quatrième carte sans les tasser.
   Les avis restent sur 3 colonnes : un témoignage a besoin de largeur. */
@media (min-width: 1200px) {
  .carousel__track { grid-auto-columns: calc((100% - var(--s-5) * 3) / 4); }
  .carousel__track--3 { grid-auto-columns: calc((100% - var(--s-6) * 2) / 3); }
}
.carousel__nav { display: flex; gap: var(--s-2); }
.carousel__btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--c-line-strong);
  border-radius: 50%;
  color: var(--c-ink);
  background: var(--c-white);
  transition: all var(--t-fast);
}
.carousel__btn:hover:not([disabled]) { background: var(--c-green); border-color: var(--c-green); color: var(--c-cream); }
.carousel__btn[disabled] { opacity: .3; cursor: default; }
.carousel__btn svg { width: 17px; height: 17px; }
@media (max-width: 767px) { .carousel__nav { display: none; } }

/* --------------------------------------------------------------------------
   20. BANDEAU DE CONFIANCE
   -------------------------------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--c-line);
  border-block: 1px solid var(--c-line);
}
.trust__item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-4);
  background: var(--c-cream);
}
.trust__icon {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--c-gold-50);
  color: var(--c-gold-600);
}
.trust__icon svg { width: 21px; height: 21px; }
.trust__t { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); line-height: 1.3; }
.trust__d { font-size: var(--fs-2xs); color: var(--c-muted); margin-top: 2px; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) {
  .trust__item { flex-direction: column; text-align: center; gap: var(--s-2); padding: var(--s-4) var(--s-2); }
}

/* --------------------------------------------------------------------------
   21. PIED DE PAGE
   -------------------------------------------------------------------------- */
.footer {
  background: var(--c-green);
  color: var(--c-green-200);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--motif-light);
  background-size: 48px 48px;
  opacity: .55;
  pointer-events: none;
}
.footer > * { position: relative; z-index: 2; }

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) 1.5fr;
  gap: var(--s-8);
  padding-block: clamp(3rem, 6vw, 5rem);
}
.footer__brand .brand__name { color: var(--c-cream); }
.footer__brand .brand__ar { color: var(--c-gold-300); }
.footer__brand p { font-size: var(--fs-sm); line-height: 1.7; margin-top: var(--s-4); max-width: 34ch; }
.footer__col h5,
.footer__news h5 { color: var(--c-gold-300); margin-bottom: var(--s-4); font-size: var(--fs-3xs); letter-spacing: var(--ls-widest); }
.footer__col li + li { margin-top: 9px; }
.footer__col a {
  font-size: var(--fs-sm);
  color: var(--c-green-200);
  transition: color var(--t-fast), padding-left var(--t-fast);
  display: inline-block;
}
.footer__col a:hover { color: var(--c-cream); padding-left: 5px; }

.footer__news p { font-size: var(--fs-sm); line-height: 1.65; margin-bottom: var(--s-4); }
.footer__news .input {
  background: rgba(255,255,255,.06);
  border-color: rgba(221,189,130,.28);
  color: var(--c-cream);
}
.footer__news .input::placeholder { color: rgba(157,189,176,.7); }
.footer__news .input:focus { border-color: var(--c-gold-300); box-shadow: 0 0 0 3px rgba(221,189,130,.14); }

.footer__contact { margin-top: var(--s-6); display: grid; gap: 10px; }
.footer__contact a, .footer__contact div {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: var(--fs-sm); color: var(--c-green-200);
}
.footer__contact svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c-gold-300); }
.footer__contact a:hover { color: var(--c-cream); }

.footer__socials { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.footer__socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(221,189,130,.26);
  border-radius: 50%;
  color: var(--c-gold-300);
  transition: all var(--t-fast);
}
.footer__socials a:hover { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-green); transform: translateY(-2px); }
.footer__socials svg { width: 17px; height: 17px; }

.footer__bottom {
  border-top: 1px solid rgba(221,189,130,.16);
  padding-block: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  font-size: var(--fs-2xs);
}
.footer__legal { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.footer__legal a:hover { color: var(--c-cream); }
.footer__pay { display: flex; align-items: center; gap: var(--s-2); }
.footer__pay span {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  border: 1px solid rgba(221,189,130,.24);
  border-radius: var(--r-xs);
  font-size: var(--fs-3xs);
  font-weight: 600;
  color: var(--c-gold-300);
}
.footer__pay svg { width: 15px; height: 15px; }

@media (max-width: 1080px) {
  .footer__top { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: span 3; }
  .footer__news { grid-column: span 3; }
}
@media (max-width: 640px) {
  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
  .footer__brand, .footer__news { grid-column: span 2; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* --------------------------------------------------------------------------
   22. BARRE D'ONGLETS MOBILE + BOUTON WHATSAPP
   -------------------------------------------------------------------------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-tabbar);
  display: none;
  background: rgba(251,248,242,.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 20px rgba(23,19,15,.05);
}
.tabbar__inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.tabbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 2px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--c-muted);
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 21px; height: 21px; stroke-width: 1.6; }
.tabbar a.is-current { color: var(--c-green); }
.tabbar a.is-current::before {
  content: ""; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 2px; background: var(--c-gold); border-radius: 0 0 3px 3px;
}
.tabbar__badge {
  position: absolute;
  top: 5px; left: 50%; margin-left: 5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center;
  background: var(--c-gold); color: #fff;
  font-size: 9px; font-weight: 700;
  border-radius: var(--r-full);
  transform: scale(0);
  transition: transform var(--t-base) var(--e-spring);
}
.tabbar__badge.is-visible { transform: scale(1); }

.wa-float {
  position: fixed;
  right: var(--s-5); bottom: var(--s-5);
  z-index: var(--z-tabbar);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  height: 54px;
  padding: 0 var(--s-5) 0 var(--s-4);
  background: #1FA855;
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(31,168,85,.36);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(31,168,85,.44); }
.wa-float svg { width: 24px; height: 24px; flex: none; }
.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid #1FA855;
  animation: pulse 2.6s var(--e-out) infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .7; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   23. RESPONSIVE — HEADER
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .header__burger { display: inline-grid; }
  .header__inner { grid-template-columns: 1fr auto 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  /* Sur petit écran, un libellé long passe à la ligne plutôt que de déborder */
  .btn { white-space: normal; text-align: center; line-height: 1.3; max-width: 100%;
         height: auto; min-height: 50px; padding-block: 12px; }
  .btn--lg { min-height: 58px; }
  .btn--sm { min-height: 40px; padding-block: 8px; }
  /* La marque est centrée entre le burger et les actions, sans les repousser */
  .header__inner { grid-template-columns: auto 1fr auto; gap: var(--s-1); }
  .brand { justify-self: center; min-width: 0; }
  .brand__text { min-width: 0; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: .88rem; letter-spacing: .06em; }
  .brand__ar { font-size: .7rem; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 19px; height: 19px; }
  /* Les favoris restent accessibles depuis le menu et la page dédiée */
  .icon-btn--fav { display: none; }
  .tabbar { display: block; }
  body { padding-bottom: 62px; }
  .wa-float { display: none; }
  .toasts { bottom: 74px; right: var(--s-3); left: var(--s-3); max-width: none; }
}

@media (max-width: 400px) {
  .brand__mark { width: 28px; height: 28px; }
  .brand__name { font-size: .78rem; letter-spacing: .03em; }
  .brand__ar { font-size: .64rem; }
  .brand { gap: var(--s-2); }
}

/* --------------------------------------------------------------------------
   24. ANIMATIONS D'APPARITION
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--e-out), transform .8s var(--e-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.skeleton {
  background: linear-gradient(90deg, var(--c-parchment) 25%, var(--c-sand) 50%, var(--c-parchment) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* --------------------------------------------------------------------------
   25. UTILITAIRES
   -------------------------------------------------------------------------- */
.divider { height: 1px; background: var(--c-line); border: 0; }
.card-surface {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.note {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  line-height: 1.6;
  background: var(--c-gold-50);
  border: 1px solid #EFE0C4;
  color: var(--c-ink-soft);
}
.note svg { width: 18px; height: 18px; flex: none; color: var(--c-gold-600); margin-top: 1px; }
.note--green { background: var(--c-green-50); border-color: #D8E6E0; }
.note--green svg { color: var(--c-green-500); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }
