/* === Le Shop17 — Cabine virtuelle === */
:root {
  --bg: #faf7f3;
  --ink: #1a1a1a;
  --ink-soft: #5a5a5a;
  --accent: #c9a87c;       /* doré Côte d'Azur */
  --accent-dark: #a88758;
  --line: #ece4d8;
  --card: #ffffff;
  --shadow: 0 6px 24px rgba(0,0,0,.06);
  --radius: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fitzu-accent: #FF4A2E;
  --fitzu-accent-soft: #FFF0ED;
  --pill-padding-y: 8px;
  --pill-padding-x: 16px;
  --pill-font-size: 14px;
  --pill-font-weight: 500;
  --pill-radius: 999px;
  --pill-border: 1px solid transparent;
}

* { box-sizing: border-box; }
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overflow-anchor: none;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* fa-clothes-hanger : icône Pro absente du FA Free 6.5.2 (polyfill SVG) */
.fa-solid.fa-clothes-hanger::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4a3.5 3.5 0 0 0-3.5 3.5h2A1.5 1.5 0 0 1 12 6a1.5 1.5 0 0 1 1.5 1.5A1.5 1.5 0 0 1 12 9c-.55 0-1 .45-1 1v1.75L2.4 18.2A1 1 0 0 0 3 20h18a1 1 0 0 0 .6-1.8L13 11.75v-.9a3.5 3.5 0 0 0 2.5-3.35A3.5 3.5 0 0 0 12 4m0 9.5l6 4.5H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 4a3.5 3.5 0 0 0-3.5 3.5h2A1.5 1.5 0 0 1 12 6a1.5 1.5 0 0 1 1.5 1.5A1.5 1.5 0 0 1 12 9c-.55 0-1 .45-1 1v1.75L2.4 18.2A1 1 0 0 0 3 20h18a1 1 0 0 0 .6-1.8L13 11.75v-.9a3.5 3.5 0 0 0 2.5-3.35A3.5 3.5 0 0 0 12 4m0 9.5l6 4.5H6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Icône Ma garde-robe (cintre) : 18px — liens dédiés, pas Mon profil */
#topnav-gallery-link .fa-clothes-hanger,
#drawer-gallery-link .fa-clothes-hanger,
#gen-in-progress-gallery .fa-clothes-hanger {
  font-size: 18px;
}

a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; display: block; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
}
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 32px;
  background: white; border-bottom: 1px solid var(--line);
  gap: 16px;
  max-height: 160px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, border-width 0.3s ease;
}
body.scroll-down .topbar {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .topbar { transition: none; }
}
.topbar-spacer { /* col 1 — vide pour équilibrer le centre */ }
.topbar-end {
  justify-self: end;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
}
.brand-logo-link {
  display: block;
  text-decoration: none;
  line-height: 0;
}
.brand-logo-link.hidden {
  display: none;
}
.drawer-logo-link {
  margin-bottom: 0;
}
.brand--has-logo .brand-logo-link {
  margin-bottom: 0;
}
.brand-tagline {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.2;
}
.brand-tagline--sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  text-transform: none;
}
.logo-img {
  height: 56px; width: auto; display: block;
  background: transparent;
}
.brand--has-logo .logo-img {
  height: 44px;
  margin-bottom: 0;
}
.brand-fitzu-platform {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  gap: 0.35em;
  line-height: 1.2;
}
.brand--has-logo .brand-fitzu-platform {
  margin-top: 10px;
}
.brand-fitzu-platform--drawer {
  justify-content: flex-start;
}
.brand-fitzu-platform--drawer.drawer-brand--has-logo {
  margin-top: 10px;
}
.brand--fitzu-primary .brand-fitzu-platform,
.brand-fitzu-platform--fitzu-primary {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}
.brand--fitzu-primary .brand-fitzu-platform .fitzu-mark,
.brand-fitzu-platform--fitzu-primary > .fitzu-mark {
  order: 1;
  font-size: 22px;
}
.brand--fitzu-primary .brand-platform-byline,
.brand-fitzu-platform--fitzu-primary .brand-platform-byline,
.brand-fitzu-platform--fitzu-primary .drawer-platform-byline {
  order: 2;
  display: inline-block;
  text-transform: none;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 500;
  background: linear-gradient(
    90deg,
    var(--ink-soft) 0%,
    var(--ink-soft) 38%,
    #b8b8b8 50%,
    var(--ink-soft) 62%,
    var(--ink-soft) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: cabine-tagline-shimmer 5s linear infinite;
}
@keyframes cabine-tagline-shimmer {
  0% {
    background-position: 120% 0;
    animation-timing-function: ease-in-out;
  }
  20% {
    background-position: -120% 0;
  }
  20.01%, 100% {
    background-position: 120% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand--fitzu-primary .brand-platform-byline,
  .brand-fitzu-platform--fitzu-primary .brand-platform-byline,
  .brand-fitzu-platform--fitzu-primary .drawer-platform-byline {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--ink-soft);
    color: var(--ink-soft);
  }
}
.brand--fitzu-primary .brand-fitzu-mark .fitzu-pill,
.brand-fitzu-platform--fitzu-primary > .fitzu-mark .fitzu-pill {
  font-size: 22px;
  padding: 4px 14px;
}
.brand-fitzu-platform--fitzu-primary.brand-fitzu-platform--drawer {
  align-items: flex-start;
}
.drawer-fitzu-by {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink);
  line-height: 1.2;
}
.brand-platform-byline {
  font-size: 11px;
  letter-spacing: 0.2em;
  line-height: 1.2;
}
.brand-fitzu-mark {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.2;
  color: var(--ink);
}
.tag { display: none; } /* on garde la classe au cas où, masquée par défaut */

/* === Topnav desktop (Marques, Catégories, garde-robe, compte) — pas le drawer mobile === */
.topnav { display: flex; gap: 20px; align-items: center; }
.topnav a {
  color: var(--ink); font-size: 14px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.topnav a.active {
  color: var(--fitzu-accent);
  border-color: var(--fitzu-accent);
}
.topnav a.active i { color: var(--fitzu-accent); }
.topnav a i { font-size: 13px; color: var(--accent-dark); transition: color .15s ease; }
.topnav a.topnav-icon-btn i { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .topnav a:not(.topnav-icon-btn):hover {
    color: var(--fitzu-accent);
    border-color: var(--fitzu-accent);
    background: transparent;
  }
  .topnav a:not(.topnav-icon-btn):hover i { color: var(--fitzu-accent); }
}
.topnav-sep {
  width: 1px; height: 18px; background: var(--line);
  margin: 0 4px; flex-shrink: 0;
}
/* 769px–1100px : liens compte / garde-robe en icônes cercle (évite la coupure du libellé) */
@media (min-width: 769px) and (max-width: 1100px) {
  .topbar {
    padding-left: 20px;
    padding-right: 20px;
    gap: 12px;
  }
  .topbar-end { gap: 10px; min-width: 0; }
  .topnav { gap: 8px; }
  .topnav a:not(.topnav-icon-btn) {
    font-size: 13px;
    padding: 4px 0;
    letter-spacing: -0.01em;
  }
  .topnav-sep {
    margin: 0 4px 0 10px;
    height: 16px;
  }
  .topnav a.topnav-icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
  }
  .topnav a.topnav-icon-btn .topnav-link-label {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
  }
  .topnav a.topnav-icon-btn i { font-size: 14px; }
  .topnav a.topnav-icon-btn.active {
    border-color: var(--fitzu-accent);
    color: var(--fitzu-accent);
  }
  .topnav a.topnav-icon-btn.active i { color: var(--fitzu-accent); }
}

/* === Quick-nav : pills catégories (Tout, Robes…) sous le header — pas le drawer mobile === */
.quick-nav {
  background: white;
  border-bottom: 1px solid var(--line);
}
.quick-nav-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.quick-nav-track-wrap {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.quick-nav-track {
  display: flex; gap: 8px;
  padding: 12px 8px 12px 24px;
  overflow-x: auto;
  scrollbar-width: none;             /* Firefox */
  -webkit-overflow-scrolling: touch; /* iOS smooth */
  scroll-snap-type: x proximity;
  scroll-padding-left: 24px;
  scroll-padding-right: 8px;
}
@media (hover: hover) and (pointer: fine) {
  .quick-nav-track { cursor: grab; }
  .quick-nav-track.is-dragging {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none;
  }
  .quick-nav-track.is-dragging .quick-pill {
    cursor: grabbing;
    pointer-events: none;
  }
}
.quick-nav-search-btn {
  flex: 0 0 auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  padding: 0;
  border: none;
  border-left: 1px solid var(--line);
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 16px;
  position: relative;
  z-index: 2;
  box-shadow: -8px 0 12px -8px rgba(30, 24, 16, 0.1);
  transition: background .2s ease, color .2s ease;
}
.quick-nav-search-btn i {
  display: inline-block;
  transition: transform .32s cubic-bezier(.4,0,.2,1), color .2s ease;
}
.quick-nav-search-btn:hover,
.quick-nav-search-btn.is-active {
  background: #f7f3eb;
  color: var(--ink);
}
.quick-nav-search-btn.is-active i {
  transform: scale(1.08) rotate(-10deg);
}
.quick-nav-search-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.quick-nav-search-panel.is-open {
  grid-template-rows: 1fr;
  pointer-events: auto;
}
.quick-nav-search-wrap {
  overflow: hidden;
  min-height: 0;
}
.quick-nav-search-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 12px;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity .24s cubic-bezier(.4,0,.2,1),
    transform .32s cubic-bezier(.4,0,.2,1);
}
.quick-nav-search-panel.is-open .quick-nav-search-inner {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .05s;
}
.quick-nav-search-panel:not(.is-open) .quick-nav-search-inner {
  transition-delay: 0s;
  transition-duration: .18s;
}
.quick-nav-search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-family: inherit;
  background: #f7f3eb;
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.quick-nav-search-input::placeholder { color: #9a9084; }
.quick-nav-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(196, 167, 125, .18);
}
.quick-nav-search-results {
  margin-top: 8px;
  max-height: min(50vh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity .26s cubic-bezier(.4,0,.2,1),
    transform .26s cubic-bezier(.4,0,.2,1),
    margin-top .26s cubic-bezier(.4,0,.2,1);
}
.quick-nav-search-results.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.quick-nav-search-results:empty {
  margin-top: 0;
  opacity: 0;
  transform: none;
}
@keyframes quickSearchHitIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.quick-nav-search-results.is-visible .quick-search-hit {
  animation: quickSearchHitIn .28s cubic-bezier(.4,0,.2,1) both;
}
.quick-nav-search-results.is-visible .quick-search-hit:nth-child(1) { animation-delay: 0ms; }
.quick-nav-search-results.is-visible .quick-search-hit:nth-child(2) { animation-delay: 24ms; }
.quick-nav-search-results.is-visible .quick-search-hit:nth-child(3) { animation-delay: 48ms; }
.quick-nav-search-results.is-visible .quick-search-hit:nth-child(4) { animation-delay: 72ms; }
.quick-nav-search-results.is-visible .quick-search-hit:nth-child(5) { animation-delay: 96ms; }
.quick-search-hit {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .12s ease;
}
.quick-search-hit:hover,
.quick-search-hit:focus-visible {
  background: #f7f3eb;
  outline: none;
}
.quick-search-hit-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: #f0eae0;
}
.quick-search-hit-thumb--empty { display: block; }
.quick-search-hit-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-search-hit-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.quick-search-hit-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-search-hit-meta {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-search-empty {
  margin: 4px 10px 0;
  font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .quick-nav-search-panel,
  .quick-nav-search-inner,
  .quick-nav-search-results,
  .quick-nav-search-btn i { transition: none; }
  .quick-nav-search-results.is-visible .quick-search-hit { animation: none; }
}
/* Espaceur gauche : le padding du conteneur scroll est ignoré sur iOS au scrollLeft=0 */
.quick-nav-track::before {
  content: '';
  flex: 0 0 1px;
  scroll-snap-align: start;
}
.quick-nav-track::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.quick-pill,
.products-filter-toggle {
  display: inline-block;
  padding: var(--pill-padding-y) var(--pill-padding-x);
  border-radius: var(--pill-radius);
  font-size: var(--pill-font-size);
  font-weight: var(--pill-font-weight);
  line-height: 1.2;
  border: var(--pill-border);
}
.quick-pill {
  flex: 0 0 auto;
  background: #f7f3eb;
  color: var(--ink);
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-drag: none;
  user-select: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  scroll-snap-align: start;
}
.quick-pill.active {
  background: var(--ink);
  color: white;
}
@media (hover: hover) and (pointer: fine) {
  .quick-pill:hover:not(.active):not(.products-filter-toggle) {
    background: transparent;
    border-color: var(--fitzu-accent);
    color: var(--fitzu-accent);
  }
  .quick-pill.active:hover {
    background: var(--ink);
    border-color: transparent;
    color: white;
  }
}

/* === Bandeau in-app browser === */
.inapp-banner {
  background: #fdf6e9; border-bottom: 1px solid var(--accent);
  padding: 10px 16px; font-size: 13px;
  max-height: 80px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, border-width 0.3s ease;
}
body.scroll-down .inapp-banner:not(.hidden) {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.inapp-banner-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  color: #6a5520;
}
#inapp-banner-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: #6a5520; line-height: 1;
}

