/* ============================================================
   Shopitel — feuille de style
   Charte : vert #00B140 · vert foncé #004D2B · noir #0B0F14
            gris clair #F4F6F8 · blanc #FFFFFF
            Montserrat (titres, logo) · Poppins (textes, interface)
   Le thème suit celui du téléphone : clair par défaut, sombre si le téléphone est en mode sombre.
   ============================================================ */

/* Polices hébergées sur le site (caractères latins, accents compris) : pas d'attente d'un autre serveur */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700 800; font-display: swap; src: url('/assets/fonts/montserrat.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/poppins-700.woff2') format('woff2'); }

:root {
  /* Couleurs de marque (identiques dans les deux thèmes) */
  --green: #00B140;
  --green-dark: #004D2B;
  --green-deep: #003A20;
  --green-light: #4BE07A;
  --on-accent: #FFFFFF;   /* texte sur fond vert foncé ou noir */
  --on-green: #0B0F14;    /* texte sur fond vert vif */

  /* Couleurs qui changent avec le thème */
  --bg: #FFFFFF;          /* fond de page */
  --surface: #FFFFFF;     /* cartes, fenêtres, champs */
  --gray: #F4F6F8;        /* zones grisées */
  --media: #EEF1F4;       /* fond des photos produit */
  --ink: #0B0F14;
  --muted: #5B6573;
  --placeholder: #7A8490;
  --line: #E3E7EC;
  --field: #D5DBE2;
  --ring: rgb(11 15 20 / .1); /* contour des pastilles de marque */
  --green-700: #007A33;   /* vert lisible sur le fond */
  --brand-ink: #004D2B;   /* textes et icônes verts */
  --green-50: #E8F8EE;    /* fond teinté vert */
  --tint-ink: #003A20;    /* texte sur fond teinté */
  --tint-line: #CDEFD9;
  --tint-hover: #DDF4E5;
  --btn: #004D2B;
  --btn-hover: #003A20;
  --warn: #B45309;
  --danger: #C62828;
  --danger-50: #FDECEC;
  --note-bg: #FFF7E6;
  --note-ink: #7A4A00;
  --switch-off: #CBD2DA;
  --tab-ink: #3A424D;
  --apple-bg: #000000;
  --apple-fg: #FFFFFF;
  --apple-hover: #1F2329;
  --shadow: 0 1px 2px rgb(11 15 20 / .05), 0 8px 24px rgb(11 15 20 / .08);

  --radius: 14px;
  --font-title: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabbar: 64px;
  color-scheme: light;
}

/* Thème sombre (téléphone en mode sombre) ; l'impression reste en clair */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F14;
    --surface: #151B22;
    --gray: #1B222A;
    --media: #E4E8EC;     /* les photos produit gardent un fond clair, couleurs fidèles */
    --ink: #EEF1F4;
    --muted: #9AA5B1;
    --placeholder: #7D8894;
    --line: #252D36;
    --field: #3A4450;
    --ring: rgb(255 255 255 / .16);
    --green-700: #3DD06E;
    --brand-ink: #4BE07A;
    --green-50: #10261A;
    --tint-ink: #B4EFC8;
    --tint-line: #1E4D31;
    --tint-hover: #163A25;
    --btn: #00873A;
    --btn-hover: #007232;
    --warn: #F0A04B;
    --danger: #FF6B6B;
    --danger-50: #3A1717;
    --note-bg: #2E2410;
    --note-ink: #F5C26B;
    --switch-off: #3A4450;
    --tab-ink: #B4BDC8;
    --apple-bg: #FFFFFF;
    --apple-fg: #000000;
    --apple-hover: #E6E8EB;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .45);
    color-scheme: dark;
  }

}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
/* Réaction immédiate au toucher (pas de délai de double-toucher) */
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Marges latérales : 16 px, ou plus sur les téléphones à encoche tenus en paysage */
.container {
  width: 100%; max-width: 1200px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
}
main { padding-bottom: 28px; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.h1 { font-family: var(--font-title); font-weight: 800; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; letter-spacing: -.01em; margin: 6px 0 12px; }
.h2 { font-family: var(--font-title); font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin: 0; }

/* ---------- En-tête ---------- */
.header { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--bg); box-shadow: 0 1px 0 var(--line); }
.header__bar { display: flex; align-items: center; gap: 12px; height: 64px; }

