/* Références et Grands Comptes, Revendeurs et Distributeurs: the two Particuliers pages (their opening and closing band,
   gp_references_hero() and gp_references_end() in inc/references.php) and the classified lists of both worlds
   (template-parts/references-list.php). Tokens from main.css: dark by default, light with the visitor's scheme, the
   Pro world's cream accent with its olive rim on light. Behaviour: assets/js/references.js. Motion is transform and
   opacity only, and only once the script (or the page's inline script, .gp-rf-pre) has added its class; under reduced
   motion, or without the script, everything stands in place. */

.gp-refs-page ::selection, .gp-refs ::selection { background: var(--accent); color: var(--on-accent); }
.gp-refs [hidden], .gp-rf-hero [hidden] { display: none !important; }

/* ---------- Opening: title, intro, the clients figure and the two lists ---------- */
.gp-rf-hero { position: relative; display: grid; align-content: center; gap: clamp(30px, 4vw, 56px); padding-top: calc(var(--header-total) + clamp(26px, 4.4vw, 68px)); padding-bottom: clamp(30px, 4vw, 60px); }
.gp-rf-hero__text { position: relative; z-index: 1; display: grid; gap: clamp(18px, 2vw, 28px); }
.gp-rf-hero__h1 { max-width: 7.8em; margin: 0; font-size: clamp(2.5rem, 1rem + 4vw, 5.2rem); line-height: .93; letter-spacing: -.03em; }
.gp-rf-hero__lead { max-width: 52ch; margin: 0; color: var(--ink-2); font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); line-height: 1.6; }

.gp-rf-proof { display: grid; gap: clamp(14px, 1.6vw, 22px); max-width: 34rem; }
.gp-rf-proof__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px .55em; margin: 0; }
/* The figure keeps the width of its final value while main.js counts it up: nothing beside it moves. */
.gp-rf-proof__n { position: relative; flex: none; display: inline-block; font-family: var(--font-display); font-size: clamp(2.9rem, 2rem + 2.6vw, 4.6rem); font-weight: 800; line-height: .86; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gp-rf-proof__size { visibility: hidden; }
.gp-rf-proof__live { position: absolute; top: 0; left: 0; }
.gp-rf-proof__plus { color: var(--accent-ink); }
.gp-rf-proof__l { flex: 1 1 12rem; color: var(--ink-2); font-size: clamp(1rem, .96rem + .2vw, 1.12rem); font-weight: 600; line-height: 1.35; }

.gp-rf-meter { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.gp-rf-meter__row { border-bottom: 1px solid var(--line); }
.gp-rf-meter__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px 18px; min-height: 64px; padding: 13px 0 15px; color: var(--ink); text-decoration: none; }
.gp-rf-meter__label { display: inline-flex; align-items: center; gap: .5em; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.gp-rf-meter__label .gp-i { width: 1.05em; height: 1.05em; color: var(--accent-ink); transition: transform .35s var(--ease-out); }
.gp-rf-meter__n { color: var(--muted); font-size: .92rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-rf-meter__bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.gp-rf-meter__bar i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--ink) 34%, transparent); transform: scaleX(var(--rf-share, 1)); transform-origin: 0 50%; }
.gp-rf-meter__row.is-here .gp-rf-meter__bar i { background: var(--accent-line); }
a.gp-rf-meter__item { border-radius: 4px; }
a.gp-rf-meter__item:hover .gp-rf-meter__label { text-decoration: underline; text-decoration-color: var(--accent-ink); text-decoration-thickness: 2px; text-underline-offset: .28em; }
a.gp-rf-meter__item:hover .gp-i { transform: translateX(4px); }
a.gp-rf-meter__item:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 4px; }

/* ---------- Opening: the wall of names (decoration, aria-hidden) ----------
   A plane of names in perspective: rows at two depths, solid and outlined names, accent dots between them. The rows
   drift apart with the scroll (--rf-p, 0 to 1 over the opening) and the plane leans toward a fine pointer (--rf-mx,
   --rf-my, -1 to 1). */
