
  :root {
    --bg: #f4eee1;
    --surface: #eae0cc;
    --surface-2: #e2d5b4;
    --ink: #2e2418;
    --ink-soft: #6b5c48;
    --accent: #b5502e;
    --accent-ink: #fff8ef;
    --accent-2: #46647a;
    --sage: #6e7c57;
    --line: #c9b994;
    --shadow: 0 1px 0 var(--line);
    --font-display: "Fraunces", ui-serif, Georgia, serif;
    --font-body: "Archivo", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: "Special Elite", "Courier New", monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #1e1911;
      --surface: #2a2318;
      --surface-2: #34291b;
      --ink: #efe6d3;
      --ink-soft: #c3b393;
      --accent: #e2825a;
      --accent-ink: #241408;
      --accent-2: #86a9bd;
      --sage: #9ab07c;
      --line: #4a3d28;
    }
  }

  :root[data-theme="dark"] {
    --bg: #1e1911;
    --surface: #2a2318;
    --surface-2: #34291b;
    --ink: #efe6d3;
    --ink-soft: #c3b393;
    --accent: #e2825a;
    --accent-ink: #241408;
    --accent-2: #86a9bd;
    --sage: #9ab07c;
    --line: #4a3d28;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  img, svg { display: block; max-width: 100%; }

  a { color: inherit; }

  .wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    text-wrap: balance;
    margin: 0;
    color: var(--ink);
  }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .lede {
    color: var(--ink-soft);
    max-width: 62ch;
  }

  button { font-family: inherit; }

  :focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
  }

  /* ---------- header ---------- */

  header.site {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
  }

  .wordmark {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-decoration: none;
  }

  .wordmark .mark {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .site-logo {
    display: block;
    height: 52px;
    width: auto;
    max-width: min(320px, 62vw);
  }

  .wordmark .tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--ink-soft);
  }

  @media (max-width: 639px) {
    .site-logo { height: 40px; }
    .wordmark .tag { font-size: 0.68rem; }
  }

  nav.primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0 4px;
  }

  nav.primary a {
    background: none;
    border: none;
    color: var(--ink-soft);
    font-size: 0.92rem;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
  }

  nav.primary a[aria-current="page"] {
    color: var(--ink);
    border-bottom-color: var(--accent);
  }

  nav.primary a:hover { color: var(--ink); }

  /* Bouton « Connexion / Administration » en bout de barre. */
  nav.primary a.nav-cta {
    margin-left: 8px;
    padding: 7px 14px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
  }
  nav.primary a.nav-cta:hover,
  nav.primary a.nav-cta:focus-visible {
    background: var(--accent);
    color: var(--accent-ink);
  }

  /* Panier : icône de caddie + pastille, plein contraste (encre sur fond clair, fond sur encre). */
  .nav-cart {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--ink); color: var(--bg); font-weight: 600;
    padding: 7px 13px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  }
  nav.primary a.nav-cart { background: var(--ink); color: var(--bg); padding: 7px 13px; border-bottom: none; margin-left: 6px; }
  nav.primary a.nav-cart:hover, nav.primary a.nav-cart:focus-visible, .nav-cart:hover { background: var(--accent); color: var(--accent-ink); }
  .nav-cart .cart-ico { flex: none; }
  .nav-cart .cart-count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 700;
  }
  .nav-cart:hover .cart-count { background: var(--bg); color: var(--ink); }

  /* Menu secondaire : galerie, partage, accès administration. */
  .site-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0 7px;
    border-top: 1px solid var(--line);
  }
  nav.secondary { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
  nav.secondary a {
    color: var(--ink-soft);
    font-size: 0.84rem;
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
  }
  nav.secondary a:hover,
  nav.secondary a:focus-visible { color: var(--ink); border-bottom-color: var(--accent); }
  .site-sub .sub-share .share-btn {
    border: 0;
    background: none;
    padding: 2px 0;
    font-size: 0.84rem;
    font-weight: 400;
    color: var(--ink-soft);
    border-radius: 0;
  }
  .site-sub .sub-share .share-btn:hover,
  .site-sub .sub-share .share-btn:focus-visible { color: var(--ink); background: none; border-color: transparent; }
  .site-sub .sub-admin {
    color: var(--ink-soft);
    font-size: 0.84rem;
    text-decoration: none;
    white-space: nowrap;
  }
  .site-sub .sub-admin:hover,
  .site-sub .sub-admin:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

  @media (max-width: 639px) {
    .site-bar { padding: 12px 0; }
    nav.secondary { gap: 14px; }
  }

  /* ---------- menu burger (mobile) ---------- */

  .burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .burger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger-btn.is-open span:nth-child(2) { opacity: 0; }
  .burger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20,15,8,0.4);
    /* header.site est position:sticky + z-index:20, ce qui crée son propre
       contexte d'empilement — nav.primary (position:fixed, descendant du
       header) y est donc piégé : son z-index:30 ne compte que DANS ce
       contexte, pas face à cet overlay qui est un sibling au niveau racine.
       Il faut rester sous 20 pour que tout le header (dont le panneau
       mobile) reste cliquable au-dessus de l'overlay. */
    z-index: 15;
  }
  .nav-overlay.is-open { display: block; }

  @media (max-width: 780px) {
    .burger-btn { display: flex; }

    nav.primary {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 78%;
      max-width: 320px;
      flex-direction: column;
      align-items: stretch;
      flex-wrap: nowrap;
      gap: 0;
      background: var(--bg);
      padding: 84px 28px 28px;
      box-shadow: -12px 0 32px rgba(20,15,8,0.2);
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 30;
      overflow-y: auto;
    }
    nav.primary.is-open { transform: translateX(0); }
    nav.primary a {
      font-size: 1.05rem;
      padding: 16px 4px;
      border-bottom: 1px solid var(--line);
    }
    nav.primary a.nav-cart { margin: 14px 0 0; padding: 12px 16px; justify-content: center; border-bottom: none; }
    nav.primary a.nav-cta {
      margin: 20px 0 0;
      padding: 12px 16px;
      text-align: center;
      border: 1px solid var(--accent);
    }
  }

  /* ---------- buttons ---------- */

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 22px;
    border-radius: 2px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
  }

  .btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
  }
  .btn-primary:hover { filter: brightness(1.08); }

  .btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
  }
  .btn-ghost:hover { border-color: var(--ink-soft); }

  /* ---------- hero ---------- */

  .hero {
    padding: 64px 0 56px;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
  }

  @media (min-width: 880px) {
    .hero-grid { grid-template-columns: 1fr 1.08fr; gap: 56px; }
  }

  .hero h1 {
    font-size: clamp(2.3rem, 5vw, 3.6rem);
    line-height: 1.05;
    margin: 14px 0 18px;
  }

  .hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
  }

  .hero-scene {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 10px;
  }

  .hero-scene img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
  }

  .hero-polaroid-scene {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    min-height: 560px;
  }
  .polaroid-frame {
    position: absolute;
    width: 56%;
    background: #fff;
    padding: 12px 12px 30px;
    box-shadow: 0 20px 40px rgba(20,15,8,0.25);
    transition: top 0.8s cubic-bezier(0.4, 0, 0.2, 1), left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                rotate 0.8s cubic-bezier(0.4, 0, 0.2, 1), scale 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                z-index 0.8s;
  }
  /* Chaque couche (devant/milieu/derrière) a sa propre animation — pas le
     même mouvement juste décalé dans le temps : la couche de devant respire
     (float vertical), celle du milieu se balance (sway horizontal), celle du
     fond oscille légèrement sur son inclinaison (tilt). rotate/scale/translate
     sont des propriétés indépendantes de transform, donc l'inclinaison de
     repos et l'animation ne se marchent pas dessus. */
  .polaroid-frame.p1 { top: 0;   left: 0%;  rotate: -6deg; scale: 1.04; z-index: 3; animation: hero-frame-float 7s ease-in-out infinite; }
  .polaroid-frame.p2 { top: 24%; left: 32%; rotate: 5deg;  scale: 0.98; z-index: 2; animation: hero-frame-sway 8s ease-in-out infinite -1.5s; }
  .polaroid-frame.p3 { top: 4%;  left: 46%; rotate: -4deg; scale: 0.93; z-index: 1; animation: hero-frame-tilt 9s ease-in-out infinite -3s; }

  /* Cartes en attente de leur tour (photos d'ambiance au-delà des 3
     positions visibles) : mêmes coordonnées que p3, mais invisibles et
     hors interaction, pour qu'elles arrivent sans saut visuel une fois
     promues par la rotation. */
  .polaroid-frame.is-waiting {
    top: 4%; left: 46%; rotate: -4deg; scale: 0.9; z-index: 0;
    opacity: 0; pointer-events: none; animation: none;
  }

  /* La carte promo se distingue par un cadre plus marqué (bordure + ombre
     teintées de la couleur accent) et reste plus longtemps au premier plan
     (voir data-dwell géré en JS dans footer.php). */
  .polaroid-promo {
    border: 3px solid var(--accent);
    box-shadow: 0 24px 50px rgba(181,80,46,0.38);
  }

  /* Cartes cliquables : celle déjà au premier plan (p1) n'a pas besoin
     d'être "ramenée devant", son curseur reste celui du lien qu'elle contient
     déjà ; les autres invitent au clic pour passer devant (voir le
     gestionnaire de clic dans footer.php). */
  .polaroid-frame:not(.p1) { cursor: pointer; }
  @media (hover: hover) and (pointer: fine) {
    .polaroid-frame:not(.p1):hover { box-shadow: 0 28px 54px rgba(20,15,8,0.32); }
  }

  @keyframes hero-frame-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
  }
  @keyframes hero-frame-sway {
    0%, 100% { translate: 0 0; }
    50% { translate: 8px 0; }
  }
  @keyframes hero-frame-tilt {
    0%, 100% { rotate: -4deg; }
    50% { rotate: -1deg; }
  }

  @keyframes hero-stack-in {
    0%   { opacity: 0; scale: 0.9;   translate: 0 -22px; }
    55%  { opacity: 1; scale: 1.02;  translate: 0 4px; }
    100% { opacity: 1; scale: 1;     translate: 0 0; }
  }
  .hero-slide {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface-2);
    transition: none;
  }
  .hero-slide.is-active { animation: hero-stack-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

  @media (prefers-reduced-motion: reduce) {
    .polaroid-frame { animation: none !important; }
    .hero-slide.is-active { animation: none !important; }
    .welcome-macaron { animation: none !important; }
  }

  .hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .hero-slide-promo { text-decoration: none; color: inherit; }
  .hero-slide-caption, .hero-promo-tag, .hero-featured-tag {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 7px 8px; font-family: var(--font-mono); font-size: 0.62rem;
    text-transform: uppercase; letter-spacing: 0.02em; text-align: center;
  }
  .hero-slide-caption { background: rgba(255,255,255,0.92); color: var(--ink); }
  .hero-promo-tag { background: var(--accent); color: #fff; }
  .hero-promo-tag .price-old { color: rgba(255,255,255,0.75); text-decoration: line-through; }
  .hero-featured-tag { background: var(--sage); color: #fff; }

  /* Carte "Bienvenue" : médaillon du logo, toujours affichée en première
     position (p1) au chargement. Contenu purement décoratif, pas un lien. */
  .polaroid-welcome-inner {
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--surface-2);
    overflow: hidden;
  }
  .welcome-macaron {
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(20,15,8,0.18);
    animation: welcome-macaron-pulse 3.4s ease-in-out infinite;
  }
  .welcome-macaron img { width: 100%; height: 100%; object-fit: contain; }
  .welcome-caption {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  @keyframes welcome-macaron-pulse {
    0%, 100% { scale: 1; }
    50% { scale: 1.05; }
  }

  @media (max-width: 879px) {
    /* Diaporama en premier, texte ensuite — et on garde le même effet de
       pile de polaroïds qu'en desktop plutôt qu'une rangée à plat, juste
       redimensionné pour l'écran étroit (les décalages top/left restent en
       %, donc ils s'adaptent déjà à la largeur du conteneur). */
    .hero-grid > div:first-child {
      order: 2;
      display: flex;
      flex-direction: column;
    }
    /* Le CTA remonte en tête du bloc texte (donc juste sous le diaporama,
       avant l'accroche/titre/texte) — les autres enfants gardent leur ordre
       naturel (order:0 implicite). Marge inversée : il n'est plus collé au
       texte du dessus mais à celui du dessous. */
    .hero-ctas { order: -1; margin-top: 0; margin-bottom: 28px; }
    .hero-scene { order: 1; }
    .hero-polaroid-scene { min-height: 420px; margin-bottom: 4px; }
    .polaroid-frame { width: 64%; }
  }

  /* ---------- variantes de hero (Apparence → Hero) ---------- */

  .shop-hero-copy { max-width: 640px; }
  .shop-hero-ctas { align-items: center; }
  .shop-hero-share { display: inline-flex; align-items: center; }
  .shop-hero-copy.is-light .eyebrow { color: rgba(255,255,255,.82); }
  .shop-hero-copy.is-light h1 { color: #fff; }
  .shop-hero-copy.is-light .lede { color: rgba(255,255,255,.88); }
  .shop-hero-copy.is-light .btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
  .shop-hero-copy.is-light .btn-ghost:hover { border-color: #fff; }

  /* Image plein écran : l'image occupe la section, le texte est posé sur un voile. */
  .shop-hero--plein { position: relative; display: flex; align-items: flex-end; min-height: min(82vh, 760px); padding: 0; overflow: hidden; background: var(--ink); }
  .shop-hero--plein .shop-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .shop-hero--plein .shop-hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.12) 32%, rgba(0,0,0,.72)); }
  .shop-hero-plein-in { position: relative; z-index: 1; padding-top: clamp(100px, 16vh, 170px); padding-bottom: clamp(36px, 7vh, 76px); }
  .shop-hero--plein.is-empty { display: block; min-height: 0; background: var(--surface); padding: 88px 0 72px; }
  .shop-hero-caption-link, .shop-hero-caption { display: inline-block; margin-top: 18px; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); padding-bottom: 3px; }
  .shop-hero-caption-link:hover { color: #fff; border-bottom-color: #fff; }

  /* Scindé : texte d'un côté, grande image de l'autre. */
  .shop-hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
  @media (min-width: 880px) { .shop-hero-grid { grid-template-columns: 1fr 1.06fr; gap: 56px; } }
  .shop-hero-figure { position: relative; }
  .shop-hero-figure img { display: block; width: 100%; aspect-ratio: 4 / 3.5; object-fit: cover; }
  .shop-hero-figure-tag { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }

  /* Carrousel : piste horizontale, flèches et repères. */
  .shop-hero--carrousel { padding: 64px 0 60px; overflow: hidden; }
  .shop-hero-carrousel-head .shop-hero-copy { max-width: 760px; }
  .shop-hero-carousel { margin-top: 34px; }
  .shop-hero-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 max(24px, calc((100vw - 1200px) / 2)) 10px; scrollbar-width: none; }
  .shop-hero-track::-webkit-scrollbar { display: none; }
  .shop-hero-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
  .shop-hero-slide { position: relative; flex: 0 0 min(80vw, 820px); aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); scroll-snap-align: center; }
  .shop-hero-slide a { display: block; height: 100%; }
  .shop-hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .shop-hero-slide-tag { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 9px 12px; background: rgba(16, 12, 8, .72); color: #fff; font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .03em; backdrop-filter: blur(4px); }
  .shop-hero-carousel-bar { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
  .shop-hero-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1rem; cursor: pointer; }
  .shop-hero-arrow:hover { border-color: var(--ink); }
  .shop-hero-arrow:disabled { opacity: .35; cursor: default; }
  .shop-hero-dots { display: flex; gap: 8px; }
  .shop-hero-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: width .2s ease, background .2s ease; }
  .shop-hero-dots button[aria-current="true"] { width: 24px; background: var(--accent); }

  /* Mosaïque : une grande image et deux plus petites. */
  .shop-hero-mosaic { display: grid; grid-template-columns: 1.3fr .8fr; grid-template-rows: 1fr 1fr; gap: 12px; min-height: min(62vh, 480px); }
  .shop-hero-mosaic-item { position: relative; overflow: hidden; background: var(--surface-2); }
  .shop-hero-mosaic-item a { display: block; height: 100%; }
  .shop-hero-mosaic-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
  .shop-hero-mosaic-item.m1 { grid-row: 1 / 3; }
  .shop-hero-mosaic-item .shop-hero-slide-tag { left: 10px; right: 10px; bottom: 10px; font-size: .6rem; }

  @media (max-width: 879px) {
    .shop-hero--plein { min-height: 70vh; }
    .shop-hero-slide { flex-basis: 86vw; }
    .shop-hero-mosaic { min-height: 320px; }
    .shop-hero:not(.shop-hero--polaroid) .hero-ctas { order: 0; margin-top: 28px; margin-bottom: 0; }
  }

  @media (prefers-reduced-motion: reduce) {
    .shop-hero-dots button { transition: none; }
  }

  /* ---------- écran de bienvenue (accueil, mobile uniquement) ---------- */

  .welcome-splash { display: none; }

  @media (max-width: 879px) {
    .welcome-splash {
      display: flex;
      position: fixed;
      inset: 0;
      z-index: 100;
      background: var(--bg);
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 18px;
      opacity: 1;
      transition: opacity 0.6s ease;
    }
    .welcome-splash.is-hidden { opacity: 0; pointer-events: none; }
    .welcome-splash-logo {
      width: 68%;
      max-width: 320px;
      height: auto;
      opacity: 0;
      scale: 0.7;
      animation: welcome-logo-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
    }
    .welcome-splash-text {
      font-family: var(--font-mono);
      font-size: 0.78rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink-soft);
      opacity: 0;
      translate: 0 8px;
      animation: welcome-text-in 0.6s ease 0.6s forwards;
    }
    @keyframes welcome-logo-in {
      0% { opacity: 0; scale: 0.7; }
      100% { opacity: 1; scale: 1; }
    }
    @keyframes welcome-text-in {
      to { opacity: 1; translate: 0 0; }
    }
    @media (prefers-reduced-motion: reduce) {
      .welcome-splash-logo, .welcome-splash-text { animation: none !important; opacity: 1 !important; scale: 1 !important; translate: 0 0 !important; }
    }
  }

  .story-photo {
    margin-top: 26px;
    border: 1px solid var(--line);
    padding: 8px;
    background: var(--surface);
  }

  .story-photo img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
  }

  .story-photo p {
    margin: 8px 2px 2px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--ink-soft);
  }

  /* ---------- sections ---------- */

  section { padding: 64px 0; }
  section.tight { padding: 48px 0; }

  .section-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 36px;
    max-width: 70ch;
  }

  .rule {
    border: none;
    border-top: 1px solid var(--line);
    margin: 0;
  }

  /* story */

  .story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 44px;
  }

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

  .principles {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }

  .principle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .principle:first-child { border-top: none; padding-top: 0; }

  .principle .num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.85rem;
  }

  .principle h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
  .principle p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

  /* categories */

  .cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }

  @media (min-width: 700px) {
    .cat-grid { grid-template-columns: repeat(5, 1fr); }
  }

  .cat-tile {
    background: var(--surface);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--ink);
    text-decoration: none;
  }

  .cat-tile:hover { background: var(--surface-2); }
  .cat-tile svg { width: 34px; height: 34px; color: var(--accent); }
  .cat-tile .name { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
  .cat-tile .count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }

  /* product cards */

  .grid-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    position: relative;
  }

  .card-icon {
    width: 100%;
    aspect-ratio: 3 / 2;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .card-icon svg { width: 56%; height: 56%; color: var(--ink); }
  .card.accent .card-icon svg { color: var(--accent); }
  .card.sage .card-icon svg { color: var(--sage); }
  .card.blue .card-icon svg { color: var(--accent-2); }
  /* contain : la photo n'est jamais recadrée (bandes sur fond --surface-2 si besoin). */
  .card-icon img { width: 100%; height: 100%; object-fit: contain; }

  .quick-preview-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20,15,8,0.72);
    opacity: 0; pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .quick-preview-overlay.is-visible { opacity: 1; }

  .quick-preview-media {
    position: relative;
    width: min(92vw, 900px);
    height: min(80vh, 900px);
  }

  .quick-preview-slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  }
  .quick-preview-slide.is-active { opacity: 1; }

  .quick-preview-overlay span {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em;
    color: #fff; text-transform: uppercase; text-align: center;
  }

  .thumb-autoplay { position: relative; width: 100%; height: 100%; }
  .thumb-slide {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease;
  }
  .thumb-slide.is-active { opacity: 1; }

  .card .ref {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
  }

  .card h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .card p.desc {
    margin: 0;
    font-size: 0.84rem;
    color: var(--ink-soft);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .badge:empty { display: none; }

  .card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
  }

  /* Sur desktop ces deux wrappers s'effacent (display:contents) : leurs
     enfants deviennent des items flex directs de .card-foot, ce qui
     reproduit exactement l'ancienne disposition (badge seul sur sa ligne,
     puis prix + action) sans wrapper visible. Le mobile les réactive en
     display:flex pour forcer deux lignes fixes — voir media query plus bas. */
  .card-price-line { display: contents; }
  .card-actions { display: contents; }

  .price {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
  }

  .price-old {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ink-soft);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
  }
  .price-promo { color: var(--accent); font-weight: 600; }

  .badge {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 8px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    align-self: flex-start;
  }

  /* Scopé à .card (catalogue) : le badge "Vendue"/prix de produit.php
     réutilise .badge/.card-foot/.price-promo hors de toute .card, il ne
     doit pas hériter de cette mise en page à deux lignes. */
  .card .badge {
    flex: 0 0 100%;
    order: -1;
    margin-bottom: 6px;
  }

  .card-details { display: none; }

  .card-cta {
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
  }
  .card-cta:hover { background: var(--ink); color: var(--bg); }
  .card-cta[data-added="true"] { background: var(--sage); border-color: var(--sage); color: var(--accent-ink); }
  /* « Commander » : ajoute la pièce et ouvre le panier ; le bouton plein, « Ajouter » restant en contour. */
  .card-cta-buy { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .card-cta-buy:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }

  /* featured link row */

  .featured-foot {
    margin-top: 30px;
    display: flex;
    justify-content: center;
  }

  /* follow strip */

  .follow {
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .follow-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    background: var(--line);
    margin-top: 26px;
  }

  .follow-tile {
    aspect-ratio: 1;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
  }

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

  /* newsletter / contact */

  .contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .field-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
  }

  .field-row input {
    flex: 1 1 220px;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.92rem;
  }

  .field-row input::placeholder { color: var(--ink-soft); }

  .form-note {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--sage);
    font-family: var(--font-mono);
    min-height: 1.2em;
  }

  .info-list { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
  .info-list li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--ink-soft); }
  .info-list strong { color: var(--ink); font-weight: 600; min-width: 96px; }

  /* bandeaux photo/vidéo en haut de page (admin → Bandeaux de page) : calque
     de fond absolu, posé derrière le contenu réel de la zone qui porte
     .has-page-banner — sans média configuré, rien n'est inséré et ces
     règles ne s'appliquent jamais (voir render_page_banner() côté PHP). */

  .page-banner-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
  .page-banner-media img, .page-banner-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
  .page-banner-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20,15,8,0.78), rgba(20,15,8,1));
    /* opacité (0-1) posée en style inline par render_page_banner() selon le
       réglage 0-100 % choisi dans Administration → Bandeaux de page */
  }

  .banner-zone.has-page-banner {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
    margin-bottom: 20px;
  }
  .banner-zone.has-page-banner > :not(.page-banner-media) { position: relative; z-index: 1; }
  .banner-zone.has-page-banner .eyebrow { color: var(--bg); }
  .banner-zone.has-page-banner h1,
  .banner-zone.has-page-banner h2 { color: #fff; margin: 0; }

  section.hero.has-page-banner { position: relative; overflow: hidden; }
  section.hero.has-page-banner .eyebrow { color: var(--bg); }
  section.hero.has-page-banner h1 { color: #fff; }
  section.hero.has-page-banner .lede { color: rgba(255,255,255,0.85); }
  section.hero.has-page-banner .hero-grid { position: relative; z-index: 1; }
  section.hero.has-page-banner .btn-ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
  section.hero.has-page-banner .btn-ghost:hover { border-color: #fff; }

  /* boutique header */

  .shop-head { padding: 40px 0 8px; }

  .shop-title { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 20px; }

  .shop-search {
    display: flex;
    align-items: stretch;
    max-width: 380px;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .shop-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--ink);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 0.9rem;
  }

  .shop-search input[type="search"]:focus { outline: none; }
  .shop-search input[type="search"]::placeholder { color: var(--ink-soft); }

  .shop-search button {
    border: none;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    padding: 0 16px;
    font-size: 1rem;
    cursor: pointer;
  }

  .shop-search button:hover { background: var(--ink); color: var(--bg); }

  .filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    margin: 20px 0 32px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .filters::-webkit-scrollbar { height: 4px; }
  .filters::-webkit-scrollbar-thumb { background: var(--line); }

  .pill {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    padding: 8px 16px;
    font-size: 0.84rem;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
  }

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

  .empty-state {
    padding: 60px 0;
    text-align: center;
    color: var(--ink-soft);
  }

  /* boutique — mobile : cartes compactes, aperçu minimal (nom + prix),
     actions groupées sur deux lignes fixes (voir .card-price-line /
     .card-actions ci-dessus, dissous en display:contents sur desktop). */
  @media (max-width: 780px) {
    .shop-head { padding: 16px 0 4px; }
    .shop-title { margin-bottom: 8px; }
    .filters { margin: 12px 0 10px; }
    .shop-products { padding-top: 12px; }

    .card .ref { display: none; }
    .card p.desc { display: none; }

    .card-price-line {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .card-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .card .card-foot { flex-direction: column; align-items: stretch; }

    .card .badge { flex: 0 0 auto; order: 0; margin-bottom: 0; }
    .card .price-promo { font-weight: 800; font-size: 1.05rem; }

    .card-details {
      display: inline-flex;
      flex: 1 1 0;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      color: var(--ink-soft);
      padding: 12px 10px;
      font-size: 0.82rem;
      text-decoration: none;
      text-align: center;
    }

    /* Deux lignes : « Détails » + « Ajouter » (contours), puis « Commander » pleine largeur. */
    .card-cta {
      flex: 1 1 0;
      background: transparent;
      color: var(--accent);
      border-color: var(--accent);
      padding: 13px 10px;
      font-size: 0.92rem;
      font-weight: 700;
      text-align: center;
    }
    .card-cta:hover { background: transparent; filter: brightness(1.08); }
    .card-cta-buy { flex: 1 1 100%; background: var(--accent); color: var(--accent-ink); order: 3; }
    .card-cta-buy:hover { background: var(--accent); }
  }

  /* footer */

  footer.site {
    border-top: 1px solid var(--line);
    padding: 48px 0 36px;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  @media (min-width: 700px) {
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  }

  .footer-grid h4 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 14px;
  }

  .footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 0.9rem; }
  .footer-grid a { text-decoration: none; color: var(--ink-soft); }
  .footer-grid a:hover { color: var(--ink); }

  .footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
  }

  .footer-note {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--ink-soft);
  }

  /* Annonce d'horaires / fermeture, en haut de toutes les pages publiques. */
  .shop-notice { border-bottom: 1px solid var(--line); background: var(--surface); font-size: 0.86rem; }
  .shop-notice .wrap { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
  .shop-notice p { margin: 0; flex: 1; }
  .shop-notice-warning { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .shop-notice-close {
    border: 0; background: transparent; color: inherit; cursor: pointer;
    font-size: 1.1rem; line-height: 1; padding: 2px 4px; opacity: 0.7;
  }
  .shop-notice-close:hover, .shop-notice-close:focus-visible { opacity: 1; }

  .is-hidden { display: none !important; }

  /* ---------- admin ---------- */

  .admin-shell { display: flex; flex-direction: column; gap: 48px; }

  .admin-block {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 28px;
  }

  .admin-block h2 { font-size: 1.3rem; margin-bottom: 4px; }

  /* Génération des versions smartphone en arrière-plan (includes/admin-nav.php). */
  .mobile-variants-status {
    position: fixed; right: 16px; bottom: 16px; z-index: 300; max-width: min(360px, calc(100vw - 32px));
    background: var(--ink); color: var(--bg); padding: 10px 14px; font-size: 0.82rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  }
  .mobile-variants-status[data-kind="error"] { background: var(--accent); color: #fff; }

  /* Ratio et taille en pixels sur les vignettes de l'admin (includes/admin-nav.php). */
  /* Classes doublées : l'emportent sur les « .xxx span » des pages (ex. sélecteur de médias). */
  .media-dims-wrap.media-dims-wrap { position: relative; display: block; padding: 0; }
  .media-dims-badge.media-dims-badge {
    display: block;
    position: absolute; left: 4px; bottom: 4px; z-index: 2;
    background: rgba(20, 15, 8, 0.74); color: #fff;
    font-family: var(--font-mono); font-size: 0.64rem; line-height: 1.35; letter-spacing: 0.01em;
    padding: 1px 5px; white-space: nowrap; pointer-events: none;
  }
  .media-dims-badge.media-dims-badge b { font-weight: 700; }
  .admin-block > p.hint { margin: 0 0 22px; color: var(--ink-soft); font-size: 0.88rem; }

  .res-warning {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--accent);
    font-size: 0.82rem;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1 1 100%;
    width: 100%;
  }
  .res-warning[hidden] { display: none; }
  .res-warning p { margin: 0; }
  .res-warning .res-warning-status { color: var(--ink-soft); font-style: italic; }

  .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
  }

  .field label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  .field input[type="text"],
  .field textarea,
  .field select {
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 0.94rem;
    width: 100%;
  }

  .field textarea { resize: vertical; min-height: 80px; }

  .field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  @media (max-width: 640px) { .field-row-2 { grid-template-columns: 1fr; } }

  .admin-photo-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
  }

  .admin-photo-preview {
    width: 90px;
    height: 68px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
    overflow: hidden;
  }
  .admin-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .admin-photo-preview svg { width: 100%; height: 100%; padding: 14px; color: var(--ink-soft); box-sizing: border-box; }

  .btn-small {
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
  }
  .btn-small:hover { background: var(--ink); color: var(--bg); }

  .product-admin-list { display: flex; flex-direction: column; gap: 18px; }

  .product-admin-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 16px;
    align-items: start;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
  .product-admin-row:first-child { border-top: none; padding-top: 0; }
  .product-admin-row.is-hidden-product { opacity: 0.55; }
  .product-admin-row.is-hidden-product .admin-photo-preview { filter: grayscale(1); }

  .bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    margin-bottom: 18px;
  }
  .bulk-toolbar .admin-delete:disabled { opacity: 0.4; cursor: not-allowed; }

  .product-admin-fields { display: flex; flex-direction: column; gap: 10px; }
  .product-admin-fields .field { margin-bottom: 0; }
  .product-admin-fields .field-row-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; align-items: end; }
  @media (max-width: 640px) { .product-admin-fields .field-row-3 { grid-template-columns: 1fr; } }

  .featured-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
  }

  .admin-delete {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    padding: 8px 12px;
    font-size: 0.76rem;
    cursor: pointer;
    white-space: nowrap;
  }
  .admin-delete:hover { border-color: var(--accent); color: var(--accent); }

  .add-product-btn {
    background: transparent;
    border: 1px dashed var(--ink-soft);
    color: var(--ink-soft);
    padding: 14px;
    width: 100%;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    text-align: center;
    list-style: none;
  }
  .add-product-btn:hover { border-color: var(--ink); color: var(--ink); }
  .add-product-btn::-webkit-details-marker { display: none; }

  .publish-status { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); }
  .publish-status[data-kind="ok"] { color: var(--sage); }
  .publish-status[data-kind="error"] { color: var(--accent); }

  .footer-admin-link { font-family: var(--font-mono); font-size: 0.7rem; }

  /* ---------- product detail / diaporama ---------- */

  .product-detail {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    margin-top: 20px;
  }
  @media (max-width: 860px) {
    .product-detail { grid-template-columns: 1fr; }
  }

  .product-info { display: flex; flex-direction: column; }

  .pg-main {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    /* Format des visuels générés : 3:2 sur ordinateur, 9:16 sur smartphone. */
    aspect-ratio: 3 / 2;
    overflow: hidden;
  }
  @media (max-width: 780px) {
    .pg-main { aspect-ratio: 9 / 16; max-height: 82svh; margin-inline: auto; }
  }

  .pg-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
  }
  .pg-slide.is-active { opacity: 1; visibility: visible; }
  .pg-slide picture { display: block; width: 100%; height: 100%; }
  /* Visuels réservés à un type d'écran (3:2 ordinateur, 9:16 smartphone). */
  @media (min-width: 781px) { .pg-only-mobile { display: none !important; } }
  @media (max-width: 780px) { .pg-only-desktop { display: none !important; } }
  .pg-slide img, .pg-slide video { width: 100%; height: 100%; object-fit: contain; }
  .pg-slide svg { width: 40%; height: 40%; color: var(--ink-soft); }

  .pg-illustration-tag {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: rgba(46, 36, 24, 0.82);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-align: center;
    padding: 8px 12px;
    line-height: 1.4;
  }

  .pg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--line);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
  }
  .pg-arrow:hover { background: #fff; }
  .pg-prev { left: 12px; }
  .pg-next { right: 12px; }

  .pg-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .pg-thumb {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0;
    width: 68px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
  }
  .pg-thumb img, .pg-thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
  .pg-thumb span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--ink-soft);
    padding: 4px 2px;
    text-align: center;
  }
  .pg-thumb.is-active { border-color: var(--accent); }
  .pg-thumb.is-active span { color: var(--accent); }

  /* Ordinateur : prix en haut à droite de la fiche (celui du pied reste pour le smartphone) ;
     intitulés des vignettes masqués, visibles seulement au survol. */
  .pi-head { display: block; }
  .product-info .pi-price { display: none; }
  @media (min-width: 861px) {
    .pi-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
    .pi-head .ref { margin: 0; }
    .product-info .pi-price { display: inline-flex; justify-content: flex-end; text-align: right; }
    .product-info .pi-price .price { font-size: 1.7rem; }
    .product-info .card-foot .price-group { display: none; }
    .product-info .card-foot { justify-content: flex-end; }
  }
  @media (min-width: 861px) and (hover: hover) {
    .pg-thumb { position: relative; }
    .pg-thumb span {
      position: absolute; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,.65); color: #fff;
      opacity: 0; pointer-events: none; transition: opacity .15s;
    }
    .pg-thumb:hover span, .pg-thumb:focus-visible span { opacity: 1; }
    .pg-thumb.is-active span { color: #fff; }
  }

  .shipping-choice-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
  }
  .shipping-choice-option:has(input:checked) { border-color: var(--accent); background: var(--surface); }
  .shipping-choice-option input[type="radio"] { margin: 0; }
  .shipping-choice-option span:first-of-type { flex: 1; }
  .shipping-choice-price { font-family: var(--font-mono); color: var(--ink-soft); white-space: nowrap; }

  .address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--bg);
    border: 1px solid var(--line);
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
  }
  .address-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 0.82rem;
    cursor: pointer;
  }
  .address-suggestion-item:last-child { border-bottom: none; }
  .address-suggestion-item:hover, .address-suggestion-item.is-active { background: var(--surface); }
  .address-suggestion-item { min-height: 44px; }
  .geo-status { font-size: 0.82rem; margin: 8px 0 0; color: var(--ink-soft); min-height: 1.2em; }
  .geo-status[data-kind="error"] { color: #b3261e; } .geo-status[data-kind="ok"] { color: var(--ink); }

  /* ---------- administration : barre latérale repliable ---------- */

  html.has-admin-sidebar { --admin-sidebar-w: 236px; }
  html.has-admin-sidebar.admin-sidebar-collapsed { --admin-sidebar-w: 64px; }
  html.has-admin-sidebar body { padding-left: var(--admin-sidebar-w); transition: padding-left 0.2s ease; }

  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
    width: var(--admin-sidebar-w);
    display: flex; flex-direction: column;
    background: var(--surface); border-right: 1px solid var(--line);
    transition: width 0.2s ease, transform 0.25s ease;
    overflow-x: hidden; overflow-y: auto;
  }
  .admin-sidebar-head { padding: 18px 16px 14px; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
  .admin-sidebar-logo img { max-width: 100%; max-height: 44px; display: block; }
  .admin-sidebar-tag { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); white-space: nowrap; }
  .admin-sidebar-nav, .admin-sidebar-foot { display: flex; flex-direction: column; padding: 10px 8px; gap: 2px; }
  .admin-sidebar-nav { flex: 1; }
  .admin-sidebar-foot { border-top: 1px solid var(--line); }
  /* Catégories de la barre latérale : titres repliables, une seule ouverte par défaut. */
  .admin-nav-group { margin-top: 8px; }
  .admin-nav-group:first-child { margin-top: 0; }
  .admin-nav-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 5px 12px 3px; cursor: pointer; list-style: none;
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink-soft); border-radius: 4px; user-select: none;
  }
  .admin-nav-title::-webkit-details-marker { display: none; }
  .admin-nav-title:hover { color: var(--ink); }
  .admin-nav-title::after {
    content: ''; width: 6px; height: 6px; flex: none; margin-right: 4px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg); transition: transform 0.2s ease;
  }
  .admin-nav-group:not([open]) .admin-nav-title::after { transform: rotate(-45deg); }
  .admin-nav-items { display: flex; flex-direction: column; gap: 2px; }
  .admin-sidebar a, .admin-collapse {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px; border-radius: 6px;
    color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; white-space: nowrap;
    background: none; border: 0; cursor: pointer; font-family: var(--font-body); text-align: left; width: 100%;
  }
  .admin-sidebar a:hover, .admin-collapse:hover { background: var(--surface-2); color: var(--ink); }
  .admin-sidebar a[aria-current="page"] { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
  .admin-ico { width: 20px; height: 20px; flex: none; }
  .admin-collapse .admin-ico { transition: transform 0.2s ease; }

  /* Replié : icônes seules. */
  html.admin-sidebar-collapsed .admin-label,
  html.admin-sidebar-collapsed .admin-sidebar-tag { display: none; }
  html.admin-sidebar-collapsed .admin-sidebar a,
  html.admin-sidebar-collapsed .admin-collapse { justify-content: center; padding: 10px 0; }
  html.admin-sidebar-collapsed .admin-sidebar-head { padding: 14px 8px; align-items: center; }
  html.admin-sidebar-collapsed .admin-sidebar-logo img { max-height: 32px; }
  html.admin-sidebar-collapsed .admin-collapse .admin-ico { transform: rotate(180deg); }
  /* Replié : titres masqués, un simple filet sépare les catégories. */
  html.admin-sidebar-collapsed .admin-nav-title { display: none; }
  html.admin-sidebar-collapsed .admin-nav-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
  html.admin-sidebar-collapsed .admin-nav-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

  /* Barre du haut et panneau coulissant : mobile uniquement. */
  .admin-topbar, .admin-sidebar-overlay { display: none; }
  @media (max-width: 860px) {
    html.has-admin-sidebar body { padding-left: 0; }
    .admin-topbar {
      display: flex; align-items: center; gap: 12px;
      position: sticky; top: 0; z-index: 30;
      padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line);
    }
    .admin-topbar-btn { background: none; border: 1px solid var(--line); padding: 6px; cursor: pointer; color: var(--ink); display: grid; }
    .admin-topbar .site-logo { max-height: 32px; }
    .admin-sidebar { width: 260px; transform: translateX(-100%); box-shadow: 12px 0 32px rgba(20,15,8,0.2); }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-sidebar-overlay { position: fixed; inset: 0; z-index: 35; background: rgba(20,15,8,0.4); }
    .admin-sidebar-overlay.is-open { display: block; }
    /* Sur mobile, le panneau est toujours déplié. */
    html.admin-sidebar-collapsed .admin-label, html.admin-sidebar-collapsed .admin-sidebar-tag { display: inline; }
    html.admin-sidebar-collapsed .admin-sidebar a { justify-content: flex-start; padding: 9px 12px; }
    .admin-collapse { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    html.has-admin-sidebar body, .admin-sidebar, .admin-collapse .admin-ico { transition: none; }
  }
  .admin-sidebar-logo .logo-mini { display: none; }
  html.admin-sidebar-collapsed .admin-sidebar-logo .logo-full { display: none; }
  html.admin-sidebar-collapsed .admin-sidebar-logo .logo-mini { display: block; width: 40px; height: 40px; object-fit: contain; }
  @media (max-width: 860px) {
    html.admin-sidebar-collapsed .admin-sidebar-logo .logo-full { display: block; }
    html.admin-sidebar-collapsed .admin-sidebar-logo .logo-mini { display: none; }
  }

  .admin-whoami { display: block; padding: 4px 14px 8px; font-size: 0.72rem; color: var(--ink-soft); line-height: 1.3; }

/* Boutons « ↻ IA » des formulaires de fiche produit (assets/product-ai.js). */
.ai-btn { margin-left: 6px; padding: 1px 7px; background: none; border: 1px solid var(--line); color: var(--ink-soft); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.02em; cursor: pointer; vertical-align: middle; }
.ai-btn:hover:not(:disabled), .ai-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.ai-btn:disabled, .ai-all:disabled { opacity: 0.5; cursor: progress; }
.ai-all { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ai-all:hover:not(:disabled), .ai-all:focus-visible { filter: brightness(1.08); color: var(--accent-ink); }
.ai-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-status { font-size: 0.82rem; color: var(--ink-soft); }
.ai-status[data-kind="ok"] { color: var(--ink); }
.ai-status[data-kind="error"] { color: #b3261e; }
.ai-filled { animation: ai-filled 1.4s ease-out; }
@keyframes ai-filled { from { background-color: var(--surface-2); outline: 2px solid var(--accent); } to { outline: 2px solid transparent; } }
@media (prefers-reduced-motion: reduce) { .ai-filled { animation: none; } }

/* Prompts enregistrés sous les champs « Mots-clés / précisions » (assets/saved-prompts.js). */
.sp { margin: 6px 0 14px; }
.sp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-save { padding: 4px 10px; background: none; border: 1px solid var(--line); color: var(--ink); font-family: var(--font-body); font-size: 0.8rem; cursor: pointer; }
.sp-save:hover:not(:disabled), .sp-save:focus-visible { border-color: var(--accent); color: var(--accent); }
.sp-save:disabled { opacity: 0.5; }
.sp-msg { font-size: 0.8rem; color: var(--ink); }
.sp-msg[data-kind="error"] { color: #b3261e; }
.sp-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sp-list[hidden] { display: none; }
.sp-list li { display: inline-flex; max-width: 100%; border: 1px solid var(--line); background: var(--surface); }
.sp-use { max-width: 260px; padding: 5px 9px; background: none; border: 0; color: var(--ink); font-family: var(--font-body); font-size: 0.8rem; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-use:hover, .sp-use:focus-visible { background: var(--surface-2); }
.sp-del { padding: 0 8px; background: none; border: 0; border-left: 1px solid var(--line); color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer; }
.sp-del:hover, .sp-del:focus-visible { color: #b3261e; }

/* Aide à la rédaction du prompt : idées cliquables + prompt envoyé (assets/prompt-helper.js). */
.ph-sug { margin: 8px 0 4px; }
.ph-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ph-title { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.ph-ai { padding: 3px 9px; background: none; border: 1px solid var(--accent); color: var(--accent); font-family: var(--font-body); font-size: 0.78rem; cursor: pointer; }
.ph-ai:hover:not(:disabled), .ph-ai:focus-visible { background: var(--accent); color: var(--accent-ink); }
.ph-ai:disabled { opacity: 0.5; cursor: progress; }
.ph-msg { font-size: 0.78rem; color: var(--ink-soft); }
.ph-msg[data-kind="error"] { color: #b3261e; }
.ph-group { margin-top: 6px; }
.ph-gtitle { margin: 0 0 3px; font-size: 0.72rem; color: var(--ink-soft); }
.ph-group.is-ai .ph-gtitle { color: var(--accent); font-weight: 600; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ph-chip { padding: 3px 9px; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-family: var(--font-body); font-size: 0.78rem; cursor: pointer; }
.ph-chip:hover, .ph-chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.ph-prev { margin: 8px 0 14px; border: 1px solid var(--line); background: var(--surface); }
.ph-prev > summary { padding: 7px 10px; cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.ph-body { padding: 0 10px 10px; }
.ph-note { margin: 0 0 6px; font-size: 0.75rem; color: var(--ink-soft); }
.ph-label { margin: 8px 0 3px; font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.ph-text { margin: 0; padding: 8px 10px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--bg); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; color: var(--ink); }
.ph-text mark { background: var(--accent); color: var(--accent-ink); padding: 0 2px; }
.ph-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 6px; font-size: 0.78rem; color: var(--ink); cursor: pointer; }
.ph-toggle input { accent-color: var(--accent); }

/* ---------- fiche produit : barre d'achat collée (smartphone) + boutons ---------- */
.buy-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.price-group { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.flash-cta { margin-left: 10px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.buybar { display: none; }
@media (max-width: 780px) {
  .buybar {
    display: block; position: sticky; top: var(--header-h, 64px); z-index: 14;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0;
  }
  .buybar-in { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .buybar-price { display: flex; flex-direction: column; line-height: 1.15; font-size: 0.95rem; min-width: 0; }
  .buybar-price .price { font-size: 1.1rem; }
  .buybar-price .price-old { font-size: 0.78rem; }
  .buybar-actions { display: flex; min-width: 0; }
  .buybar .buy-form { flex-wrap: nowrap; gap: 6px; }
  .buybar .btn { padding: 10px 12px; font-size: 0.82rem; white-space: nowrap; }
}
.product-info .price-group .price { font-size: 1.4rem; }
.product-info .price-group .price-old { font-size: 1rem; }
.etat-hint { color: var(--ink-soft); font-size: 0.88em; }
.color-chip { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; white-space: nowrap; }
.color-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); display: inline-block; flex: none; }
.product-admin-fields .field select, .admin-block .field select { width: 100%; box-sizing: border-box; }

/* Filtre « type de produit » de la boutique et lien de la fiche (nature › sous-catégorie). */
.nature-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.nature-filter select { background: var(--bg); border: 1px solid var(--line); color: var(--ink); padding: 9px 10px; font-family: var(--font-body); font-size: 0.9rem; max-width: 100%; }
.nature-clear { font-size: 0.85rem; color: var(--ink-soft); }
.nature-link { color: inherit; }
.nature-link:hover { color: var(--accent); }

/* « Prix du marché » : panneau sous le champ Prix (assets/price-research.js). */
.pr-panel { margin: 10px 0 16px; padding: 12px 14px; border: 1px solid var(--accent); background: var(--surface); font-size: 0.88rem; }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pr-close { background: none; border: 0; padding: 4px; color: var(--ink-soft); text-decoration: underline; font-family: var(--font-body); font-size: 0.8rem; cursor: pointer; }
.pr-ident { margin: 0 0 8px; color: var(--ink-soft); }
.pr-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 0.84rem; }
.pr-table th, .pr-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.pr-table tr:first-child th { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
.pr-table td:last-child, .pr-table th:last-child { text-align: right; font-family: var(--font-mono); }
.pr-advice { margin: 6px 0; }
.pr-use { margin: 2px 0 8px; }
.pr-reliab, .pr-note { margin: 6px 0 0; font-size: 0.78rem; color: var(--ink-soft); }
.pr-sources { margin-top: 8px; font-size: 0.8rem; }
.pr-sources ul { margin: 6px 0; padding-left: 18px; }
.pr-sources a { color: var(--accent); }
.pr-q { margin: 4px 0; color: var(--ink-soft); }
.pr-table th:first-child { width: 38%; }
.admin-sidebar-foot .admin-ai-chip { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); padding: 4px 12px; text-decoration: none; }
.admin-sidebar-foot .admin-ai-chip:hover { color: var(--accent); }
.admin-sidebar-collapsed .admin-ai-chip { display: none; }

/* Bandeau d'aperçu d'un modèle de design (?modele=<clé>) : rien n'est enregistré. */
.template-preview-bar { position: sticky; top: 0; z-index: 60; background: #1d1d1d; color: #fff; text-align: center; font-size: 0.82rem; padding: 7px 12px; }
.template-preview-bar a { color: #fff; font-weight: 700; margin-left: 10px; }

/* Vente en lot : pastille à côté du prix */
.lot-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--accent, #b4532a); color: var(--accent, #b4532a); border-radius: 999px; font-family: var(--font-mono, monospace); font-size: 0.68rem; letter-spacing: 0.03em; vertical-align: middle; white-space: nowrap; }

/* Catalogue : état « Vendue » */
.sold-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ink-soft, #777); color: var(--bg, #fff); font-family: var(--font-mono, monospace); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.btn-sold { border-color: var(--accent, #b4532a); color: var(--accent, #b4532a); }

/* Fiche produit : canaux de vente */
.channel-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sale-actions .field select, .sale-actions .field input[type=number] { width: 100%; }

/* Fiche produit : bande des médias du diaporama (nom au survol) */
.fiche-media-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: flex-start; }
.fiche-media { position: relative; width: 88px; height: 88px; margin: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg); outline-offset: 2px; }
.fiche-media img, .fiche-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.fiche-media figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font-size: 0.64rem; line-height: 1.25; background: rgba(0, 0, 0, 0.74); color: #fff; opacity: 0; transform: translateY(100%); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.fiche-media:hover figcaption, .fiche-media:focus figcaption, .fiche-media:focus-visible figcaption { opacity: 1; transform: none; }
.fiche-media-badge { position: absolute; top: 4px; padding: 1px 5px; border-radius: 4px; font-family: var(--font-mono, monospace); font-size: 0.6rem; line-height: 1.3; background: rgba(0, 0, 0, 0.6); color: #fff; }
.fiche-media-badge-video { left: 4px; }
.fiche-media-badge-ia { right: 4px; background: var(--accent, #b4532a); }
.fiche-media-note { align-self: center; font-size: 0.74rem; color: var(--ink-soft); text-decoration: underline; max-width: 150px; }

/* ── Mobile d'abord, passe 1 (front et administration) ─────────────────────────────────────────────────────────
   Zones tactiles d'au moins 44 px, champs à 16 px (sinon iOS zoome au focus), rien qui dépasse de l'écran. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, iframe, svg { max-width: 100%; }
@media (max-width: 780px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), select, textarea { font-size: 16px !important; }
  .admin-topbar-btn { min-width: 44px; min-height: 44px; } .admin-ai-chip { display: inline-flex; align-items: center; min-height: 40px; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; }
  .btn, .btn-small, .btn-primary, .btn-ghost, .admin-delete, .share-btn, .shop-search button, .shop-search input, main button[type="submit"] { min-height: 44px; }
  .btn-small, .admin-delete { padding-top: 10px; padding-bottom: 10px; }
  footer li a, footer .footer-admin-link { display: inline-block; padding: 10px 0; }
  .eyebrow a, section h3 a, .back-link { display: inline-block; padding: 10px 0; }
  main table.acc-table, main table.t-scroll, main table.rate-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-block { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  main .gm-item { grid-template-columns: 1fr; gap: 10px; }
  main .gm-thumb { width: 100%; height: 160px; }
  main .gm-fields input[type="text"], main .gm-fields input[type="number"] { max-width: none; width: 100%; }
  main .gm-actions { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  main .gm-actions .btn-small { width: auto; flex: 1 1 40%; } main .gm-order { flex: 1 1 100%; }
  main .media-filters > * { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  main .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  main .apx-form, main .apx-block { min-width: 0; } main .apx-block { padding: 14px; }
  main .apx-colors { grid-template-columns: 1fr; } main .apx-palettes { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  main .un-sector { min-height: 40px; padding: 8px 14px; }
  main .media-list .tags, main .media-list .muted { font-size: 0.8rem; }
}
@media (max-width: 640px) {      /* ligne du panier : photo + détail, puis total et « Retirer » sur toute la largeur */
  .cart-line { grid-template-columns: 76px minmax(0, 1fr) !important; gap: 12px !important; }
  .cart-line > :nth-child(3) { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; text-align: left !important; }
  .cart-line > :nth-child(3) .price { margin: 0 !important; }
  .cart-line input[type="number"] { min-height: 44px; }
}
/* Liens légaux sous le pied de page (CGV, conditions d'utilisation, confidentialité, mentions légales) */
.legal-bar { padding: 14px 0 22px; font-size: .82rem; color: var(--ink-soft); text-align: center; }
.legal-bar a { display: inline-block; padding: 8px 6px; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ── Payer une pièce par QR code (fiche produit et page payer.php) ──────────────────────────────────────────── */
.qr-pay {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 22px; padding: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow);
}
.qr-pay-code {
  flex: 0 0 auto; width: 136px; height: 136px; padding: 8px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  color: #2a2420; font-size: .72rem; line-height: 1.3; text-align: center;
}
.qr-pay-code svg { display: block; width: 100%; height: 100%; }
.qr-pay-body { flex: 1 1 190px; min-width: 0; }
.qr-pay-kicker { margin: 0 0 4px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.qr-pay-title { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.3; }
.qr-pay-text { margin: 0; font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }
.qr-pay-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.qr-pay-actions .btn { font-size: .82rem; padding: 8px 12px; min-height: 40px; }
.qr-pay-admin { font-size: .78rem; color: var(--accent); }

.pay-product {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
}
.pay-product img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.pay-product > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-product .pay-ref { font-size: .78rem; color: var(--ink-soft); }
.pay-product .price-group { flex: 0 0 auto; }
.pay-card {
  margin-top: 18px; padding: 20px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow);
}
.pay-form fieldset { margin: 0; padding: 0; border: 0; }
.pay-form legend { padding: 0; margin-bottom: 10px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.pay-methods { display: grid; gap: 8px; margin-bottom: 18px; }
.pay-method {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
  font-size: .94rem; cursor: pointer;
}
.pay-method:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pay-method input { margin: 0; accent-color: var(--accent); }
.pay-email { display: block; margin-bottom: 16px; font-size: .9rem; }
.pay-email > span { display: block; margin-bottom: 6px; }
.pay-email em { font-style: normal; color: var(--ink-soft); }
.pay-email input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: inherit; font: inherit;
}
.pay-submit { width: 100%; }
.pay-legal { margin: 12px 0 0; font-size: .78rem; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.pay-notice { margin: 16px 0 0; padding: 10px 13px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-size: .88rem; }
.pay-notice-error { border-color: var(--accent); color: var(--accent); }
@media (max-width: 560px) {
  .qr-pay { flex-direction: column; align-items: stretch; }
  .qr-pay-code { width: 168px; height: 168px; align-self: center; }
  .qr-pay-actions .btn { flex: 1 1 auto; justify-content: center; }
}