.logo { display: flex; align-items: center; gap: 4px; flex: none; }
.logo__mark { width: 40px; height: 40px; }
img.logo__mark { object-fit: contain; } /* logo en image (Site › Apparence dans l'admin) */
.logo__text { font-family: var(--font-title); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -.035em; }
.logo__text b { color: var(--green); font-weight: 800; }

.search {
  flex: 1; min-width: 0; display: flex; align-items: center; height: 44px;
  padding: 0 4px 0 16px; border: 1px solid var(--field); border-radius: 999px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent); }
/* 16 px minimum dans les champs : sinon l'iPhone zoome la page dès qu'on touche le champ */
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; }
.search input::placeholder { color: var(--placeholder); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search button { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--brand-ink); }
.search button:hover { background: var(--green-50); }

.header__links { display: none; }

.cats-wrap { border-top: 1px solid var(--line); }
.no-cats .cats-wrap { display: none; } /* Favoris et Plus */
/* Les 4 catégories tiennent sur tous les téléphones, dès 320 px (texte proportionnel à l'écran) */
.cats { display: flex; padding-inline: max(6px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-right)); overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: 1 0 auto; padding: 11px 4px 10px; text-align: center; white-space: nowrap;
  font-size: clamp(12px, 3.7vw, 14px); font-weight: 500; border-bottom: 3px solid transparent;
}
.cats a:hover { color: var(--green-700); }
.cats a.is-active { color: var(--green-700); border-color: var(--green); font-weight: 600; }

