/* Lollysportwear — boutique de tenues de sport.
   Palette tirée du logo de la page : la silhouette passe du framboise
   (#D73655 → #CB1C67) au violet nuit (#413865). Fond blanc, texte nuit
   violette, framboise pour tout ce qui se clique. Le dégradé du logo
   n'apparaît qu'une fois : dans le grand titre d'accueil.
   Une seule famille (Archivo) dont la largeur variable fait le caractère :
   très large et grasse pour les titres, normale pour le reste. */
:root {
  color-scheme: light;
  --white: #ffffff;
  --ink: #261f35;
  --berry: #cb1c67;
  --veil: #fbeef3;
  --grey: #8b8497;
  --line: #eeeaf1;
  --field: #f6f3f7;
  --logo-gradient: linear-gradient(170deg, #d73655 0%, #cb1c67 38%, #992c70 68%, #553365 100%);
  --gutter: clamp(16px, 4vw, 48px);
  --wide: "wdth" 125;
  --narrow: "wdth" 100;

  /* Noms utilisés par admin.css */
  --bg: var(--white);
  --muted: var(--grey);
  --soft: var(--field);
  --pink: var(--berry);
  --pink-soft: var(--veil);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  font-variation-settings: var(--narrow);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 2px; }

/* ── En-tête ─────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  padding: 10px var(--gutter);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-variation-settings: var(--wide); font-weight: 850; font-size: 19px; letter-spacing: -.02em;
}
/* Silhouette détourée (fond transparent) : ni cercle ni bordure. */
.logo img { width: auto; height: 42px; }
.logo span { color: var(--berry); font-weight: 400; }
.search {
  justify-self: center; width: min(440px, 100%);
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px; background: var(--field);
}
.search:focus-within { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--ink); }
.search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--grey); stroke-width: 2; }
.search input { border: 0; background: none; outline: none; width: 100%; font: inherit; font-size: 15px; color: var(--ink); }
.top-msg {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  font-weight: 600; font-size: 14px;
}
.top-msg svg { width: 22px; height: 22px; fill: var(--berry); }
.top-msg:hover { color: var(--berry); }
@media (max-width: 640px) {
  .top { grid-template-columns: 1fr auto; gap: 10px 14px; }
  .search { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; width: 100%; }
  .top-msg span { display: none; }
  .logo img { height: 36px; }
}

/* ── Accueil : titre très large au dégradé du logo + trois nouveautés ── */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--gutter);
  align-items: center; padding: clamp(28px, 6vw, 72px) var(--gutter);
}
.hero h1 {
  font-variation-settings: var(--wide); font-weight: 900;
  font-size: clamp(48px, 8.6vw, 128px); line-height: .92; letter-spacing: -.045em;
  margin: 0 0 24px; max-width: 8ch;
  background: var(--logo-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--grey); font-size: 17px; max-width: 34ch; margin: 0 0 28px; }
.cta {
  display: inline-block; background: var(--berry); color: var(--white); text-decoration: none;
  font-weight: 600; padding: 15px 28px; border-radius: 999px; transition: background .2s;
}
.cta:hover { background: var(--ink); }
.collage {
  display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;
  aspect-ratio: 5 / 4;
}
.collage img { width: 100%; height: 100%; object-fit: cover; background: var(--veil); border-radius: 4px; cursor: pointer; }
.collage img:first-child { grid-row: 1 / span 2; }
/* Le seul mouvement non déclenché : l'arrivée du collage au chargement. */
.collage img { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.collage img:nth-child(2) { animation-delay: .08s; }
.collage img:nth-child(3) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .collage { order: -1; aspect-ratio: 4 / 3; }
}

