/*
 * Shop navigation and landing pages (owner review of 10 Nov 2026: S1, S3, S5 to S8, S10, G3).
 * Loaded after shop.css and site.css on every page that shows product cards (inc/shop-filters.php), and by the
 * « Plan du site » template. Tokens only: both schemes and both worlds follow main.css.
 */

/* ---------- Category buttons above the filters (S1) ----------
   shop.css makes .gp-chips the scrolling row; the links now sit in a list inside it. */
.gp-chips__list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gp-chips__list > li { flex: none; }
.gp-chips .gp-chip { padding: 0 15px; font-size: .9rem; white-space: nowrap; }
.gp-chips { scroll-padding-inline: var(--gutter); } /* a button reached with Tab comes fully into view, clear of the edge; no snapping, which would pull it back */
/* Sub-categories of the category being viewed: a second, quieter row (it keeps the row's own padding: the focus ring
   of a button needs it inside a scrolling row). */
.gp-chips--sub .gp-chip:not(.is-on) { border-color: transparent; background: var(--hover); font-weight: 500; }
.gp-chips--sub .gp-chip:not(.is-on):hover { border-color: var(--ink); }
/* A mouse cannot drag a row whose scrollbar is hidden: with a pointer that hovers, and on wide screens, the row wraps.
   Phones keep one row that scrolls under the finger; Tab brings each button into view. */