/* === Auth modal === */
.auth-card { max-width: 420px; }
.auth-card h3 {
  font-family: var(--font-sans);
  font-size: 24px; margin: 0 0 8px;
}
.auth-card .muted { margin-bottom: 20px; }
.auth-card label {
  display: block; margin: 14px 0 6px;
  font-size: 13px; font-weight: 500;
}
.auth-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; font-family: inherit;
}
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card .btn-large {
  margin-top: 20px; width: 100%;
  padding: 14px; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.2px;
}
.auth-card .btn-large i { margin-right: 8px; }
.auth-switch {
  text-align: center; margin: 16px 0 0;
  font-size: 13px; color: var(--ink-soft);
}
.auth-switch a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.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;
}
.otp-input {
  text-align: center;
  font-size: 28px !important;
  font-weight: 600;
  letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
  padding: 16px 14px !important;
}
.otp-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #b42318;
  text-align: center;
}

/* === Galerie === */
.gallery-section { max-width: 1200px; margin: 0 auto; }
.gallery-header {
  text-align: center; margin-bottom: 32px;
}
.gallery-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 8px;
}
.gallery-page-title {
  font-family: var(--font-sans);
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--fitzu-accent);
}
.gallery-header h2 {
  font-family: var(--font-sans);
  font-size: 32px; margin: 0 0 8px;
}
.gallery-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.gallery-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .15s ease;
}
.gallery-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* === Image générée (héros de la card) === */
.gallery-main {
  position: relative;
  aspect-ratio: 3/4;
  background: #f0eae0;
}
.gallery-main-skeleton {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(110deg, #f0eae0 8%, #faf6f0 18%, #f0eae0 33%);
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s ease-in-out infinite;
}
@keyframes gallery-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.gallery-main.is-loaded .gallery-main-skeleton { display: none; }
.gallery-main-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  position: relative;
  z-index: 0;
}
.gallery-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--ink-soft); font-size: 12px;
}
.gallery-placeholder.failed { color: #8a2929; }
.gallery-placeholder i { font-size: 28px; }
.spinner-small {
  width: 32px; height: 32px;
  border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}

/* Date en surimpression coin haut-gauche, fine et discrète */
.gallery-date {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--ink);
}

/* Mini-vignette "Avant" — photo originale en surimpression bas-gauche */
.gallery-before {
  position: absolute;
  bottom: 10px; left: 10px;
  width: 64px; height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  cursor: pointer;
  padding: 0;
  background: #f0eae0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.gallery-before:hover { transform: scale(1.06); box-shadow: 0 4px 14px rgba(0,0,0,.32); }
.gallery-before img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-before-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  padding: 3px 0;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

/* Boutons d'action ronds en overlay haut-droit */
.gallery-quick-actions {
  position: absolute; top: 10px; right: 10px;
  display: flex; gap: 6px;
}
.gallery-icon-btn {
  width: 34px; height: 34px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.gallery-icon-btn:hover { background: white; color: var(--accent-dark); }
.gallery-hide-icon {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.gallery-hide-card { max-width: 400px; }

/* QR code bas-droite (symétrique du « Avant ») */
.gallery-qr {
  position: absolute;
  bottom: 10px; right: 10px;
  width: 72px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  padding: 4px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.gallery-qr:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(0,0,0,.32);
}
.gallery-qr img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.gallery-qr-label {
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.2;
}

/* === Page publique /look/:token === */
.look-share-section {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.look-share-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--ink-soft);
  font-size: 14px;
}
.look-share-content.hidden,
.look-share-error.hidden { display: none; }
.look-share-content {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.look-share-content.is-visible { opacity: 1; }
.look-share-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f0eae0;
  box-shadow: var(--shadow);
}
.look-share-hero.is-loading {
  min-height: min(72vh, 640px);
}
.look-share-img-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #f0eae0 8%, #faf7f2 18%, #f0eae0 33%);
  background-size: 200% 100%;
  animation: look-share-shimmer 1.4s ease-in-out infinite;
  transition: opacity 0.35s ease;
}
.look-share-img-skeleton.is-hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes look-share-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.look-share-img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.look-share-img.is-visible { opacity: 1; }
.look-share-product-block {
  margin-top: 20px;
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.look-share-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
}
.look-share-order-wrap {
  margin: 0;
  padding: 0 16px 14px;
  text-align: right;
}
.look-share-order-wrap.hidden { display: none; }
.look-share-hint {
  text-align: center;
  font-size: 14px;
  margin: 24px 0 14px;
}
.look-share-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.look-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  padding: 14px 24px;
  font-size: 14px;
}
.look-share-error {
  text-align: center;
  padding: 48px 16px;
  color: #8a2929;
}
.look-share-error i { font-size: 36px; margin-bottom: 16px; }
.look-share-error p { margin-bottom: 20px; color: var(--ink-soft); }

/* === Mini-card du produit réel sous l'image générée === */
.gallery-product-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fdfbf7;
  border-top: 1px solid var(--line);
  align-items: center;
}
.gallery-product-card.small { padding: 12px 16px; }
.gallery-product-thumb {
  width: 56px; height: 72px;
  background: #f0eae0;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.gallery-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-product-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.gallery-product-brand {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.gallery-product-name {
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-product-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* === Bouton achat externe (secondaire à l'essayage) === */
.product-buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.15px;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.product-buy-link:hover {
  color: var(--fitzu-accent);
  background: transparent;
  border-color: var(--fitzu-accent);
  text-decoration: none;
}
.product-buy-link:hover .product-buy-link-arrow {
  color: var(--fitzu-accent);
  transform: translateX(4px);
}
.product-buy-link-arrow {
  font-size: 13px;
  color: var(--fitzu-accent);
  display: inline-block;
  transition: transform .2s ease, color .15s ease;
}
.product-buy-link > i {
  font-size: 14px;
  flex-shrink: 0;
}
.gallery-buy-wrap {
  margin: 0;
  padding: 10px 16px 14px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.gallery-empty {
  text-align: center; padding: 60px 20px;
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* Story 9:16 en entier — pas de crop 3/4 */
  .gallery-main {
    aspect-ratio: auto;
  }
  .gallery-main.is-loading:not(.is-loaded) {
    aspect-ratio: 9 / 16;
  }
  .gallery-main:has(.gallery-placeholder) {
    aspect-ratio: 9 / 16;
  }
  .gallery-main-img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

/* === Carte colorimétrie === */
.color-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 28px;
}
.color-card-head {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 22px;
}
/* En-tête morpho : illustration + texte côte à côte (empilé sur mobile) */
.morpho-hero {
  display: flex; align-items: center; gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px; margin-bottom: 22px;
}
.morpho-hero .color-card-head {
  flex: 1; text-align: left; border-bottom: none;
  padding-bottom: 0; margin-bottom: 0;
}
.morpho-illu {
  width: 120px; height: 180px; object-fit: contain;
  flex-shrink: 0; border-radius: 10px;
  background: #fbf6ec; padding: 6px;
}
@media (max-width: 480px) {
  .morpho-hero { flex-direction: column; gap: 12px; text-align: center; }
  .morpho-hero .color-card-head { text-align: center; }
  .morpho-illu { width: 150px; height: 220px; }
}
.color-saison {
  font-family: var(--font-sans);
  font-size: 28px; font-weight: 600;
  margin: 6px 0 6px;
}
.color-eyebrow {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent-dark); margin-bottom: 4px;
}
.color-sub { font-size: 13px; color: var(--ink-soft); margin: 0; letter-spacing: .3px; }

.color-section { margin-bottom: 22px; }
.color-section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 12px;
}
.color-swatches {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.color-swatch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px;
  background: #fdfbf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.color-swatch.avoid {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: var(--ink-soft);
}
.color-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.1);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
}
.color-name { color: var(--ink); font-weight: 500; }

.color-metrics {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.color-metric { display: flex; justify-content: space-between; font-size: 13px; }
.color-metric-label { color: var(--ink-soft); font-weight: 500; }
.color-metric-value { color: var(--ink); font-weight: 600; text-transform: capitalize; }

.color-tips {
  font-size: 13px; line-height: 1.6; color: var(--ink-soft);
  margin: 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-style: italic;
}

/* === Palette par saison de l'année === */
.color-seasonal-wrap { padding-top: 16px; border-top: 1px solid var(--line); }
.color-seasons {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 4px;
}
.season-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; background: #fdfbf7;
}
.season-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 6px;
}
.season-head i { color: var(--accent-dark); font-size: 13px; width: 16px; text-align: center; }
.season-ambiance { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.45; }
.season-swatches { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.season-swatch { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink); }
.season-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.08); flex-shrink: 0;
}
.season-color-name { white-space: nowrap; }

@media (max-width: 480px) {
  .color-card { padding: 22px 18px; }
  .color-saison { font-size: 22px; }
  .color-seasons { grid-template-columns: 1fr; }
}

/* === Carte profil === */
.profile-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.profile-avatar {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
  font-size: 22px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.profile-avatar-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%;
}
.profile-identity { min-width: 0; flex: 1; }
.profile-name {
  font-family: var(--font-sans);
  font-size: 18px; font-weight: 600;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 4px;
}
.profile-name-row .profile-name { flex: 1; min-width: 0; }
.profile-name-edit-btn {
  flex-shrink: 0;
  padding: 0;
  background: none;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.profile-name-edit-btn:hover { color: var(--ink); }
.profile-name-form { margin-bottom: 4px; }
.profile-name-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.profile-name-field { display: block; min-width: 0; }
.profile-name-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.profile-name-field input:focus {
  outline: none;
  border-color: var(--fitzu-accent);
  box-shadow: 0 0 0 2px rgba(255, 74, 46, 0.15);
}
.profile-name-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-member {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}
.profile-logout {
  flex-shrink: 0;
  padding: 6px 0;
  background: none;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.profile-logout:hover { color: var(--ink); }

.profile-facts {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.profile-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
}
.profile-fact:last-child { border-bottom: none; }
.profile-fact i {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  color: var(--accent-dark);
  font-size: 14px;
}
.profile-fact-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.profile-fact-stat .profile-fact-text { color: var(--ink-soft); }
.profile-fact-stat strong {
  color: var(--ink);
  font-weight: 600;
}

/* Résumé express morpho + colorimétrie */
.profile-quick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.profile-quick-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fdfbf7; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); transition: border-color .2s, background .2s;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.profile-quick-item:hover { border-color: var(--accent); background: #f7efe1; }
#pq-morpho-icon { color: var(--accent-dark); font-size: 18px; width: 26px; text-align: center; flex-shrink: 0; }
.pq-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pq-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); }
.pq-value {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pq-value.pq-todo { font-weight: 500; color: var(--accent-dark); font-style: italic; }
.pq-go { color: var(--ink-soft); font-size: 12px; flex-shrink: 0; }
.pq-illu { width: 26px; height: 38px; object-fit: contain; flex-shrink: 0; }
.pq-dots { display: flex; gap: 3px; width: 22px; flex-wrap: wrap; flex-shrink: 0; }
.pq-dots .pq-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(0,0,0,.08); }
.pq-dots > i { color: var(--accent-dark); font-size: 18px; }

@media (max-width: 480px) {
  .profile-card { padding: 16px; margin-bottom: 20px; }
  .profile-avatar { width: 48px; height: 48px; font-size: 20px; }
  .profile-name { font-size: 17px; }
  .profile-name-fields { grid-template-columns: 1fr; }
  .profile-quick { grid-template-columns: 1fr; gap: 8px; }
  .profile-quick-item { padding: 14px 16px; }
  .gallery-section .gallery-header { margin-bottom: 20px; }
  .gallery-section .gallery-header h2 { font-size: 22px; }
  .gallery-section .gallery-header .muted { font-size: 13px; line-height: 1.45; }
}

