/* ==========================================================================
   BOUTIQUE SUR-MESURE — WEBAPP
   Palette couture : ivoire chaud, encre café, bordeaux, laiton.
   Fraunces (marque, titres, noms de modèles) + Work Sans (interface).
   ========================================================================== */

:root {
  --ivory: #faf6ef;
  --ivory-deep: #f1e9dc;
  --paper: #fffdf9;
  --ink: #1c1410;
  --ink-soft: #4a3c33;
  --sable: #75685a;
  --wine: #6b1f2a;
  --wine-deep: #4f1620;
  --brass: #b08d57;
  --brass-text: #7d5f32;
  --line: #e4d8c4;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;

  --r-card: 18px;
  --r-ctl: 12px;
  --gutter: 16px;
  --dock-h: 64px;
  --dock-space: calc(var(--dock-h) + 28px + env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ *
 *  EN-TÊTE
 * ------------------------------------------------------------------ */

.top {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  color: var(--ink);
  text-decoration: none;
}

.brand__name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.01em;
}

.brand__tagline {
  margin: 0;
  color: var(--sable);
  font-size: 13px;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter) var(--dock-space);
}

/* ------------------------------------------------------------------ *
 *  ACCROCHE
 * ------------------------------------------------------------------ */

.hero { padding: 36px 0 26px; }

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 9vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  margin: 0 0 16px;
  max-width: 14ch;
}

.hero__text {
  margin: 0 0 22px;
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: 15px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--ink-soft);
}

.steps li { display: flex; align-items: center; gap: 8px; }

.steps__n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  color: var(--brass-text);
  font-family: var(--serif);
  font-size: 12px;
  display: grid;
  place-items: center;
}

/* Réglette de mètre ruban : le seul ornement, rappel du sur-mesure */
.ruler {
  height: 12px;
  margin: 0 0 18px;
  border-top: 1px solid var(--brass);
  background:
    repeating-linear-gradient(90deg, var(--brass) 0 1px, transparent 1px 50px) top left / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--brass) 0 1px, transparent 1px 10px) top left / 100% 5px no-repeat;
  opacity: 0.7;
}

/* ------------------------------------------------------------------ *
 *  PASTILLES DE CATÉGORIES
 * ------------------------------------------------------------------ */

.pills {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1) 18px;
  padding: 10px var(--gutter);
  background: var(--ivory);
}
.pills::-webkit-scrollbar { display: none; }
.pills:empty { display: none; }

.pill {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms;
}

.pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------------------ *
 *  GRILLE ET CARTES
 * ------------------------------------------------------------------ */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 12px;
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 20px; }
}
@media (min-width: 1040px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card { position: relative; min-width: 0; }

.card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--ivory-deep);
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__media--empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(176, 141, 87, 0.12) 12px 13px);
}

.card__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px 0;
}

.card__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
}

.card__price {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--brass-text);
}

.price--ask { font-style: italic; font-weight: 400; color: var(--sable); }

.add {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 200ms, color 200ms, transform 200ms var(--ease);
}

.add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.add:hover { background: var(--ink); color: var(--paper); }
.add.is-done { background: var(--wine); border-color: var(--wine); color: var(--paper); transform: scale(1.08); }

/* Cœur en verre, posé sur la photo */
.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 253, 249, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.heart svg {
  width: 19px;
  height: 19px;
  fill: transparent;
  stroke: var(--ink);
  stroke-width: 1.6;
  transition: fill 200ms, stroke 200ms, transform 300ms var(--ease);
}

.heart[aria-pressed="true"] svg { fill: var(--wine); stroke: var(--wine); transform: scale(1.12); }

.skeleton {
  aspect-ratio: 3 / 4.5;
  border-radius: var(--r-card);
  background: linear-gradient(100deg, var(--ivory-deep) 30%, #f7f1e7 50%, var(--ivory-deep) 70%) 0 0 / 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ *
 *  VUES, ÉTATS VIDES
 * ------------------------------------------------------------------ */

.view__head { padding: 32px 0 20px; }

.view__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 7vw, 44px);
  letter-spacing: -0.015em;
  margin: 0;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 12px;
  color: var(--ink-soft);
}

.empty p { margin: 0 auto 18px; max-width: 32ch; }

