/* ============================================================
   UX v3 : stepper de devis (.sx-*) et panier (.cx-*).
   Chargé en dernier par pages/shop/accueil.html. Classes neuves : rien d'hérité ne s'y applique.
   ============================================================ */
:root {
  --ux-ink: #111;
  --ux-muted: #6b6b6b;
  --ux-line: rgba(17,17,17,0.10);
  --ux-soft: #f6f4ef;
  --ux-gold: #C9A96E;
  --ux-gold-ink: #8A6A30;
  --ux-r: 14px;
  --ux-r-sm: 10px;
  --ux-ease: cubic-bezier(.22,.61,.36,1);
}

/* ── Modale : feuille plein écran sur mobile, carte bornée sur ordinateur ── */
#acc-devis-modal .acc-devis-modal-card {
  width: min(560px, calc(100% - 32px));
  height: min(720px, 88dvh);
  max-height: none;
  background: #fff;
}
#acc-devis-modal .acc-modal-close {
  top: 14px !important; right: 14px !important;
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important;
  background: var(--ux-soft) !important; color: var(--ux-ink) !important;
  border: 0 !important; z-index: 3;
  display: grid !important; place-items: center;
}
#acc-devis-modal .acc-modal-close:hover { background: #ebe7de !important; }
@media (max-width: 600px) {
  #acc-devis-modal .acc-devis-modal-card {
    width: 100%;
    height: 94dvh;
    border-radius: 20px 20px 0 0 !important;
    animation: sx-sheet .38s var(--ux-ease);
  }
}
@keyframes sx-sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

.sx { display: flex; flex-direction: column; height: 100%; min-height: 0; color: var(--ux-ink); font-family: "Outfit", system-ui, sans-serif; }

/* En-tête */
.sx-head { flex-shrink: 0; padding: 22px 64px 18px 28px; border-bottom: 1px solid var(--ux-line); }
.sx-cat { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 600; color: var(--ux-gold-ink); letter-spacing: .02em; margin-bottom: 14px; }
.sx-cat-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #111; color: var(--ux-gold); }
.sx-cat-ico svg { width: 16px; height: 16px; }
.sx-count { margin: 0 0 4px; font-size: .72rem; font-weight: 600; color: var(--ux-muted); text-transform: uppercase; letter-spacing: .1em; }
.sx-count span { text-transform: none; letter-spacing: 0; }
.sx-title { margin: 0; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.1rem); line-height: 1; letter-spacing: .01em; color: var(--ux-ink); }
.sx-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-top: 16px; }
.sx-progress span { height: 3px; border-radius: 3px; background: var(--ux-line); transition: background .35s var(--ux-ease); }
.sx-progress span.done { background: var(--ux-ink); }
.sx-progress span.active { background: var(--ux-gold); }

/* Corps défilant */
.sx-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 22px 28px 28px; }
.sx-body.dv-step-enter { animation: sx-in .32s var(--ux-ease); }
@keyframes sx-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sx-hint { margin: 0 0 14px; font-size: .88rem; line-height: 1.5; color: var(--ux-muted); }
.sx-hint strong { color: var(--ux-ink); }
.sx-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 26px 0 12px; font-size: .9rem; font-weight: 600; }
.sx-sub span { font-size: .76rem; font-weight: 500; color: var(--ux-muted); }
.sx-note { margin: 8px 0 0; font-size: .76rem; line-height: 1.5; color: var(--ux-muted); }
.sx-empty { display: grid; justify-items: center; gap: 12px; padding: 40px 12px; text-align: center; color: var(--ux-muted); }
.sx-empty i { font-size: 1.6rem; opacity: .4; }
.sx-empty p { margin: 0; max-width: 320px; line-height: 1.5; }