/* Formulaire avec 2 colonnes (prénom + nom) */
.form-row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.form-row-2 label { margin: 14px 0 6px; }
@media (max-width: 380px) {
  .form-row-2 { grid-template-columns: 1fr; }
}
.gallery-empty .btn-primary { margin-top: 18px; display: inline-block; }

/* === Lightbox photo originale === */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 18, 14, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 80vh;
  touch-action: pan-y pinch-zoom;
}
.lightbox-img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox--carousel .lightbox-img {
  transition: opacity .2s ease;
  max-height: 90vh;
}
.lightbox--carousel .lightbox-stage {
  max-height: 90vh;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
  z-index: 1;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 500;
  pointer-events: none;
}
.lightbox-caption {
  position: absolute;
  bottom: 20px;
  color: white;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 500;
}
.lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

/* === Boutons de partage dans le résultat === */
.share-buttons {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin: 18px 0;
}
.btn-share {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  background: white; border: 1px solid var(--line); color: var(--ink);
  font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none;
  border-radius: 8px;
  transition: border-color .15s ease, color .15s ease;
}
.btn-share:hover { border-color: var(--accent); }
.btn-share-ig:hover { color: #E1306C; border-color: #E1306C; }
.btn-share-wa:hover { color: #25D366; border-color: #25D366; }
.btn-share i { font-size: 16px; }

/* === Bouton WhatsApp flottant (cabine) === */
.cabine-whatsapp {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cabine-whatsapp:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}
.cabine-whatsapp__icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
}
.cabine-whatsapp__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cabine-whatsapp__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(37, 211, 102, 0.55);
  animation: cabine-whatsapp-pulse 2.4s ease-out infinite;
}
.cabine-whatsapp__ring:nth-child(2) {
  animation-delay: 1.2s;
}
@keyframes cabine-whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* === Burger mobile === */
.burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; padding: 0;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}

/* === Drawer latéral (ouvre depuis la droite) === */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 280px; max-width: 80vw;
  background: white;
  box-shadow: -4px 0 24px rgba(0,0,0,.08);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 50;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.drawer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.drawer-logo-img {
  height: 42px; width: auto; display: block;
}
.drawer-close {
  background: none; border: none; cursor: pointer;
  font-size: 30px; line-height: 1; color: var(--ink-soft);
  width: 36px; height: 36px;
}
.drawer-nav {
  display: flex; flex-direction: column;
  padding: 12px 0;
  flex: 1;
}
.drawer-nav a {
  padding: 16px 24px;
  font-size: 17px; color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
}
/* Drawer-nav : menu burger mobile uniquement (masqué sur desktop via .burger) */
.drawer-nav a:hover, .drawer-nav a:active {
  background: transparent;
  color: var(--fitzu-accent);
}
.drawer-nav a.active { color: var(--fitzu-accent); font-weight: 600; }
.drawer-footer {
  padding: 20px 24px;
  font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,18,14,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
  z-index: 49;
}
.drawer-backdrop.open {
  opacity: 1; pointer-events: auto;
}

/* === Responsive mobile === */
@media (max-width: 768px) {
  :root {
    --pill-padding-y: 7px;
    --pill-padding-x: 14px;
    --pill-font-size: 13px;
  }
  .topbar { padding: 10px 16px; }
  .burger { display: flex; }
  .topnav { display: none; }
  .logo-img { height: 44px; }

  .quick-nav-track {
    padding: 10px 6px 10px 16px;
    gap: 6px;
    scroll-padding-left: 16px;
    scroll-padding-right: 6px;
  }
  .quick-nav-track::before { flex-basis: 1px; }
  .quick-nav-search-btn { width: 46px; font-size: 15px; }
  .quick-nav-search-inner { padding: 0 16px 10px; }

  main { padding: 16px 16px 60px; }

  .hero { padding: 30px 16px 20px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .section h2 { font-size: 22px; }

  .product-card .body { padding: 10px 12px 14px; }

  .product-wrap { gap: 24px; }
  .product-info .product-title-row h1 { font-size: 26px; }
  .price { font-size: 19px; margin-bottom: 18px; }
  .fitting-box { padding: 18px; }

  .modal-card, .overlay-card, .result-card { padding: 22px; }
  .overlay-card-stream { max-width: 92%; }
  .scan-wrap { aspect-ratio: 3/4; }
}

main { max-width: 1200px; margin: 0 auto; padding: 24px 32px 80px; }

.hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.hero h1 {
  font-family: var(--font-sans);
  font-size: 44px; margin: 0 0 14px; font-weight: 700;
}
.hero p { color: var(--ink-soft); font-size: 17px; max-width: 600px; margin: 0 auto; }

.section { margin: 0 0 40px; }
.section > h2 {
  font-family: var(--font-sans);
  font-size: 28px; margin: 0 0 28px;
  text-align: center;
}
.section .row-between h2 {
  font-family: var(--font-sans);
  font-size: 28px; margin: 0;
}

.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }

.products-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.products-head h2 {
  font-family: var(--font-sans);
  font-size: 28px;
  margin: 0;
  text-align: center;
  justify-self: center;
  grid-column: 2;
}
.products-head .link-back {
  justify-self: start;
  grid-column: 1;
  white-space: nowrap;
}
.products-head-spacer {
  grid-column: 3;
  justify-self: end;
  width: 1px;
  height: 1px;
  visibility: hidden;
}