/* ---------- Bannière (carrousel) ---------- */
.hero { position: relative; margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: var(--green-deep); }
.hero__track { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.hero__track::-webkit-scrollbar { display: none; }
.hero__slide {
  position: relative; flex: 0 0 100%; display: flex; align-items: center;
  aspect-ratio: 2.75 / 1; min-height: 136px; max-height: 340px;
  padding-left: clamp(16px, 4.5vw, 56px); overflow: hidden; scroll-snap-align: start; color: var(--on-accent);
  background: radial-gradient(120% 150% at 88% 15%, var(--hero-a, #0B8A43) 0%, var(--hero-b, #005C30) 42%, var(--green-deep) 100%);
}
.hero__text {
  position: relative; z-index: 1; max-width: 47%; margin: 0;
  font-family: var(--font-title); font-weight: 800; font-size: clamp(17px, 4.6vw, 42px); line-height: 1.15; letter-spacing: -.015em;
  text-shadow: 0 2px 12px rgb(0 0 0 / .25);
}
.hero__text em { font-style: normal; color: var(--green-light); }
.hero__brush { width: 78%; height: auto; margin-top: .25em; color: var(--green-light); }
.hero__art { position: absolute; top: 0; right: 0; width: 55%; height: 100%; }
.hero__art svg { width: 100%; height: 100%; }
.hero__art img { width: 100%; height: 100%; object-fit: contain; }
.hero__next {
  position: absolute; top: 50%; right: 10px; translate: 0 -50%; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgb(11 15 20 / .45); color: var(--on-accent); backdrop-filter: blur(4px);
}
.hero__next:hover { background: rgb(11 15 20 / .65); }
.hero__next .i { width: 20px; height: 20px; }
.hero__dots { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 2; display: flex; gap: 6px; }
.hero__dots button { width: 7px; height: 7px; border-radius: 4px; background: rgb(255 255 255 / .45); transition: width .2s, background .2s; }
.hero__dots button[aria-current="true"] { width: 18px; background: var(--on-accent); }

/* ---------- Marques ---------- */
.brands { position: relative; margin-top: 16px; }
.brands__row {
  display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 4px 40px 4px 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.brands__row::-webkit-scrollbar { display: none; }
.brands.is-static .brands__row { -webkit-mask-image: none; mask-image: none; padding-right: 2px; }
.brands.is-static .brands__next { display: none; }
.brand { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 66px; font-size: 12.5px; font-weight: 500; }
.brand__logo {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  font-family: var(--font-title); font-weight: 800; letter-spacing: .01em;
  box-shadow: inset 0 0 0 1px var(--ring); transition: transform .15s;
}
.brand__logo img { width: 100%; height: 100%; object-fit: cover; }
.brand:hover .brand__logo { transform: translateY(-2px); }
.brands__next {
  position: absolute; top: 19px; right: 0; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--ink);
}
.brands__next .i { width: 18px; height: 18px; }

/* ---------- Listes de produits ---------- */
.section { margin-top: 24px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section__title { display: flex; align-items: center; gap: 8px; }
.section__title .i { color: var(--green); }

.sort { position: relative; flex: none; }
.sort__btn {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px;
  border: 1px solid var(--field); border-radius: 10px; background: var(--surface);
  font-weight: 500; cursor: pointer; list-style: none; user-select: none;
}
.sort__btn::-webkit-details-marker { display: none; }
.sort__btn .i { width: 20px; height: 20px; }
.sort__btn .i:last-child { width: 18px; height: 18px; transition: rotate .15s; }
.sort[open] .sort__btn .i:last-child { rotate: 180deg; }
.sort__count {
  display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--green); color: var(--on-green); font-size: 12px; font-weight: 700;
}
.sort__menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 540px); overflow-y: auto; padding: 4px 14px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.sort__label { margin: 12px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sort__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.sort__opts button { height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; font-weight: 500; }
.sort__opts button:hover { border-color: var(--green); }
.sort__opts button[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: var(--on-accent); }
.sort__reset { display: block; margin-top: 14px; }

.section--bare { margin-top: 14px; }
.section__head > .sort:only-child { margin-left: auto; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.active-filters .chip { gap: 6px; height: 34px; padding: 0 10px 0 14px; }
.active-filters .i { width: 16px; height: 16px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } 

}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } 

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

}

.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .2s, transform .2s;
  /* Les cartes hors de l'écran ne sont dessinées qu'en approchant : défilement fluide sur les petits téléphones */
  content-visibility: auto; contain-intrinsic-size: auto 330px;
}
@media (hover: hover) { .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } 

}
.card__media:active { opacity: .85; }
.card__media { position: relative; display: block; aspect-ratio: 1 / .88; padding: 12px; background: var(--media); }
.card__media > svg, .card__media > img { width: 100%; height: 100%; object-fit: contain; }
.card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 12px 10px 10px; }
.card__title {
  margin: 0; min-height: 2.7em; font-family: var(--font); font-size: 15px; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__title a:hover { color: var(--green-700); }
/* Prix réel en haut, ancien prix barré en dessous */
.card__price { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin: auto 0 0; line-height: 1.25; }
.card__price strong { font-size: 16.5px; font-weight: 700; color: var(--green-700); }
.card__price s { font-size: 13px; color: var(--muted); }
.card .btn { height: 42px; padding: 0 8px; gap: 6px; font-size: 14.5px; }

/* Bouton favori, en haut à droite de chaque image */
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgb(11 15 20 / .14);
  transition: color .15s, transform .15s;
}
.fav .i { width: 19px; height: 19px; }
.fav:hover { color: var(--green-700); }
.fav:active { transform: scale(.88); }
.fav.is-on { color: var(--green); }
.fav.is-on .i { fill: currentColor; animation: fav-pop .3s ease-out; }
@keyframes fav-pop { 50% { transform: scale(1.3); } }