.gp-rf-wall { position: relative; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; perspective: 780px; perspective-origin: 0% 50%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 90%, transparent 100%), linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-composite: intersect; }
/* Hinged on its right edge (z = 0 there): the plane recedes toward the text, so no part of it ever comes past the
   viewer, and its rows fan out from behind the title. Each row is cut at the edges of the plane (the padding keeps the
   accents of the capitals): past the hinge a name would come toward the viewer, off the screen but blown up. */
.gp-rf-wall__plane { position: absolute; inset: 0 -4% 0 -90%; display: grid; align-content: center; gap: .55em; font-size: clamp(1.8rem, 1rem + 2.9vw, 4.2rem); transform-origin: 100% 50%; transform-style: preserve-3d; transform: rotateY(calc(-30deg + var(--rf-mx, 0) * 5deg)) rotateX(calc(7deg - var(--rf-my, 0) * 4deg)); transition: transform 1.4s var(--ease-out); }
.gp-rf-wall__row { --rf-dir: -1; --rf-run: 300px; transform: translateZ(0); overflow: hidden; padding-block: .3em; margin-block: -.3em; font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -.012em; text-transform: uppercase; white-space: nowrap; }
.gp-rf-wall__row:nth-child(even) { --rf-dir: 1; --rf-run: 220px; transform: translateZ(-60px); }
.gp-rf-wall__row:nth-child(3n) { --rf-run: 380px; }
.gp-rf-wall__row:nth-child(2) { --rf-i: 1; } .gp-rf-wall__row:nth-child(3) { --rf-i: 2; } .gp-rf-wall__row:nth-child(4) { --rf-i: 3; }
.gp-rf-wall__row:nth-child(5) { --rf-i: 4; } .gp-rf-wall__row:nth-child(6) { --rf-i: 5; } .gp-rf-wall__row:nth-child(7) { --rf-i: 6; }
.gp-rf-wall__track { display: inline-flex; align-items: center; gap: .5em; transform: translate3d(calc(-9% + var(--rf-dir) * var(--rf-p, 0) * var(--rf-run)), 0, 0); }
.gp-rf-wall__name { flex: none; color: var(--ink); }
.gp-rf-wall__row:nth-child(even) .gp-rf-wall__name { color: color-mix(in srgb, var(--ink) 40%, transparent); }
.gp-rf-wall__name.is-ghost, .gp-rf-wall__row:nth-child(even) .gp-rf-wall__name.is-ghost { color: transparent; -webkit-text-stroke: 1.2px color-mix(in srgb, var(--ink) 58%, transparent); }
.gp-rf-wall__name + .gp-rf-wall__name::before { content: ""; display: inline-block; width: .2em; height: .2em; margin-right: .5em; border-radius: 50%; background: var(--accent-ink); vertical-align: .26em; }