.products-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 22px;
}
.products-filter {
  position: relative;
}
.products-filter-toggle {
  margin: 0;
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.products-filter-toggle:hover,
.products-filter.is-open .products-filter-toggle {
  border-color: var(--fitzu-accent);
  background: #fdfaf4;
}
.products-filter-label {
  font-weight: inherit;
}
.products-filter-summary {
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.products-filter-summary:not(:empty)::before {
  content: '·';
  margin: 0 6px 0 2px;
  color: var(--line);
}
.products-filter-panel {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(320px, 50vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.products-filter-panel.is-positioning {
  visibility: hidden;
  pointer-events: none;
}
.products-filter-panel.hidden { display: none; }
.products-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.products-filter-option:hover { background: #f8f4ec; }
.products-filter-option.is-selected {
  background: var(--fitzu-accent-soft, #fdf6e9);
  font-weight: 600;
}
.products-filter-option input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--fitzu-accent);
}
.products-filter-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.products-filter-clear {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 4px;
}
.products-filter-clear:hover { color: var(--accent-dark); }

@media (max-width: 768px) {
  .products-head h2 { font-size: 22px; }
  .products-filters {
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
  }
  .products-filter-summary { max-width: 96px; }
  .products-filter-panel {
    min-width: min(280px, calc(100vw - 32px));
  }
}

.link-back { color: var(--ink-soft); font-size: 14px; }
.link-back:hover { color: var(--accent-dark); }
.product-page > .link-back {
  display: inline-block;
  margin: 0;
}

/* Grilles */
.grid { display: grid; gap: 20px; }
.grid-brands  { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-cats    { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid-colors  { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.card-tile-color {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.color-tile-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.product-color-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft, #6a6a6a);
}
.product-card .product-color-hint {
  margin: 4px 0 0;
}
.product-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.product-color-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.section-intro { margin: -8px 0 20px; }

.section-search {
  max-width: 420px;
  margin: -12px auto 24px;
}
.section-search-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-family: inherit;
  background: #f7f3eb;
  color: var(--ink);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.section-search-input::placeholder { color: #9a9084; }
.section-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(196, 167, 125, .18);
}
.section-search-empty {
  text-align: center;
  margin: 0 0 20px;
}

.brands-browse { position: relative; }
.brands-directory {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brands-group-letter {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.brands-index {
  position: fixed;
  right: max(4px, env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 8px 2px;
  overflow: visible;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.brands-index-letter {
  --letter-scale: 1;
  --letter-translate-y: 0px;
  appearance: none;
  border: 0;
  background: none;
  font: 600 10px/1.15 var(--font-sans);
  color: var(--accent-dark);
  padding: 1px 6px;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  transform: translateY(var(--letter-translate-y)) scale(var(--letter-scale));
  transform-origin: center center;
  transition: transform 0.18s ease-out, color 0.12s ease, background 0.12s ease;
  will-change: transform;
}
.brands-index.is-scrubbing .brands-index-letter {
  transition: color 0.12s ease;
}
.brands-index-letter.is-disabled {
  color: #c8bfb3;
  cursor: default;
}
.brands-index-letter.is-active,
.brands-index-letter:not(.is-disabled):hover {
  color: var(--fitzu-accent);
  background: var(--fitzu-accent-soft);
}
.brands-index.is-scrubbing .brands-index-letter {
  background: none;
}
.brands-index.is-scrubbing .brands-index-letter.is-active {
  font-weight: 700;
  color: var(--fitzu-accent);
}
.brands-index-hint {
  display: none;
}
@media (min-width: 769px) {
  .brands-index-letter {
    font-size: 11px;
    padding: 2px 8px;
  }
}
.grid-products{ grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-new-products { grid-template-columns: repeat(3, 1fr); }
.recent-looks-carousel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  outline: none;
}
.recent-looks-carousel::-webkit-scrollbar { display: none; }
.recent-looks-carousel.is-dragging { cursor: grabbing; }
.recent-looks-track {
  display: flex;
  gap: 16px;
  width: max-content;
  align-items: stretch;
  user-select: none;
}
.recent-looks-track > .product-card.recent-look-card {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
}
.recent-looks-track > .product-card.recent-look-card img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}
@media (max-width: 768px) {
  .grid-new-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .recent-looks-track { gap: 12px; }
  .recent-looks-track > .product-card.recent-look-card {
    width: 150px;
    min-width: 150px;
  }
}
.section-recent-looks {
  padding-bottom: 8px;
  overflow: hidden;
}

/* Eyebrow + titre + CTA centré pour les sections "Nouveautés" */
.section-head { text-align: center; margin-bottom: 28px; }
.section-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--fitzu-accent); margin-bottom: 6px;
}
.section-head h2 {
  font-family: var(--font-sans);
  font-size: 28px; margin: 0;
}
.section-cta { text-align: center; margin-top: 28px; }

.card-tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 20px; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}
.card-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.grid-brands .card-tile:hover,
.grid-cats .card-tile:hover,
.grid-colors .card-tile:hover { border-color: var(--fitzu-accent); }
.card-tile .label {
  font-family: var(--font-sans); font-size: 19px; font-weight: 600;
  line-height: 1.3; overflow-wrap: break-word; hyphens: auto;
}
.card-tile .count { color: var(--ink-soft); font-size: 13px; margin-top: 6px; }

/* Grilles catalogue — responsive (après définitions de base pour garantir la cascade) */
@media (max-width: 768px) {
  .grid-brands,
  .grid-cats {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .grid-colors {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
  }
  .grid-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-tile {
    padding: 14px 10px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }
  .card-tile .label { font-size: 15px; }
  .card-tile .count { font-size: 11px; margin-top: 4px; }
  .card-tile-color {
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 12px 8px;
  }
  .color-tile-swatch {
    width: 32px;
    height: 32px;
  }
  .section-intro { margin-bottom: 16px; }
  .section > h2 { margin-bottom: 20px; }
}

@media (max-width: 480px) {
  .grid-colors {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }
}

@media (max-width: 380px) {
  .grid-brands,
  .grid-cats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-colors {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .grid-colors {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

.product-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card .img-wrap { position: relative; aspect-ratio: 3/4; background: #f0eae0; overflow: hidden; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card.recent-look-card {
  width: 100%;
  min-width: 0;
}
.product-card.recent-look-card .img-wrap {
  aspect-ratio: 9 / 16;
  background: #1a1a1a;
}
.product-card.recent-look-card .img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.product-card.recent-look-card .body {
  width: 100%;
  align-items: center;
  text-align: center;
}
.product-card.recent-look-card .brand-tag {
  width: 100%;
}
.product-tried-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--fitzu-accent);
  background: rgba(255, 240, 237, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--fitzu-accent);
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(255, 74, 46, 0.12);
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.product-tried-badge:hover {
  background: var(--fitzu-accent-soft);
  border-color: var(--fitzu-accent);
  box-shadow: 0 2px 8px rgba(255, 74, 46, 0.18);
}
.product-tried-badge i { font-size: 9px; opacity: 0.9; color: var(--fitzu-accent); }
.product-card .img-wrap .product-tried-badge {
  bottom: 10px;
  left: 10px;
}
.product-image .product-tried-badge {
  top: 10px;
  right: 10px;
}
.product-card .body {
  padding: 14px 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.product-card .brand-tag {
  font-size: 11px;
  margin-bottom: 4px;
  line-height: 1.35;
}
.product-card .brand-tag-label {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.product-card .brand-tag-name {
  color: var(--fitzu-accent);
  font-weight: 500;
}
.product-card .name { font-size: 15px; font-weight: 500; width: 100%; }
.product-card .price { font-size: 14px; color: var(--ink); margin-top: 8px; font-weight: 600; width: 100%; }

.products-count-hint {
  text-align: center;
  margin: -4px 0 22px;
  font-size: 14px;
}
.products-grid-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}
.products-grid-loader {
  text-align: center;
  margin: 8px 0 24px;
  font-size: 14px;
}

/* Page produit */
.product-page { padding: 0; }
.product-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 20px;
}
@media (max-width: 768px) { .product-wrap { grid-template-columns: 1fr; gap: 30px; } }
.product-media { display: flex; flex-direction: column; gap: 20px; }
.product-image { position: relative; }
.product-image img {
  width: 100%; border-radius: var(--radius); aspect-ratio: 3/4; object-fit: cover;
  background: #f0eae0;
}

.product-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0 10px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.4;
}
.product-brand-row__item.hidden {
  display: none;
}
.product-brand-row__sep {
  color: rgba(0, 0, 0, 0.2);
  font-weight: 300;
  user-select: none;
  line-height: 1;
}
.product-brand-row__sep.hidden {
  display: none;
}
.product-brand-row__color {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.product-brand-row__color .product-color-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-soft, #6a6a6a);
}
.product-meta-label {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.product-brand-row .brand-tag,
.product-info .product-brand-row .brand-tag {
  margin-bottom: 0;
  display: inline;
}
.product-brand-row .product-color-hint {
  margin: 0;
  padding-left: 0;
  border-left: none;
  font-size: inherit;
  font-weight: inherit;
}
.product-info .brand-tag {
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.product-info .brand-tag-label {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.product-info .brand-tag-name,
.product-info .brand-tag-link {
  color: var(--fitzu-accent);
  font-weight: 500;
}
.product-info .brand-tag-link {
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.product-info .brand-tag-link:hover,
.product-info .brand-tag-link:active,
.product-info .brand-tag-link:focus-visible {
  color: var(--fitzu-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.product-title-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
  text-align: left;
}
.product-info .product-title-row h1 {
  font-family: var(--font-sans);
  font-size: 34px;
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}
.product-info .price {
  text-align: left;
}
.price { font-size: 22px; font-weight: 600; margin-bottom: 10px; }
@media (max-width: 768px) {
  .product-title-row {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .product-info .product-title-row h1,
  #p-name,
  .product-info .price,
  #p-price {
    width: 100%;
    text-align: center;
  }
  .product-brand-row {
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    text-align: center;
    font-size: 11px;
    gap: 0 8px;
  }
  .product-brand-row__sep { padding: 0 1px; }
  .product-brand-row .product-color-value { gap: 6px; }
  .product-brand-row .product-color-value__name { display: none; }
}
.product-actions-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 20px;
}
.product-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.15px;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.product-share-btn:hover {
  color: var(--fitzu-accent);
  border-color: var(--fitzu-accent);
}
.product-share-btn i {
  font-size: 14px;
}
.product-actions-wrap .product-buy-link {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  padding: 10px 14px;
}
.product-actions-wrap .product-buy-link.hidden,
.result-buy-wrap.hidden { display: none; }
@media (max-width: 480px) {
  .product-actions-wrap {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .product-actions-wrap .product-share-btn,
  .product-actions-wrap .product-more-btn {
    flex: 0 0 auto;
    padding: 10px 10px;
  }
  .product-actions-wrap .product-buy-link:not(.hidden) {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 0;
    padding: 10px 12px;
    font-size: 13px;
  }
  .product-actions-wrap .product-buy-link:not(.hidden) > i {
    font-size: 13px;
  }
}
.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 10050;
  max-width: min(90vw, 360px);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(20, 20, 20, 0.92);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.result-buy-wrap {
  margin: 12px 0 4px;
  text-align: center;
}
.desc {
  color: var(--ink-soft); line-height: 1.6;
  margin-top: 32px; padding-top: 28px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 120px;
}
.desc p { margin: 0 0 14px; }
.desc p:last-child { margin-bottom: 0; }
.product-bullets {
  list-style: none; padding: 0; margin: 12px 0 0;
}
.product-bullets li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.product-bullets li:last-child { border-bottom: none; }
.product-bullets li::before {
  content: '';
  position: absolute;
  left: 4px; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* === Boîte d'essayage — style éditorial sobre === */
.fitting-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.fitting-head { margin-bottom: 24px; }
.fitting-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 8px;
}
.fitting-box > .fitting-head > .fitting-eyebrow,
.decor-zone-head .fitting-eyebrow {
  color: var(--fitzu-accent);
}
.fitting-title {
  font-family: var(--font-sans);
  font-size: 22px; font-weight: 600;
  margin: 0; letter-spacing: -.2px;
}
.fitting-intro {
  font-size: 14px; color: var(--ink-soft); line-height: 1.6;
  margin: 10px 0 0; max-width: 42ch;
}

/* Zone d'upload — pas de bordure dashed */
.upload-zone { margin-bottom: 18px; }
.upload-actions { display: flex; gap: 8px; }
.upload-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px;
  background: var(--ink); color: white;
  font-size: 13px; font-weight: 500; letter-spacing: .3px;
  cursor: pointer;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.upload-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}
.upload-btn i { font-size: 15px; }
.upload-btn-secondary {
  background: white; color: var(--ink); border: 1px solid var(--line);
}
.upload-btn-secondary:hover {
  background: white; color: var(--accent-dark); border-color: var(--accent);
}

/* Page produit : boutons upload pill + hover orange Fitzu */
.fitting-box .upload-zone .upload-btn {
  border-radius: 999px;
}
.fitting-box .upload-zone .upload-btn:hover {
  background: var(--fitzu-accent);
  border-color: var(--fitzu-accent);
}
.fitting-box .upload-zone .upload-btn-secondary:hover {
  background: var(--fitzu-accent-soft);
  color: var(--fitzu-accent);
  border-color: var(--fitzu-accent);
}

@media (max-width: 480px) {
  .upload-actions { flex-direction: column; gap: 8px; }
  .upload-btn { padding: 15px; font-size: 14px; }
}

.preview-zone {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-bottom: 20px;
}
.preview-zone img {
  max-height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* === Sélecteur de décor — liste verticale épurée === */
.decor-zone { margin-bottom: 20px; }
.decor-zone-head { margin-bottom: 14px; text-align: center; }
.decor-title {
  font-family: var(--font-sans);
  font-size: 18px; font-weight: 600;
  margin: 4px 0 0;
}

.decor-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}

.decor-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  transition: background .12s ease;
}
.decor-row:last-child { border-bottom: none; }
.decor-row:hover { background: #fdfbf7; }
.decor-zone .decor-row.selected { background: var(--fitzu-accent-soft); }

/* Radio circulaire à gauche */
.decor-radio {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  position: relative;
  transition: border-color .15s ease;
}
.decor-zone .decor-row:hover .decor-radio { border-color: var(--fitzu-accent); }
.decor-zone .decor-row.selected .decor-radio { border-color: var(--fitzu-accent); border-width: 5px; }

.decor-icon {
  flex-shrink: 0;
  width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent-dark);
  transition: color .12s ease;
}
.decor-zone .decor-icon { color: var(--ink); }
.decor-zone .decor-row.selected .decor-icon { color: var(--fitzu-accent); }

.decor-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.decor-name {
  font-size: 14px; font-weight: 600;
  font-family: var(--font-sans);
  color: var(--ink);
}
.decor-city { font-weight: 400; color: var(--ink-soft); }
.decor-mood {
  font-size: 10px; color: var(--accent-dark);
  letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600;
  transition: color .12s ease;
}
.decor-zone .decor-mood { color: var(--ink-soft); }
.decor-zone .decor-row.selected .decor-mood { color: var(--fitzu-accent); }
.link-button {
  background: none; border: none;
  color: var(--ink-soft); font-size: 13px;
  cursor: pointer; padding: 4px 0;
  text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: color .15s ease;
  font-family: inherit;
}
.link-button:hover { color: var(--accent-dark); text-decoration-color: var(--accent); }

/* Bouton générer en mode édito */
.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-radius: 2px;
}
.btn-large i { margin-right: 8px; font-size: 14px; }

/* Bouton générer — fond noir, baguette orange */
.gen-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  max-width: 340px;
  margin: 8px auto 0;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: background 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.gen-pill-btn:hover:not(:disabled) { background: #252525; }
.gen-pill-btn:disabled {
  cursor: default;
  opacity: 0.88;
}
.gen-pill-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  user-select: none;
}
.gen-pill-icon {
  color: #FF4A2E;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1), color 0.15s ease;
}
.gen-pill-btn.is-busy .gen-pill-icon,
.gen-pill-btn.is-sending .gen-pill-icon {
  color: #fff;
  font-size: 15px;
}
.gen-pill-label {
  white-space: nowrap;
}
@media (min-width: 769px) {
  .gen-pill-btn {
    width: min(100%, 300px);
    max-width: 300px;
    transition: background 0.15s ease, opacity 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }
  .gen-pill-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 74, 46, 0.22);
  }
  .gen-pill-btn:hover:not(:disabled):not(.is-busy):not(.is-sending) .gen-pill-icon {
    transform: scale(1.12) rotate(-10deg);
  }
}
@media (max-width: 768px) {
  .gen-pill-btn {
    width: min(92%, 320px);
    max-width: 320px;
    padding: 13px 20px;
    font-size: 13px;
  }
}

.hidden { display: none !important; }

/* Boutons */
.btn-primary, .btn-secondary {
  border: none; font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn-primary {
  background: var(--ink); color: white;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: white; color: var(--ink); border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-large { width: 100%; padding: 16px; font-size: 16px; }

.crm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.crm-sync-status { margin: 0 0 12px; }

.crm-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 18px;
}
.crm-search-label { flex: 1 1 280px; margin: 0; }
.crm-search-label input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.crm-search-count { margin: 0; font-size: 13px; white-space: nowrap; }

.crm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
}

#crm-table {
  table-layout: fixed;
  min-width: 1090px;
}
#crm-table tbody tr.crm-row { vertical-align: top; }
#crm-table th,
#crm-table td {
  padding-left: 10px;
  padding-right: 10px;
}
#crm-table .crm-col-name { width: 6%; }
#crm-table .crm-col-firstname { width: 6%; }
#crm-table .crm-col-email {
  width: 18%;
  min-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#crm-table .crm-col-phone {
  width: 11%;
  min-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#crm-table .crm-col-notes {
  width: 11%;
  vertical-align: top;
}
#crm-table .crm-col-first-seen,
#crm-table .crm-col-last-seen {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  font-size: 12px;
  padding-left: 4px;
  padding-right: 4px;
  vertical-align: top;
}
.crm-date-cell {
  display: inline-block;
  line-height: 1.25;
}
.crm-date-day,
.crm-date-time {
  display: block;
  white-space: nowrap;
}
#crm-table th.crm-col-first-seen,
#crm-table th.crm-col-last-seen,
#crm-table th.crm-col-interactions,
#crm-table th.crm-col-generations,
#crm-table th.crm-col-actions {
  font-size: 11px;
  line-height: 1.2;
  padding-left: 5px;
  padding-right: 5px;
  white-space: nowrap;
}
#crm-table .crm-col-interactions,
#crm-table .crm-col-generations {
  width: 2.75rem;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}
#crm-table .crm-col-source {
  width: 6rem;
  padding-left: 5px;
  padding-right: 5px;
  font-size: 11px;
  line-height: 1.25;
  overflow: hidden;
}
#crm-table .crm-col-actions {
  width: 5.5rem;
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
  white-space: nowrap;
}
.crm-actions-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.crm-actions-head .fa-phone { font-size: 10px; }
.crm-wa-head { font-weight: 600; }

.crm-source-cell {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crm-source-wc { font-size: 10px; margin-top: 2px; }
.crm-phone-trigger {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  text-decoration: underline dotted var(--line);
  text-underline-offset: 3px;
}
.crm-phone-trigger:hover { color: var(--accent-dark); }
.crm-phone-edit { display: flex; flex-direction: column; gap: 8px; min-width: 180px; }
.crm-phone-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.crm-phone-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-phone-actions .btn-secondary { padding: 6px 12px; font-size: 12px; }
.crm-phone-status { margin: 0; font-size: 11px; }
.crm-add-modal-card { max-width: 520px; }
.crm-add-form { margin-top: 16px; }
.crm-add-hint { margin: 8px 0 0; font-size: 13px; }
.crm-add-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.sa-required { font-style: normal; color: #8a2929; }
.sa-field--full { grid-column: 1 / -1; }
.sa-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 72px;
}
.crm-notes-preview-wrap {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.crm-notes-preview {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-notes-preview--empty { font-style: italic; }
.crm-notes-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9f7;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.crm-notes-toggle:hover { background: #f0eee9; color: var(--ink); }
.crm-notes-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.crm-notes-row td {
  padding: 0 14px 12px;
  background: #faf8f4;
  border-bottom: 1px solid var(--line);
}
.crm-notes-panel {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.crm-notes-full {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  cursor: pointer;
}
.crm-notes-full.muted { cursor: default; }
.crm-notes-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.crm-notes-edit-btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-dark);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.crm-notes-edit-btn:hover { color: var(--accent); }
.crm-notes-close.btn-secondary,
.crm-notes-cancel-edit.btn-secondary { padding: 6px 12px; font-size: 12px; }
.crm-notes-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  min-height: 80px;
  background: #fff;
}
.crm-notes-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-notes-actions .btn-secondary { padding: 6px 12px; font-size: 12px; }
.crm-notes-status { margin: 0; font-size: 11px; }
.crm-contact-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}
.crm-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  color: var(--accent-dark);
  background: #eef4fc;
  border: 1px solid #c5d9f0;
  text-decoration: none;
  flex-shrink: 0;
}
.crm-call-btn:hover {
  background: #dce8f8;
  border-color: var(--accent-dark);
}
.crm-call-btn--disabled {
  color: var(--muted);
  background: #f5f4f2;
  border-color: var(--line);
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.crm-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #128c7e;
  background: #e7f8f0;
  border: 1px solid #b8e6d4;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.crm-wa-btn:hover {
  background: #d4f1e4;
  border-color: #128c7e;
}

@media (max-width: 768px) {
  #view-crm .sa-page-head.row-between {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 18px;
  }
  #view-crm .sa-page-head h1 {
    margin-bottom: 0;
    font-size: 22px;
  }
  .crm-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .crm-toolbar > .btn-primary,
  .crm-toolbar > .btn-secondary {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .crm-toolbar-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .crm-toolbar-secondary > .btn-secondary {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 11px 10px;
    font-size: 12px;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  .crm-toolbar-secondary > .btn-secondary:only-child,
  #crm-sync-wc-btn.hidden + #csv-link {
    grid-column: 1 / -1;
  }
  #crm-add-contact-btn {
    padding: 12px 16px;
    font-size: 14px;
  }
  .crm-search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .crm-search-label { flex: 1 1 auto; }
  .crm-search-count { white-space: normal; }

  .crm-table-wrap {
    margin-left: -4px;
    margin-right: -4px;
    border-radius: 12px;
    box-shadow: inset -8px 0 12px -10px rgba(20, 18, 14, 0.12);
  }
  #crm-table.data-table {
    overflow: visible;
    --crm-sticky-name-w: 4.75rem;
    --crm-sticky-firstname-w: 5.25rem;
  }
  #crm-table .crm-col-name,
  #crm-table .crm-col-firstname {
    position: sticky;
    z-index: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fff;
  }
  #crm-table thead .crm-col-name,
  #crm-table thead .crm-col-firstname {
    z-index: 4;
    background: #f0eee9;
  }
  #crm-table .crm-col-name {
    left: 0;
    width: var(--crm-sticky-name-w);
    min-width: var(--crm-sticky-name-w);
    max-width: var(--crm-sticky-name-w);
    box-shadow: 3px 0 8px -4px rgba(20, 18, 14, 0.14);
  }
  #crm-table .crm-col-firstname {
    left: var(--crm-sticky-name-w);
    width: var(--crm-sticky-firstname-w);
    min-width: var(--crm-sticky-firstname-w);
    max-width: var(--crm-sticky-firstname-w);
    box-shadow: 3px 0 8px -4px rgba(20, 18, 14, 0.14);
  }
  #crm-table thead .crm-col-firstname {
    z-index: 3;
  }
  .crm-call-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Modale */