/* ── Catalogue ───────────────────────────────────────────────────────── */
main { padding: 0 var(--gutter) 40px; scroll-margin-top: 70px; }
.cats {
  display: flex; gap: clamp(18px, 3vw, 40px); overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.cats::-webkit-scrollbar { display: none; }
.cats button {
  flex: none; border: 0; background: none; cursor: pointer; padding: 14px 0;
  font-variation-settings: var(--wide); font-weight: 700; font-size: clamp(16px, 2vw, 20px);
  letter-spacing: -.01em; color: var(--grey); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cats button small { font-variation-settings: var(--narrow); font-weight: 400; font-size: 13px; margin-left: 6px; }
.cats button.on, .cats button:hover { color: var(--ink); }
.cats button.on { border-bottom-color: var(--berry); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.count { margin: 0; color: var(--grey); font-size: 14px; }
.avail { display: flex; gap: 8px; }
.avail button {
  border: 1px solid var(--line); background: none; border-radius: 999px; padding: 6px 14px;
  font-size: 13px; cursor: pointer; color: var(--ink);
}
.avail button.on { background: var(--ink); border-color: var(--ink); color: var(--white); }

.grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(10px, 1.5vw, 20px); align-items: stretch;
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Carte produit : photo 4:5, puis titre (2 lignes réservées), prix et
   bouton toujours au même niveau d'une carte à l'autre. */
.card { display: flex; flex-direction: column; cursor: pointer; min-width: 0; }
.card .media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--veil); border-radius: 4px; }
.card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.card .media img.b { opacity: 0; }
@media (hover: hover) { .card:hover .media img.b { opacity: 1; } }
.card .badge { position: absolute; top: 10px; left: 10px; }
.card .n {
  position: absolute; right: 10px; bottom: 10px; font-size: 12px;
  background: rgba(255, 255, 255, .9); padding: 2px 9px; border-radius: 999px;
}
.card .body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; }
.card h3 {
  margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; min-height: calc(2 * 1.35em);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card .price { font-size: 15px; font-weight: 700; min-height: 1.4em; }
.card .ref { font-size: 12px; color: var(--grey); }
.card .order {
  margin-top: auto; width: 100%;
  background: none; color: var(--ink); border: 1px solid var(--ink);
  padding: 10px 12px; font-size: 13px;
}
.card .order:hover { background: var(--berry); border-color: var(--berry); color: var(--white); }
.card .spacer { flex: 1; min-height: 8px; }

.badge {
  display: inline-block; background: var(--white); color: var(--berry);
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.price { color: var(--ink); }
.price.mp { color: var(--berry); font-weight: 600; }

.order {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; transition: background .2s, color .2s, border-color .2s;
}
.order svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.order.big { background: var(--berry); color: var(--white); padding: 16px 24px; font-size: 16px; width: 100%; }
.order.big:hover { background: var(--ink); }

.skeleton { pointer-events: none; }
.skeleton .media { animation: pulse 1.2s ease-in-out infinite; }
.skeleton .body span { display: block; height: 10px; background: var(--field); border-radius: 4px; margin-top: 8px; }
.skeleton .body span:last-child { width: 45%; }
@keyframes pulse { 50% { opacity: .55; } }

.empty { text-align: center; color: var(--grey); padding: 80px 0; }
/* « Voir plus » : bien visible, et déclenché tout seul en arrivant dessus. */
.more {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 56px auto 0; min-width: min(360px, 100%);
  background: var(--berry); color: var(--white); border: 0; border-radius: 999px;
  padding: 16px 36px; font-weight: 700; font-size: 16px; cursor: pointer; transition: background .2s;
}
.more small { font-weight: 400; font-size: 13px; opacity: .85; }
.more:hover { background: var(--ink); }

/* ── Fiche produit ───────────────────────────────────────────────────── */
.sheet {
  border: 0; padding: 0; max-width: none;
  width: min(1080px, calc(100vw - 2 * var(--gutter))); max-height: calc(100vh - 48px);
  border-radius: 6px; background: var(--white); color: var(--ink); overflow: auto;
}
.sheet::backdrop { background: rgba(38, 31, 53, .5); backdrop-filter: blur(3px); }
.sheet[open] { display: grid; grid-template-columns: 1.15fr 1fr; }
.sheet .close {
  position: absolute; top: 10px; right: 12px; z-index: 4; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .94); font-size: 24px; line-height: 1; cursor: pointer;
}
.gallery { background: var(--veil); min-width: 0; }
.stage { position: relative; aspect-ratio: 4 / 5; }
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage .nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .94); font-size: 24px; line-height: 1; cursor: pointer;
}
.stage .prev { left: 12px; }
.stage .next { right: 12px; }
.thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: var(--white); }
.thumbs img { width: 56px; height: 70px; object-fit: cover; cursor: pointer; opacity: .5; border-radius: 3px; flex: none; }
.thumbs img.on { opacity: 1; box-shadow: 0 0 0 2px var(--berry); }
.info { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.info .ref { margin: 0; font-size: 13px; color: var(--grey); }
.info h2 {
  margin: 0; font-variation-settings: var(--wide); font-weight: 800;
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1; letter-spacing: -.02em;
}
.price-row { display: flex; gap: 10px; align-items: center; margin: 0; font-size: 20px; font-weight: 700; }
.price-row .badge { background: var(--veil); }
.hint { margin: -4px 0 0; font-size: 13px; color: var(--grey); }
.desc { white-space: pre-line; font-size: 14px; line-height: 1.65; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--line); max-width: 60ch; }
.post-link {
  display: inline-flex; align-self: flex-start; padding: 10px 0; font-size: 14px;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.post-link:hover { color: var(--berry); }
@media (max-width: 760px) {
  .sheet { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .sheet[open] { display: block; }
  /* Sur téléphone, le bouton Commander reste collé en bas de l'écran. */
  .info { padding-bottom: 104px; }
  .order.big { position: fixed; left: 16px; right: 16px; bottom: 16px; width: auto; z-index: 3; box-shadow: 0 8px 24px rgba(203, 28, 103, .35); }
}

/* ── Pied de page, messages ──────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 48px var(--gutter); display: grid; gap: 18px; justify-items: center; text-align: center; }
.foot .logo img { height: 60px; }
.contact { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: center; align-items: center; font-size: 14px; }
.contact a { color: var(--ink); text-decoration: none; }
.contact a:hover { color: var(--berry); }
.contact a.order { background: var(--berry); color: var(--white); padding: 12px 22px; }
.contact a.order:hover { background: var(--ink); color: var(--white); }
.contact span { color: var(--grey); }
.foot-note { margin: 0; color: var(--grey); font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: var(--ink); color: var(--white); padding: 12px 20px; border-radius: 999px;
  font-size: 14px; max-width: calc(100vw - 32px); text-align: center;
}
/* Filtres de disponibilité : jamais sur deux lignes, défilent si l'écran est étroit. */
.avail { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.avail button { white-space: nowrap; flex: none; }

/* Barres de catégories et de disponibilité : défilement latéral seulement.
   Un conteneur en overflow-x: auto devient aussi défilable verticalement ;
   le soulignement de l'onglet actif (margin-bottom: -1px) dépassait d'un
   pixel et suffisait à le faire bouger de haut en bas au doigt. */
.cats, .avail {
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.cats button { margin-bottom: 0; }
.cats { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
