/* ==========================================================================
   Fatme Shop : design system
   1. Variables (clair / sombre)   2. Base   3. Composants   4. Vitrine
   Le back-office ajoute admin.css.
   ========================================================================== */

:root {
  /* Identité Fatme Shop : encre, or et sable (démo boutique vêtements) */
  --gold: #a9824f;
  --gold-soft: #d6c3a4;
  --gold-ink: #8a673a;
  --sand: #ede4d7;
  /* Alias historiques du design system, remappés sur l'identité */
  --forest: #151412;
  --forest-deep: #050504;
  --forest-mid: var(--gold);
  --sage: var(--gold-soft);
  --cocoa: #2b2925;
  --cocoa-deep: #151412;
  --amber: #c9a46f;
  --amber-deep: var(--gold);
  --amber-gradient: linear-gradient(135deg, #c9a46f, #a9824f);
  --brass: var(--gold);
  --whatsapp: #1f7a4d;
  --whatsapp-deep: #17633d;

  /* Thème clair : papier chaud, encre profonde */
  --bg: #f7f3ed;
  --bg-alt: #ede4d7;
  --surface: #fffdf9;
  --surface-2: #faf6ef;
  --glass: rgba(247, 243, 237, .82);
  --ink: #151412;
  --ink-soft: #2b2925;
  --muted: #6f695f;
  --line: rgba(21, 20, 18, .1);
  --line-strong: rgba(21, 20, 18, .2);
  --accent: var(--gold-ink);
  --accent-soft: #f1e8da;
  --accent-ink: #5e4524;
  --primary: #151412;
  --primary-hover: #2b2925;
  --on-primary: #ffffff;
  --cream: #f4ede2;
  --danger: #b3261e;
  --danger-soft: #fbeceb;
  --success: #1e6b2f;
  --success-soft: #e6f1e7;
  --warning: #7a5600;
  --warning-soft: #fff4d6;
  --focus: var(--gold);
  --overlay: rgba(21, 20, 18, .45);
  --skeleton: linear-gradient(90deg, #ede4d7 0%, #f7f3ed 50%, #ede4d7 100%);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-xs: 0 1px 2px rgba(52, 38, 22, .06);
  --shadow-soft: 0 14px 34px -18px rgba(52, 38, 22, .28);
  --shadow: 0 30px 60px -30px rgba(52, 38, 22, .35);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
  --tap: 44px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --header-h: 72px;

  color-scheme: light;
}

/* Thème sombre : noir chaud et or, contrastes AA */
:root[data-theme="dark"] {
  --bg: #12110f;
  --bg-alt: #191714;
  --surface: #1d1b18;
  --surface-2: #24211d;
  --glass: rgba(18, 17, 15, .78);
  --ink: #f3ede4;
  --ink-soft: #d9d1c5;
  --muted: #a8a093;
  --line: rgba(243, 237, 228, .09);
  --line-strong: rgba(243, 237, 228, .2);
  --accent: #d4b585;
  --accent-soft: rgba(212, 181, 133, .12);
  --accent-ink: #ead8bb;
  --primary: #f3ede4;
  --primary-hover: #ffffff;
  --on-primary: #151412;
  --cream: #24211d;
  --danger: #f2a39d;
  --danger-soft: rgba(242, 163, 157, .12);
  --success: #9fd5a8;
  --success-soft: rgba(159, 213, 168, .12);
  --warning: #f5cf6b;
  --warning-soft: rgba(245, 207, 107, .12);
  --focus: #d4b585;
  --overlay: rgba(0, 0, 0, .6);
  --skeleton: linear-gradient(90deg, #1d1b18 0%, #26231f 50%, #1d1b18 100%);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
  --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 30px 60px -30px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip; /* filet final, n'empêche pas position: sticky */
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; } /* l'attribut hidden l'emporte toujours sur les règles d'affichage */
picture { display: block; }
picture > img { width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.1; overflow-wrap: break-word; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.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; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: calc(12px + var(--safe-top)); }

/* ---------- Typographie ---------- */
body { transition: background-color .35s var(--ease), color .35s var(--ease); }
h1 em, h2 em, h3 em { color: var(--accent); font-style: italic; font-weight: 500; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 16px; color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.75; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---------- Logos selon le thème ---------- */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em; line-height: 1.2;
  text-align: center; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .fa-arrow-right { transition: transform .3s var(--ease); }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
.btn-sm { min-height: var(--tap); padding: 0 18px; font-size: 13px; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 15px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-deep); }
.btn-danger { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .btn-danger { color: #2a0b08; }
.btn-danger:hover { filter: brightness(.92); }
.btn-cacao { background: var(--amber-gradient); color: var(--cocoa-deep); }
.btn-cacao:hover { filter: brightness(1.04); box-shadow: 0 12px 30px -14px rgba(255, 159, 10, .7); }
.btn-light { background: #fff; color: var(--forest-deep); }
.btn-light:hover { background: #f1ecdf; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 2px solid currentColor; border-radius: 50%; border-right-color: transparent;
  color: var(--on-primary); animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap); height: var(--tap);
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  font-size: 16px; text-decoration: none; cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }

/* Sélecteur de thème : l'icône suit le thème actif */
.theme-toggle .fa-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

/* ---------- Formulaires ---------- */
.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: 1 / -1; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.field-hint { margin: 0; color: var(--muted); font-size: 12px; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 13px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-size: 16px; /* évite le zoom automatique d'iOS */
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.input-icon { position: relative; }
.input-icon > i { position: absolute; top: 50%; left: 17px; color: var(--muted); font-size: 14px; transform: translateY(-50%); pointer-events: none; }
.input-icon > .input { padding-left: 44px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field-error { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--danger); font-size: 12px; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 10px 0; cursor: pointer; font-size: 14px; }
.check input {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--line-strong); border-radius: 7px; background: var(--surface);
  display: grid; place-items: center; cursor: pointer; transition: all .2s var(--ease);
}
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--ease); }
.check input:checked { border-color: var(--primary); background: var(--primary); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-strong); transition: background-color .25s var(--ease); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform .25s var(--ease); }
.switch input:checked + .switch-track { background: var(--forest-mid); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Cartes ---------- */
.card {
  min-width: 0; padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-xs);
}
.card-elevated { box-shadow: var(--shadow-soft); }
.card-glass { background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card h2, .card-title { margin: 0; font-size: 24px; }
.card > .card-title { margin-bottom: 18px; }
.stack { display: grid; gap: 16px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-soft);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; white-space: nowrap;
}
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-new { background: var(--forest); color: #fff; }
.badge-promo { background: var(--amber-gradient); color: var(--cocoa-deep); }
.badge-glass { background: rgba(255, 255, 255, .9); color: var(--forest-deep); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ---------- Alertes ---------- */
.flash {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; line-height: 1.5;
}
.flash i { margin-top: 3px; }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-success { background: var(--success-soft); color: var(--success); }
.flash-info { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Superposition, modal, panneaux ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.overlay.is-open { opacity: 1; }
.overlay[hidden], .modal-wrap[hidden], .drawer[hidden] { display: none; }

.modal-wrap {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  overscroll-behavior: contain;
}
.modal {
  width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 28px calc(22px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(22px + var(--safe-left));
  border: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--glass); color: var(--ink);
  -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: var(--shadow);
  transform: translateY(100%); transition: transform .38s var(--ease);
}
.modal::before { content: ""; display: block; width: 40px; height: 5px; margin: -14px auto 18px; border-radius: 999px; background: var(--line-strong); }
.modal-wrap.is-open .modal { transform: none; }
.modal-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px;
}
.modal-icon.is-danger { background: var(--danger-soft); color: var(--danger); }
.modal-title { margin: 0 0 8px; font-size: 30px; text-align: center; }
.modal-text { margin: 0 0 24px; color: var(--muted); font-size: 15px; text-align: center; }
.modal-text strong { color: var(--ink); }
.modal-actions { display: flex; flex-direction: column-reverse; gap: 10px; }
.modal-actions .btn { width: 100%; }
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 24px; }
  .modal { width: min(480px, 100%); padding: 34px; border-radius: var(--radius-lg); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .3s var(--ease); }
  .modal::before { display: none; }
  .modal-wrap.is-open .modal { opacity: 1; }
  .modal-actions { flex-direction: row; justify-content: center; }
  .modal-actions .btn { width: auto; min-width: 140px; }
}

/* Tiroir latéral (menu mobile, panier, sidebar admin) */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 90;
  display: flex; flex-direction: column;
  width: min(380px, 88%); max-width: 100%;
  padding: calc(18px + var(--safe-top)) 20px calc(18px + var(--safe-bottom)) calc(20px + var(--safe-left));
  background: var(--bg); color: var(--ink);
  box-shadow: var(--shadow);
  overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); transition: transform .38s var(--ease);
}
.drawer.drawer-right { right: 0; left: auto; padding-right: calc(20px + var(--safe-right)); padding-left: 20px; transform: translateX(100%); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(440px, calc(100% - 24px - var(--safe-left) - var(--safe-right)));
  transform: translateX(-50%); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 12px 12px 18px; border-radius: 18px;
  background: #17201a; color: #f4f1ea;
  font-size: 14px; box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in .35s var(--ease) both;
}
:root[data-theme="dark"] .toast { background: #ece6d6; color: #0e1a0b; }
.toast.is-leaving { animation: toast-out .3s var(--ease) both; }
.toast > i { flex: none; font-size: 16px; }
.toast-success > i { color: #8fd19e; }
.toast-error > i { color: #f2a39d; }
.toast-info > i { color: #cfe6c2; }
:root[data-theme="dark"] .toast-success > i { color: var(--forest-mid); }
:root[data-theme="dark"] .toast-error > i { color: #b3261e; }
:root[data-theme="dark"] .toast-info > i { color: var(--forest); }
.toast-message { flex: 1; min-width: 0; }
.toast-action, .toast-close {
  flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
:root[data-theme="dark"] .toast-action, :root[data-theme="dark"] .toast-close { background: rgba(0, 0, 0, .08); }
.toast-close { display: grid; place-items: center; width: 36px; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ---------- Tableau : vrai tableau au-dessus de 768 px, cartes empilées en dessous ---------- */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.data-table caption { margin-bottom: 12px; text-align: left; font-weight: 700; }
.data-table thead { display: none; }
.data-table tr {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
  margin-bottom: 10px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.data-table td { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 0; text-align: right; }
.data-table td::before { flex: none; text-align: left; }
.data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; }
.data-table td.cell-main { padding-bottom: 6px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 20px; font-weight: 600; text-align: left; }
.data-table td.cell-main::before, .data-table td.cell-actions::before { display: none; }
.data-table td.cell-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .data-table thead { display: table-header-group; }
  .data-table tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
  .data-table th, .data-table td { display: table-cell; padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
  .data-table th { background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
  .data-table td::before { display: none; }
  .data-table tbody tr { transition: background-color .2s; }
  .data-table tbody tr:hover { background: var(--surface-2); }
  .data-table tbody tr:last-child td { border-bottom: 0; }
  .data-table td.cell-actions { padding-top: 14px; border-top: 0; text-align: right; white-space: nowrap; }
  .data-table td.cell-main { padding-bottom: 14px; border-bottom: 1px solid var(--line); font-family: var(--font-ui); font-size: 14px; font-weight: 700; }
  .data-table td { text-align: left; }
  .data-table td.num { text-align: right; }
  .data-table td.cell-actions > * + * { margin-left: 6px; }
  .data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
}

/* ---------- Chargement ---------- */
.skeleton {
  display: block; min-height: 14px; border-radius: var(--radius-xs);
  background: var(--skeleton); background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-media { aspect-ratio: 4 / 5; border-radius: var(--radius); }
.skeleton-line { height: 14px; margin-top: 10px; }
.skeleton-line.short { width: 55%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Page de connexion ---------- */
.auth-page {
  position: relative; display: grid; place-items: center;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(24px + var(--safe-top)) calc(16px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(16px + var(--safe-left));
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 100%, color-mix(in srgb, var(--amber-deep) 8%, transparent), transparent 70%),
    var(--bg);
}
.auth-card { width: min(440px, 100%); padding: clamp(28px, 6vw, 44px); border-radius: var(--radius-lg); }
.auth-logo { width: 104px; margin: 0 auto 20px; }
.auth-card h1 { margin-bottom: 6px; font-size: clamp(30px, 6vw, 38px); text-align: center; }
.auth-card .lead { margin: 0 0 28px; font-size: 15px; text-align: center; }
.auth-tools { position: absolute; top: calc(16px + var(--safe-top)); right: calc(16px + var(--safe-right)); }
.auth-footer { margin: 22px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Pages simples (erreurs, maintenance) ---------- */
.simple-page {
  display: grid; place-items: center;
  min-height: calc(100dvh - var(--header-h) - 120px);
  padding: 56px calc(var(--gutter) + var(--safe-right)) 56px calc(var(--gutter) + var(--safe-left));
  text-align: center;
}
.simple-page.is-full { min-height: 100vh; min-height: 100dvh; }
.simple-inner { display: grid; justify-items: center; gap: 18px; width: min(680px, 100%); }
.simple-inner .logo { width: 140px; }
.simple-inner h1 { font-size: clamp(40px, 8vw, 72px); line-height: 1; }
.simple-inner p { margin: 0; color: var(--muted); }
.error-code { font-family: var(--font-display); font-size: clamp(90px, 22vw, 180px); font-style: italic; line-height: .9; color: var(--accent); opacity: .18; }

/* ==========================================================================
   Vitrine
   ========================================================================== */
.container { width: min(1320px, 100%); margin: 0 auto; padding-right: calc(var(--gutter) + var(--safe-right)); padding-left: calc(var(--gutter) + var(--safe-left)); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-top);
  border-bottom: 1px solid transparent;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -24px rgba(0, 0, 0, .45); }
/* Hauteur fixe : un en-tête qui change de taille déplace la page et provoque des tremblements */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-logo { width: 54px; flex: none; transform-origin: left center; transition: transform .3s var(--ease); }
.site-header.is-scrolled .brand-logo { transform: scale(.88); }
.brand-text { display: none; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.brand-sub { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.site-nav { display: none; }
.site-nav > ul { display: flex; align-items: center; gap: 34px; margin: 0; padding: 0; list-style: none; }
.site-nav > ul > li > a { position: relative; padding: 8px 0; color: var(--ink-soft); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .25s; }
.site-nav > ul > li > a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.site-nav > ul > li > a:hover, .site-nav > ul > li > a[aria-current="page"] { color: var(--ink); }
.site-nav > ul > li > a:hover::after, .site-nav > ul > li > a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav > ul > li > a.is-cacao::after { background: var(--amber-gradient); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { display: none; }
.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-size: 11px; font-weight: 700;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

/* Menu burger */
.burger { display: inline-grid; }
.burger-lines { position: relative; width: 18px; height: 12px; }
.burger-lines span { position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
.burger-lines span:nth-child(1) { top: 0; }
.burger-lines span:nth-child(2) { top: 5px; }
.burger-lines span:nth-child(3) { top: 10px; }
.mobile-nav { display: grid; gap: 4px; margin: 18px 0; padding: 0; list-style: none; }
.mobile-nav a, .mobile-nav .accordion-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink);
  font-family: var(--font-display); font-size: 26px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
}
.mobile-nav a i, .accordion-btn i { color: var(--muted); font-size: 14px; transition: transform .3s var(--ease); }
.accordion-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.accordion-panel { display: grid; gap: 2px; padding: 8px 0 12px 12px; }
.accordion-panel[hidden] { display: none; }
.accordion-panel a { min-height: var(--tap); border: 0; font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.drawer-foot { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.drawer-contact { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.drawer-contact i { width: 18px; color: var(--accent); }
.drawer-contact a { text-decoration: none; }

/* Barre basse mobile */
.bottom-bar {
  position: fixed; right: 12px; bottom: calc(10px + var(--safe-bottom)); left: 12px; z-index: 45;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px; border: 1px solid var(--line); border-radius: 26px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: var(--shadow);
}
.bottom-bar a, .bottom-bar button {
  position: relative; display: grid; place-items: center; gap: 2px; min-height: 52px; padding: 4px 0;
  border: 0; border-radius: 20px; background: none; color: var(--muted);
  font-size: 11px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.bottom-bar i { font-size: 18px; }
.bottom-bar [aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.bottom-bar .is-whatsapp { color: var(--whatsapp); }
:root[data-theme="dark"] .bottom-bar .is-whatsapp { color: #6fd39d; }
.bottom-bar .cart-count { top: 2px; right: calc(50% - 24px); }
.has-bottom-bar { padding-bottom: calc(86px + var(--safe-bottom)); }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 0; padding: 64px 0 28px; background: #0f1a10; color: rgba(244, 241, 234, .72); }
:root[data-theme="dark"] .site-footer { background: #0a0d0a; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.footer-logo { width: 84px; margin-bottom: 16px; }
.footer-brand p { max-width: 340px; margin: 0; font-size: 14px; line-height: 1.7; }
.site-footer h2 { margin-bottom: 16px; color: #f4f1ea; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.footer-links a { text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-links i { width: 20px; color: var(--sage); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; letter-spacing: .04em; }
.footer-bottom a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(169, 208, 146, .5); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title, .hero-title { margin: 0; font-family: var(--font-display); font-weight: 600; }
.section-title { font-size: clamp(38px, 5vw, 64px); line-height: 1.02; letter-spacing: -.015em; }

/* Hero en arche */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 48px; padding-top: clamp(32px, 6vw, 96px); padding-bottom: clamp(56px, 8vw, 112px); }
.hero-copy { min-width: 0; animation: rise .9s var(--ease) both; }
.hero-title { font-size: clamp(46px, 7vw, 96px); line-height: .98; letter-spacing: -.02em; }
.hero-title em { display: block; }
.hero .lead { max-width: 520px; margin: 26px 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 38px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--ink-soft); font-size: 14px; }
.hero-proof li { display: flex; align-items: center; gap: 8px; }
.hero-proof i { color: var(--accent); font-size: 12px; }
.hero-visual { position: relative; width: min(500px, 88%); margin: 0 auto; animation: rise 1.1s .12s var(--ease) both; }
.arch {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.arch-brand {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .14), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(169, 208, 146, .18), transparent 50%),
    linear-gradient(160deg, #1b5a0b 0%, var(--forest) 45%, var(--forest-deep) 100%);
}
.arch-brand::before {
  content: ""; position: absolute; inset: 16px; border: 1px solid rgba(244, 240, 230, .22);
  border-radius: 999px 999px calc(var(--radius) - 8px) calc(var(--radius) - 8px);
}
.arch-logo { position: relative; width: 62%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .25)); transition: transform 1.2s var(--ease); }
.hero-visual:hover .arch-logo { transform: scale(1.04); }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft); font-size: 13px;
}
.float-card strong { display: block; font-size: 14px; }
.float-card small { color: var(--muted); font-size: 12px; }
.float-card .float-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.float-top { top: 10%; left: -8%; flex-direction: column; align-items: flex-start; gap: 0; }
.float-top span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.float-top strong { font-family: var(--font-display); font-size: 22px; font-style: italic; font-weight: 500; }
.float-bottom { right: -6%; bottom: 9%; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* Bandeau défilant */
.marquee { overflow: hidden; padding: 18px 0; background: var(--forest); color: #f4f0e6; }
:root[data-theme="dark"] .marquee { background: #102a0a; }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 44px; padding-right: 44px; font-family: var(--font-display); font-size: 22px; font-style: italic; white-space: nowrap; }
.marquee-item::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Cartes univers */
.universe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.universe-card {
  position: relative; display: grid; align-content: end; gap: 10px; overflow: hidden;
  min-height: 340px; padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg); color: #f4f0e6; text-decoration: none;
  isolation: isolate; box-shadow: var(--shadow-soft);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.universe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.universe-card h3 { font-size: clamp(32px, 4vw, 46px); }
.universe-card p { max-width: 380px; margin: 0; color: rgba(244, 240, 230, .78); font-size: 15px; }
.universe-card .universe-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; font-weight: 700; }
.universe-card .universe-mark { position: absolute; top: clamp(20px, 3vw, 32px); right: clamp(20px, 3vw, 32px); width: 84px; opacity: .95; }
.universe-shop { background: radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .12), transparent 45%), linear-gradient(155deg, #1b5a0b, var(--forest-deep)); }
.universe-cacao { background: radial-gradient(circle at 85% 10%, rgba(255, 214, 10, .16), transparent 45%), linear-gradient(155deg, #4a2e1d, var(--cocoa-deep)); color: #fff3d6; }
.universe-cacao .universe-link { color: var(--amber); }
.universe-cacao .universe-mark { width: 96px; overflow: hidden; border-radius: 22px; }
.universe-card .eyebrow { margin: 0; }
.universe-shop .eyebrow { color: var(--sage); }
.universe-cacao .eyebrow { color: var(--amber); }
.section-aside { max-width: 420px; margin: 0; }

/* Univers Cacao */
.cacao-feature {
  position: relative; overflow: hidden; padding: clamp(64px, 9vw, 128px) 0;
  background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(255, 159, 10, .16), transparent 70%), linear-gradient(170deg, #3e2618, var(--cocoa-deep));
  color: #f6ead8;
}
.cacao-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 40px; }
.cacao-feature .eyebrow { color: var(--amber); }
.cacao-feature h2 em { background: var(--amber-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cacao-feature .lead { color: rgba(246, 234, 216, .78); }
.cacao-logo { width: 92px; margin-bottom: 22px; border-radius: 22px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8); }
.cacao-media { position: relative; width: min(460px, 92%); margin: 0 auto; }
.cacao-media .arch { border: 1px solid rgba(255, 214, 10, .2); }
.cacao-media img { width: 100%; height: 100%; object-fit: cover; }
.format-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 32px; padding: 0; list-style: none; }
.format-pills li { padding: 10px 18px; border: 1px solid rgba(255, 214, 10, .35); border-radius: 999px; color: #ffe9a8; font-size: 14px; font-weight: 700; }

/* Bandeau contact */
.contact-band { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 136px) 0; background: var(--bg-alt); text-align: center; }
.contact-band::before {
  content: ""; position: absolute; top: -40%; left: 50%; width: min(720px, 140%); aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
  transform: translateX(-50%); pointer-events: none;
}
.contact-inner { position: relative; display: grid; justify-items: center; gap: 16px; max-width: 680px; margin: 0 auto; }
.contact-inner .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }

/* ---------- Points de rupture vitrine ---------- */
@media (min-width: 480px) {
  .brand-text { display: flex; }
}
@media (min-width: 768px) {
  .universe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  :root { --header-h: 84px; }
  .site-nav { display: block; }
  .burger { display: none; }
  .header-actions .btn { display: inline-flex; }
  .bottom-bar { display: none; }
  .has-bottom-bar { padding-bottom: 0; }
  .hero { grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 100px); }
  .hero-visual { width: 100%; max-width: 520px; margin-right: 0; }
  .cacao-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); }
}
@media (max-width: 479px) {
  .float-top { left: -4%; }
  .float-bottom { right: -4%; }
  .float-card { padding: 11px 13px; }
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Boutique (phase 4)
   ========================================================================== */

/* ---------- Mega menu (desktop) ---------- */
.site-nav .has-mega { display: flex; align-items: center; gap: 2px; }
.mega-toggle {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.mega-toggle:hover { background: var(--bg-alt); color: var(--ink); }
.mega-toggle i { font-size: 11px; transition: transform .3s var(--ease); }
.mega-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.mega {
  position: absolute; top: 100%; right: 0; left: 0; z-index: 49;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg); /* opaque : un flou imbriqué dans l'en-tête vitré ne s'applique pas */
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .35);
  animation: mega-in .28s var(--ease) both;
}
.mega[hidden] { display: none; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-8px); } }
.mega-inner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; width: min(1320px, 100%); margin: 0 auto; padding: 34px var(--gutter) 38px; }
.mega-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 28px; margin: 0 0 24px; padding: 0; list-style: none; }
.mega-links a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 22px; font-weight: 500; text-decoration: none;
  transition: color .2s, padding-left .3s var(--ease);
}
.mega-links a:hover { padding-left: 6px; color: var(--accent); }
.mega-links small { color: var(--muted); font-family: var(--font-ui); font-size: 12px; font-weight: 700; }
.mega-feature { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.mega-feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.mega-feature-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); background: var(--bg-alt); }
.mega-feature-media img { width: 100%; height: 100%; object-fit: cover; }
.mega-feature-text { display: grid; gap: 4px; }
.mega-feature-text small { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.mega-feature-text strong { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.mega-feature-text span { font-weight: 700; }
.site-nav > ul { gap: 28px; }

/* ---------- Accès rapide aux catégories ---------- */
.quick-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.quick-cat {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.quick-cat span { color: var(--muted); font-size: 12px; }
.quick-cat:hover { border-color: var(--ink); }
.quick-cat[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.quick-cat[aria-current="page"] span { color: inherit; opacity: .7; }
.quick-cat.is-cacao:hover { border-color: var(--amber-deep); }

/* ---------- Grille et carte produit ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
.product-card { position: relative; display: flex; flex-direction: column; min-width: 0; animation: rise .7s var(--delay, 0ms) var(--ease) both; }
.product-media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: var(--radius); background: var(--bg-alt); isolation: isolate;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.product-card:hover .product-media img, .product-card:hover .product-placeholder svg { transform: scale(1.05); }
.product-card.is-sold-out .product-media > img, .product-card.is-sold-out .product-placeholder { opacity: .55; filter: grayscale(.4); }
.product-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding-top: 14px; }
.product-category { margin: 0; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.product-card.is-cacao .product-category { color: #b86a00; }
:root[data-theme="dark"] .product-card.is-cacao .product-category { color: var(--amber); }
.product-name { margin: 0; font-family: var(--font-display); font-size: clamp(19px, 2vw, 23px); font-weight: 600; line-height: 1.15; }
.product-name a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .4s var(--ease); }
.product-name a:hover { background-size: 100% 1px; }
.product-name a::after { content: ""; position: absolute; inset: 0 0 auto; aspect-ratio: 4 / 5; } /* toute la photo mène à la fiche */
.product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 10px; font-size: 15px; font-weight: 700; }
.product-price s, .product-price-lg s { color: var(--muted); font-size: .85em; font-weight: 500; }
.stock-note { margin: 8px 0 0; color: var(--warning); font-size: 12px; font-weight: 700; }

/* Choix (taille, format) */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.chip:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.chip-lg { min-height: var(--tap); padding: 0 20px; font-size: 14px; border-radius: 14px; }
.chip-hint { min-height: 0; margin: 0; color: var(--danger); font-size: 12px; font-weight: 700; }
.chip-hint:empty { display: none; }
.needs-variant .chip-group { animation: shake .45s var(--ease); }
.needs-variant .chip { border-color: var(--danger); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.add-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--tap); margin-top: auto; padding: 0 14px;
  border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chip-group + .add-btn, .chip-hint + .add-btn { margin-top: 12px; }
.add-btn:hover { background: var(--ink); color: var(--bg); }
.add-btn.is-added { border-color: var(--whatsapp); background: var(--whatsapp); color: #fff; }
.add-btn.is-muted { border-color: var(--line-strong); color: var(--ink-soft); }

/* Visuel d'attente */
.product-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--bg-alt));
  color: color-mix(in srgb, var(--accent) 55%, var(--muted));
}
.product-placeholder svg { width: 46%; max-width: 180px; transition: transform .9s var(--ease); }
.placeholder-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }

/* ---------- En-tête de page, fil d'Ariane ---------- */
.page-hero { padding: clamp(24px, 4vw, 56px) 0 clamp(24px, 3vw, 40px); }
.page-hero .lead { max-width: 640px; margin: 14px 0 0; }
.page-hero.is-cacao { background: radial-gradient(ellipse 60% 100% at 90% 0%, rgba(255, 159, 10, .12), transparent 70%); }
.page-hero.is-cacao .eyebrow { color: #b86a00; }
:root[data-theme="dark"] .page-hero.is-cacao .eyebrow { color: var(--amber); }
.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; opacity: .5; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- Catalogue ---------- */
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: clamp(64px, 8vw, 112px); }
.catalog-main { min-width: 0; }
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.catalog-search { flex: 1 1 260px; }
.toolbar-right { display: flex; flex: 1 1 auto; gap: 10px; }
.toolbar-right .select { flex: 1; min-width: 0; }
.filters-open { flex: none; }
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.results-count { margin: 0; color: var(--muted); font-size: 14px; }
.results-count strong { color: var(--ink); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; text-decoration: none; }
.filter-reset { padding: 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.catalog-results { transition: opacity .25s var(--ease); }
.catalog-results.is-loading { opacity: .45; pointer-events: none; }

.catalog-filters { visibility: hidden; transition: transform .38s var(--ease), visibility 0s linear .38s; }
.catalog-filters.is-open { visibility: visible; transition: transform .38s var(--ease); }
.filters-title { margin: 0; font-size: 28px; }
.filter-group { margin: 0; padding: 22px 0; border: 0; border-bottom: 1px solid var(--line); }
.filter-title { margin: 0 0 14px; padding: 0; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.filter-cats, .filter-cats ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.filter-cats ul { margin: 2px 0 6px 14px; padding-left: 12px; border-left: 1px solid var(--line); }
.filter-cats a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; color: var(--ink-soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.filter-cats a span { color: var(--muted); font-size: 12px; }
.filter-cats a:hover { color: var(--ink); }
.filter-cats a[aria-current="page"] { color: var(--accent); }
.price-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.price-range label { font-size: 12px; color: var(--muted); }
.filters-actions { position: sticky; bottom: calc(-18px - var(--safe-bottom)); display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: auto; padding: 16px 0 calc(4px + var(--safe-bottom)); background: var(--bg); }

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 48px; }
.page-num { display: grid; place-items: center; min-width: var(--tap); height: var(--tap); padding: 0 8px; border-radius: 50%; font-weight: 700; text-decoration: none; transition: background-color .2s; }
a.page-num:hover { background: var(--bg-alt); }
.page-num[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
.page-gap { color: var(--muted); }

.empty-state { display: grid; justify-items: center; gap: 12px; padding: clamp(40px, 8vw, 80px) 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); text-align: center; }
.empty-state h2 { font-size: clamp(28px, 4vw, 40px); }
.empty-state p { max-width: 460px; margin: 0; color: var(--muted); }
.empty-state .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px; }

/* ---------- Fiche produit ---------- */
.product-page { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 104px); }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.gallery { position: relative; min-width: 0; }
.gallery-track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--radius-lg); background: var(--bg-alt);
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  position: relative; flex: 0 0 100%; aspect-ratio: 4 / 5; overflow: hidden;
  margin: 0; padding: 0; border: 0; background: none; scroll-snap-align: start; cursor: zoom-in;
}
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slide.is-placeholder { cursor: default; }
.gallery .product-badges { top: 16px; left: 16px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumb { flex: none; width: 64px; aspect-ratio: 4 / 5; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--bg-alt); cursor: pointer; opacity: .7; transition: opacity .2s, border-color .2s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }

.product-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.product-info .eyebrow { margin: 0; }
.product-brand { width: 60px; overflow: hidden; border-radius: 16px; }
.product-title { font-size: clamp(36px, 5vw, 58px); line-height: 1.02; letter-spacing: -.015em; }
.product-price-lg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0; font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; }
.product-lead { margin: 0; }
.stock-indicator { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin: 0; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.stock-indicator.is-in { background: var(--success-soft); color: var(--success); }
.stock-indicator.is-low { background: var(--warning-soft); color: var(--warning); }
.stock-indicator.is-out { background: var(--danger-soft); color: var(--danger); }
.variant-picker { margin: 4px 0 0; padding: 0; border: 0; }
.variant-picker legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 10px; padding: 0; font-size: 13px; font-weight: 700; }
.buy-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.buy-main { flex: 1 1 220px; }
.qty-stepper { display: inline-flex; flex: none; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
.qty-stepper button { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: none; cursor: pointer; transition: background-color .2s; }
.qty-stepper button:hover { background: var(--bg-alt); }
.qty-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.qty-stepper input { width: 44px; border: 0; background: none; font-size: 16px; font-weight: 700; text-align: center; -moz-appearance: textfield; }
.qty-stepper input::-webkit-outer-spin-button, .qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; }
.qty-stepper:focus-within { border-color: var(--accent); }
.qty-stepper.is-small button { width: 36px; height: 36px; font-size: 12px; }
.qty-stepper.is-small span { min-width: 22px; font-size: 14px; font-weight: 700; text-align: center; }
.reassurance { display: grid; gap: 12px; margin: 10px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--ink-soft); font-size: 14px; }
.reassurance li { display: flex; align-items: flex-start; gap: 12px; }
.reassurance i { width: 20px; margin-top: 3px; color: var(--accent); text-align: center; }
.reassurance a { color: var(--accent); font-weight: 700; }
.product-details { margin-top: 6px; border-top: 1px solid var(--line); }
.detail-block { border-bottom: 1px solid var(--line); }
.detail-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 0; border: 0; background: none; font-family: var(--font-display); font-size: 22px; font-weight: 600; cursor: pointer; }
.detail-toggle i { color: var(--muted); font-size: 13px; transition: transform .3s var(--ease); }
.detail-toggle[aria-expanded="true"] i { transform: rotate(180deg); }
.detail-panel { padding: 0 0 20px; color: var(--ink-soft); line-height: 1.75; }
.detail-panel[hidden] { display: none; }
.specs { display: grid; gap: 0; margin: 0; }
.specs div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.specs dt { color: var(--muted); font-size: 14px; }
.specs dd { margin: 0; font-weight: 600; }

/* Visionneuse plein écran */
.lightbox { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; overflow: auto; background: rgba(8, 10, 8, .94); overscroll-behavior: contain; animation: fade-in .25s var(--ease) both; }
.lightbox img { max-width: min(1000px, 100%); max-height: 100dvh; object-fit: contain; cursor: zoom-in; transition: transform .35s var(--ease); }
.lightbox.is-zoomed img { cursor: zoom-out; transform: scale(2); }
.lightbox-close { position: fixed; top: calc(16px + var(--safe-top)); right: calc(16px + var(--safe-right)); z-index: 1; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); color: #fff; }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Panier ---------- */
.cart-drawer { width: min(440px, 100%); padding-right: calc(20px + var(--safe-right)); padding-left: 20px; }
.cart-drawer-title { margin: 0; font-size: 30px; }
.cart-drawer-title span { color: var(--muted); font-size: 20px; font-style: italic; font-weight: 500; }
.cart-drawer .cart-lines { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }
.cart-drawer-foot { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line.is-unavailable { opacity: .55; }
.cart-thumb { position: relative; display: block; width: 72px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 14px; background: var(--bg-alt); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .product-placeholder svg { width: 70%; }
.cart-thumb .placeholder-label { display: none; }
.cart-line-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-line-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.cart-line-meta { color: var(--muted); font-size: 12px; }
.cart-line-body .qty-stepper { align-self: flex-start; margin-top: 6px; }
.cart-line-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.cart-line-total { font-size: 14px; font-weight: 700; white-space: nowrap; }
.cart-remove { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: color .2s, background-color .2s; }
.cart-remove:hover { background: var(--danger-soft); color: var(--danger); }
.cart-empty { display: grid; justify-items: center; gap: 10px; padding: 56px 0; color: var(--muted); text-align: center; }
.cart-empty i { color: color-mix(in srgb, var(--accent) 45%, var(--muted)); font-size: 36px; }
.cart-empty p { margin: 0 0 8px; color: var(--ink); font-family: var(--font-display); font-size: 24px; font-style: italic; }
.cart-issues { display: grid; gap: 6px; margin: 14px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 13px; font-weight: 600; list-style: none; }
.cart-issues[hidden] { display: none; }
.summary-rows { display: grid; gap: 8px; margin: 0; }
.summary-rows div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; }
.summary-rows dd { margin: 0; color: var(--ink); font-weight: 600; }
.summary-rows .summary-total { align-items: baseline; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line-strong); color: var(--ink); font-weight: 700; }
.summary-rows .summary-total dd { font-family: var(--font-display); font-size: 30px; }
.cart-page { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 104px); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 28px; }
.cart-summary { display: grid; gap: 12px; align-self: start; }
.cart-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }

/* Aperçu du message WhatsApp */
.wa-preview {
  max-height: 46dvh; overflow-y: auto; margin: 0 0 22px; padding: 16px 18px;
  border-radius: 16px 16px 16px 4px; background: #e2f3e6; color: #10241a;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.6; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere;
}
:root[data-theme="dark"] .wa-preview { background: #12392a; color: #e6f5ec; }
.modal-actions .btn-whatsapp { order: -1; }

/* Accueil : maison et arguments */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.about-grid .lead { margin: 22px 0 0; }
.values { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.values li { display: flex; align-items: center; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.values li:last-child { border-bottom: 1px solid var(--line); }
.value-icon { display: grid; flex: none; place-items: center; width: 50px; height: 50px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 50%; color: var(--accent); }
.values strong { display: block; font-size: 15px; }
.values small { color: var(--muted); font-size: 13px; }

/* Univers Cacao : formats */
.format-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 10px; }
.format-option { display: grid; gap: 2px; min-height: 64px; padding: 10px 20px; border-color: rgba(255, 214, 10, .35); border-radius: 18px; background: transparent; color: #ffe9a8; text-align: left; }
.format-option strong { font-size: 16px; }
.format-option span { color: rgba(246, 234, 216, .75); font-size: 13px; font-weight: 600; }
.format-option:hover { border-color: var(--amber); }
.format-option[aria-pressed="true"] { border-color: transparent; background: var(--amber-gradient); color: var(--cocoa-deep); }
.format-option[aria-pressed="true"] span { color: var(--cocoa); }
.cacao-feature .chip-hint { color: #ffb4a8; }
.cacao-feature .hero-actions { margin-top: 18px; }
.cacao-media .arch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Points de rupture boutique ---------- */
@media (max-width: 639px) {
  /* Panier en bottom sheet sur téléphone */
  .cart-drawer {
    top: auto; right: 0; left: 0; width: 100%; height: min(88dvh, 760px);
    padding: 18px calc(18px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(18px + var(--safe-left));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
  }
  .cart-drawer::before { content: ""; display: block; flex: none; width: 40px; height: 5px; margin: -6px auto 12px; border-radius: 999px; background: var(--line-strong); }
  .header-search { display: none; }
}
@media (min-width: 640px) {
  .product-grid { gap: 40px 18px; }
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); }
}
@media (min-width: 900px) {
  .product-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 20px); }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .cart-summary { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (min-width: 1024px) {
  .catalog-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
  .catalog-filters.drawer {
    position: sticky; top: calc(var(--header-h) + 20px); z-index: auto; align-self: start;
    width: auto; max-height: calc(100dvh - var(--header-h) - 40px); padding: 0;
    background: none; box-shadow: none; transform: none; visibility: visible;
  }
  .catalog-filters .filters-head { display: none; }
  .catalog-filters .filter-group:first-of-type { padding-top: 0; }
  .filters-actions { position: static; grid-template-columns: 1fr; padding: 18px 0 0; background: none; }
  .filters-actions .btn-primary { display: none; }
  .filters-open { display: none; }
  .toolbar-right { flex: 0 0 auto; }
  .toolbar-right .select { width: 220px; }
}
@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-main .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .site-nav > ul { gap: 20px; }
}

/* ---------- Grilles adaptées au nombre de produits (accueil, similaires) ---------- */
.product-grid.is-fit[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .product-grid.is-fit[data-count="1"] .product-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 72px);
  }
  .product-grid.is-fit[data-count="1"] .product-media { aspect-ratio: 1 / 1; }
  .product-grid.is-fit[data-count="1"] .product-name { font-size: clamp(30px, 3.4vw, 44px); }
  .product-grid.is-fit[data-count="1"] .product-price { font-size: 20px; }
  .product-grid.is-fit[data-count="1"] .add-btn { width: auto; min-width: 240px; margin-top: 18px; }
  .product-grid.is-fit[data-count="1"] .product-name a::after { display: none; }
  .product-grid.is-fit[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid.is-fit[data-count="2"] .product-media { aspect-ratio: 1 / 1; }
}
@media (min-width: 1200px) {
  .product-grid.is-fit[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==========================================================================
   Contact, commande, confirmation, suivi (phase 5)
   ========================================================================== */
/* Champ piège anti-robots : hors écran, ignoré des lecteurs d'écran */
.hp-field { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: clamp(64px, 8vw, 112px); }
.contact-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); }
a.contact-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
.contact-card strong { display: block; font-size: 15px; }
.contact-card small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.contact-icon { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 17px; }
.contact-card.is-whatsapp { border-color: transparent; background: var(--whatsapp); color: #fff; }
.contact-card.is-whatsapp small { color: rgba(255, 255, 255, .8); }
.contact-card.is-whatsapp .contact-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.contact-arrow { margin-left: auto; opacity: .7; }
.contact-form-card { scroll-margin-top: calc(var(--header-h) + 20px); }
.contact-phone { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.contact-phone a { color: var(--ink); font-weight: 700; }

.checkout-page, .confirmation-page { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 104px); }
.checkout-form { display: grid; gap: 16px; min-width: 0; }
.checkout-step { margin: 0; }
.step-title { display: flex; align-items: center; gap: 12px; float: left; width: 100%; margin: 0 0 18px; padding: 0; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.step-title + * { clear: both; }
.step-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-family: var(--font-ui); font-size: 14px; font-weight: 700; }
.choice-list { display: grid; gap: 10px; margin-bottom: 8px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .2s, background-color .2s, box-shadow .2s; }
.choice-body > i { width: 24px; color: var(--muted); font-size: 18px; text-align: center; }
.choice-body strong { display: block; font-size: 14px; }
.choice-body small { color: var(--muted); font-size: 13px; }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:checked + .choice-body > i { color: var(--accent); }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--focus); outline-offset: 2px; }
.checkout-step .field-error { margin-top: 2px; }
.checkout-step .check.has-error input { border-color: var(--danger); }
.checkout-summary .cart-lines { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; }
.checkout-summary .cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; }
.checkout-summary .cart-thumb { width: 56px; }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 2px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cart-detail-link { color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }

.confirmation-hero { display: grid; justify-items: center; gap: 10px; max-width: 720px; margin: 0 auto 40px; text-align: center; }
.confirmation-hero .lead { margin: 6px 0 12px; }
.confirmation-hero .hero-actions { justify-content: center; }
.confirmation-icon { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 30px; animation: pop .6s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.confirmation-note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.confirmation-note a { color: var(--accent); font-weight: 700; }
.order-summary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 1080px; margin: 0 auto; }
.timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 14px; padding-bottom: 18px; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.is-done::before { background: var(--accent); }
.timeline-dot { position: relative; display: grid; flex: none; place-items: center; width: 28px; height: 28px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); font-size: 11px; }
.timeline li.is-done { color: var(--ink); }
.timeline li.is-done .timeline-dot { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.timeline li.is-current .timeline-dot { box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline-text strong { display: block; font-size: 14px; }
.timeline-text small { color: var(--muted); font-size: 12px; }
.order-items { display: grid; gap: 0; margin: 0 0 16px; padding: 0; list-style: none; }
.order-items li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.order-items li > span:first-child { display: grid; gap: 2px; min-width: 0; }
.order-items small { color: var(--muted); font-size: 12px; }
.order-item-total { font-weight: 700; white-space: nowrap; }

.tracking-page { display: grid; gap: 24px; padding-bottom: clamp(64px, 8vw, 112px); }
.tracking-form { display: grid; gap: 18px; max-width: 720px; }
.tracking-result-title { margin: 12px 0 0; }

@media (min-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: start; }
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 400px; }
  .order-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .order-summary > section:first-child { grid-row: span 2; }
}
.btn.is-disabled { opacity: .45; }