.modal, .overlay {
  position: fixed; inset: 0; background: rgba(20, 18, 14, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(4px);
}
.modal-card, .overlay-card, .result-card {
  background: white; border-radius: 16px; padding: 32px;
  max-width: 460px; width: 92%; box-shadow: var(--shadow);
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 28px; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-card h3, .overlay-card h3, .result-card h3 {
  font-family: var(--font-sans);
  font-size: 24px; margin: 0 0 8px;
}
.muted { color: var(--ink-soft); font-size: 14px; }
#contact-form label {
  display: block; margin: 18px 0 6px;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
#contact-form input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: 15px;
}
#contact-form input:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* Overlay loading */
.overlay-card { text-align: center; }
.spinner {
  width: 50px; height: 50px; margin: 0 auto 18px;
  border: 4px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.overlay-card-stream { max-width: 480px; }

/* Zone de génération cinématographique */
.scan-wrap {
  position: relative; width: 100%; aspect-ratio: 2/3;
  background: #1a1814; border-radius: 12px; overflow: hidden;
  margin-bottom: 18px;
  transform-origin: center center;
}
.scan-wrap.gen-phase-active {
  animation: genBreathe 4s ease-in-out infinite;
}
@keyframes genBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.01); }
}
.scan-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(0);
  transition: filter 0.8s ease, opacity 0.4s ease;
}
.scan-wrap.gen-phase-active .scan-photo {
  filter: blur(2.5px);
}
.scan-wrap.gen-revealing .scan-photo {
  opacity: 0;
}
/* Lueur maquillage / coiffure sur le visage */
.beauty-shimmer {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.scan-wrap.gen-beauty-active .beauty-shimmer {
  opacity: 1;
  background: radial-gradient(ellipse 75% 45% at 50% 26%,
    rgba(255, 196, 172, 0.32) 0%,
    rgba(255, 148, 128, 0.12) 38%,
    transparent 68%);
  animation: beautyGlow 2.6s ease-in-out infinite;
}
.scan-wrap.gen-hair-active .beauty-shimmer {
  opacity: 1;
  background: linear-gradient(165deg,
    rgba(255, 250, 242, 0.22) 0%,
    transparent 32%,
    rgba(255, 236, 210, 0.14) 48%,
    transparent 72%);
  animation: hairGloss 2.4s ease-in-out infinite;
}
@keyframes beautyGlow {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
@keyframes hairGloss {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-3%); opacity: 1; }
}
.scan-wrap.gen-revealing .beauty-shimmer,
.scan-wrap.gen-revealing-done .beauty-shimmer {
  opacity: 0;
  animation: none;
}
/* Voile centré pour lisibilité du texte */
.scan-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 90% 58% at 50% 40%,
    rgba(20, 18, 14, 0.84) 0%,
    rgba(20, 18, 14, 0.48) 42%,
    rgba(20, 18, 14, 0.12) 62%,
    transparent 78%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.scan-wrap.gen-revealing .scan-overlay {
  opacity: 1;
}
.scan-wrap.gen-revealing-done .scan-overlay {
  opacity: 0;
}
/* Lumière diffuse de studio, gauche → droite */
.studio-sweep {
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 248, 235, 0.07) 46%,
    rgba(255, 248, 235, 0.13) 50%,
    rgba(255, 248, 235, 0.07) 54%,
    transparent 62%,
    transparent 100%);
  background-size: 220% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.scan-wrap.gen-phase-active .studio-sweep {
  opacity: 1;
  animation: studioSweep 7s ease-in-out infinite;
}
@keyframes studioSweep {
  0% { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}
.scan-wrap.gen-revealing .studio-sweep {
  opacity: 0;
  animation: none;
}
/* Texte d'étape unique — centré verticalement sur l'image */
.gen-image-ui {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 22px;
  z-index: 2;
  pointer-events: none;
  text-align: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.scan-wrap.gen-revealing .gen-image-ui {
  opacity: 1;
}
.scan-wrap.gen-revealing-done .gen-image-ui {
  opacity: 0;
}
.gen-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}
.gen-step-counter {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1;
  transition: opacity 0.35s ease;
}
.gen-step-label {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.35;
  min-height: 1.35em;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.gen-step-label.gen-step-label-exit {
  opacity: 0;
  transform: translateY(-8px);
}
.gen-step-label.gen-step-label-enter {
  opacity: 0;
  transform: translateY(10px);
}
.scan-wrap.gen-phase-active .gen-step-label {
  animation: genLabelPulse 2.4s ease-in-out infinite;
}
.scan-wrap.gen-generate-active .gen-step-label {
  animation: genLabelPulse 1.6s ease-in-out infinite;
}
@keyframes genLabelPulse {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}
.gen-step-ellipsis {
  display: inline-flex;
  gap: 1px;
  margin-left: 1px;
  vertical-align: baseline;
}
.gen-step-ellipsis span {
  opacity: 0.25;
  animation: genEllipsisBlink 1.1s ease-in-out infinite;
}
.gen-step-ellipsis span:nth-child(2) { animation-delay: 0.18s; }
.gen-step-ellipsis span:nth-child(3) { animation-delay: 0.36s; }
@keyframes genEllipsisBlink {
  0%, 70%, 100% { opacity: 0.25; }
  35% { opacity: 1; }
}
.scan-wrap.gen-ready-active .gen-step-label {
  font-size: 22px;
  letter-spacing: 0.03em;
  animation: genReadyPulse 1.15s ease-in-out infinite;
}
.scan-wrap.gen-ready-active .gen-step-counter {
  color: rgba(255, 107, 74, 0.75);
}
@keyframes genReadyPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
  }
  50% {
    transform: scale(1.04);
    text-shadow: 0 0 22px rgba(255, 74, 46, 0.5), 0 2px 16px rgba(0, 0, 0, 0.65);
  }
}
/* Image finale — révélation par flou artistique */
.final-reveal {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(24px);
  z-index: 3;
  transition: opacity 0.4s ease, filter 0.8s ease;
}
.final-reveal.revealing-blur {
  opacity: 1;
  filter: blur(24px);
}
.final-reveal.revealing-sharp {
  opacity: 1;
  filter: blur(0);
}
/* Barre de progression sous la carte blanche */
.gen-progress-block { margin-top: 6px; }
.gen-progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.gen-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fitzu-accent), #ff6b4a);
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .scan-wrap.gen-phase-active { animation: none; }
  .scan-wrap.gen-phase-active .studio-sweep {
    animation: none;
    opacity: 0.25;
    background-position: 50% 0;
  }
  .scan-wrap.gen-phase-active .scan-photo { filter: blur(1.5px); }
  .scan-wrap.gen-phase-active .gen-step-label { animation: none; opacity: 1; }
  .scan-wrap.gen-generate-active .gen-step-label { animation: none; opacity: 1; }
  .scan-wrap.gen-ready-active .gen-step-label { animation: none; opacity: 1; transform: none; }
  .gen-step-ellipsis span { animation: none; opacity: 0.85; }
  .gen-step-label.gen-step-label-exit,
  .gen-step-label.gen-step-label-enter { opacity: 1; transform: none; }
  .scan-wrap.gen-beauty-active .beauty-shimmer,
  .scan-wrap.gen-hair-active .beauty-shimmer { animation: none; opacity: 0.55; }
  .final-reveal { filter: none !important; transition: opacity 0.4s ease; }
  .final-reveal.revealing-blur { filter: none; }
}

/* Résultat */
.result-card { max-width: 520px; text-align: center; }
.result-card img {
  width: 100%; max-height: 60vh; object-fit: contain;
  border-radius: 12px; margin: 14px 0;
  background: #f0eae0;
}
.result-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* === Admin === */
body.admin { background: #f7f5f1; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px 32px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.card {
  background: white; padding: 22px; border-radius: var(--radius);
  border: 1px solid var(--line); margin-bottom: 18px;
}
.stat-card .label { font-size: 12px; text-transform: uppercase; color: var(--ink-soft); letter-spacing: 1px; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 6px; font-family: var(--font-sans); }
.stat-card .sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

.login { display: flex; justify-content: center; align-items: center; padding: 80px 20px; }
.login-card { background: white; padding: 36px; border-radius: var(--radius); width: 360px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 18px; font-family: var(--font-sans); }
.login-card input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; margin-bottom: 18px; }