/* ------------------------------------------------------------------ *
 *  BOUTONS
 * ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}

.btn--wine { background: var(--wine); color: var(--paper); }
.btn--wine:hover { background: var(--wine-deep); }
.btn--wine:disabled { background: var(--line); color: var(--sable); cursor: not-allowed; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--sable);
  cursor: pointer;
  font-size: 13px;
}

/* ------------------------------------------------------------------ *
 *  PANIER
 * ------------------------------------------------------------------ */

.cart {
  display: grid;
  gap: 28px;
}

@media (min-width: 880px) {
  .cart--filled { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 48px; }
}

.lines { list-style: none; margin: 0; padding: 0; }

.line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.line:first-child { padding-top: 0; }

.line__img {
  width: 72px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--ivory-deep);
}

.line__name { font-family: var(--serif); font-weight: 500; font-size: 16px; margin: 0 0 2px; line-height: 1.25; }
.line__price { margin: 0 0 8px; font-size: 13px; color: var(--brass-text); }

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.stepper button {
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
}

.stepper output { min-width: 20px; text-align: center; font-size: 14px; }

.line__remove {
  align-self: start;
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--sable);
  border-radius: 50%;
}
.line__remove svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

.summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 18px 0 4px;
  font-family: var(--serif);
  font-size: 20px;
}

.summary__note { margin: 4px 0 0; font-size: 13px; color: var(--sable); }

.checkout {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px;
}

.checkout h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 0 0 4px;
}

.checkout__intro { margin: 0 0 18px; font-size: 14px; color: var(--ink-soft); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }

/* 16px : en dessous, l'iPhone zoome sur le champ */
.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

.field input:focus { outline: 2px solid var(--wine); outline-offset: 0; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: var(--wine); }

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 12px;
  cursor: pointer;
}

.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--wine); }

.form-error {
  margin: 4px 0 14px;
  color: var(--wine);
  font-size: 14px;
  font-weight: 500;
}

.done {
  text-align: center;
  padding: 40px 12px;
  max-width: 420px;
  margin: 0 auto;
}

.done h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 10px; }
.done p { color: var(--ink-soft); margin: 0 0 22px; }
.done .btn + .btn { margin-top: 10px; }

/* ------------------------------------------------------------------ *
 *  BARRE FLOTTANTE « LIQUID GLASS »
 * ------------------------------------------------------------------ */

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40;
  width: min(340px, calc(100% - 32px));
  height: var(--dock-h);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 999px;
  isolation: isolate;
  overflow: hidden;
  background: rgba(255, 253, 249, 0.52);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(176, 141, 87, 0.18),
    0 12px 32px -8px rgba(60, 30, 20, 0.28),
    0 2px 6px rgba(60, 30, 20, 0.08);
}

/* Reflet lumineux sur le haut de la surface */
.dock::before {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 999px 999px 40% 40% / 999px 999px 100% 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .dock { background: rgba(255, 253, 249, 0.96); }
  .heart { background: rgba(255, 253, 249, 0.92); }
}

.dock__indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc((100% - 12px) / 3);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 420ms var(--ease);
  z-index: -1;
}

.dock[data-active="favoris"] .dock__indicator { transform: translateX(100%); }
.dock[data-active="panier"] .dock__indicator { transform: translateX(200%); }

.dock__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: color 300ms;
}

.dock__item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.dock__item.is-active { color: var(--paper); }

.dock__badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px rgba(255, 253, 249, 0.9);
}

.dock__badge.is-bump { animation: bump 400ms var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ------------------------------------------------------------------ *
 *  FICHES (PRODUIT, CONFIDENTIALITÉ)
 * ------------------------------------------------------------------ */

.sheet { position: fixed; inset: 0; z-index: 60; }

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 20, 16, 0.4);
  animation: fade 260ms ease both;
}

.sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  padding: 0 0 calc(20px + env(safe-area-inset-bottom, 0px));
  animation: rise 420ms var(--ease) both;
}

@media (min-width: 720px) {
  .sheet__panel {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(820px, calc(100% - 48px));
    transform: translate(-50%, -50%);
    border-radius: 26px;
    animation: fade 260ms ease both;
    padding-bottom: 0;
  }
  .sheet__panel--text { width: min(560px, calc(100% - 48px)); }
}

@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 253, 249, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sheet__close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }

.detail { display: grid; }

@media (min-width: 720px) {
  .detail { grid-template-columns: 1fr 1fr; }
}

