/*
 * « Accessibilité » (modules/a11y-panel.php): what each setting does on the page, then the panel itself.
 * A setting is a class on <html>, put there before the first paint by the module's inline script.
 * The rules below override the theme on purpose, so they carry !important where the theme sets the same property
 * on a more specific selector. Nothing here applies while no class is set.
 */

/* ---------- Text size: the theme sizes its text in rem ---------- */
html.gp-a11y-fs-115 { font-size: 115%; }
html.gp-a11y-fs-130 { font-size: 130%; }
html.gp-a11y-fs-150 { font-size: 150%; }
/* Larger or wider text: a long word breaks rather than leaving its box. */
html:is(.gp-a11y-fs-130, .gp-a11y-fs-150, .gp-a11y-sp, .gp-a11y-font) body { overflow-wrap: break-word; }

/*
 * ---------- Room for larger text ----------
 * The theme's layouts are tuned to its own type. With larger, wider or spaced text:
 *  - on phones and tablets, a word may break and a one-line label may wrap, so no box asks for more than the screen;
 *  - the desktop navigation gives way to the menu button when it no longer fits: a11y-panel.js measures the header
 *    and sets gp-a11y-compact; the three rules are the theme's own for screens under 1281 px.
 */
@media (max-width: 1100px) {
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) body :where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, a, button, label, legend, summary, strong, em, small, td, th) { overflow-wrap: anywhere; }
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-chips__list > li { flex: 0 1 auto; max-width: 100%; }
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-chips .gp-chip { padding-block: 8px; white-space: normal; }
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-rate__link { white-space: normal; }
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) :is(p, li, dd, td, address) > a:not(.gp-btn) { white-space: normal !important; } /* an e-mail address kept on one line in a sentence */
}
@media (max-width: 767.98px) {
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-numbers__n { font-size: min(2.4rem, 11vw); }
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) table.cart .coupon > * { min-width: 0; max-width: 100%; } /* the promo-code field and its button may shrink to the cart width */
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) table.cart .coupon input.input-text { width: 100%; } /* a field’s own width (20 characters) would set the width of the whole cart table */
	html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) table.cart :is(.coupon, td.actions) button { white-space: normal; line-height: 1.2; text-align: center; }
}
/* The key numbers stand on one line each in the theme: they may wrap, and their column may shrink. */
html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-numbers__grid > * { min-width: 0; }
html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-numbers__n { white-space: normal; overflow-wrap: anywhere; }
html:is([class*="gp-a11y-fs-"], .gp-a11y-sp, .gp-a11y-font) .gp-numbers__l { overflow-wrap: anywhere; }
html.gp-a11y-compact .gp-nav, html.gp-a11y-compact .gp-header .gp-lang, html.gp-a11y-compact .gp-tool--account { display: none; }
html.gp-a11y-compact .gp-burger { display: inline-grid; }
html.gp-a11y-compact .gp-header__tools { margin-left: auto; }
/* Still too wide (several settings at once, a small screen): the cart and the menu button must stay on screen and the
   two names of the world switch must not run into each other. The switch goes back to the theme's own size, the bar
   one keeps its two names only; favourites and the quote button stay in the menu. */
html.gp-a11y-tight .gp-header__bar .gp-mode-switch__tax, html.gp-a11y-tight .gp-header__bar .gp-tool--fav, html.gp-a11y-tight .gp-header__bar .gp-header__cta { display: none; }
html.gp-a11y-tight .gp-header .gp-mode-switch__label { font-size: 13px; letter-spacing: 0 !important; word-spacing: 0 !important; }
html.gp-a11y-tight .gp-header .gp-mode-switch__tax { font-size: 11px; letter-spacing: 0 !important; word-spacing: 0 !important; } /* the phone row keeps « Prix TTC » and « Prix HT » */

/* ---------- Line height (WCAG 1.4.12: at least 1.5; running text is already 1.6, so it gets more) ---------- */
html.gp-a11y-lh :where(h1, h2, h3, h4, h5, h6, [role="heading"], label, legend, summary, a, button) { line-height: 1.5 !important; }
html.gp-a11y-lh :where(p, li, dd, dt, td, th, blockquote, figcaption, address) { line-height: 1.8 !important; }
html.gp-a11y-lh :where(.gp-prose, .entry-content) p { margin-bottom: 2em !important; } /* paragraph spacing: 2 × the font size */

/* ---------- Letter and word spacing (WCAG 1.4.12: 0.12 em and 0.16 em) ---------- */
html.gp-a11y-sp body, html.gp-a11y-sp body * { letter-spacing: .12em !important; word-spacing: .16em !important; }