.tags { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tag { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: var(--green-50); color: var(--green-700); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.tag--promo { background: #0B0F14; color: #FFFFFF; } /* posée sur la photo, qui reste claire dans les deux thèmes */
.tag--out { background: var(--danger-50); color: var(--danger); }

.chip {
  flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500;
}
.chip:hover { border-color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-start > p { margin: 0 0 16px; }

/* Bouton « Partager » de la fiche produit et fenêtre de partage */
.share-btn { margin-top: 4px; }
.share-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.share-opt .i { width: 26px; height: 26px; color: var(--green-700); }

.chip.is-active { background: var(--btn); border-color: var(--btn); color: var(--on-accent); }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--green-700); }
.crumbs > :last-child { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55vw; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 10px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn .i, .btn .brand-ico { width: 20px; height: 20px; }
.btn--wa, .btn--primary { background: var(--btn); color: var(--on-accent); }
.btn--wa:hover, .btn--primary:hover { background: var(--btn-hover); }
.btn--outline { background: var(--surface); color: var(--brand-ink); box-shadow: inset 0 0 0 1.5px var(--brand-ink); }
.btn--outline:hover { background: var(--green-50); }
.btn--lg { height: 52px; border-radius: 12px; font-size: 16px; }
.btn--sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; }
.link { color: var(--green-700); font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

/* ---------- Fiche produit ---------- */
.pdp {
  display: grid; gap: 14px; margin-top: 12px; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "main info" "thumbs thumbs" "actions actions";
}
.pdp__main { grid-area: main; position: relative; aspect-ratio: 1 / 1.08; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--media); }
.pdp__pic { width: 100%; height: 100%; }
.pdp__pic > svg, .pdp__pic > img { width: 100%; height: 100%; object-fit: contain; }
.pdp__pic { cursor: zoom-in; }
.pdp__zoom {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgb(11 15 20 / .14);
}
.pdp__zoom .i { width: 20px; height: 20px; }

/* ---------- Photos en grand (visionneuse plein écran) ---------- */
.viewer {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: #FFFFFF; color: #0B0F14; overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: #FFFFFF; }
.viewer__top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
}
.viewer__count { font-weight: 600; font-size: 14px; color: #5B6573; }
.viewer__close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #F4F6F8; color: #0B0F14; }
.viewer__track { flex: 1; display: flex; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__track.is-zooming { overflow-x: hidden; }
.viewer__slide { display: grid; place-items: center; flex: 0 0 100%; min-width: 0; overflow: hidden; scroll-snap-align: center; cursor: zoom-in; }
.viewer__img { width: min(100%, 78vh, 820px); aspect-ratio: 1; padding: 12px; }
.viewer__img > svg, .viewer__img > img { width: 100%; height: 100%; object-fit: contain; }
.viewer__slide.is-zoomed { display: block; overflow: auto; overscroll-behavior: contain; scrollbar-width: none; cursor: zoom-out; }
.viewer__slide.is-zoomed::-webkit-scrollbar { display: none; }
.viewer__slide.is-zoomed .viewer__img { width: 250%; max-width: none; padding: 0; }
.viewer__nav {
  position: absolute; top: 50%; z-index: 2; display: none; place-items: center; width: 46px; height: 46px; margin-top: -23px;
  border-radius: 50%; background: #FFFFFF; color: #0B0F14; box-shadow: 0 2px 10px rgb(11 15 20 / .18);
}
.viewer__nav--prev { left: 16px; }
.viewer__nav--prev .i { transform: rotate(180deg); }
.viewer__nav--next { right: 16px; }
@media (hover: hover) and (min-width: 700px) { .viewer__nav { display: grid; } 

}
.viewer__dots { display: flex; justify-content: center; gap: 8px; padding: 10px 0 4px; }
.viewer__dots button { width: 8px; height: 8px; border-radius: 4px; background: #D5DBE2; transition: width .2s, background .2s; }
.viewer__dots button[aria-current="true"] { width: 20px; background: var(--green); }
.viewer__hint { margin: 0; padding: 6px 16px calc(12px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 13px; color: #5B6573; }
.pdp__info { grid-area: info; min-width: 0; padding-top: 4px; }
.pdp__name { margin: 0 0 12px; font-family: var(--font-title); font-weight: 800; font-size: clamp(20px, 5.6vw, 34px); line-height: 1.15; letter-spacing: -.015em; overflow-wrap: anywhere; }
.pdp__price { margin: 0; font-family: var(--font-title); font-weight: 800; font-size: clamp(19px, 5.2vw, 30px); line-height: 1.2; color: var(--green-700); white-space: nowrap; }
.pdp__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 6px 0 0; font-size: 14px; }
.pdp__sub s { color: var(--muted); }
.stock { font-weight: 500; color: var(--green-700); }
.stock--out { color: var(--danger); }
.thumbs { grid-area: thumbs; position: relative; }
.thumbs__row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.thumbs__row::-webkit-scrollbar { display: none; }
.thumb {
  flex: 0 0 calc((100% - 30px) / 4.3); aspect-ratio: 1.15; padding: 5px; scroll-snap-align: start;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--media);
}
.thumb > svg, .thumb > img { width: 100%; height: 100%; object-fit: contain; }
.thumb.is-on { border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.thumbs__next {
  position: absolute; top: 50%; right: 4px; translate: 0 -50%; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow);
}
.thumbs__next .i { width: 18px; height: 18px; }
.pdp__actions { grid-area: actions; display: grid; gap: 10px; }

/* Atouts sous les boutons de la fiche produit */
/* 2 × 2 sur téléphone, 4 côte à côte quand la place le permet */
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
@media (min-width: 480px) { .perks { grid-template-columns: repeat(4, minmax(0, 1fr)); } 

}
.perks li {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px;
  background: var(--green-50); color: var(--tint-ink); text-align: center; font-size: 12.5px; font-weight: 600; line-height: 1.25;
}
.perks .i { width: 28px; height: 28px; color: var(--green-700); stroke-width: 1.8; }
.perks small { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; opacity: .85; }
/* « Vous économisez … » sous un prix barré */
.save { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--green-50); color: var(--tint-ink); font-size: 13px; font-weight: 600; }
.save .i { width: 16px; height: 16px; color: var(--green-700); }
@media (min-width: 860px) {
  .pdp {
    column-gap: 40px; grid-template-rows: auto 1fr auto;
    grid-template-areas: "main info" "main actions" "thumbs .";
  }
  .pdp__main { aspect-ratio: 1; padding: 24px; }
  .pdp__actions { align-self: start; max-width: 460px; }

}

.tabs { display: flex; gap: 22px; margin-top: 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; margin-bottom: -1px; padding: 10px 0 9px; border-bottom: 3px solid transparent;
  font-family: var(--font-title); font-size: 16px; font-weight: 700; color: var(--muted);
}
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--brand-ink); }
.tab-panel { padding-top: 14px; }
.tab-panel > p { margin: 0; }

.specs { display: grid; grid-template-columns: minmax(110px, auto) 1fr; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.specs dt, .specs dd { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); }
.specs dt { background: var(--gray); color: var(--muted); }
.specs dt:first-of-type, .specs dd:first-of-type { border-top: 0; }

.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rating__value { font-family: var(--font-title); font-size: 22px; font-weight: 800; }
.rating .btn { margin-left: auto; }
.stars { position: relative; display: inline-flex; color: var(--field); }
.stars__on { position: absolute; inset: 0 auto 0 0; display: inline-flex; overflow: hidden; color: var(--green); }
.stars .i { width: 18px; height: 18px; }
.reviews { display: grid; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.review { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.review__score { margin-left: auto; font-weight: 600; }
.review p { margin: 4px 0 6px; }
.review-form { margin-top: 14px; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { color: var(--field); cursor: pointer; }
.star-input .i { width: 32px; height: 32px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--green); }
.star-input input:focus-visible + label { outline: 2px solid var(--green); border-radius: 4px; }

/* ---------- Formulaires ---------- */
.panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel > .h2 { margin-bottom: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label, .field legend, .label { font-size: 13.5px; font-weight: 600; }
.field legend { margin-bottom: 6px; }
.label { margin: 6px 0 8px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1.5px solid var(--field); border-radius: 10px; background: var(--surface); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 70px; padding: 10px 14px; resize: vertical; }
select.input {
  appearance: none; padding-right: 40px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6573' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.input:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgb(198 40 40 / .12); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.opt span:hover { border-color: var(--green); }
.opt input:checked + span { border-color: var(--green); background: var(--green-50); color: var(--brand-ink); font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.opt .i { width: 19px; height: 19px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg .opt span { width: 100%; height: 46px; border-radius: 10px; }
/* Téléphone : nom et prix sur toute la largeur, quantité et boutons en dessous */
.field > small { font-size: 12.5px; }
.field > .label { margin: 0; }
/* Icône ronde des fenêtres d'installation et de notifications */
.auth-sheet__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-50); color: var(--green-700); }

/* ---------- Fenêtres du bas de l'écran (installation, notifications, partage) ---------- */
.sheet {
  width: 100%; max-width: 560px; max-height: min(90vh, 760px); margin: auto auto 0; padding: 0; overflow-y: auto;
  border: 0; border-radius: 18px 18px 0 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.sheet::backdrop { background: rgb(11 15 20 / .55); }
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 18px; } 

}
.sheet__body { display: grid; gap: 12px; padding: 20px 18px 0; }
.sheet__body > p { margin: -6px 0 0; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; font-weight: 600; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--btn); }
.sheet__actions {
  position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
  margin: 0 -18px; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
}

/* ---------- Installation de l'application (proposée à l'arrivée) ---------- */
.install-sheet { justify-items: center; text-align: center; }
.install-sheet > .sheet__actions { justify-self: stretch; }
.install-sheet__icon { width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); }
.install-steps {
  display: grid; gap: 10px; width: 100%; margin: 0; padding: 14px 14px 14px 34px;
  border-radius: 12px; background: var(--gray); font-size: 14.5px; text-align: left;
}
.install-steps li::marker { font-weight: 700; color: var(--green-700); }
.install-steps .i { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; color: var(--brand-ink); }

/* ---------- Page Plus ---------- */
.account { max-width: 640px; margin-inline: auto; }
/* Texte lu seulement par les lecteurs d'écran */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Pied de page ---------- */
.footer { margin-top: 36px; padding-block: 26px 22px; border-top: 1px solid var(--line); background: var(--gray); font-size: 14px; }
.footer__inner { display: grid; gap: 22px; }
/* Dans l'application installée, pas de pied de page : il sert au site et à Google (les pages d'aide et
   les informations légales restent dans Profil) */
.is-app .footer { display: none; }
@media (display-mode: standalone) { .footer { display: none; } 

}
.footer__brand .logo__text { font-size: 22px; }
.footer__brand p { max-width: 560px; margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.footer__groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
@media (min-width: 760px) { .footer__groups { grid-template-columns: repeat(5, minmax(0, 1fr)); } 

}
.footer__title { margin: 0 0 8px; font-family: var(--font-title); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.footer ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--green-700); }
.footer__bottom { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Présentation en bas de l'accueil et des pages de catégorie, de marque et de promos */
.seo-text { max-width: 760px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.seo-text__title { margin: 0 0 8px; font-family: var(--font-title); font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.seo-text p { margin: 0 0 8px; }
.seo-text__links a { color: var(--green-700); font-weight: 600; white-space: nowrap; }
/* Photo de profil modifiable : pastille appareil photo */
.group-title { margin: 22px 4px 8px; font-family: var(--font-title); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-list { display: grid; padding: 0; overflow: hidden; }
.menu-list > * + * { border-top: 1px solid var(--line); }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; font-weight: 500; text-align: left; }
a.menu-row:hover, button.menu-row:hover { background: var(--gray); }
.menu-row > .i:first-child { color: var(--green-700); }
.menu-row > span:not(.pill) { flex: 1; min-width: 0; }
.menu-row small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.menu-row > .i:last-child:not(:first-child) { width: 18px; height: 18px; color: var(--muted); }
.invite { margin-top: 22px; background: var(--green-50); border-color: var(--tint-line); }
.invite a.menu-row:hover { background: var(--tint-hover); }
/* ---------- Pastilles et interrupteurs ---------- */
.pill { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--green-50); color: var(--green-700); font-size: 12px; font-weight: 700; }
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--switch-off); transition: background .2s; }
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--on-accent); box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: translate .2s;
}
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { translate: 18px 0; }
.socials { display: flex; justify-content: center; gap: 14px; }
.socials a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--green-50); color: var(--brand-ink); transition: transform .15s; }
.socials a:hover { transform: translateY(-2px); }
.socials .i { width: 22px; height: 22px; }