@media (min-width: 1000px) {
	.gp-rf-hero { min-height: min(100svh, 980px); }
	.gp-rf-hero__text { max-width: min(44rem, 50%); }
	/* The wall starts past the end of the text (its lines stop at about 34rem), never left of 46 %: on narrow desktops
	   it moves right instead of running under the lead, the figure and the two lists. */
	.gp-rf-wall { position: absolute; z-index: 0; top: var(--header-total); right: 0; bottom: 0; left: max(46%, calc(var(--gutter) + min(34rem, 50% - var(--gutter)) + 32px)); }
	/* The opening already ends on its own air: the list starts right after it. */
	.gp-rf-hero + .gp-refs-sec { padding-top: 0; }
}
@media (max-width: 999.98px) {
	.gp-rf-hero { padding-bottom: clamp(8px, 2vw, 20px); }
	.gp-rf-wall { height: clamp(230px, 50vw, 400px); margin-inline: calc(-1 * var(--gutter)); perspective-origin: 0% 50%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
	.gp-rf-wall__plane { inset: 0 -4% 0 -110%; gap: .42em; font-size: clamp(1.4rem, .8rem + 2.8vw, 2.6rem); transform: rotateY(calc(-22deg + var(--rf-mx, 0) * 4deg)) rotateX(9deg); }
	.gp-rf-wall__row:nth-child(even) { transform: none; }
}
@media (max-width: 599.98px) {
	.gp-rf-wall__row:nth-child(n+6) { display: none; }
}

/* ---------- The section that holds a list (both worlds) ---------- */
/* Its top room is the one the theme keeps under a band with a surface of its own (the Pro pages put one just above). */
.gp-refs-sec { padding-block: var(--space-sheet, clamp(30px, 4vw, 56px)) var(--space-section, clamp(70px, 9vw, 130px)); }
.gp-refs-sec__head { display: grid; gap: 14px; max-width: 70ch; margin-bottom: clamp(26px, 3.6vw, 52px); }
.gp-refs-sec__head h2, .gp-refs-sec__head p { margin: 0; }
.gp-refs-sec__head p { color: var(--ink-2); font-size: clamp(1.02rem, .98rem + .2vw, 1.15rem); line-height: 1.6; }

/* ---------- A list: groups, their sub-groups as rows, the names flowing ---------- */
.gp-refs { position: relative; }
.gp-refs__body { display: grid; gap: clamp(56px, 7vw, 112px); min-width: 0; }
.gp-refs__group { min-width: 0; }
.gp-refs__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: clamp(14px, 1.6vw, 22px); }
.gp-refs__title { margin: 0; font-size: clamp(1.85rem, 1.2rem + 2.3vw, 3.4rem); line-height: .98; text-wrap: balance; }
.gp-refs__count { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gp-refs__subs { border-bottom: 1px solid var(--line); }
.gp-refs__sub { display: grid; gap: 10px 32px; padding-block: clamp(16px, 1.8vw, 26px); border-top: 1px solid var(--line); }
.gp-refs__subtitle { margin: 0; color: var(--ink-2); font-family: var(--font-body); font-size: .78rem; font-weight: 800; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase; text-wrap: balance; }
.gp-refs__names { margin: 0; padding: 0; list-style: none; color: var(--ink); font-family: var(--font-display); font-size: clamp(1.14rem, 1rem + .55vw, 1.5rem); font-weight: 600; line-height: 1.34; letter-spacing: -.01em; }
.gp-refs__name { display: inline-block; max-width: 100%; vertical-align: baseline; }
/* The dot between two names stays with the last word of the first (U+2060 word joiner): never alone on a line. */
.gp-refs__name:has(~ .gp-refs__name:not([hidden]))::after { content: "\2060\2022"; content: "\2060\2022" / ""; padding: 0 .55em 0 .6em; color: var(--accent-ink); font-size: .8em; line-height: 1; }
.gp-refs__mark { padding: 0 .05em; border-radius: 3px; background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-rim); }
@media (min-width: 760px) {
	.gp-refs__sub { grid-template-columns: minmax(150px, 15rem) minmax(0, 1fr); }
	.gp-refs__subtitle { padding-top: .62em; }
}

/* A logo Gravipack has supplied: on a light tile in every scheme, the name as its alternative text. */
.gp-refs__name.has-logo { display: inline-flex; align-items: center; margin: 0 .5em .3em 0; padding: 6px 12px; border-radius: var(--radius-s); background: var(--light-bg); vertical-align: middle; }
.gp-refs__name.has-logo::after { display: none; }
.gp-refs__logo { display: block; width: auto; height: 30px; max-width: 132px; object-fit: contain; }

/* Poster: a short list, one row per sub-group, the names set large. */
.gp-refs--poster .gp-refs__title { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.6rem); }
.gp-refs--poster .gp-refs__sub { gap: 12px 40px; padding-block: clamp(22px, 3vw, 46px); }
.gp-refs--poster .gp-refs__names { font-size: clamp(1.55rem, 1rem + 2.1vw, 3.1rem); font-weight: 700; line-height: 1.14; letter-spacing: -.02em; }
.gp-refs--poster .gp-refs__name { margin-block: .06em; }
@media (min-width: 900px) {
	.gp-refs--poster .gp-refs__sub { grid-template-columns: minmax(180px, 3fr) minmax(0, 9fr); }
	.gp-refs--poster .gp-refs__subtitle { padding-top: 1.1em; }
}