/* ---------- Clearer typeface: system fonts with open, distinct letter shapes; nothing is downloaded ---------- */
html.gp-a11y-font {
	--font-body: "GP Registered", Verdana, Tahoma, "DejaVu Sans", "Noto Sans", Roboto, "Segoe UI", system-ui, sans-serif; /* « GP Registered »: only the raised ®, already in main.css */
	--font-display: "GP Registered", Tahoma, Verdana, "DejaVu Sans", "Noto Sans", Roboto, "Segoe UI", system-ui, sans-serif;
}
html.gp-a11y-font .gp-exit { --gx-body: var(--font-body); --gx-display: var(--font-display); }
html.gp-a11y-font .gp-display { letter-spacing: 0; }

/*
 * ---------- Stronger contrast ----------
 * Dark surfaces (the page in the dark scheme, and every block that stays dark): whiter text, clearer lines.
 * Light surfaces read the --light-* and --paper-* values, set once on <html>: darker text and lines, and a darker
 * accent ink for each world. The theme's own scheme rules keep deciding which set a surface uses.
 */
html.gp-a11y-contrast, html.gp-a11y-contrast .gp-scheme-dark, html.gp-a11y-contrast body.gp-paper-view .gp-paper-top {
	--ink: #fff;
	--ink-2: #f2f2ef;
	--muted: #dcdee3;
	--line: rgba(255, 255, 255, .42);
	--field-line: rgba(255, 255, 255, .75);
	--surface-1: rgba(255, 255, 255, .07);
	--surface-2: rgba(255, 255, 255, .12);
	--surface-3: rgba(255, 255, 255, .2);
}
html.gp-a11y-contrast {
	--light-ink: #000;
	--light-ink-2: #1c1d21;
	--light-muted: #2f3136;
	--light-line: rgba(0, 0, 0, .5);
	--light-field-line: rgba(0, 0, 0, .8);
	--paper-ink: #000;
	--paper-muted: #2f3136;
	--paper-line: rgba(0, 0, 0, .5);
	--paper-field-line: rgba(0, 0, 0, .8);
	--w-ink-light: #344800;
	--w-edge-light: #344800;
	--w-line-light: #344800;
}
html.gp-a11y-contrast[data-gp-world="b2b"] { --w-ink-light: #3d3b12; --w-edge-light: #3d3b12; --w-line-light: #3d3b12; --w-rim-light: #3d3b12; } /* the Pro olive on light: 6.09:1 or more becomes 8.67:1 or more (10.50 on --light-bg); the cream on dark (19.21:1) and the cream fill are unchanged */
html.gp-a11y-contrast .gp-lead { opacity: 1; }
html.gp-a11y-contrast ::placeholder { color: var(--muted); opacity: 1; }

/* ---------- Greyscale and lower saturation. On the root element a filter leaves fixed parts (header, buy bar) fixed. ---------- */
html.gp-a11y-desat { filter: saturate(.45); }
html.gp-a11y-gray { filter: grayscale(1); }

/* ---------- Underlined links (buttons keep their button look; a link around a card underlines its title) ---------- */
html.gp-a11y-links a[href]:not(.gp-btn, .button, .wp-block-button__link, [role="button"]) { text-decoration: underline !important; text-decoration-thickness: max(1px, .08em) !important; text-underline-offset: .2em !important; }
html.gp-a11y-links a[href]:has(:is(h1, h2, h3, h4, h5, h6)) { text-decoration: none !important; }
html.gp-a11y-links a[href] :is(h1, h2, h3, h4, h5, h6) { text-decoration: underline !important; text-decoration-thickness: max(1px, .06em) !important; text-underline-offset: .16em !important; }

/* ---------- Headings shown with a frame ---------- */
html.gp-a11y-headings :is(h1, h2, h3, h4, h5, h6, [role="heading"]) { outline: 2px solid var(--accent-ink) !important; outline-offset: 3px !important; border-radius: 2px; }

/* ---------- Thicker focus ring, with a band of the surface colour on each side so it shows on any background ---------- */
html.gp-a11y-focus :focus-visible { outline: 4px solid var(--accent-ink) !important; outline-offset: 2px !important; box-shadow: 0 0 0 2px var(--bg), 0 0 0 8px var(--bg) !important; }

/* ---------- Large pointer (48 px, white with a black edge: visible on both schemes) ---------- */
html.gp-a11y-cursor, html.gp-a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5v17l4.6-4.1 2.9 6.6 2.8-1.2-2.9-6.5 6.1-.3z' fill='%23fff' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 8 5, auto !important; }
html.gp-a11y-cursor :is(a[href], button, summary, label, select, [role="button"], input:is([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="range"], [type="file"], [type="image"])),
html.gp-a11y-cursor :is(a[href], button, summary, label, [role="button"]) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M9 11.5V4.3a1.5 1.5 0 0 1 3 0v5.9l5.5.9c1 .2 1.7 1 1.7 2V16c0 3.1-2.2 5.5-5.2 5.5h-2c-1.5 0-2.8-.7-3.6-1.9l-3.3-5.1c-.6-1 .5-2.1 1.5-1.4z' fill='%23fff' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 21 6, pointer !important; }
html.gp-a11y-cursor :is(textarea, [contenteditable="true"], input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="range"], [type="file"], [type="image"], [type="color"])) { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='48' viewBox='0 0 16 24'%3E%3Cpath d='M4 2.5h2.5c.9 0 1.5.5 1.5 1.3 0-.8.6-1.3 1.5-1.3H12M4 21.5h2.5c.9 0 1.5-.5 1.5-1.3 0 .8.6 1.3 1.5 1.3H12M8 3.8v16.4' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'/%3E%3Cpath d='M4 2.5h2.5c.9 0 1.5.5 1.5 1.3 0-.8.6-1.3 1.5-1.3H12M4 21.5h2.5c.9 0 1.5-.5 1.5-1.3 0 .8.6 1.3 1.5 1.3H12M8 3.8v16.4' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") 16 24, text !important; }

/*
 * ---------- No animation ----------
 * The same rule as the theme's own prefers-reduced-motion block. a11y-panel.js also turns the style sheets'
 * reduced-motion rules on (what they show once nothing moves), and the scripts read the setting through
 * matchMedia (see the module).
 */
html.gp-a11y-still *, html.gp-a11y-still *::before, html.gp-a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.gp-a11y-still::view-transition-group(*), html.gp-a11y-still::view-transition-old(*), html.gp-a11y-still::view-transition-new(*) { animation: none !important; }

/*
 * ---------- Images hidden ----------
 * Every <img> keeps its box and loses its picture; a11y-panel.js writes the alt text of each meaningful image in a
 * .gp-a11y-alt label that takes the image's place. Videos that play by themselves and inline background photos go too.
 */
html.gp-a11y-noimg img { visibility: hidden !important; }
html.gp-a11y-noimg img[data-gp-a11y-alt] { display: none !important; }
html.gp-a11y-noimg video:not([controls]) { visibility: hidden !important; }
html.gp-a11y-noimg [style*="background-image"] { background-image: none !important; }
.gp-a11y-alt { display: none; }
html.gp-a11y-noimg .gp-a11y-alt { display: flex; align-items: center; justify-content: center; box-sizing: border-box; max-width: 100%; min-height: 2.75rem; padding: .6rem .75rem; overflow: hidden; border: 1px dashed var(--field-line, currentColor); border-radius: 8px; background: var(--surface-1, transparent); color: var(--ink, inherit); font: 400 .875rem/1.4 var(--font-body, sans-serif); letter-spacing: normal; text-align: center; text-transform: none; text-wrap: balance; }
html.gp-a11y-noimg .gp-a11y-alt--fill { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
html.gp-a11y-noimg .gp-a11y-alt--small { display: inline-flex; min-height: 0; padding: .15em .4em; overflow: visible; font-size: .72rem; line-height: 1.2; overflow-wrap: anywhere; text-wrap: wrap; vertical-align: middle; } /* a logo or a mark: its name, wrapped inside the place it had */

/* ---------- Reading guide: a band that follows the pointer (and the keyboard focus) ---------- */
.gp-a11y-band { position: fixed; top: 0; left: 0; right: 0; z-index: 2147483000; height: 2.75rem; border-block: 3px solid var(--gp-lime, #d4ff3a); background: rgba(212, 255, 58, .1); box-shadow: 0 -2px 0 #0a0b0d, 0 2px 0 #0a0b0d; pointer-events: none; transform: translateY(var(--gp-a11y-band-y, -200px)); }
:root[data-gp-world="b2b"] .gp-a11y-band { border-color: var(--gp-pro, #fefee2); background: rgba(254, 254, 226, .1); } /* the cream bands keep their carbon outer lines: seen on light and dark pages */
@media (hover: none) and (pointer: coarse) {
	/* A touch screen has no pointer to follow: the tile is not offered there. */
	.gp-a11y__tile[data-gp-a11y-toggle="guide"] { display: none; }
	.gp-a11y-band { display: none; }
}

/* =============================================================================================
 * The footer button and the panel
 * ============================================================================================= */

/* The theme styles .gp-footer__ctl (site.css). These zero-weight values only matter where that sheet is absent. */
:where(.gp-a11y-open) { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--accent-ink, currentColor); border-radius: 12px; background: transparent; color: inherit; font: inherit; font-weight: 600; line-height: 1; cursor: pointer; }
:where(.gp-a11y-open) .gp-i { width: 20px; height: 20px; }
.gp-footer__controls .gp-a11y-open { font-size: .9rem; } /* the size of the language code beside it */

.gp-a11y { position: fixed; inset: auto auto 16px max(16px, env(safe-area-inset-left)); box-sizing: border-box; width: min(30rem, calc(100vw - 32px)); max-width: none; height: fit-content; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: 0; padding: 0; overflow: hidden; border: 1.5px solid var(--accent-ink); border-radius: var(--radius, 22px); background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font-body); letter-spacing: normal; text-align: left; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); }
.gp-a11y[open] { display: flex; flex-direction: column; }
.gp-a11y::backdrop { background: rgba(10, 11, 13, .3); }
.gp-a11y__head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.gp-a11y__title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; line-height: 1.1; letter-spacing: .01em; text-transform: uppercase; }
.gp-a11y__title .gp-i { width: 1.3em; height: 1.3em; color: var(--accent-ink); }
.gp-a11y__close { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
.gp-a11y__close:hover { background: var(--hover); }
.gp-a11y__body { flex: 1 1 auto; min-height: 0; padding: 16px 20px 20px; overflow: hidden auto; overscroll-behavior: contain; }
.gp-a11y__intro { margin: 0 0 4px; color: var(--ink-2); font-size: .9rem; line-height: 1.45; }
.gp-a11y__group { margin-top: 18px; }
.gp-a11y__group-title { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--ink); font-family: var(--font-body); font-size: .95rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-transform: none; }

.gp-a11y__size { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface-1); }
.gp-a11y__size-label { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.gp-a11y__size-label .gp-i { width: 1.5rem; height: 1.5rem; color: var(--accent-ink); }
.gp-a11y__stepper { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.gp-a11y__step { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--field-line); border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.gp-a11y__step:hover { background: var(--hover); }
.gp-a11y__step[aria-disabled="true"] { border-style: dashed; color: var(--muted); cursor: default; }
.gp-a11y__step[aria-disabled="true"]:hover { background: none; }
.gp-a11y__step[aria-disabled="true"] .gp-i { opacity: .55; }
.gp-a11y__size-value { min-width: 4.2em; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }

/* Three tiles a row, two on a 320 px screen, fewer again as the text grows. */
.gp-a11y__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(6.2rem, 30%)), 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gp-a11y__grid > li { display: flex; min-width: 0; }
.gp-a11y__tile { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 6.4rem; padding: 12px 8px 10px; border: 1px solid var(--field-line); border-radius: 12px; background: var(--surface-1); color: var(--ink); font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; }
.gp-a11y__tile:hover { background: var(--surface-2); }
.gp-a11y__tile > .gp-i { width: 1.75rem; height: 1.75rem; margin-bottom: 2px; }
.gp-a11y__label { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
.gp-a11y__state { color: var(--muted); font-size: .75rem; font-weight: 500; }
.gp-a11y__check { position: absolute; top: 6px; right: 6px; display: none; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.gp-a11y__check .gp-i { width: 100%; height: 100%; padding: 2px; stroke-width: 2.6; }
/* On: a thicker accent frame, a check mark and the word « Activé » (never colour alone). */
.gp-a11y__tile[aria-pressed="true"] { border-color: var(--accent-ink); background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent-ink); }
.gp-a11y__tile[aria-pressed="true"] > .gp-i { color: var(--accent-ink); }
.gp-a11y__tile[aria-pressed="true"] .gp-a11y__state { color: var(--ink); font-weight: 700; } /* text stays in the text colour: the Pro accent (cream on dark, olive on light) would not stand apart from it */
.gp-a11y__tile[aria-pressed="true"] .gp-a11y__check { display: block; }

.gp-a11y__status { min-height: 1.3em; margin: 14px 0 0; color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.gp-a11y__status:empty { min-height: 0; margin-top: 6px; }
.gp-a11y__actions { margin: 10px 0 0; }
.gp-a11y__reset { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 0 16px; border: 1.5px solid var(--accent-ink); border-radius: 12px; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.gp-a11y__reset:hover { background: var(--hover); color: var(--accent-ink); }
.gp-a11y__reset .gp-i { width: 1.25rem; height: 1.25rem; }
.gp-a11y__note { margin: 12px 0 0; color: var(--ink-2); font-size: .82rem; line-height: 1.5; }
.gp-a11y__note a { display: inline-block; margin-block: -13px; padding-block: 13px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; } /* a taller target that does not move the line */
.gp-a11y__note a:hover { color: var(--accent-ink); }
.gp-a11y :focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

@media (max-width: 559.98px) {
	.gp-a11y { inset: auto 8px 8px; width: auto; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
	.gp-a11y__head { padding-left: 16px; }
	.gp-a11y__body { padding: 14px 16px 18px; }
}
@media (forced-colors: active) {
	.gp-a11y__tile[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: -3px; }
	.gp-a11y-band { border-color: Highlight; }
}