/* Notre promesse, tout en bas du Profil */
.promise {
  margin-top: 26px; padding: 18px 14px 14px; border-radius: var(--radius); color: var(--on-accent);
  background: linear-gradient(120deg, var(--green-deep), var(--green-dark) 55%, var(--green-mid, #00873A));
}
.promise__title { margin: 0 0 14px; font-family: var(--font-title); font-size: 18px; font-weight: 800; text-align: center; }
.promise ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; list-style: none; }
.promise li { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 12px; background: rgb(255 255 255 / .1); font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.promise .i { width: 26px; height: 26px; color: var(--green-light); }

/* ---------- Pages d'aide, états vides ---------- */
.prose { max-width: 720px; font-size: 15.5px; }
.prose p { margin: 0 0 12px; }
.prose ul { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 20px; }
.prose h2 { margin: 22px 0 8px; font-family: var(--font-title); font-size: 17px; font-weight: 700; line-height: 1.3; }
.legal-date { font-size: 13px; color: var(--muted); }
.contact { display: grid; gap: 12px; margin: 16px 0 22px; padding: 0 !important; list-style: none; }
.contact li { display: flex; align-items: center; gap: 12px; }
.contact .i { color: var(--green-700); }
.contact a { color: var(--green-700); font-weight: 600; }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; line-height: 1; color: var(--green-700); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--muted); }

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 48px 16px; text-align: center; }
.empty p { max-width: 440px; margin: 0; }
.empty--compact { gap: 6px; padding: 24px 16px 4px; }
.empty--compact .empty__icon { width: 60px; height: 60px; }
.empty__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--green-50); color: var(--green-700); }
.empty__icon .i { width: 34px; height: 34px; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; right: 0; bottom: 0; left: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(11 15 20 / .05);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; font-weight: 500; color: var(--tab-ink); }
.tabbar .i { width: 25px; height: 25px; stroke-width: 1.8; }
.tabbar a.is-active { color: var(--green-700); }
.tabbar a.is-active::before { content: ""; position: absolute; top: -1px; right: 0; left: 0; height: 3px; background: var(--green); }
.badge {
  position: absolute; top: -5px; right: -9px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
}
@keyframes badge-bump { 30% { transform: scale(1.45); } 60% { transform: scale(.9); } }