/* ---------- Index with a rail: the search and the sectors ---------- */
.gp-refs--rail { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 56px); }
.gp-refs__rail { display: grid; gap: 28px; align-content: start; min-width: 0; }

.gp-refs__find { display: grid; gap: 10px; }
.gp-refs__find-label { color: var(--ink); font-size: .95rem; font-weight: 700; line-height: 1.3; }
.gp-refs__field { position: relative; }
.gp-refs__input { display: block; width: 100%; min-height: var(--field-h-l, 56px); margin: 0; padding: 0 52px 0 48px; border: 1.5px solid var(--field-line); border-radius: 999px; background: var(--surface-1); color: var(--ink); caret-color: var(--accent-ink); font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.3; -webkit-appearance: none; appearance: none; }
.gp-refs__input::placeholder { color: var(--muted); opacity: 1; }
.gp-refs__input::-webkit-search-cancel-button, .gp-refs__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.gp-refs__input:focus { border-color: var(--accent-ink); outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gp-refs__find-icon { position: absolute; top: 50%; left: 18px; display: grid; color: var(--ink-2); translate: 0 -50%; pointer-events: none; }
.gp-refs__find-icon .gp-i { width: 20px; height: 20px; }
.gp-refs__clear { position: absolute; top: 50%; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); translate: 0 -50%; cursor: pointer; }
.gp-refs__clear:hover { background: var(--hover); }
.gp-refs__clear .gp-i { width: 18px; height: 18px; }
.gp-refs__sum { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.gp-refs__nav { position: relative; min-width: 0; }
.gp-refs__nav-list { position: relative; display: grid; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); list-style: none; }
.gp-refs__nav-item { margin: 0; }
.gp-refs__nav-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 0; color: var(--ink-2); font-size: .95rem; font-weight: 600; line-height: 1.3; text-decoration: none; transition: color var(--dur-hover) ease; }
.gp-refs__nav-link:hover, .gp-refs__nav-link.is-active { color: var(--ink); }
.gp-refs__nav-n { min-width: 2.3em; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .78rem; font-weight: 700; line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; }
.gp-refs__nav-link.is-active .gp-refs__nav-n { background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-rim); }
.gp-refs__glide { position: absolute; top: 0; left: 0; width: 2px; height: 1px; background: var(--accent-line); transform-origin: 0 0; transform: scaleY(0); pointer-events: none; }