/* Écran de connexion admin — plein écran, sans chrome back-office */
body.admin.admin-boot #login-screen,
body.admin.admin-boot #admin-app {
  display: none !important;
}
body.admin.admin-gate {
  min-height: 100vh;
  background: linear-gradient(165deg, #faf7f3 0%, #f0ebe3 100%);
  overflow: hidden;
}
.admin-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 20px;
}
.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 40px 36px 36px;
  text-align: center;
}
.admin-login-brand {
  margin-bottom: 4px;
}
.admin-login-logo {
  display: block;
  width: auto;
  max-width: min(100%, 260px);
  height: 52px;
  margin: 0 auto 12px;
  object-fit: contain;
}
.admin-login-brand--has-logo #admin-login-fitzu {
  margin-top: 4px;
}
.admin-login-brand--has-logo .sa-login-tagline,
.admin-login-brand--has-logo .sa-login-mark {
  font-size: 10px;
}
.admin-login-tag {
  margin: 0 0 28px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.admin-login-label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.admin-login-card input[type="email"],
.admin-login-card .otp-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 16px;
  background: #faf8f5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-login-card input[type="email"]:focus,
.admin-login-card .otp-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.2);
  background: #fff;
}
.admin-login-submit {
  width: 100%;
  margin-top: 4px;
}
.admin-login-card .muted {
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.5;
}
.admin-login-card .auth-switch {
  margin-top: 14px;
}
.admin-login-card .otp-error {
  text-align: left;
  margin-bottom: 12px;
}