/* Options (radio / case) */
.sx-list { display: grid; gap: 8px; }
.sx-opt {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 15px 16px; text-align: left;
  background: #fff; color: var(--ux-ink); font: inherit;
  border: 1px solid var(--ux-line); border-radius: var(--ux-r);
  cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.sx-opt:hover { border-color: rgba(17,17,17,0.28); }
.sx-opt:focus-visible { outline: 2px solid var(--ux-gold); outline-offset: 2px; }
.sx-opt.selected { border-color: var(--ux-ink); background: #fcfbf8; box-shadow: inset 0 0 0 1px var(--ux-ink); }
.sx-opt-main { display: grid; gap: 3px; min-width: 0; }
.sx-opt-name { font-size: .95rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.sx-opt-desc { font-size: .8rem; line-height: 1.45; color: var(--ux-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sx-opt-price { font-size: .9rem; font-weight: 700; white-space: nowrap; text-align: right; }
.sx-opt-price small { display: block; font-size: .66rem; font-weight: 500; color: var(--ux-muted); text-transform: uppercase; letter-spacing: .06em; }
.sx-mark { width: 20px; height: 20px; flex-shrink: 0; border: 1.5px solid rgba(17,17,17,0.3); border-radius: 50%; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.sx-opt--check .sx-mark { border-radius: 6px; }
.sx-opt.selected .sx-mark { background: var(--ux-ink); border-color: var(--ux-ink); }
.sx-opt.selected .sx-mark::after { content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.sx-opt--ico { grid-template-columns: auto minmax(0, 1fr) auto; }
.sx-opt-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--ux-r-sm); background: var(--ux-soft); color: var(--ux-ink); font-size: .95rem; transition: background .2s, color .2s; }
.sx-opt.selected .sx-opt-ico { background: #111; color: var(--ux-gold); }

/* Champs */
.sx-field { display: grid; gap: 8px; margin-bottom: 20px; }
.sx-field > label { font-size: .84rem; font-weight: 600; }
.sx-req { color: #b4532a; }
.sx-field textarea,
.sx-field input[type="text"] {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--ux-ink);
  background: #fff; border: 1px solid var(--ux-line); border-radius: var(--ux-r-sm);
  transition: border-color .2s, box-shadow .2s; resize: vertical; box-sizing: border-box;
}
.sx-field textarea { min-height: 104px; line-height: 1.5; }
.sx-field textarea:focus,
.sx-field input[type="text"]:focus { outline: none; border-color: var(--ux-ink); box-shadow: 0 0 0 3px rgba(201,169,110,0.25); }
.sx-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sx-chips--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 601px) { .sx-chips--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sx-chip {
  display: grid; gap: 2px; justify-items: center; align-content: center; min-height: 46px;
  padding: 10px 8px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--ux-ink);
  background: #fff; border: 1px solid var(--ux-line); border-radius: var(--ux-r-sm);
  cursor: pointer; text-align: center; transition: background .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.sx-chip small { font-size: .7rem; font-weight: 500; color: var(--ux-muted); line-height: 1.3; }
.sx-chip:hover { border-color: rgba(17,17,17,0.28); }
.sx-chip.active { background: #111; border-color: #111; color: #fff; }
.sx-chip.active small { color: rgba(255,255,255,0.7); }
.sx-chip:focus-visible { outline: 2px solid var(--ux-gold); outline-offset: 2px; }
@media (max-width: 380px) { .sx-chips--3 { grid-template-columns: 1fr; } .sx-chips--3 .sx-chip { grid-auto-flow: column; justify-content: space-between; } }

/* Photos */
.sx-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 380px) { .sx-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sx-photo {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 6px;
  border: 1.5px dashed rgba(17,17,17,0.22); border-radius: var(--ux-r); background: var(--ux-soft);
  cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.sx-photo:hover, .sx-photo.dragover { border-color: var(--ux-ink); background: #efebe2; }
.sx-photo:focus-visible { outline: 2px solid var(--ux-gold); outline-offset: 2px; }
.sx-photo-ico { color: var(--ux-ink); font-size: 1.1rem; }
.sx-photo-ico svg { width: 24px; height: 24px; }
.sx-photo-label { font-size: .72rem; font-weight: 600; text-align: center; padding: 0 6px; line-height: 1.25; }
.sx-photo.has-file { border-style: solid; border-color: transparent; background: #111; }
.sx-photo.has-file img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sx-photo.has-file .sx-photo-label {
  position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px 6px;
  background: rgba(17,17,17,0.72); color: #fff; border-radius: 6px; font-size: .66rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sx-photo-rm {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: rgba(255,255,255,0.95); color: #111; font-size: .78rem; cursor: pointer;
}
.sx-photo--add { border-style: dashed; background: #fff; }

/* Récapitulatif */
.sx-recap { margin: 0 0 18px; border: 1px solid var(--ux-line); border-radius: var(--ux-r); overflow: hidden; }
.sx-recap-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 16px; border-top: 1px solid var(--ux-line); }
.sx-recap-row:first-child { border-top: 0; }
.sx-recap dt { font-size: .76rem; font-weight: 600; color: var(--ux-muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.sx-recap dd { margin: 0; font-size: .9rem; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.sx-edit { background: none; border: 0; padding: 2px 0; font: inherit; font-size: .78rem; font-weight: 600; color: var(--ux-gold-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 420px) {
  .sx-recap-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .sx-recap dt { grid-column: 1; }
  .sx-recap dd { grid-column: 1 / -1; grid-row: 2; }
  .sx-edit { grid-column: 2; grid-row: 1; }
}
.sx-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: #111; color: #fff; border-radius: var(--ux-r); }
.sx-total span { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,0.7); }
.sx-total strong { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 1.7rem; color: var(--ux-gold); line-height: 1; }
.sx-recap + .sx-note { margin-bottom: 18px; }
.sx-total + .sx-note { margin-bottom: 20px; }
.sx-auth { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--ux-soft); border-radius: var(--ux-r); }
.sx-auth i { font-size: 1.1rem; }
.sx-auth div { display: grid; gap: 2px; }
.sx-auth strong { font-size: .9rem; }
.sx-auth span { font-size: .8rem; color: var(--ux-muted); }

/* Barre d'actions */
.sx-nav {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ux-line); background: #fff;
}
.sx-back {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--ux-line); border-radius: var(--ux-r-sm); background: #fff; color: var(--ux-ink); cursor: pointer;
  transition: border-color .2s;
}
.sx-back:hover { border-color: var(--ux-ink); }
.sx-est { flex: 1; min-width: 0; display: grid; line-height: 1.15; }
.sx-est small { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ux-muted); }
.sx-est strong { font-size: 1.05rem; }
.sx-next {
  height: 48px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: var(--ux-r-sm); background: #111; color: #fff; text-decoration: none;
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .2s, opacity .2s;
}
.sx-next:hover { background: #2a2a2a; color: #fff; }
.sx-next i { font-size: .8rem; transition: transform .25s var(--ux-ease); }
.sx-next:hover i { transform: translateX(3px); }
.sx-next.disabled { opacity: .35; }
.sx-next:disabled { opacity: .6; cursor: wait; }
.sx-next--final { background: var(--ux-gold); color: #111; }
.sx-next--final:hover { background: #d8bb84; color: #111; }
.sx-next svg { width: 18px; height: 18px; }
@media (max-width: 420px) {
  .sx-head { padding: 18px 60px 16px 18px; }
  .sx-body { padding: 18px 18px 24px; }
  .sx-nav { padding-left: 14px; padding-right: 14px; }
  .sx-next { padding: 0 16px; }
  .sx-est.is-empty { flex: 1; }
}
/* Sans estimation, le bouton prend la place */
.sx-est.is-empty + .sx-next { margin-left: auto; }
@media (max-width: 600px) { .sx-est.is-empty { display: none; } .sx-est.is-empty + .sx-next { flex: 1; } }

/* Choix de catégorie dans la même coque */
#acc-devis-modal .sx .dv-cat-grid { margin-top: 0; }

/* ── Panier ───────────────────────────────────────────────── */
#acc-cart-panel { font-family: "Outfit", system-ui, sans-serif; }
#acc-cart-panel .acc-cart-header h3 { display: flex; align-items: center; gap: 10px; }
.cx-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #111; color: #fff; font-family: "Outfit", sans-serif; font-size: .74rem; font-weight: 700; letter-spacing: 0; }
.cx-list { display: grid; }
.cx-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--ux-line); }
.cx-item:first-child { padding-top: 4px; }
.cx-thumb { width: 64px; height: 64px; border-radius: var(--ux-r-sm); overflow: hidden; background: var(--ux-soft); display: grid; place-items: center; }
.cx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-thumb-ico { color: var(--ux-gold-ink); }
.cx-thumb-ico svg { width: 30px; height: 30px; }
.cx-info { min-width: 0; display: grid; gap: 3px; }
.cx-name { margin: 0; font-size: .95rem; font-weight: 700; line-height: 1.3; color: var(--ux-ink); overflow-wrap: anywhere; }
.cx-name span { font-weight: 500; color: var(--ux-muted); }
.cx-sub { margin: 0; font-size: .82rem; line-height: 1.4; color: #444; overflow-wrap: anywhere; }
.cx-meta { margin: 0; font-size: .74rem; color: var(--ux-muted); }
.cx-actions { display: flex; gap: 16px; margin-top: 6px; }
.cx-link { padding: 0; background: none; border: 0; font: inherit; font-size: .78rem; font-weight: 600; color: var(--ux-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(17,17,17,0.3); cursor: pointer; }
.cx-link:hover { text-decoration-color: currentColor; }
.cx-link--rm { color: var(--ux-muted); }
.cx-link--rm:hover { color: #b4332a; }
.cx-price { margin: 0; font-size: .95rem; font-weight: 700; white-space: nowrap; text-align: right; color: var(--ux-ink); }
.cx-price small { display: block; font-size: .64rem; font-weight: 500; color: var(--ux-muted); text-transform: uppercase; letter-spacing: .06em; }
.cx-reassure { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 4px; padding: 12px 14px; background: var(--ux-soft); border-radius: var(--ux-r-sm); font-size: .78rem; line-height: 1.5; color: #444; }
.cx-reassure i { color: var(--ux-gold-ink); margin-top: 2px; }
.cx-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 16px; text-align: center; }
.cx-empty svg { width: 34px; height: 34px; color: rgba(17,17,17,0.3); margin-bottom: 6px; }
.cx-empty p { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ux-ink); }
.cx-empty span { font-size: .84rem; color: var(--ux-muted); }
.cx-empty-btn { margin-top: 14px; height: 46px; padding: 0 22px; border: 0; border-radius: var(--ux-r-sm); background: #111; color: #fff; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.cx-empty-btn:hover { background: #2a2a2a; }
#acc-cart-panel .acc-cart-submit { display: flex !important; align-items: center; justify-content: center; gap: 10px; border-radius: var(--ux-r-sm) !important; height: 52px; }
@media (max-width: 480px) {
  .cx-item { grid-template-columns: 56px minmax(0, 1fr); }
  .cx-thumb { width: 56px; height: 56px; }
  .cx-price { grid-column: 2; text-align: left; }
  .cx-price small { display: inline; margin-right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  #acc-devis-modal .acc-devis-modal-card, .sx-body.dv-step-enter { animation: none; }
}

/* ── Communauté (réseaux) : lisible sur mobile ─────────────── */
@media (max-width: 760px) {
  .page-accueil .ec-social-metrics {
    display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px !important;
    margin: 24px 0 !important; padding: 0 !important; border: 0 !important;
  }
  .page-accueil .ec-metric-sep { display: none !important; }
  .page-accueil .ec-metric {
    display: grid !important; justify-items: start; gap: 4px; min-width: 0;
    padding: 14px 12px !important; margin: 0 !important;
    background: #fff; border: 1px solid var(--ux-line); border-radius: var(--ux-r);
    transform: none !important; translate: none !important; align-self: stretch;
  }
  .page-accueil .ec-social-quote { margin: 0 0 20px !important; }
  .page-accueil .ec-metric-num { font-size: 1.7rem !important; line-height: 1 !important; }
  .page-accueil .ec-metric-lbl { font-size: .62rem !important; letter-spacing: .06em !important; line-height: 1.3 !important; white-space: normal !important; }
  .page-accueil .ec-social-links { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .page-accueil .ec-social-btn { justify-content: center; min-height: 46px; margin: 0 !important; width: 100%; }
  .page-accueil .ec-social-right { padding: 0 16px 48px !important; }
  .page-accueil .ec-tiktok-container { width: min(100%, 320px) !important; margin: 0 auto !important; }
  .page-accueil .ec-tiktok-video { width: 100% !important; height: auto !important; max-height: 70vh; aspect-ratio: 9 / 16; object-fit: cover; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LANDING v3 : barre de navigation, rythme, mouvements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Barre défilée : noir profond net (le gris translucide salissait les fonds crème) */
body.page-accueil .acc-navbar.scrolled .acc-nav-inner {
  background: rgba(11,11,12,0.9) !important;
  border-color: rgba(255,255,255,0.08) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

/* Cartes prestations : photo qui respire au survol, flèche qui avance */
.page-accueil .ec-cards .ec-row-img { overflow: hidden; }
.page-accueil .ec-cards .ec-row-img img { transition: transform .9s cubic-bezier(.22,.61,.36,1) !important; }
.page-accueil .ec-cards .ec-row:hover .ec-row-img img { transform: scale(1.045) !important; }
.page-accueil .ec-cards .ec-row { transition: border-color .3s, background .3s !important; }

/* Chiffres : grands, alignés, compteurs animés */
.page-accueil .ec-stat-num { font-variant-numeric: tabular-nums; }

/* Entrées en scène : un peu plus de course, même douceur partout */
.page-accueil .rv { transition-duration: .8s !important; transition-timing-function: cubic-bezier(.22,.61,.36,1) !important; }

/* Titres de section : interligne et marge homogènes */
.page-accueil .ec-title { line-height: .95; }
.page-accueil .ec-eyebrow { letter-spacing: .18em; }

/* Logos marques : lisibles, s'éclairent au survol */
.page-accueil .brand-logo { opacity: .55; transition: opacity .3s; }
.page-accueil .brand-logo:hover { opacity: 1; }

/* Avis : carte qui se détache au survol par la bordure, sans relief */
.page-accueil .ec-avis-card { transition: border-color .3s !important; }

@media (prefers-reduced-motion: reduce) {
  .page-accueil .ec-cards .ec-row:hover .ec-row-img img { transform: none !important; }
}