/* « Voir plus de produits » sous une longue liste */
.more { display: flex; justify-content: center; margin-top: 18px; }

/* Barre d'achat de la fiche produit, au-dessus de la barre d'onglets */
.buybar {
  position: fixed; right: 0; left: 0; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); z-index: 35;
  display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgb(11 15 20 / .08);
  visibility: hidden; transform: translateY(110%); transition: transform .22s ease, visibility .22s;
}
.buybar.is-on { visibility: visible; transform: none; }
.buybar__price { display: flex; flex-direction: column; margin: 0 auto 0 0; line-height: 1.2; white-space: nowrap; }
.buybar__price strong { font-family: var(--font-title); font-size: 17px; font-weight: 800; color: var(--green-700); }
.buybar__price s { font-size: 12.5px; color: var(--muted); }
.buybar .btn { height: 44px; }
.has-buybar .footer { padding-bottom: 100px; }
.has-buybar .toast { bottom: calc(var(--tabbar) + 82px + env(safe-area-inset-bottom)); }

/* ---------- Notification ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 14px; width: max-content; max-width: calc(100% - 32px); padding: 12px 16px;
  border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow);
  opacity: 0; translate: -50% 16px; pointer-events: none; transition: opacity .2s, translate .2s;
}
.toast.is-on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.toast a { flex: none; color: var(--green-light); font-weight: 600; }

/* ---------- Petits téléphones (moins de 360 px de large) ---------- */
@media (max-width: 359px) {
  .header__bar { gap: 10px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__text { font-size: 20px; }
  .search { padding-left: 12px; }
  .grid { gap: 10px; }
  .card__body { padding: 10px 8px 8px; }
  .card__title { font-size: 14px; }
  .card .btn { gap: 4px; padding: 0 4px; font-size: 13px; }
  .card .btn .i { width: 17px; height: 17px; }
  .pdp { gap: 12px; }
  .seg .opt span { padding: 0 8px; }
  .tabbar a { font-size: 11.5px; }

}

/* ---------- Téléphone tenu en paysage : l'en-tête défile pour laisser la place au contenu ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --tabbar: 50px; }
  .header { position: relative; }
  .tabbar a { flex-direction: row; gap: 14px; }
  .tabbar .i { width: 22px; height: 22px; }
  .hero__slide { max-height: 58vh; }
  .pdp__main { max-height: 72vh; }
  .sheet { max-height: 96vh; }

}

/* ---------- Grand écran ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  main { padding-bottom: 48px; }
  .tabbar { display: none; }
  .header__bar { gap: 18px; height: 76px; }
  .logo__mark { width: 46px; height: 46px; }
  .logo__text { font-size: 27px; }
  .search { max-width: 560px; margin-inline: auto; }
  .header__links { display: flex; align-items: center; gap: 2px; }
  .header__links a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; }
  .header__links a:hover { background: var(--gray); }
  .header__links a.is-active { color: var(--green-700); }
  .cats { gap: 6px; padding-inline: 16px; }
  .cats a { flex: 0 0 auto; padding-inline: 16px; font-size: 15px; }
  .brand { width: 84px; font-size: 13.5px; }
  .brand__logo { width: 80px; height: 80px; }
  .brands__row { gap: 18px; }
  .brands__next { top: 27px; }
  .toast { bottom: 24px; }
  .buybar { bottom: 0; }
  .has-buybar .toast { bottom: 96px; }

}

/* Facture : impression ou enregistrement en PDF */
@media print {
  body { padding: 0; background: #fff; }
  .header, .tabbar, .toast, .crumbs, .done, .track, .footer, .invoice__actions, #app > .section { display: none !important; }
  main { padding: 0; }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

}