.gens-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.gens-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.gens-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.btn-danger {
  border-color: #c45c5c;
  color: #8a2929;
}
.btn-danger:hover {
  border-color: #8a2929;
  color: #8a2929;
  background: #fdf5f5;
}
.gen-card { position: relative; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gen-select {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}
.gen-card .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.gen-card .imgs img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.gen-card .info { padding: 12px 14px; }
.gen-card .info .name { font-weight: 600; font-size: 14px; }
.gen-card .info .gen-client { font-size: 13px; color: var(--ink); margin-top: 2px; }
.gen-card .info .meta { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.gen-card .info .gen-cost strong { color: var(--ink); font-weight: 600; }
.gen-card .info .gen-duration--slow strong { color: #8a2929; }
.gen-duration-breakdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
}
.gen-duration-bar {
  display: inline-flex;
  width: 48px;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: #e8e4df;
  flex-shrink: 0;
}
.gen-dur-seg { display: block; height: 100%; min-width: 1px; }
.gen-dur-seg--prep { background: #9ca3af; }
.gen-dur-seg--api { background: #4a7fd4; }
.gen-dur-seg--post { background: #5a9e6f; }
.gen-status {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.gen-status.success { background: #e8f3ec; color: #2c6b3f; }
.gen-status.failed  { background: #fbe4e4; color: #8a2929; }
.gen-status.pending { background: #fdf3d8; color: #7a5e15; }

/* === Switch de provider IA dans l'admin === */
.provider-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 14px;
}
.provider-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: white;
  transition: border-color .15s ease, background .15s ease;
}
.provider-option:hover { border-color: var(--accent); }
.provider-option.selected { border-color: var(--ink); background: #fdf6e9; }
.provider-option.disabled { opacity: 0.5; cursor: not-allowed; }
.provider-option input { margin: 0; }
.provider-option-name { font-weight: 600; font-size: 14px; }
.provider-option-model { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
@media (max-width: 600px) {
  .provider-switch { grid-template-columns: 1fr; }
}

.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; font-size: 14px; }
.data-table th { background: #f0eee9; font-weight: 600; }
.data-table tr { border-bottom: 1px solid var(--line); }
.data-table tr:last-child { border-bottom: none; }

/* ============================================================
   Mon profil : photo de référence, accordéons, carte morphologie
   ============================================================ */

.gallery-page .gallery-page-title,
.profile-page .gallery-page-title {
  color: var(--ink);
}

.gallery-page .gallery-page-title .fa-clothes-hanger {
  margin-right: 0.35em;
}

.profile-page .fitting-eyebrow,
.profile-page .color-eyebrow {
  color: var(--fitzu-accent);
}

.profile-page .profile-fact i,
.profile-page #pq-morpho-icon,
.profile-page .pq-dots > i,
.profile-page .pq-go,
.profile-page .accordion-label i,
.profile-page .season-head i,
.profile-page .reference-actions .upload-btn-secondary i {
  color: var(--fitzu-accent);
}

.profile-page .pq-value.pq-todo {
  color: var(--fitzu-accent);
}

.profile-page .profile-quick-item:hover {
  border-color: var(--fitzu-accent);
  background: var(--fitzu-accent-soft);
}

.profile-page .reference-gallery-badge {
  background: var(--fitzu-accent-soft);
  color: var(--fitzu-accent);
}

.profile-page .reference-gallery-item.is-selected,
.profile-page .reference-photo-item.is-selected {
  border-color: var(--fitzu-accent);
  box-shadow: 0 0 0 2px rgba(255, 74, 46, 0.28);
}

.profile-page .reference-gallery-item.is-default,
.profile-page .reference-photo-item.is-default {
  border-color: var(--fitzu-accent);
}

/* --- Accordéon --- */
.accordion {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  scroll-margin-top: 140px;
}
.accordion-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: none; border: none; cursor: pointer;
  font: inherit; color: var(--ink); text-align: left;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.accordion-label {
  font-family: var(--font-sans);
  font-size: 18px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
}
.accordion-label i { color: var(--accent-dark); font-size: 16px; }
.accordion-chevron { color: var(--ink-soft); transition: transform .25s ease; }
.accordion.collapsed .accordion-chevron { transform: rotate(-90deg); }
.accordion-body { padding: 0 22px 6px; }
.accordion.collapsed .accordion-body { display: none; }
.accordion .color-card,
.accordion .morpho-card { border: none; padding: 6px 0 18px; margin: 0; }
.accordion-empty { padding: 0 0 18px; font-size: 13px; }

/* --- Carte morphologie --- */
.morpho-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.morpho-chip {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: #fdfbf7; border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--ink);
}
.morpho-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.morpho-list li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  background: #fdfbf7; border: 1px solid var(--line);
  border-radius: 10px;
}
.morpho-li-name { font-weight: 600; font-size: 13px; }
.morpho-li-why { font-size: 12px; color: var(--ink-soft); }
.morpho-list-avoid li { opacity: .85; }
.morpho-list-avoid .morpho-li-name {
  text-decoration: line-through; text-decoration-color: var(--ink-soft);
}

/* --- Carte photo d'analyse (morphologie + colorimétrie) --- */
.analysis-photo-card {
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 18px;
}
.analysis-photo-head { margin-bottom: 16px; }
.analysis-photo-title {
  font-family: var(--font-sans);
  font-size: 20px; font-weight: 600; margin: 4px 0 6px;
}
.analysis-photo-sub { font-size: 13px; margin: 0; line-height: 1.55; }
.analysis-photo-sub strong { font-weight: 600; }
.analysis-photo-preview { margin-bottom: 14px; }
.analysis-photo-img {
  width: 120px; height: 200px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
}
.analysis-photo-empty { font-size: 13px; margin: 0 0 14px; }
.analysis-photo-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
}

/* --- Carte photos d'essayage (Mon profil) --- */
.reference-card {
  background: white; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 18px;
}
.reference-head { margin-bottom: 16px; }
.reference-title {
  font-family: var(--font-sans);
  font-size: 20px; font-weight: 600; margin: 4px 0 6px;
}
.reference-sub { font-size: 13px; margin: 0; line-height: 1.5; }
.reference-preview { margin-bottom: 16px; }
.reference-preview img {
  width: 160px; height: 200px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
}
.reference-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  width: 100%;
}
.reference-photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #fdfbf7;
}
.reference-photo-item.is-selected { border-color: var(--accent); }
.reference-photo-item img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block;
}
.reference-photo-badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 6px; border-radius: 4px;
  background: rgba(0,0,0,.55); color: #fff;
}
.reference-photo-delete {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
}
.reference-photo-delete:hover { background: #b3261e; }
.reference-max-hint { margin: 10px 0 0; font-size: 13px; text-align: center; width: 100%; }
.reference-choice-list { display: grid; gap: 10px; margin-bottom: 8px; }
.reference-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.reference-status {
  margin-top: 14px; font-size: 13px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
}
.reference-status.error { color: #b3261e; }

/* Galerie photos de référence (Mon profil) */
.reference-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}
.reference-gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #faf7f2;
  aspect-ratio: 3/4;
  cursor: pointer;
}
.reference-gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.reference-gallery-item.is-selected {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 2px rgba(139, 94, 60, 0.25);
}
.reference-gallery-item.is-dragging { opacity: 0.45; }
.reference-gallery-item.drag-over {
  border-color: var(--accent-dark);
  box-shadow: inset 0 0 0 2px rgba(139, 94, 60, 0.35);
}
.reference-gallery--product.reference-gallery--single {
  display: flex;
  justify-content: center;
  overflow-x: visible;
  margin-bottom: 4px;
}
.reference-gallery--product.reference-gallery--single .reference-gallery-item {
  flex: 0 0 auto;
  width: min(220px, 72vw);
  max-width: 280px;
  aspect-ratio: 3/4;
}
.reference-gallery--product.reference-gallery--multi .reference-gallery-item {
  flex: 0 0 88px;
  width: 88px;
}
.upload-zone .link-button { margin-top: 12px; width: 100%; text-align: center; }
.reference-gallery-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--accent-dark); color: white;
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.02em;
}
.reference-gallery-delete {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.reference-gallery-delete:hover { background: rgba(179, 38, 30, 0.85); }
.reference-gallery-item.is-dragging { opacity: 0.45; }
.reference-gallery-item.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(139, 94, 60, 0.35); }
.reference-count { font-size: 12px; margin: -8px 0 12px; }
.reference-gallery-hint { font-size: 12px; margin: -8px 0 12px; }

/* Galerie horizontale compacte (fiche produit) */
.reference-gallery--horizontal {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  grid-template-columns: unset;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 0;
  padding-bottom: 4px;
}
.reference-gallery--horizontal::-webkit-scrollbar { display: none; }
.reference-gallery--horizontal .reference-gallery-item {
  flex: 0 0 72px;
  width: 72px;
  aspect-ratio: 3/4;
  padding: 0;
  font: inherit;
  color: inherit;
  background: #faf7f2;
}
.reference-gallery--horizontal .reference-gallery-item:focus-visible {
  outline: 2px solid var(--fitzu-accent);
  outline-offset: 2px;
}
.reference-gallery--product .reference-gallery-item.is-default {
  border-color: var(--fitzu-accent);
}
.reference-gallery--product .reference-gallery-badge {
  background: var(--fitzu-accent-soft);
  color: var(--fitzu-accent);
}
.reference-gallery--product .reference-gallery-item.is-selected {
  border-color: var(--fitzu-accent);
  box-shadow: 0 0 0 2px rgba(255, 74, 46, 0.28);
}
.reference-gallery--product .reference-gallery-item.drag-over {
  border-color: var(--fitzu-accent);
  box-shadow: inset 0 0 0 2px rgba(255, 74, 46, 0.35);
}
.reference-gallery--horizontal .reference-gallery-badge {
  font-size: 9px;
  padding: 1px 4px;
}
.reference-actions.is-disabled label {
  opacity: 0.45; pointer-events: none; cursor: not-allowed;
}

/* --- Choix photo de référence (page produit) --- */
.reference-choice-lead { font-size: 13px; margin: 0 0 8px; }
.reference-choice-list { display: grid; gap: 8px; }
.reference-choice { margin-bottom: 16px; display: grid; gap: 10px; }
.reference-choice-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px 14px;
  background: #fdfbf7; border: 1px solid var(--accent);
  border-radius: 12px; cursor: pointer; text-align: left;
  font: inherit; color: var(--ink); transition: background .2s;
}
.reference-choice-btn:hover { background: #f7efe1; }
.reference-choice-img {
  flex: 0 0 56px; width: 56px; height: 72px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
}
.reference-choice-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.reference-choice-text strong {
  font-size: 14px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis;
}
.reference-choice-arrow { flex: 0 0 auto; }
.reference-choice-text .muted { font-size: 12px; }
.reference-choice-btn > i { color: var(--accent-dark); }
.reference-choice .link-button { align-self: center; }

/* CTA photo de référence manquante (fiche produit) */
.reference-missing-cta {
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
  text-align: center;
}
.reference-missing-cta .btn-large { width: 100%; }
.reference-missing-hint { font-size: 13px; margin: 0; line-height: 1.5; max-width: 36ch; margin-inline: auto; }

/* Modale génération déjà en cours */
.gen-in-progress-card {
  max-width: 400px;
  text-align: center;
  background: linear-gradient(165deg, #fffdf9 0%, #faf3e8 100%);
  border: 1px solid var(--line);
}
.gen-in-progress-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(168, 135, 88, 0.35);
}
.gen-in-progress-card h3 { font-size: 22px; margin-bottom: 10px; }
.gen-in-progress-msg { line-height: 1.55; margin: 0; }
.gen-in-progress-actions {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.gen-in-progress-actions .btn-large {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* Modale orientation photo de référence */
.ref-prompt-card { max-width: 420px; text-align: center; }
.ref-prompt-card > .muted { margin: 8px 0 0; line-height: 1.55; }
.ref-prompt-actions {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.ref-prompt-actions .upload-btn,
.ref-prompt-actions .btn-large { width: 100%; justify-content: center; }
.ref-prompt-profile { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

@media (max-width: 600px) {
  .reference-card { padding: 18px 20px; }
  .accordion-head { padding: 16px 18px; }
  .accordion-body { padding: 0 18px 6px; }

  /* Mobile : photo CENTRÉE en haut, puis deux boutons plus petits centrés
     en dessous (au lieu de la photo collée à gauche + gros boutons). */
  .reference-body { display: flex; flex-direction: column; align-items: center; }
  .reference-preview { margin-bottom: 18px; text-align: center; }
  .reference-preview img { width: 70vw; max-width: 260px; height: auto; aspect-ratio: 3/4; border-radius: 14px; }
  .reference-actions {
    flex-direction: row; flex-wrap: wrap; justify-content: center;
    gap: 8px; width: 100%;
  }
  .reference-actions .upload-btn {
    flex: 0 1 auto; padding: 10px 16px; font-size: 12.5px;
  }
  .reference-actions .upload-btn i { font-size: 13px; }
  .reference-status { width: 100%; justify-content: center; margin-top: 12px; text-align: center; }
}

/* === Modale "Remplacer ma photo de référence" === */
.ref-modal-card { max-width: 420px; text-align: center; }
.ref-modal-sub, #ref-modal-sub { margin: 4px 0 0; }
.ref-modal-body { margin-top: 18px; }
.ref-modal-figure {
  width: 140px; height: 186px; margin: 0 auto 18px;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: #f3ece0;
}
.ref-modal-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-progress-block { text-align: left; }
.ref-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink); margin-bottom: 8px; gap: 12px;
}
.ref-progress-head span:last-child { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ref-progress-track {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.ref-progress-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width .4s ease;
}
.ref-progress-bar.indeterminate {
  width: 40% !important;
  animation: ref-indeterminate 1.2s ease-in-out infinite;
}
@keyframes ref-indeterminate {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}
.ref-progress-hint {
  margin: 12px 0 0; font-size: 12px; color: var(--accent-dark);
  display: flex; align-items: center; gap: 7px; line-height: 1.4;
}
.ref-progress-hint i { font-size: 11px; }
.ref-modal-error {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: #fdecea; color: #b3261e; font-size: 13px; text-align: left;
}

/* === Progression sync catalogue (admin) === */
.catalog-sync-progress { margin-top: 12px; }
.catalog-sync-log {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8f7f5;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.catalog-sync-log-line { margin: 0 0 4px; word-break: break-word; }
.catalog-sync-log-line:last-child { margin-bottom: 0; }
.catalog-sync-sources-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.catalog-sync-source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8f7f5;
  border: 1px solid var(--line);
  font-size: 13px;
}
.catalog-sync-source-item.is-running { border-color: var(--accent); background: rgba(255, 74, 46, 0.06); }
.catalog-sync-source-item.is-done { border-color: #2e7d32; background: rgba(46, 125, 50, 0.06); }
.catalog-sync-source-item.is-error { border-color: #b3261e; background: #fdecea; }
.catalog-sync-source-status { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.catalog-sync-source-item.is-running .catalog-sync-source-status { color: var(--accent-dark); }
.catalog-sync-source-item.is-done .catalog-sync-source-status { color: #2e7d32; }
.catalog-sync-source-item.is-error .catalog-sync-source-status { color: #b3261e; }

.ref-modal-actions { margin-top: 20px; }
.ref-modal-actions .btn-large { width: 100%; }

@media (max-width: 480px) {
  .ref-modal-figure { width: 120px; height: 160px; }
}

/* === Marque Fitzu (alignée fitzu.fr) === */
.fitzu-mark {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  display: inline-block;
  color: var(--ink);
  line-height: 1.2;
}
.fitzu-pill {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.2;
  vertical-align: baseline;
}
.fitzu-pill:hover {
  background: rgba(26, 26, 26, 0.05);
}
.fitzu-pill:focus-visible {
  outline: 2px solid var(--fitzu-accent);
  outline-offset: 2px;
}
.fitzu-word {
  display: inline-block;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.2;
}
.fitzu-dot {
  color: var(--fitzu-accent);
  font-size: 0.55em;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  margin: 0;
}
.fitzu-tagline {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}
.fitzu-platform-title {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
  gap: 0.35em;
  line-height: 1.2;
}
.fitzu-platform-title--center {
  justify-content: center;
  width: 100%;
}
.sa-field-note {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
}

/* === Super-admin Fitzu === */
.sa-login-mark {
  font-size: 12px;
  margin: 0;
}
.sa-login-tagline {
  font-size: 12px;
  margin: 0;
}
.sa-topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.sa-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.sa-brand {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.sa-brand-tagline {
  font-size: 11px;
  letter-spacing: 0.2em;
}
.sa-brand-mark {
  font-size: 11px;
  line-height: 1.2;
}
.sa-client-tagline {
  font-size: 11px;
  letter-spacing: 0.2em;
}
.sa-client-mark {
  font-size: 11px;
  line-height: 1.2;
}
.sa-mainnav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.sa-nav-link {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.sa-nav-link:hover { color: var(--ink); background: rgba(11, 11, 12, 0.04); }
.sa-nav-link.active { color: var(--ink); background: rgba(255, 74, 46, 0.1); }
.sa-topbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.sa-user { font-size: 12px; color: var(--ink-soft); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-logout-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.sa-logout-btn:hover { background: #f3f2ef; }
.sa-subnav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.sa-subnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.sa-subnav-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  width: 100%;
}
.sa-sub-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 12px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sa-sub-link:hover { color: var(--ink); }
.sa-sub-link.active { color: var(--ink); border-bottom-color: var(--accent); }
.sa-sub-link--external { margin-left: auto; color: var(--accent-dark); }
.sa-subnav-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 8px;
}
.sa-tenant-picker select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  min-width: 200px;
  background: #faf8f5;
}
.sa-page-head { margin-bottom: 24px; }
.sa-page-head h1 {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
}
.sa-page-head .muted { margin: 0; font-size: 14px; }
.sa-form-card { max-width: 960px; }
.multi-catalog-list .multi-catalog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}
.multi-catalog-list .btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}
.sa-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.sa-form-grid--branding { margin-top: 16px; gap: 20px 24px; }
.sa-field--wide { grid-column: 1 / -1; }
.sa-form-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.sa-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}
.sa-field span em { color: #b3261e; font-style: normal; }
.sa-field input,
.sa-field select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  background: #faf8f5;
  font-family: inherit;
}
.sa-field input:focus,
.sa-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,168,124,.2);
  background: #fff;
}
.sa-hint { font-size: 12px; color: var(--ink-soft); }
.sa-checkbox-group { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.sa-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.sa-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.sa-logo-upload { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sa-logo-preview {
  width: 120px;
  height: 72px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf8f5;
  overflow: hidden;
}
.sa-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sa-logo-preview--dark { background: #2a2a2a; }
.sa-form-actions { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.sa-form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}
.sa-form-status--error { background: #fdecea; color: #b3261e; }
.sa-form-status--ok { background: #e8f3ec; color: #2c6b3f; }
.sa-success-card {
  margin-top: 20px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #f7f3eb 0%, #fdfbf7 100%);
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.sa-success-card h3 { margin: 0 0 10px; font-size: 18px; }
.sa-success-card ul { margin: 12px 0 0; padding-left: 18px; }
.sa-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.sa-status--active { background: #e8f3ec; color: #2c6b3f; }
.sa-status--suspended { background: #fbe4e4; color: #8a2929; }
.sa-actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm { padding: 5px 10px !important; font-size: 12px !important; }
body.admin .sa-topbar + .sa-subnav + .admin-main,
body.admin .sa-topbar ~ .admin-main { padding-top: 8px; }
@media (max-width: 768px) {
  .sa-topbar-inner { padding: 0 16px; gap: 12px; }
  .sa-mainnav { gap: 2px; overflow-x: auto; }
  .sa-nav-link { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .sa-user { display: none; }
  .sa-subnav-inner { padding: 0 16px; }
  .admin-main { padding: 16px !important; }
  .sa-sub-link--external { margin-left: 0; }
}

/* === Admin — Stocks WooCommerce === */
.wc-catalog-stats {
  margin-bottom: 18px;
  padding: 18px 20px 16px;
}
.wc-catalog-stats.is-loading .wc-catalog-stat__value,
.wc-catalog-stats.is-preview .wc-catalog-stat__value {
  color: var(--ink-soft);
}
.wc-catalog-stats.is-loading .wc-catalog-stat__value {
  opacity: 0.55;
}
.wc-catalog-stats.is-preview .wc-catalog-stat__value {
  opacity: 0.82;
}
.wc-catalog-stats.is-complete .wc-catalog-stats__meta {
  color: var(--ink-soft);
}
.wc-catalog-stats.is-error .wc-catalog-stats__meta {
  color: #b42318;
}
.wc-catalog-stats__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
}
.wc-catalog-stats__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}
.wc-catalog-filter-clear {
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wc-catalog-filter-clear:hover { background: #faf8f5; }
.wc-catalog-filter-clear:active { background: #f5f0ea; }
.wc-catalog-stats__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 640px) {
  .wc-catalog-stats__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }
}
.wc-catalog-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  padding: 14px 10px;
  border-radius: 14px;
  background: #faf8f5;
  border: 1px solid var(--line);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.wc-catalog-stat:hover {
  border-color: #d8cfc3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.wc-catalog-stat:active { transform: scale(0.98); }
.wc-catalog-stat.is-active {
  border-width: 2px;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(44, 36, 28, 0.08);
}
.wc-catalog-stat--warn.is-active {
  border-color: #8a2929;
  box-shadow: 0 0 0 3px rgba(138, 41, 41, 0.12);
}
.wc-catalog-stat--alert.is-active {
  border-color: #9a6b1a;
  box-shadow: 0 0 0 3px rgba(154, 107, 26, 0.12);
}
.wc-catalog-stat__value {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.wc-catalog-stat__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.25;
}
.wc-catalog-stat--warn {
  background: #fdf5f5;
  border-color: #ecd8d8;
}
.wc-catalog-stat--warn .wc-catalog-stat__value { color: #8a2929; }
.wc-catalog-stat--alert {
  background: #fff8ef;
  border-color: #f0dfc4;
}
.wc-catalog-stat--alert .wc-catalog-stat__value { color: #9a6b1a; }
.wc-catalog-stats__meta {
  margin: 12px 0 0;
  font-size: 12px;
  text-align: center;
}
.wc-products-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 20px;
}
.wc-products-search-label { flex: 1 1 280px; margin: 0; }
.wc-products-search-label input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
}
.wc-products-count { margin: 0; font-size: 13px; }
.wc-products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
  gap: 14px;
  align-items: start;
}
@media (min-width: 480px) {
  .wc-products-list {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
@media (min-width: 768px) {
  .wc-products-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
}
.wc-product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}
.wc-product-card.is-expanded {
  grid-column: span 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: visible;
}
@media (min-width: 900px) {
  .wc-product-card.is-expanded {
    grid-column: span 3;
  }
}
@media (max-width: 479px) {
  .wc-product-card.is-expanded {
    grid-column: 1 / -1;
  }
}
.wc-product-card__head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  min-height: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.wc-product-card__head:hover { background: #faf8f5; }
.wc-product-card__head:active { background: #f5f0ea; }
.wc-product-card__media {
  position: relative;
  width: 100%;
}
.wc-product-card__thumb-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
}
.wc-product-card__thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  background: #f0eae0;
  display: block;
}
.wc-product-card__thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--ink-soft);
}
.wc-product-card__rupture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.wc-product-card__rupture-label {
  display: block;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(138, 41, 41, 0.94);
  color: #fff;
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.wc-product-card__info { flex: 1; min-width: 0; }
.wc-product-card__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wc-product-card__meta {
  font-size: 12px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.wc-product-card__sku {
  word-break: break-all;
}
.wc-product-card__price {
  font-weight: 600;
  color: var(--ink);
}
.wc-product-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #eee9e0;
  color: var(--ink-soft);
}
.wc-product-badge--variable { background: #e8eef8; color: #2a4a7a; }
.wc-product-card__stock-summary {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}
.wc-product-card__stock-summary.is-out {
  color: #fff;
  background: rgba(138, 41, 41, 0.92);
}
.wc-product-card__chevron {
  align-self: center;
  font-size: 16px;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
  line-height: 1;
  padding: 4px 0 2px;
}
.wc-product-card.is-expanded .wc-product-card__chevron { transform: rotate(180deg); }
.wc-product-card.is-expanded .wc-product-card__head {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 0;
  border-bottom: 1px solid var(--line);
}
.wc-product-card.is-expanded .wc-product-card__head .wc-product-card__media {
  display: none;
}
.wc-product-card.is-expanded .wc-product-card__name {
  font-size: 15px;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  overflow: hidden;
}
.wc-product-card.is-expanded .wc-product-card__meta {
  font-size: 12px;
  gap: 6px;
}
.wc-product-card.is-expanded .wc-product-card__chevron {
  align-self: center;
  margin-left: auto;
  font-size: 18px;
  padding: 0;
  flex-shrink: 0;
}
.wc-product-card__body {
  display: none;
  padding: 0;
  border-top: none;
}
.wc-product-card.is-expanded .wc-product-card__body { display: block; }
.wc-product-card__expand-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px;
}
@media (min-width: 480px) {
  .wc-product-card__expand-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px 16px;
  }
}
.wc-product-card__expand-media {
  flex: 0 0 auto;
  width: 100%;
  max-width: 120px;
}
@media (min-width: 768px) {
  .wc-product-card__expand-media {
    max-width: 140px;
  }
}
.wc-product-card__expand-media .wc-product-card__thumb-wrap {
  width: 100%;
}
.wc-product-card__expand-media .wc-product-card__thumb {
  width: 100%;
  aspect-ratio: 1;
}
.wc-product-card__expand-stock {
  flex: 1;
  min-width: 0;
  overflow: visible;
}
.wc-product-card__expand-stock .wc-stock-simple,
.wc-product-card__expand-stock .wc-stock-variations {
  padding-top: 0;
}
.wc-stock-simple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
}
.wc-stock-simple label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.wc-stock-simple input[type="number"] {
  width: 120px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
}
.wc-stock-variations { padding-top: 12px; }
.wc-stock-variation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.wc-stock-variation:last-child { border-bottom: none; }
.wc-stock-variation--skeleton { pointer-events: none; }
.wc-skeleton-line--variation-label { width: 48px; margin: 0; }
.wc-skeleton-line--variation-meta { width: 40%; margin: 0; flex: 1; }
.wc-skeleton-block--stepper {
  width: 140px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.wc-stock-variation__label {
  font-weight: 600;
  font-size: 15px;
  min-width: 64px;
}
.wc-stock-variation__meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-stock-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.wc-stock-stepper .wc-stock-feedback {
  flex: 0 0 auto;
  min-width: 4.5rem;
  margin-left: 2px;
}
.wc-stock-feedback {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.wc-stock-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.wc-stock-feedback.is-pending {
  color: #5c574f;
  background: #f3f0eb;
  padding: 4px 8px;
  border-radius: 6px;
}
.wc-stock-feedback.is-ok {
  color: #1b7f4a;
  background: #e3f6eb;
  padding: 4px 8px;
  border-radius: 6px;
}
.wc-stock-feedback.is-error {
  color: #c0392b;
  background: #fdecea;
  padding: 4px 8px;
  border-radius: 6px;
}
.wc-stock-simple .wc-stock-feedback {
  margin-top: 0;
}
.wc-stock-stepper button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.wc-stock-stepper button:active { background: #f0ebe3; }
.wc-stock-stepper button:disabled { opacity: 0.45; cursor: not-allowed; }
.wc-stock-stepper input {
  width: 64px;
  min-width: 48px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  padding: 0;
}
/* Carte étendue : label/meta à gauche, stepper ± toujours visible à droite */
.wc-product-card.is-expanded .wc-stock-variation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
}
.wc-product-card.is-expanded .wc-stock-variation__label {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.wc-product-card.is-expanded .wc-stock-variation__meta {
  grid-column: 1;
  grid-row: 2;
  white-space: nowrap;
}
.wc-product-card.is-expanded .wc-stock-stepper {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-content: flex-end;
  max-width: none;
  min-width: 210px;
}
.wc-product-card.is-expanded .wc-stock-stepper .wc-stock-feedback {
  width: auto;
  padding-top: 0;
}
.wc-stock-loading {
  padding: 16px 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.wc-stock-error {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.wc-stock-error .wc-stock-loading {
  padding: 0;
}
.wc-products-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.wc-products-pagination button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
}
.wc-products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
}
.wc-product-card--skeleton { pointer-events: none; }
.wc-product-card--skeleton .wc-product-card__head { cursor: default; }
.wc-product-card--skeleton .wc-product-card__head:hover { background: transparent; }
.wc-product-card--skeleton .wc-product-card__media {
  position: relative;
}
.wc-skeleton-block {
  background: linear-gradient(90deg, #eee9e0 25%, #f7f4ef 50%, #eee9e0 75%);
  background-size: 200% 100%;
  animation: wc-skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: 8px;
}
.wc-skeleton-line { height: 14px; margin-bottom: 8px; }
.wc-skeleton-line--title { width: 85%; height: 16px; }
.wc-skeleton-line--meta { width: 55%; margin-bottom: 0; }
.wc-skeleton-line--stock {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 56px;
  height: 22px;
  margin-bottom: 0;
  border-radius: 999px;
}
@keyframes wc-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Admin — ambiances / décors */
.sa-settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sa-settings-subnav .sa-sub-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}
.sa-settings-subnav .sa-sub-link.active {
  background: #fdf6e9;
  color: var(--ink);
  font-weight: 600;
}
.decors-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.decors-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.decors-admin-row:last-child { border-bottom: none; }
.decors-admin-row:hover { background: #fdfbf7; }
.decors-admin-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.decors-admin-row--custom { cursor: default; }
.decors-admin-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.decors-icon-field { margin-top: 6px; }
.decors-icon-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.decors-icon-trigger:hover {
  border-color: var(--accent);
  background: #fdfbf7;
}
.decors-icon-trigger-preview {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--accent-dark);
  flex-shrink: 0;
}
.decors-icon-trigger-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--ink-soft);
}
.decors-icon-trigger-hint {
  margin-left: auto;
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 500;
}
.fa-icon-modal-card {
  max-width: 620px;
  width: 94%;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.fa-icon-modal-sub {
  margin: 0 0 10px;
  font-size: 13px;
}
.fa-icon-modal-count {
  margin: 0 0 10px;
  font-size: 12px;
}
.icon-picker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.icon-picker-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.icon-picker-tab:hover,
.icon-picker-tab.active {
  border-color: var(--accent);
  background: #fdf6e9;
  color: var(--ink);
}
.icon-picker-tab-count {
  opacity: .7;
  font-weight: 400;
}
.fa-icon-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}
.fa-icon-page-info {
  font-size: 13px;
  color: var(--ink-soft);
  min-width: 90px;
  text-align: center;
}
.fa-icon-grid .bi,
.decor-icon.bi,
.decors-icon-trigger-preview.bi {
  font-size: 1.1em;
  line-height: 1;
}
.fa-icon-grid .lucide-icon,
.decors-icon-trigger-preview.lucide-icon,
.decor-icon.lucide-icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.125em;
}
.fa-icon-grid .lucide-icon svg,
.decors-icon-trigger-preview.lucide-icon svg,
.decor-icon.lucide-icon svg {
  width: 100%;
  height: 100%;
}
.lucide-icon--fallback .lucide-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 0.85em;
  line-height: 1;
  opacity: 0.55;
}
.fa-icon-modal-sub code {
  font-size: 12px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}
.fa-icon-search {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 12px;
}
.fa-icon-search:focus {
  outline: none;
  border-color: var(--accent);
}
.fa-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  max-height: min(52vh, 420px);
  padding: 2px;
}
.fa-icon-grid-btn {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 16px;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.fa-icon-grid-btn:hover,
.fa-icon-grid-btn.selected {
  border-color: var(--accent);
  background: #fdf6e9;
  color: var(--ink);
}
.fa-icon-empty {
  margin: 8px 0 0;
  text-align: center;
}
.sa-divider {
  border: none;
  border-top: 1px solid var(--line);
}

/* Nouveaux produits WooCommerce */
.np-form { max-width: 720px; }
.np-url-import {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #faf8f5;
}
.np-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.np-url-row input[type="url"] {
  flex: 1 1 220px;
  min-width: 0;
}
.np-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}
@media (min-width: 720px) {
  .np-grid { grid-template-columns: 200px 1fr; align-items: start; }
}
.np-photo-preview {
  margin-top: 10px;
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #faf8f5;
  padding: 8px;
}
.np-gallery-note {
  margin: 8px 0 0;
  font-size: 12px;
  text-align: center;
}
.np-photo-preview img {
  width: 100%;
  height: auto;
  display: block;
}
.np-fields { display: grid; gap: 14px; }
.np-fields--identified {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}
@media (min-width: 620px) {
  .np-fields--identified { grid-template-columns: 1fr 1fr; }
}
.np-processing { margin: 16px 0; padding: 14px 16px; background: #faf8f5; }
.np-processing-title { margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.np-processing-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-soft); }
.np-processing-list li.np-status--ok { color: #1a7f37; }
.np-processing-list li.np-status--err { color: #b42318; }
.np-inline-status { margin: 6px 0 0; font-size: 13px; }
.np-confirm-desc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
}
.np-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  font-size: 14px;
}
.np-variations { margin: 16px 0; padding: 14px 16px; }
.np-toggle { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.np-variations-list { display: grid; gap: 10px; margin-bottom: 12px; }
.np-variation-row {
  display: grid;
  grid-template-columns: 1fr 100px 44px;
  gap: 8px;
  align-items: center;
}
.np-variation-row select,
.np-variation-row input {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  font-size: 16px;
}
.np-variation-remove {
  min-width: 44px;
  height: 44px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
.np-actions { margin-top: 20px; }
.np-actions .btn-primary {
  width: 100%;
  min-height: 48px;
  font-size: 16px;
}
@media (min-width: 520px) {
  .np-actions .btn-primary { width: auto; min-width: 260px; }
}

.np-publish-progress {
  position: sticky;
  top: 8px;
  z-index: 50;
  margin-bottom: 16px;
}
.np-publish-progress-card {
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.np-publish-progress-head { margin-bottom: 10px; }
.np-publish-progress-steps {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.np-publish-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.np-publish-step-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  position: relative;
}
.np-publish-step--pending .np-publish-step-icon { background: #fff; }
.np-publish-step--active {
  color: var(--ink);
  font-weight: 600;
}
.np-publish-step--active .np-publish-step-icon {
  border-color: var(--accent);
  border-top-color: transparent;
  animation: np-publish-spin .8s linear infinite;
}
.np-publish-step--done { color: #1a7f37; }
.np-publish-step--done .np-publish-step-icon {
  border-color: #1a7f37;
  background: #1a7f37;
}
.np-publish-step--done .np-publish-step-icon::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.np-publish-step--error { color: #b42318; }
.np-publish-step--error .np-publish-step-icon {
  border-color: #b42318;
  background: #b42318;
}
.np-publish-step--error .np-publish-step-icon::before,
.np-publish-step--error .np-publish-step-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 2px;
  background: #fff;
  transform: translate(-50%, -50%) rotate(45deg);
}
.np-publish-step--error .np-publish-step-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
@keyframes np-publish-spin {
  to { transform: rotate(360deg); }
}
.np-publish-progress-message {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.np-publish-progress-message a { color: var(--accent-dark); }
.np-publish-progress--success .np-publish-progress-card {
  border: 1px solid rgba(26, 127, 55, 0.25);
}
.np-publish-progress--error .np-publish-progress-card {
  border: 1px solid rgba(180, 35, 24, 0.25);
}