/* ---------- Cadrage des photos produit (phase 7) ----------
   La photo est affichée entière (contain), centrée, sur un fond tiré d'elle-même (copie floutée) :
   aucun recadrage, quel que soit le format envoyé, et un cadre uniforme 4:5. */
.product-media, .gallery-slide { background: var(--bg-alt); }
.media-backdrop {
  position: absolute; inset: -12%; z-index: 0; width: 124% !important; height: 124% !important;
  object-fit: cover; filter: blur(28px) saturate(1.1); opacity: .55; transform: none !important; pointer-events: none;
}
.product-media .media-photo, .gallery-slide .media-photo {
  position: relative; z-index: 1; width: 100%; height: 100%;
  object-fit: contain; padding: 4%;
  filter: drop-shadow(0 18px 24px rgba(17, 26, 18, .14));
}
.gallery-slide .media-photo { padding: 5%; }
.gallery-thumb img { object-fit: contain; background: var(--bg-alt); }
.product-card:hover .product-media .media-photo { transform: scale(1.04); }
:root[data-theme="dark"] .media-backdrop { opacity: .35; }
.cart-thumb img, .mega-feature-media img { object-fit: contain; padding: 6%; background: var(--bg-alt); }

/* ---------- Pages d'information (phase 7) ---------- */
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); } }
.page-hero-compact { padding-bottom: clamp(16px, 2vw, 28px); }
.page-updated { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.info-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-bottom: clamp(56px, 8vw, 104px); }
.info-main { min-width: 0; }
.info-nav-title { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.info-nav ul { display: flex; gap: 8px; margin: 0; padding: 0 0 4px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.info-nav ul::-webkit-scrollbar { display: none; }
.info-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: border-color .2s, background-color .2s;
}
.info-nav a:hover { border-color: var(--ink); color: var(--ink); }
.info-nav a[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.info-toc { margin-bottom: 28px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.info-toc ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
@media (min-width: 640px) { .info-toc ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; } }
.info-toc a { color: var(--ink-soft); text-decoration: none; }
.info-toc a:hover { color: var(--accent); text-decoration: underline; }

.prose { max-width: 72ch; color: var(--ink-soft); font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2em 0 .5em; color: var(--ink); font-size: clamp(24px, 3vw, 30px); line-height: 1.2; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { margin: 1.6em 0 .4em; color: var(--ink); font-family: var(--font-ui); font-size: 17px; font-weight: 700; }
.prose p { margin: 0 0 1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.prose-table { margin: 0 0 1.4em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prose-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose-table th, .prose-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose-table th { background: var(--surface-2); color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.prose-table tr:last-child td { border-bottom: 0; }
.prose-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prose-table td small { display: block; color: var(--muted); font-size: 13px; }

.info-help {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center;
  max-width: 72ch; margin-top: 40px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.info-help-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--whatsapp); font-size: 22px; }
.info-help-title { margin: 0; color: var(--ink); font-weight: 700; }
.info-help p:not(.info-help-title) { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.info-help-actions { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 8px; }

.faq-list { display: grid; gap: 10px; max-width: 72ch; margin-bottom: 28px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 20px;
  color: var(--ink); font-weight: 700; list-style: none; cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; transition: transform .25s var(--ease); }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq-answer { padding: 0 20px 6px; font-size: 15px; }
.faq-intro { color: var(--muted); font-size: 15px; }
.terms-check a { color: var(--accent); font-weight: 600; }

@media (min-width: 640px) {
  .info-help { grid-template-columns: auto minmax(0, 1fr) auto; }
  .info-help-actions { grid-column: auto; }
}
@media (min-width: 1024px) {
  .info-layout { grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: start; }
  .info-aside { position: sticky; top: calc(var(--header-h) + 24px); }
  .info-nav ul { flex-direction: column; gap: 2px; overflow: visible; }
  .info-nav a { display: flex; min-height: 40px; padding: 0 14px; border-color: transparent; border-radius: 12px; }
  .info-nav a:hover { border-color: transparent; background: var(--surface); }
  .info-nav a[aria-current="page"] { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
}
@media (min-width: 1024px) { :root[data-theme="dark"] .info-nav a[aria-current="page"] { color: var(--ink); } }
.chip.is-unavailable { border-style: dashed; color: var(--muted); text-decoration: line-through; }

/* ---------- iOS Safari : pièges de débordement et de zoom (phase 8) ---------- */
/* Anciennes versions sans overflow: clip */
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
/* Champs date/heure : largeur intrinsèque d'iOS qui fait déborder les grilles */
input[type="date"].input, input[type="time"].input, input[type="datetime-local"].input {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 50px; line-height: 1.2;
}
input[type="date"].input::-webkit-date-and-time-value { min-height: 1.2em; text-align: left; }
input[type="search"].input { -webkit-appearance: none; appearance: none; }
input, select, textarea, button { max-width: 100%; }
/* Jamais de police < 16 px dans un champ sur mobile : iOS zoomerait au focus */
@media (max-width: 767px) { .input, .select, .textarea, input[type="number"] { font-size: 16px !important; } }
/* Pages d'information : liens empilés sur mobile et tablette (aucun défilement horizontal caché) */
@media (max-width: 1023px) {
  .info-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; padding: 0; }
  .info-nav a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 48px; padding: 6px 12px; border-radius: 14px; text-align: center; white-space: normal; line-height: 1.25; }
}
@media (min-width: 640px) and (max-width: 1023px) { .info-nav ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ==========================================================================
   Identité Fatme Shop (démo boutique vêtements) : encre, or, sable, monogramme
   ========================================================================== */
h1, h2, h3, .section-title, .hero-title { font-weight: 500; }
.eyebrow { color: var(--gold-ink); letter-spacing: .24em; }
:root[data-theme="dark"] .eyebrow { color: var(--accent); }
h1 em, h2 em, h3 em, .section-title em, .hero-title em { color: var(--gold); }
:root[data-theme="dark"] h1 em, :root[data-theme="dark"] h2 em, :root[data-theme="dark"] .section-title em { color: var(--accent); }

/* Monogramme (initiale en italique dans un cercle) */
.brand-mark {
  display: inline-grid; flex: none; place-items: center;
  width: var(--mark-size, 42px); height: var(--mark-size, 42px);
  border: 1px solid currentColor; border-radius: 50%;
  color: var(--ink); font-family: var(--font-display); font-size: calc(var(--mark-size, 42px) * .52);
  font-style: italic; font-weight: 500; line-height: 1;
}
.brand-mark.is-light { color: var(--gold-soft); }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-lockup.is-light { color: #f7f3ed; }
.brand-lockup.is-light .brand-mark { color: var(--gold-soft); }
.brand-wordmark { font-size: 13px; font-weight: 700; letter-spacing: .26em; white-space: nowrap; }
.brand-mark.brand-logo { width: var(--mark-size, 42px); }
.brand-name { font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; }
.brand-sub { font-weight: 600; letter-spacing: .2em; }
.site-header.is-scrolled .brand-logo { transform: scale(.92); }
.auth-logo.brand-lockup, .logo.brand-lockup { display: flex; flex-direction: column; width: auto; gap: 14px; }
.auth-logo .brand-wordmark, .logo .brand-wordmark { font-size: 15px; }

/* Hero : arche photo */
.arch-photo { background: var(--sand); }
.arch-photo .arch-link { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.arch-photo .media-photo { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 14% 6% 5%; transition: transform 1.2s var(--ease); }
.hero-visual:hover .arch-photo .media-photo { transform: scale(1.03); }
.arch .media-backdrop { opacity: .5; }

/* Bandeau défilant : encre et or */
.marquee { background: #151412; color: var(--gold-soft); }
.marquee-item::after { background: var(--gold); }

/* Collection de l'accueil */
.home-search { width: min(320px, 100%); }
.home-search .input { border-radius: 999px; }
.quick-cat.is-active { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.quick-cat.is-active span { color: inherit; opacity: .7; }
#collection .product-grid { margin-top: 36px; }
.section-more { display: flex; justify-content: center; margin: 44px 0 0; }
.empty-note { margin: 40px 0 0; color: var(--muted); font-family: var(--font-display); font-size: 22px; font-style: italic; text-align: center; }

/* La maison : fond sable, photo et tampon */
.about-section { padding: clamp(70px, 9vw, 130px) 0; background: var(--sand); }
:root[data-theme="dark"] .about-section { background: var(--bg-alt); }
.about-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.about-visual { position: relative; width: min(460px, 88%); margin: 0 auto; }
.about-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
.about-frame .media-photo { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.about-stamp {
  position: absolute; right: -18px; bottom: 30px; z-index: 2;
  display: grid; place-items: center; width: 124px; height: 124px; padding: 10px;
  border-radius: 50%; background: #151412; color: var(--gold-soft);
  font-family: var(--font-display); font-size: 18px; font-style: italic; line-height: 1.15; text-align: center;
  box-shadow: var(--shadow-soft);
}
.about-copy .lead { max-width: 540px; margin: 22px 0 30px; color: var(--ink-soft); }
.value-icon { border-color: color-mix(in srgb, var(--gold) 40%, transparent); color: var(--gold); }

/* Contact : bandeau encre et halo doré */
.contact-band { background: #151412; color: #fff; }
.contact-band::before { background: radial-gradient(circle, color-mix(in srgb, var(--gold) 24%, transparent), transparent 65%); }
.contact-band .eyebrow { color: var(--gold-soft); }
.contact-band .section-title { color: #fff; }
.contact-band .section-title em { color: var(--gold-soft); }
.contact-band .lead { color: rgba(255, 255, 255, .72); }
.contact-band .contact-phone { color: rgba(255, 255, 255, .6); }
.contact-band .contact-phone a { color: #fff; }
.btn-light { background: #fff; color: #151412; }
.btn-light:hover { background: var(--gold-soft); color: #151412; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .3); background: transparent; color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; }

/* Badges et boutons de marque */
.badge-new { background: #151412; color: #fff; }
.badge-promo { background: var(--gold); color: #fff; }
.badge-glass { color: #151412; }
:root[data-theme="dark"] .badge-new { background: var(--gold-soft); color: #151412; }
.switch input:checked + .switch-track { background: var(--gold); }

@media (min-width: 900px) {
  .about-split { grid-template-columns: .9fr 1.1fr; }
  .about-visual { width: 100%; margin: 0; }
  .about-stamp { right: -28px; bottom: 36px; width: 128px; height: 128px; font-size: 19px; }
}
@media (max-width: 479px) {
  .about-stamp { right: -6px; width: 104px; height: 104px; font-size: 15px; }
}
.footer-logo.brand-lockup { width: auto; margin-bottom: 18px; }
.site-footer { background: #151412; }
:root[data-theme="dark"] .site-footer { background: #0c0b0a; }
.footer-links i { color: var(--gold-soft); }
.hero-visual .float-card { z-index: 3; }
/* Le nom de la boutique reste visible sur mobile (pas de logo graphique) */
.brand-text { display: flex; }
@media (max-width: 389px) { .brand-sub { display: none; } }