.detail__media {
  aspect-ratio: 4 / 5;
  max-height: 62vh;
  width: 100%;
  background: var(--ivory-deep);
  overflow: hidden;
}

@media (min-width: 720px) { .detail__media { max-height: none; height: 100%; } }

.detail__media img { width: 100%; height: 100%; object-fit: cover; }

.detail__body { padding: 22px 20px 4px; display: flex; flex-direction: column; }
@media (min-width: 720px) { .detail__body { padding: 56px 32px 32px; } }

.detail__cat { margin: 0 0 6px; font-size: 13px; color: var(--sable); }

.detail__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.detail__price { margin: 0 0 18px; font-size: 17px; font-weight: 500; color: var(--brass-text); }
.detail__text { margin: 0 0 24px; color: var(--ink-soft); font-size: 14px; }

.detail__actions { display: grid; grid-template-columns: 1fr 50px; gap: 10px; margin-top: auto; }

.detail__actions .heart {
  position: static;
  width: 50px;
  height: 50px;
  background: transparent;
  border-color: var(--ink);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.prose { padding: 28px 22px 8px; }
@media (min-width: 720px) { .prose { padding: 36px 36px 28px; } }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 14px; }
.prose p { margin: 0 0 12px; color: var(--ink-soft); max-width: 60ch; }

/* ------------------------------------------------------------------ *
 *  TOAST, PIED DE PAGE, CONSENTEMENT
 * ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + 30px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 12px);
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms, transform 320ms var(--ease);
  white-space: nowrap;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.social {
  margin-top: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.social__label { width: 100%; text-align: center; font-size: 13px; color: var(--sable); margin: 0 0 2px; }
.social { flex-wrap: wrap; }
.social a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--surface, #fffdf9);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 200ms, color 200ms, transform 200ms;
}
.social a:hover { background: var(--wine); color: #fffdf9; }
.social a:active { transform: scale(.94); }
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:not([hidden]) + .foot { margin-top: 24px; }

.foot {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--sable);
  font-size: 13px;
}

.foot p { margin: 0; }
.foot__links { display: flex; gap: 16px; }

.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--dock-h) + 28px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  margin: 0 auto;
  z-index: 70;
  background: var(--ink);
  color: var(--ivory);
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 14px;
  box-shadow: 0 12px 32px -8px rgba(28, 20, 16, 0.4);
}

.consent p { margin: 0 0 12px; }
.consent__actions { display: flex; gap: 8px; }
.consent .btn { min-height: 42px; flex: 1; }
.consent .btn--line { border-color: var(--ivory); color: var(--ivory); }
.consent .btn--line:hover { background: var(--ivory); color: var(--ink); }

body.is-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* ------------------------------------------------------------------ *
 *  GALERIE MULTI-PHOTOS
 * ------------------------------------------------------------------ */

/* Indicateur "plusieurs vues" sur la carte du catalogue */
.card__views {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.card__views i,
.gallery__dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(28, 20, 16, 0.3);
  transition: width 300ms var(--ease), background 300ms;
}

.card__views i.is-on,
.gallery__dots i.is-on {
  width: 14px;
  background: var(--ink);
}

.gallery {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }

.gallery__slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--ivory-deep);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  cursor: zoom-in;
}

.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.gallery__dots i { width: 6px; height: 6px; }
.gallery__dots i.is-on { width: 18px; }

/* Flèches : seulement sur écran avec souris */
.gallery__nav {
  display: none;
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 253, 249, 0.7);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  place-items: center;
  cursor: pointer;
  transition: opacity 200ms;
}

.gallery__nav svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gallery__nav--prev { left: 12px; }
.gallery__nav--prev svg { transform: scaleX(-1); }
.gallery__nav--next { right: 12px; }
.gallery__nav:disabled { opacity: 0; pointer-events: none; }

@media (hover: hover) and (pointer: fine) {
  .gallery__nav { display: grid; }
}

/* Plein écran */
.zoom {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #140e0b;
  animation: fade 220ms ease both;
}

.zoom .gallery__slide { background: transparent; cursor: default; }
.zoom .gallery__slide img { object-fit: contain; }
.zoom .gallery__dots { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 253, 249, 0.16); }
.zoom .gallery__dots i { background: rgba(255, 253, 249, 0.4); }
.zoom .gallery__dots i.is-on { background: var(--paper); }

.zoom__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 253, 249, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.zoom__close svg { width: 20px; height: 20px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; }