@media (min-width: 900px), (hover: hover) and (pointer: fine) {
	.gp-chips { overflow: visible; }
	.gp-chips__list { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .gp-chip { transition: none; } }
/* Selection pages (owner's feedback of 14 Nov 2026, point 13): a row of its own, named at its start, quieter than the
   categories (as the sub-category row) so the two rows do not read as one list. */
.gp-chips--sel { align-items: center; }
.gp-chips__label { flex: none; margin-right: 4px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.gp-chips--sel .gp-chip:not(.is-on) { border-color: transparent; background: var(--hover); font-weight: 500; }
.gp-chips--sel .gp-chip:not(.is-on):hover { border-color: var(--ink); }
/* A narrow window with a mouse wraps the row: the name then sits above its buttons, not beside two lines of them. */
@media (max-width: 899px) and (hover: hover) and (pointer: fine) {
	.gp-chips--sel { flex-wrap: wrap; row-gap: 4px; }
	.gp-chips--sel .gp-chips__label { flex-basis: 100%; }
}
/* An empty selection page: the other selections under the message. */
.gp-empty__more { margin: 22px 0 10px; color: var(--ink-2); }
.gp-empty__links { flex-wrap: wrap; justify-content: center; }
.gp-filter__page { padding-top: 6px; }
.gp-filter__page .gp-link { font-size: .88rem; }

/* ---------- Landing pages: one sentence under the H1 (S5, S6, S10) ---------- */
.gp-shop-hero__intro { max-width: 62ch; margin: 12px 0 0; font-size: clamp(1rem, .95rem + .25vw, 1.15rem); line-height: 1.5; color: var(--ink-2); }
.gp-shop .gp-empty__title { margin: 0 0 18px; text-wrap: balance; } /* room between the message and its button */

/* ---------- Second photo of a card on touch screens (S3) ----------
   A mouse shows it on hover (shop.css). A finger cannot hover: a two-dot switch under the photo swaps it.
   The switch sits in a box that mirrors the photo's box (same 4/5 ratio), so it needs no script to be placed and
   moves nothing. Until it is used the second photo has no box, so the browser does not fetch it (it is lazy). */
.gp-card__swapbox { display: none; }
@media (hover: none) {
	html.gp-swap .gp-card__swapbox { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 4/5; pointer-events: none; }
	.gp-card__swap { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
	.gp-card__dots { display: flex; gap: 6px; padding: 6px 8px; border-radius: 20px; background: rgba(10, 11, 13, .62); }
	.gp-card__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
	.gp-card__swap[aria-pressed="false"] .gp-card__dots i:first-child,
	.gp-card__swap[aria-pressed="true"] .gp-card__dots i:last-child { background: #fff; transform: scale(1.34); } /* the current photo: brighter and larger, not brighter only */
	.gp-card__swap:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -6px; border-radius: 12px; }
	.gp-card:not(.is-alt-ready) .gp-card__img--hover { display: none; }
	.gp-card.is-alt .gp-card__img--hover { opacity: 1; }
	.gp-card.is-alt .gp-card__img:not(.gp-card__img--hover) { opacity: 0; }
}
@media (hover: none) and (prefers-reduced-motion: no-preference) {
	.gp-card__img { transition: opacity .3s ease; }
}
/* Two narrow columns: site.css puts the badges in the photo's bottom left corner, so the switch takes the right one
   and the badges leave it room. */
@media (hover: none) and (max-width: 560px) {
	html.gp-swap .gp-card__swapbox { justify-content: flex-end; }
	html.gp-swap .gp-card:has(.gp-card__swapbox) .gp-card__badges { max-width: calc(100% - 60px); }
}

/* ---------- « Fonctionnalités » and « Réglages » indexes: search and filter (S7, S8) ---------- */
.gp-feat__tools { display: grid; gap: 14px; margin-bottom: clamp(22px, 3vw, 36px); }
.gp-feat__tools[hidden] { display: none; }
.gp-feat__search { position: relative; }
.gp-feat__search .gp-i { position: absolute; top: 50%; left: 18px; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gp-feat__search input { width: 100%; min-height: var(--field-h-l); padding: 0 18px 0 50px; border: 1px solid var(--field-line); border-radius: var(--field-radius-l); background: var(--surface-1); color: var(--ink); font: inherit; font-size: 1.05rem; -webkit-appearance: none; appearance: none; }
.gp-feat__search input::placeholder { color: var(--muted); opacity: 1; }
.gp-feat__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gp-feat__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-feat__filters .gp-chip { background: none; color: inherit; font-family: inherit; cursor: pointer; }
.gp-feat__filters .gp-chip.is-on { background: var(--accent); border-color: var(--accent-ink); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-rim); } /* G1 cue, as .gp-chip.is-on */
.gp-feat__listhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 16px; }
.gp-feat__list-title { margin: 0; font: 800 clamp(1.2rem, 1rem + .9vw, 1.6rem)/1.1 var(--font-display); }
.gp-feat__count { margin: 0; color: var(--muted); }
.gp-feat__tiles > li[hidden] { display: none; }
/* Index cards: title and arrow on the first row, number of models and theme on the second. */
.gp-feat__tile--hub { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; align-items: start; gap: 14px 12px; min-height: 124px; padding: 18px; }
.gp-feat__tile--hub strong { grid-area: 1 / 1; }
.gp-feat__tile--hub .gp-i { grid-area: 1 / 2; justify-self: end; margin-top: 2px; }
.gp-feat__tile--hub .gp-feat__n { grid-area: 2 / 1; align-self: end; }
/* The theme shares the second row with the number of models: it spans the row and keeps to the right. */
.gp-feat__tile .gp-feat__tag { grid-area: 2 / 1 / 3 / 3; align-self: end; justify-self: end; padding: 4px 10px; border-radius: 8px; background: var(--hover); color: var(--ink-2); font-size: .78rem; white-space: nowrap; }
.gp-feat__none { margin: 8px 0 0; padding: clamp(24px, 4vw, 44px) 0; text-align: center; color: var(--ink-2); }
.gp-feat__none[hidden] { display: none; }
.gp-feat__none button { margin-left: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* ---------- Plan du site (G3, F12) ---------- */
.gp-sitemap h3 { margin: 0 0 4px; font: 700 1rem/1.25 var(--font-body); }
.gp-sitemap .gp-sitemap__tree, .gp-sitemap .gp-sitemap__tree ul, .gp-sitemap .gp-sitemap__groups ul { columns: auto; }
/* The shop tree: one block per category, its sub-categories and products nested under it. */
.gp-sitemap .gp-sitemap__tree { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 22px 36px; padding: 0; list-style: none; }
.gp-sitemap__tree > li { padding: 0; }
.gp-sitemap__tree > li > a { font-weight: 700; }
.gp-sitemap__tree ul { margin: 2px 0 0; }
.gp-sitemap__tree ul ul { margin-bottom: 6px; }
/* A category with sub-categories (Accessoires) takes the full width; its sub-categories sit side by side. */
.gp-sitemap__tree > .is-wide { grid-column: 1 / -1; }
.gp-sitemap .gp-sitemap__tree > .is-wide > ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px 36px; padding-left: 0; list-style: none; }
.gp-sitemap__tree > .is-wide > ul > li > a, .gp-sitemap__label { font-weight: 600; }
.gp-sitemap__all { margin: 0 0 14px; }
/* Landing pages: one short list per criterion. */
.gp-sitemap__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 22px 36px; }