.gp-refs__empty { display: grid; justify-items: start; gap: 16px; padding: clamp(26px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.gp-refs__empty-t { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.gp-refs__empty-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); }
.gp-refs__try { min-height: 44px; padding: 0 16px; border: 1px solid var(--field-line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; transition: background-color var(--dur-hover) ease; }
.gp-refs__try:hover { background: var(--hover); }

@media (min-width: 1100px) {
	.gp-refs--rail { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); align-items: start; }
	.gp-refs__rail { position: sticky; top: calc(var(--header-total) + 28px); max-height: calc(100vh - var(--header-total) - 56px); margin: -4px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
	.gp-refs--rail .gp-refs__body { padding-top: 2px; }
}
/* Phones and tablets: the search heads the list; the sectors become a row of chips that stays under the header (and
   follows it when it slides away, main.js, once it has reached it). */
@media (max-width: 1099.98px) {
	.gp-refs__rail { display: contents; }
	.gp-refs__nav { position: sticky; z-index: 20; top: var(--header-total); margin-inline: calc(-1 * var(--gutter)); padding-block: 3px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
	.gp-refs__nav.is-following { transition: transform var(--dur-header) var(--ease-out); }
	/* The header gone (main.js), the bar comes up by no more than its place in the flow lies above its line under the
	   header (--rf-up, references.js, with the scroll): it never covers the search and docks without a jump. The
	   header's shift: all of it here and on short screens, its top bar only on taller phones (below, as main.css). */
	body:has(#gp-header.is-hidden) .gp-refs__nav { transform: translateY(calc(-1 * min(var(--header-total), var(--rf-up, 0px)))); }
	/* The row scrolls sideways, so it clips: 6 px above and below keep the chips' focus ring whole (the bar keeps its
	   height). */
	.gp-refs__nav-list { display: flex; gap: 8px; padding: 6px var(--gutter); border: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
	.gp-refs__nav-list::-webkit-scrollbar { display: none; }
	.gp-refs__nav-item { flex: none; }
	.gp-refs__nav-link { display: flex; align-items: center; gap: 8px; padding: 0 7px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-1); color: var(--ink); font-size: .88rem; white-space: nowrap; }
	.gp-refs__nav-link.is-active { border-color: var(--accent-edge); background: var(--accent); color: var(--on-accent); box-shadow: inset 0 0 0 1.5px var(--accent-rim); }
	.gp-refs__nav-link.is-active .gp-refs__nav-n { background: color-mix(in srgb, var(--on-accent) 12%, transparent); color: var(--on-accent); box-shadow: none; }
	.gp-refs__glide { display: none; }
	.gp-refs--rail .gp-refs__title { scroll-margin-top: 76px; }
}
@media (max-width: 767px) and (min-height: 481px) {
	body:has(#gp-header.is-hidden) .gp-refs__nav { transform: translateY(calc(-1 * min(var(--header-h), var(--rf-up, 0px)))); }
}

/* ---------- Closing band (Particuliers pages) ---------- */
.gp-rf-end { --rf-o: 1; padding-block: clamp(10px, 2vw, 30px) var(--space-section, clamp(70px, 9vw, 130px)); }
.gp-rf-end__grid { display: grid; gap: clamp(26px, 4vw, 64px); align-items: center; }
.gp-rf-end__media { overflow: hidden; aspect-ratio: 16 / 10; border-radius: var(--radius); background: var(--bg-2); transform: scale(calc(.9 + .1 * var(--rf-o))); transform-origin: 50% 80%; }
.gp-rf-end__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--rf-pos, 50% 50%); transform: scale(calc(1.18 - .18 * var(--rf-o))); }
.gp-rf-end__h2 { max-width: 5.4em; margin: 0 0 clamp(20px, 2.2vw, 30px); font-size: clamp(2.5rem, 1.3rem + 3.6vw, 5rem); line-height: .92; }
@media (min-width: 900px) {
	.gp-rf-end__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
}

/* ---------- Motion (references.js adds .gp-rf-motion; the page's inline script .gp-rf-pre before the first paint) ---------- */
:is(.gp-rf-pre, .gp-rf-motion) .gp-rf-wall:not(.is-in) .gp-rf-wall__row { opacity: 0; translate: 16% 0; }
.gp-rf-motion .gp-rf-wall__row { transition: opacity 1s var(--ease-out), translate 1.6s var(--ease-out); transition-delay: calc(var(--rf-i, 0) * 80ms + 120ms); }
:is(.gp-rf-pre, .gp-rf-motion) .gp-rf-meter:not(.is-in) .gp-rf-meter__bar i { transform: scaleX(0); }
.gp-rf-motion .gp-rf-meter__bar i { transition: transform 1.3s var(--ease-out) .35s; }
.gp-rf-meter__row + .gp-rf-meter__row .gp-rf-meter__bar i { transition-delay: .5s; }
:is(.gp-rf-pre, .gp-rf-motion) .gp-refs__name { opacity: .16; translate: 0 .32em; }
.gp-rf-motion .gp-refs__name { transition: opacity .7s var(--ease-out), translate .9s var(--ease-out); transition-delay: calc(min(var(--rf-k, 0), 16) * 36ms); }
.gp-rf-motion .gp-refs__sub.is-lit .gp-refs__name, .gp-rf-motion .gp-refs.is-searching .gp-refs__name { opacity: 1; translate: none; }
.gp-rf-motion .gp-refs.is-searching .gp-refs__name { transition-delay: 0s; }
.gp-rf-motion .gp-rf-end { --rf-o: 0; }
.gp-rf-motion .gp-refs__glide { transition: transform .55s var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
	.gp-rf-wall__plane { transition: none; }
}
@media print {
	.gp-rf-wall, .gp-refs__find, .gp-refs__nav { display: none !important; }
	.gp-refs__name { opacity: 1 !important; translate: none !important; }
}
