/* =====================================================================
   GestiOne - système d'interface (refonte UX, lots 0 et 1)
   Chargé APRÈS style.css. Tous les composants sont préfixés « gx- » pour ne
   rien écraser sur les pages non migrées ; seule la dernière section (« Compat »)
   définit des classes que les anciennes pages utilisaient sans qu'elles existent.
   Référence visuelle : _design/gestione-ux/maquette.html
   ===================================================================== */

/* ---------- 1. Tokens (clair, sombre auto, sombre forcé) ---------- */
:root {
    --bg: #f3f4f6; --surface: #ffffff; --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb;
    --nav: #1f2937; --nav-2: #111827; --nav-ink: #d1d5db; --nav-on: #ffffff; --nav-line: rgba(255, 255, 255, .08);
    --accent: #ea580c; --accent-ink: #ffffff; --accent-soft: #fff7ed; --accent-hi: #f97316; --grad: linear-gradient(135deg, #f97316, #ea580c); --shadow-orange: 0 4px 14px rgba(249, 115, 22, .4);
    --ok: #065f46; --ok-bg: #d1fae5; --warn: #92400e; --warn-bg: #fef3c7; --bad: #991b1b; --bad-bg: #fee2e2;
    --blue: #1e40af; --blue-bg: #dbeafe; --violet: #5b21b6; --violet-bg: #ede9fe; --grey: #374151; --grey-bg: #e5e7eb;
    --elev: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
    --elev-up: 0 -8px 24px -12px rgba(17, 26, 44, .35);
    --f-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    --r-sm: 8px; --r: 12px; --r-lg: 14px; --r-pill: 99px;
    /* échelle typographique */
    --t-xs: .75rem; --t-sm: .8125rem; --t-base: .9375rem; --t-md: 1rem; --t-lg: 1.125rem; --t-xl: 1.375rem; --t-2xl: 2.125rem;
    /* dimensions du gabarit */
    --gx-nav-w: 248px; --gx-top-h: 64px; --gx-bar-h: 64px; --gx-gutter: 28px;
    --gx-safe-b: env(safe-area-inset-bottom, 0px);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111827; --surface: #1f2937; --ink: #f3f4f6; --muted: #9ca3af; --line: #374151;
        --nav: #111827; --nav-2: #0b1220; --nav-ink: #d1d5db; --nav-on: #ffffff; --nav-line: rgba(255, 255, 255, .08);
        --accent: #f97316; --accent-ink: #1a0b00; --accent-soft: #3a2314; --accent-hi: #fb923c;
        --ok: #6ee7b7; --ok-bg: #064e3b; --warn: #fcd34d; --warn-bg: #451a03; --bad: #fca5a5; --bad-bg: #450a0a;
        --blue: #93c5fd; --blue-bg: #1e3a8a; --violet: #c4b5fd; --violet-bg: #2e1065; --grey: #d1d5db; --grey-bg: #374151;
        --elev: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -10px rgba(0, 0, 0, .6);
        --elev-up: 0 -8px 24px -12px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #111827; --surface: #1f2937; --ink: #f3f4f6; --muted: #9ca3af; --line: #374151;
    --nav: #111827; --nav-2: #0b1220; --nav-ink: #d1d5db; --nav-on: #ffffff; --nav-line: rgba(255, 255, 255, .08);
    --accent: #f97316; --accent-ink: #1a0b00; --accent-soft: #3a2314; --accent-hi: #fb923c;
    --ok: #6ee7b7; --ok-bg: #064e3b; --warn: #fcd34d; --warn-bg: #451a03; --bad: #fca5a5; --bad-bg: #450a0a;
    --blue: #93c5fd; --blue-bg: #1e3a8a; --violet: #c4b5fd; --violet-bg: #2e1065; --grey: #d1d5db; --grey-bg: #374151;
    --elev: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -10px rgba(0, 0, 0, .6);
    --elev-up: 0 -8px 24px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- 2. Base ---------- */
.gx-body [hidden] { display: none !important; }
.gx-body {
    background: var(--bg); color: var(--ink);
    font-family: var(--f-text); font-size: var(--t-base); line-height: 1.5;
    overflow-x: clip;
}
.gx-body *:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.gx-skip {
    position: absolute; left: 12px; top: -60px; z-index: 3000; background: var(--accent); color: var(--accent-ink);
    padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none;
}
.gx-skip:focus { top: 12px; }
.gx-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gx-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gx-mono { font-family: var(--f-mono); }
.gx-muted { color: var(--muted); }
.gx-num { font-variant-numeric: tabular-nums; }

/* ---------- 3. Gabarit : sidebar / rail / barre du bas ---------- */
.gx-app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--gx-nav-w) minmax(0, 1fr); }
.gx-nav {
    grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
    background: linear-gradient(180deg, var(--nav), var(--nav-2)); color: var(--nav-ink); display: flex; flex-direction: column; padding: 16px 12px; gap: 2px; z-index: 900;
}
.gx-main { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; }
.gx-brand { display: flex; align-items: center; gap: 10px; color: var(--nav-on); font-weight: 700; font-size: 19px; padding: 4px 8px 14px; text-decoration: none; }
.gx-brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; flex: none; }
.gx-brand i svg { width: 18px; height: 18px; stroke: var(--accent-ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gx-brand b { color: var(--accent); font-weight: 700; }
.gx-ntitle { margin: 14px 12px 4px; font-size: var(--t-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--nav-ink); opacity: .65; }
.gx-nl {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; position: relative;
    color: var(--nav-ink); font-weight: 500; text-decoration: none; font-size: var(--t-base); background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; text-align: left;
}
.gx-nl:hover { background: var(--nav-line); color: var(--nav-on); }
.gx-nl[aria-current="page"] { background: var(--nav-line); color: var(--nav-on); }
.gx-nl[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.gx-n { margin-left: auto; background: var(--accent); color: var(--accent-ink); font-size: var(--t-xs); font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; }
.gx-nsep { height: 1px; background: var(--nav-line); margin: 10px 8px; }
.gx-who { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--nav-line); display: flex; align-items: center; gap: 10px; color: var(--nav-on); font-size: 14px; }
.gx-av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.gx-who a { color: var(--nav-on); text-decoration: none; font-weight: 600; }
.gx-who small { display: block; color: var(--nav-ink); }
.gx-who form { margin-left: auto; }
.gx-iconbtn {
    width: 44px; height: 44px; border-radius: var(--r); border: 1px solid var(--line); display: inline-grid; place-items: center;
    background: var(--surface); color: var(--ink); cursor: pointer; flex: none; padding: 0;
}
.gx-iconbtn:hover { border-color: var(--muted); }
.gx-nav .gx-iconbtn { background: transparent; border-color: var(--nav-line); color: var(--nav-ink); }
.gx-navclose, .gx-more, .gx-navhead-sheet { display: none; }
.gx-scrim { display: none; position: fixed; inset: 0; background: rgba(5, 10, 20, .55); z-index: 880; }

/* En-tête */
.gx-top {
    position: sticky; top: 0; z-index: 800; min-height: var(--gx-top-h); display: flex; align-items: center; gap: 14px;
    padding: 10px var(--gx-gutter); background: var(--surface); border-bottom: 1px solid var(--line);
}
.gx-top h1 { margin: 0; font-size: var(--t-xl); letter-spacing: -.015em; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-search {
    flex: 1; max-width: 460px; margin-left: auto; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); background: var(--bg);
}
.gx-search:focus-within { border-color: var(--accent); }
.gx-search input {
    flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; min-height: 44px; padding: 0;
}
.gx-search input:focus, .gx-search input:focus-visible { outline: none; }
.gx-search input::placeholder { color: var(--muted); }
.gx-search kbd { font: 500 12px var(--f-mono); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.gx-search button { border: 0; background: transparent; color: inherit; display: grid; place-items: center; min-width: 44px; min-height: 44px; cursor: pointer; padding: 0; }
.gx-search--page { max-width: none; margin: 0; flex: 1 1 260px; }
.gx-pill {
    display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-sm); font-weight: 600; padding: 6px 12px; border-radius: var(--r-pill);
    background: var(--ok-bg); color: var(--ok); white-space: nowrap; text-decoration: none; min-height: 32px;
}
.gx-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.gx-pill--warn { background: var(--warn-bg); color: var(--warn); }
.gx-pill--bad { background: var(--bad-bg); color: var(--bad); }
.gx-top-search-btn { display: none; margin-left: auto; }
.gx-search .gx-search-close { display: none; }
.gx-theme .gx-sun { display: none; }
:root[data-theme="dark"] .gx-theme .gx-sun { display: block; }
:root[data-theme="dark"] .gx-theme .gx-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .gx-theme .gx-sun { display: block; }
    :root:not([data-theme="light"]) .gx-theme .gx-moon { display: none; }
}

/* Zone de contenu */
.gx-content { flex: 1; padding: 24px var(--gx-gutter) 40px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.gx-content > * { flex: none; min-width: 0; }
.gx-legacy { background: #f3f4f6; color: #374151; color-scheme: light; flex: 1; }
.gx-legacy .page-content { min-height: 100%; }
.gx-bar { display: none; }

/* Tablette : rail d'icônes 76 px (769-1024 inclus) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root { --gx-nav-w: 76px; --gx-gutter: 20px; }
    .gx-nav { align-items: center; padding: 14px 8px; }
    .gx-brand { padding: 4px 0 12px; min-width: 52px; justify-content: center; min-height: 44px; }
    .gx-brand span, .gx-nl > span:not(.gx-n), .gx-who > div, .gx-ntitle, .gx-who form, .gx-nl:not([data-rail]), .gx-nsep { display: none; }
    .gx-nl { width: 52px; justify-content: center; padding: 0; }
    .gx-nl .gx-n { position: absolute; top: 3px; right: 1px; margin: 0; font-size: 11px; padding: 0 5px; }
    .gx-nl[aria-current="page"]::before { left: -8px; }
    .gx-who { padding: 12px 0 0; justify-content: center; border-top-color: var(--nav-line); width: 100%; flex-direction: column; }
    .gx-more { display: flex; }
    .gx-search kbd { display: none; }
    /* tiroir déployé par « Tout le menu » */
    body.gx-menu-open .gx-nav {
        position: fixed; left: 0; top: 0; bottom: 0; width: 290px; align-items: stretch; padding: 16px 12px; box-shadow: 8px 0 32px rgba(0, 0, 0, .35); z-index: 900;
    }
    body.gx-menu-open .gx-brand span, body.gx-menu-open .gx-nl > span:not(.gx-n), body.gx-menu-open .gx-who > div, body.gx-menu-open .gx-ntitle,
    body.gx-menu-open .gx-who form { display: revert; }
    body.gx-menu-open .gx-nl:not([data-rail]), body.gx-menu-open .gx-nsep { display: flex; }
    body.gx-menu-open .gx-nsep { display: block; }
    body.gx-menu-open .gx-nl { width: 100%; justify-content: flex-start; padding: 0 12px; }
    body.gx-menu-open .gx-nl .gx-n { position: static; margin-left: auto; font-size: var(--t-xs); padding: 1px 7px; }
    body.gx-menu-open .gx-who { flex-direction: row; justify-content: flex-start; padding-top: 12px; }
    body.gx-menu-open .gx-scrim { display: block; }
    body.gx-menu-open .gx-more { display: none; }
    body.gx-menu-open .gx-navclose { display: grid; position: absolute; right: 8px; top: 12px; }
}

/* Mobile : barre du bas + feuille « Menu » */
@media (max-width: 768px) {
    :root { --gx-gutter: 14px; --gx-top-h: 56px; }
    .gx-app { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(var(--gx-bar-h) + var(--gx-safe-b)); }
    .gx-main { grid-column: 1; }
    .gx-top { padding: 8px var(--gx-gutter); gap: 10px; }
    .gx-top h1 { font-size: 19px; }
    .gx-top .gx-pill span.gx-pill-txt { display: none; }
    .gx-top .gx-pill { padding: 0; width: 44px; flex: none; justify-content: center; }
    .gx-top .gx-pill::before { width: 12px; height: 12px; }
    .gx-top-search-btn { display: inline-grid; }
    .gx-top > .gx-search {
        display: none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; max-width: none; margin: 0; border-radius: 0; border: 0; padding: 0 var(--gx-gutter); background: var(--surface); z-index: 5;
    }
    body.gx-search-open .gx-top > .gx-search { display: flex; }
    .gx-search .gx-search-close { display: grid; }
    .gx-content { padding: 14px var(--gx-gutter) 28px; gap: 18px; }
    /* le menu complet devient une feuille plein écran */
    .gx-nav {
        position: fixed; inset: 0; height: auto; z-index: 1100; transform: translateY(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s;
        padding: 12px 14px calc(18px + var(--gx-safe-b));
    }
    body.gx-menu-open .gx-nav { transform: none; visibility: visible; transition: transform .25s ease; }
    body.gx-menu-open { overflow: hidden; }
    .gx-navclose { display: grid; position: absolute; right: 12px; top: 10px; }
    .gx-brand { padding-right: 56px; }
    .gx-nl:hover { background: none; color: var(--nav-ink); }
    .gx-nl[aria-current="page"]::before { left: -14px; }
    .gx-bar {
        display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; grid-auto-flow: column; grid-auto-columns: 1fr;
        background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--gx-safe-b)); min-height: var(--gx-bar-h);
    }
    .gx-bar a, .gx-bar button {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--muted);
        font: inherit; font-size: 11.5px; font-weight: 600; text-decoration: none; position: relative; border-radius: var(--r); background: none; border: 0; cursor: pointer; padding: 0;
    }
    .gx-bar [aria-current="page"] { color: var(--accent); }
    .gx-bar .gx-n { position: absolute; top: 2px; left: 54%; margin: 0; min-width: 18px; text-align: center; font-size: 11px; padding: 0 5px; }
    body.gx-menu-open .gx-bar { z-index: 1050; }
}

@media (max-width: 768px) { .gx-hide-m { display: none !important; } }

/* ---------- 4. Titres de page, sections ---------- */
.gx-pagehead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.gx-pagehead p { margin: 0; color: var(--muted); font-size: var(--t-base); }
.gx-pagehead .gx-actions { margin-left: auto; }
.gx-sech { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.gx-sech h2, .gx-sech h3 { margin: 0; font-size: var(--t-md); letter-spacing: -.01em; }
.gx-link { color: var(--accent); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.gx-link:hover { text-decoration: underline; }
.gx-body a.gx-link { color: var(--accent); }
.gx-ref { font: 500 13.5px var(--f-mono); color: var(--accent); text-decoration: none; }
.gx-body a.gx-ref { color: var(--accent); }
.gx-ref:hover { text-decoration: underline; }
.gx-sub { color: var(--muted); font-size: var(--t-sm); }

/* ---------- 5. Boutons ---------- */
.gx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: var(--t-base);
    cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; transition: border-color .15s, background-color .15s, transform .05s;
}
.gx-btn:hover { border-color: var(--muted); }
.gx-btn:active { transform: translateY(1px); }
.gx-btn .gx-ico { width: 18px; height: 18px; }
.gx-body a.gx-btn { color: var(--ink); }
.gx-btn--pri, .gx-body a.gx-btn--pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gx-btn--pri:hover { filter: brightness(1.06); border-color: var(--accent); }
.gx-btn--danger, .gx-body a.gx-btn--danger { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.gx-btn--ghost, .gx-body a.gx-btn--ghost { border-color: transparent; background: transparent; color: var(--accent); }
.gx-btn--ghost:hover { background: var(--accent-soft); border-color: transparent; }
.gx-btn--sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.gx-btn--block { width: 100%; }
.gx-btn[disabled], .gx-btn[aria-busy="true"] { opacity: .6; cursor: not-allowed; pointer-events: none; }
.gx-btn[aria-busy="true"]::after {
    content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gx-spin .7s linear infinite;
}
@keyframes gx-spin { to { transform: rotate(360deg); } }
.gx-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (pointer: coarse), (max-width: 768px) { .gx-btn--sm { min-height: 44px; } }

/* ---------- 6. Champs ---------- */
.gx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gx-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.gx-input, .gx-select, .gx-textarea {
    width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink);
    font: inherit; font-size: 16px; font-weight: 500;
}
.gx-textarea { padding: 10px 14px; min-height: 96px; resize: vertical; }
.gx-select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23888' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.gx-input:focus, .gx-select:focus, .gx-textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.gx-fieldrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.gx-check { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -11px; cursor: pointer; position: relative; flex: none; }
.gx-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.gx-check i { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--muted); background: var(--surface); display: block; position: relative; pointer-events: none; }
.gx-check input:checked + i { background: var(--accent); border-color: var(--accent); }
.gx-check input:checked + i::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.gx-check input:focus-visible + i { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 7. Cartes, tuiles ---------- */
.gx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--elev); min-width: 0; }
.gx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.gx-card__head h2, .gx-card__head h3 { margin: 0; font-size: var(--t-md); letter-spacing: -.01em; }
.gx-card__body { padding: 12px 18px 16px; }
.gx-card--flush .gx-card__body { padding: 0; }
.gx-card--accent { border-color: var(--accent); }
.gx-card--alert { border-color: var(--bad); }
.gx-card--foot { padding: 12px 18px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
@media (max-width: 768px) { .gx-card__head { padding: 14px 16px 0; } .gx-card__body { padding: 10px 16px 14px; } }

.gx-todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.gx-tile {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px;
    align-items: center; box-shadow: var(--elev); min-height: 104px; text-decoration: none; color: inherit; transition: border-color .15s, transform .05s;
}
.gx-body a.gx-tile { color: var(--ink); }
.gx-tile:hover { border-color: var(--muted); }
.gx-tile:active { transform: translateY(1px); }
.gx-tile .k { grid-column: 1; color: var(--muted); font-size: 14px; font-weight: 500; }
.gx-tile .v { grid-column: 1; font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gx-tile .s { grid-column: 1 / -1; font-size: var(--t-sm); font-weight: 600; margin-top: 6px; }
.gx-tile .chip { grid-column: 2; grid-row: 1 / 3; width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; }
.gx-tile.is-zero .v { color: var(--muted); }
.gx-tone-warn { background: var(--warn-bg); color: var(--warn); } .gx-tone-blue { background: var(--blue-bg); color: var(--blue); }
.gx-tone-bad { background: var(--bad-bg); color: var(--bad); } .gx-tone-violet { background: var(--violet-bg); color: var(--violet); }
.gx-tone-ok { background: var(--ok-bg); color: var(--ok); } .gx-tone-grey { background: var(--grey-bg); color: var(--grey); }
.gx-t-warn { color: var(--warn); } .gx-t-bad { color: var(--bad); } .gx-t-ok { color: var(--ok); } .gx-t-blue { color: var(--blue); } .gx-t-muted { color: var(--muted); }
@media (max-width: 1100px) { .gx-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
    .gx-todo { gap: 10px; }
    .gx-tile { padding: 12px; min-height: 96px; }
    .gx-tile .v { font-size: 30px; }
    .gx-tile .chip { width: 38px; height: 38px; }
}
.gx-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.gx-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
@media (max-width: 1100px) { .gx-cols { grid-template-columns: minmax(0, 1fr); } }
.gx-cols--detail { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .gx-cols--detail { grid-template-columns: minmax(0, 1fr); } }
.gx-grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* synchro / erreurs / lignes */
.gx-sync { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.gx-sync div { background: var(--bg); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.gx-sync b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.gx-sync span { font-size: 12.5px; color: var(--muted); }
.gx-err { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--ink); font-size: 13.5px; margin-top: 8px; }
.gx-err b { color: var(--bad); white-space: nowrap; }
.gx-err span { min-width: 0; overflow-wrap: anywhere; }
.gx-row { color: var(--ink); display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); }
.gx-row:last-child { border-bottom: 0; }
.gx-row .t { flex: 1; min-width: 0; }
.gx-row .t b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-row .t small { color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
.gx-qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
.gx-dl dt { color: var(--muted); }
.gx-dl dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.gx-details { border-top: 1px solid var(--line); }
.gx-details > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; padding: 0 2px; }
.gx-details > summary::-webkit-details-marker { display: none; }
.gx-details > summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.gx-details[open] > summary::after { content: "−"; }

/* ---------- 8. Badges (statuts, teintes) ---------- */
.gx-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; line-height: 1.4; }
.gx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.gx-badge--warn { background: var(--warn-bg); color: var(--warn); } .gx-badge--info { background: var(--blue-bg); color: var(--blue); }
.gx-badge--ok { background: var(--ok-bg); color: var(--ok); } .gx-badge--bad { background: var(--bad-bg); color: var(--bad); }
.gx-badge--violet { background: var(--violet-bg); color: var(--violet); } .gx-badge--grey { background: var(--grey-bg); color: var(--grey); }
.gx-badge--lg { font-size: 14px; padding: 5px 14px; }
.gx-badge--plain::before { display: none; }

/* ---------- 9. Tables : tableau, essentiel (tablette), cartes (mobile) ---------- */
.gx-tablewrap { container-type: inline-size; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gx-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gx-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.gx-table td { padding: 8px 14px; min-height: 52px; height: 52px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.gx-table tbody tr:last-child td { border-bottom: 0; }
.gx-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.gx-table tbody tr.is-selected td { background: var(--accent-soft); }
.gx-table .r { text-align: right; }
.gx-table .nw { white-space: nowrap; }
.gx-table .gx-w-chk { width: 56px; padding-right: 0; }
.gx-table tfoot td { height: auto; padding: 8px 14px; font-weight: 600; }
.gx-only-narrow, .gx-only-card { display: none; }
@container (max-width: 999px) {
    .gx-col-2 { display: none; }
    .gx-only-narrow { display: block; }
}
@container (max-width: 700px) {
    .gx-col-3 { display: none; }
    .gx-table--cards, .gx-table--cards tbody { display: block; }
    .gx-table--cards thead { display: none; }
    .gx-table--cards tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main amount" "meta status" "date act";
        gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: relative; align-items: center;
    }
    .gx-table--cards.gx-table--sel tr { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "chk main amount" "chk meta status" "chk date act"; column-gap: 14px; }
    .gx-table--cards tbody tr:last-child { border-bottom: 0; }
    .gx-table--cards td { display: block; padding: 0; height: auto; min-height: 0; border: 0; background: none !important; min-width: 0; }
    .gx-table--cards .c-chk { grid-area: chk; z-index: 2; align-self: start; padding-top: 4px; }
    .gx-table--cards .c-main { grid-area: main; font-weight: 600; }
    .gx-table--cards .c-amount { grid-area: amount; text-align: right; font-weight: 700; }
    .gx-table--cards .c-meta { grid-area: meta; color: var(--muted); font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gx-table--cards .c-main .gx-sub { font-weight: 400; }
    .gx-table--cards .c-status { grid-area: status; justify-self: end; }
    .gx-table--cards .c-foot { grid-area: date; color: var(--muted); font-size: 13px; }
    .gx-table--cards .c-act { grid-area: act; justify-self: end; position: relative; z-index: 2; }
    .gx-table--cards .c-stretch a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
    .gx-table--cards .c-stretch a { position: static; }
    .gx-table--cards .c-hide { display: none; }
    .gx-only-narrow { display: none; }
    .gx-only-card { display: inline; }
}

/* ---------- 10. Recherche et filtres : puces, panneau, filtres actifs ---------- */
.gx-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gx-tools .gx-select { width: auto; min-width: 180px; max-width: 100%; }
.gx-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; margin: 0 calc(var(--gx-gutter) * -1); padding-inline: var(--gx-gutter); scroll-snap-type: x proximity; }
.gx-chips::-webkit-scrollbar { display: none; }
.gx-chip {
    font: inherit; font-weight: 600; font-size: 14px; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
    color: var(--ink); white-space: nowrap; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; text-decoration: none; scroll-snap-align: start; flex: none;
}
.gx-body a.gx-chip { color: var(--ink); }
.gx-chip[aria-current="true"], .gx-chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.gx-body a.gx-chip[aria-current="true"] { color: var(--surface); }
.gx-chip i { font-style: normal; font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.gx-chip--rm { min-height: 36px; font-size: 13px; padding: 0 10px 0 12px; background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.gx-body a.gx-chip--rm { color: var(--accent); }
.gx-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gx-filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.gx-filters > summary { list-style: none; cursor: pointer; }
.gx-filters > summary::-webkit-details-marker { display: none; }
.gx-filters__body { padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.gx-filterbtn { min-height: 44px; }
.gx-filterbtn .gx-n { margin-left: 2px; }

/* barre d'actions groupées (collante, visible seulement quand elle n'est pas hidden) */
.gx-bulk {
    position: sticky; bottom: 14px; z-index: 700; display: flex; align-items: center; gap: 10px 12px; padding: 10px 14px; background: var(--ink); color: var(--surface);
    border-radius: var(--r-lg); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .55); flex-wrap: wrap;
}
.gx-bulk[hidden] { display: none; }
.gx-bulk b { font-weight: 600; margin-right: auto; }
.gx-bulk .gx-btn { min-height: 44px; background: transparent; color: var(--surface); border-color: rgba(255, 255, 255, .28); }
.gx-body .gx-bulk .gx-btn { color: var(--surface); }
.gx-bulk .gx-btn--pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gx-body .gx-bulk .gx-btn--pri { color: var(--accent-ink); }
@media (max-width: 768px) {
    .gx-bulk { bottom: calc(var(--gx-bar-h) + var(--gx-safe-b) + 10px); }
    .gx-bulk .gx-btn { flex: 1 1 auto; padding: 0 12px; }
    .gx-bulk b { flex-basis: 100%; }
}

/* pagination */
.gx-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.gx-pager nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gx-pager a, .gx-pager span.gx-pg {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600;
}
.gx-pager a:hover { border-color: var(--muted); }
.gx-pager .gx-pg[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.gx-pager .gx-pg.is-off { opacity: .4; }
.gx-pager .gx-dots { color: var(--muted); padding: 0 2px; }
@media (max-width: 768px) {
    .gx-pager { justify-content: center; text-align: center; }
    .gx-pager .gx-hide-m { display: none; }
}

/* ---------- 11. États vides et chargement ---------- */
.gx-empty { text-align: center; padding: 40px 20px; display: grid; justify-items: center; gap: 8px; color: var(--muted); }
.gx-empty .gx-ico { width: 40px; height: 40px; color: var(--muted); opacity: .8; }
.gx-empty b { color: var(--ink); font-size: var(--t-md); }
.gx-empty p { margin: 0 0 8px; max-width: 42ch; }
.gx-skeleton { background: linear-gradient(90deg, var(--grey-bg), var(--bg), var(--grey-bg)); background-size: 200% 100%; animation: gx-shimmer 1.2s linear infinite; border-radius: 8px; min-height: 16px; }
@keyframes gx-shimmer { to { background-position: -200% 0; } }

/* ---------- 12. Messages : toasts (un seul canal) ---------- */
.gx-toasts { position: fixed; top: 76px; right: 20px; z-index: 2500; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 28px)); pointer-events: none; }
.gx-toast {
    pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 5px solid var(--ok);
    border-radius: var(--r); box-shadow: 0 12px 32px -10px rgba(0, 0, 0, .45); padding: 12px 8px 12px 14px; animation: gx-in .2s ease;
}
.gx-toast--error { border-left-color: var(--bad); }
.gx-toast--warn { border-left-color: var(--warn); }
.gx-toast--info { border-left-color: var(--blue); }
.gx-toast .gx-ico { margin-top: 1px; color: var(--ok); }
.gx-toast--error .gx-ico { color: var(--bad); } .gx-toast--warn .gx-ico { color: var(--warn); } .gx-toast--info .gx-ico { color: var(--blue); }
.gx-toast p { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.gx-toast button { border: 0; background: none; color: var(--muted); cursor: pointer; min-width: 36px; min-height: 36px; border-radius: 8px; font-size: 20px; line-height: 1; }
@keyframes gx-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 768px) { .gx-toasts { top: auto; right: 14px; left: 14px; width: auto; bottom: calc(var(--gx-bar-h) + var(--gx-safe-b) + 12px); } }
.gx-inline { padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; background: var(--grey-bg); color: var(--ink); }
.gx-inline--ok { background: var(--ok-bg); } .gx-inline--bad { background: var(--bad-bg); } .gx-inline--warn { background: var(--warn-bg); }

/* ---------- 13. Fenêtres : centrée (bureau), panneau latéral (tablette), feuille plein écran (mobile) ---------- */
dialog.gx-modal { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0; background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6); overflow: hidden; }
dialog.gx-modal[open] { display: flex; flex-direction: column; }
dialog.gx-modal::backdrop { background: rgba(5, 10, 20, .6); }
.gx-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.gx-modal__head h2 { margin: 0; font-size: var(--t-lg); }
.gx-modal__body { padding: 16px 18px; overflow-y: auto; display: grid; gap: 14px; }
.gx-modal__body p { margin: 0; }
.gx-modal__foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px calc(12px + var(--gx-safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 769px) and (max-width: 1024px) {
    dialog.gx-modal { margin: 0 0 0 auto; width: min(440px, 92vw); height: 100dvh; max-height: 100dvh; border-radius: var(--r-lg) 0 0 var(--r-lg); border-right: 0; }
}
@media (max-width: 768px) {
    dialog.gx-modal { margin: auto 0 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
    .gx-modal__foot .gx-btn { flex: 1 1 140px; }
}

/* ---------- 14. Fiche : barre d'actions collante ---------- */
.gx-stickyact { display: none; }
@media (max-width: 768px) {
    .gx-stickyact {
        display: flex; gap: 10px; position: sticky; bottom: calc(var(--gx-bar-h) + var(--gx-safe-b) + 8px); z-index: 650; padding: 10px; background: var(--surface);
        border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--elev-up);
    }
    .gx-stickyact .gx-btn { flex: 1; }
}
.gx-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.gx-timeline li { position: relative; }
.gx-timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--surface); }
.gx-addr { margin: 0; font-style: normal; line-height: 1.7; overflow-wrap: anywhere; }
.gx-copy { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; min-width: 36px; min-height: 36px; cursor: pointer; vertical-align: middle; font-size: 13px; padding: 0 6px; }
.gx-copy:hover { border-color: var(--muted); }
.gx-copy.is-done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }

/* bouton « copier » (composant x-copier) */
.btn-copier { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; min-width: 28px; min-height: 28px; margin-left: 4px; cursor: pointer; font-size: 12px; vertical-align: middle; padding: 0 4px; line-height: 1; }
@media (pointer: coarse), (max-width: 768px) { .btn-copier { min-width: 44px; min-height: 44px; } }
.btn-copier:hover { border-color: var(--muted); }
.btn-copier.copie { background: var(--ok-bg); color: var(--ok); border-color: transparent; }

/* résultats de recherche */
.gx-results { display: grid; gap: 22px; }
.gx-result { color: var(--ink); display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 60px; }
.gx-result:last-child { border-bottom: 0; }
.gx-result:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.gx-result b { display: block; font-weight: 600; }

/* impression : seul le contenu est imprimé */
@media print {
    .gx-nav, .gx-top, .gx-bar, .gx-toasts, .gx-bulk, .gx-stickyact { display: none !important; }
    .gx-app { display: block; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .gx-body *, .gx-body *::before, .gx-body *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (pointer: coarse), (max-width: 768px) {
    .gx-body .gx-link { min-height: 44px; }
    .gx-body .gx-pill { min-height: 44px; }
    .gx-body a.gx-badge { min-height: 44px; }
}

/* =====================================================================
   COMPAT : classes utilisées par les pages non migrées mais jamais définies
   ===================================================================== */
.content-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.content-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); line-height: 1.25; margin: 0; }
@media (max-width: 768px) { .content-header h1 { font-size: 1.25rem; } }
.form-control {
    width: 100%; min-height: 44px; padding: 0.625rem 0.875rem; font-size: 16px; border: 1px solid var(--gray-300); border-radius: var(--radius);
    background: #fff; color: var(--gray-700); font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1); }
textarea.form-control { min-height: 100px; resize: vertical; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.875rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.data-table th { background: var(--gray-50); font-weight: 600; font-size: 0.8125rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.025em; white-space: nowrap; }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563eb; }
.form-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem; }
@media (max-width: 480px) { .form-actions .btn { flex: 1 1 140px; } }
.badge-secondary { background: var(--gray-200); color: var(--gray-700); }

/* ---------- 20. Formulaires de réglages (lot 2) ---------- */
.gx-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gx-fieldset { border: 0; padding: 0; margin: 0; }
.gx-fieldset legend { padding: 0; margin-bottom: 6px; }
.gx-hint { color: var(--muted); font-size: 13.5px; }
.gx-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.gx-choice { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 600; }
.gx-choice input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.gx-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.gx-choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.gx-subcard { padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--accent) 3%, var(--surface)); }
.gx-dl > div { display: contents; }
.gx-dl code, .gx-sub code { font-family: var(--f-mono); }
@media (max-width: 768px) { .gx-choice { flex: 1 1 100%; } }

/* ---------- 21. SAV : onglets, fil de messages (lot 3) ---------- */
.gx-tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.gx-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.gx-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.gx-tabs .gx-ico { width: 18px; height: 18px; }
/* Onglets nombreux : défilement horizontal au lieu d'un débordement illisible */
.gx-tabs { overflow-x: auto; overflow-y: hidden; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scroll-snap-type: x proximity; }
.gx-tabs a { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
@media (max-width: 720px) {
    .gx-tabs { gap: 2px; margin-left: -4px; margin-right: -4px; }
    .gx-tabs a { min-height: 40px; padding: 0 12px; font-size: 14px; }
}
.gx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-left: 6px; vertical-align: middle; }
.gx-grid2--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.gx-thread { display: flex; flex-direction: column; gap: 14px; }
.gx-msg { display: flex; flex-direction: column; gap: 4px; max-width: min(86%, 620px); }
.gx-msg.is-out { align-self: flex-end; align-items: flex-end; }
.gx-msg__bubble { padding: 10px 14px; border-radius: 14px; background: var(--grey-bg); overflow-wrap: anywhere; }
.gx-msg__text { white-space: pre-wrap; }
.gx-msg.is-out .gx-msg__bubble { background: var(--accent-soft); }
.gx-msg.is-private .gx-msg__bubble { background: var(--warn-bg); border: 1px dashed var(--warn); }
.gx-msg__tag, .gx-msg__file { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.gx-msg__file { margin: 6px 0 0; }
.gx-msg__tag .gx-ico, .gx-msg__file .gx-ico { width: 16px; height: 16px; }
.gx-msg__meta { font-size: 12.5px; color: var(--muted); }
.gx-msg__err { color: var(--bad); font-weight: 600; }
@media (max-width: 768px) { .gx-msg { max-width: 94%; } }

/* ---------- Lot 5 : catalogue (valeurs d'attribut, fiche produit) ---------- */
.gx-value { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-height: 52px; }
.gx-value__text { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.gx-swatch { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); flex: none; }

/* ---------- Lot 4 : stocks, réceptions, achats, inventaire, fournisseurs ---------- */
.gx-t-ink { color: var(--ink); }
.gx-pre { white-space: pre-line; }
.gx-fielderr { margin: 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.gx-card--narrow { max-width: 680px; width: 100%; }
.gx-eyebrow { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.gx-body a.gx-prodlink, .gx-body a.gx-rowlink { color: var(--ink); font-weight: 600; text-decoration: none; }
.gx-body a.gx-prodlink:hover, .gx-body a.gx-rowlink:hover { text-decoration: underline; }
.gx-bignum { font-size: 1.25rem; font-weight: 700; }
.gx-inlineform { display: inline; }
.gx-table .c-act { white-space: nowrap; }
.gx-table .c-act .gx-btn + form, .gx-table .c-act form + .gx-btn { margin-left: 6px; }
.gx-contactline { display: block; }
.gx-table tbody tr.gx-table__empty:hover td { background: none; }
.gx-table tr.gx-table__empty td { height: auto; padding: 0; border: 0; }
.gx-ico--sub { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.gx-btn--danger-text, .gx-body a.gx-btn--danger-text { color: var(--bad); }
.gx-btn--danger-text:hover { background: var(--bad-bg); }
.gx-form--inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.gx-form--inline .gx-field { flex: 1 1 240px; }

/* chiffres clés (inventaire, achats, fournisseur) */
.gx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.gx-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gx-kpis--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gx-kpi {
    display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--grey); border-radius: var(--r-lg); box-shadow: var(--elev); text-decoration: none; min-width: 0;
}
.gx-kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); }
.gx-kpi .k { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.gx-kpi--warn { border-left-color: var(--warn); } .gx-kpi--bad { border-left-color: var(--bad); }
.gx-kpi--ok { border-left-color: var(--ok); } .gx-kpi--info { border-left-color: var(--blue); }
a.gx-kpi { min-height: 44px; }
a.gx-kpi:hover { border-color: var(--muted); border-left-color: inherit; }
@media (max-width: 768px) { .gx-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gx-kpi .v { font-size: 24px; } }

/* saisie d un stock dans un tableau (inventaire, réception) */
.gx-stockfield { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.gx-stockfield .gx-input { width: 104px; min-height: 44px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.gx-stockfield .gx-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); }
.gx-input.saving { background: var(--warn-bg); border-color: var(--warn); }
.gx-input.saved { background: var(--ok-bg); border-color: var(--ok); }
.gx-input.error { background: var(--bad-bg); border-color: var(--bad); }
.gx-tag { display: inline-block; padding: 1px 8px; margin: 2px 4px 0 0; border-radius: var(--r-pill); background: var(--grey-bg); color: var(--grey); font-size: 12.5px; font-weight: 600; }
.gx-table--stock td.c-main { white-space: normal; }

/* en mode carte : une ligne qui occupe toute la largeur (réception, formulaires) */
@container (max-width: 700px) {
    .gx-table--cards .c-full { grid-area: auto; grid-column: 1 / -1; justify-self: stretch; padding-top: 4px; }
    .gx-table--cards .c-full .gx-recv { width: 100%; }
    .gx-table--cards .c-full .gx-recv .gx-input { flex: 1; }
    .gx-table--cards .c-meta .gx-contactline { display: inline; }
    .gx-table--cards .c-meta .gx-contactline::before { content: " · "; }
}
.gx-recv { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.gx-recv .gx-input { width: 96px; text-align: center; font-weight: 700; }

/* scan et expédition */
.gx-scan__body { display: grid; justify-items: center; gap: 12px; padding: 28px 18px 24px; text-align: center; }
.gx-scan__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--grey-bg); color: var(--grey); }
.gx-scan__icon .gx-ico { display: none; width: 38px; height: 38px; }
.gx-scan__icon[data-state="idle"] .s-idle, .gx-scan__icon[data-state="busy"] .s-busy,
.gx-scan__icon[data-state="ok"] .s-ok, .gx-scan__icon[data-state="err"] .s-err { display: block; }
.gx-scan__icon[data-state="busy"] { background: var(--warn-bg); color: var(--warn); animation: gx-pulse 1s ease-in-out infinite; }
.gx-scan__icon[data-state="ok"] { background: var(--ok-bg); color: var(--ok); }
.gx-scan__icon[data-state="err"] { background: var(--bad-bg); color: var(--bad); }
@keyframes gx-pulse { 50% { transform: scale(1.08); } }
.gx-scan__field { width: min(100%, 460px); }
.gx-scan__input { min-height: 64px; font-size: 22px; text-align: center; letter-spacing: 2px; font-family: var(--f-mono); }
.gx-scan__input.processing { background: var(--warn-bg); border-color: var(--warn); }
.gx-scan__input.success { background: var(--ok-bg); border-color: var(--ok); }
.gx-scan__input.error { background: var(--bad-bg); border-color: var(--bad); }
.gx-scan__status { margin: 0; color: var(--muted); min-height: 1.5em; }
.gx-scan__status[data-state="busy"] { color: var(--warn); } .gx-scan__status[data-state="ok"] { color: var(--ok); } .gx-scan__status[data-state="err"] { color: var(--bad); }
.gx-scanres { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; justify-content: space-between; padding: 4px 0; border-left: 4px solid var(--ok); padding-left: 14px; }
.gx-scanres--bad { border-left-color: var(--bad); }
.gx-scanres--ok b { color: var(--ok); } .gx-scanres--bad b { color: var(--bad); }
.gx-scanres__txt { min-width: 0; overflow-wrap: anywhere; }
.gx-scanres__txt p { margin: 2px 0 0; }
.gx-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink); }
.gx-steps li::marker { color: var(--accent); font-weight: 700; }

/* réception : ajout d un produit, résultats, quantité */
.gx-addrow { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.gx-addrow .gx-search { flex: 1 1 240px; }
.gx-pick { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); max-height: 340px; overflow-y: auto; background: var(--surface); }
.gx-pick__item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 8px 14px; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; cursor: pointer;
}
.gx-pick__item:last-child { border-bottom: 0; }
.gx-pick__item:hover, .gx-pick__item:focus-visible { background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.gx-pick__t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.gx-pick__t b { font-weight: 600; }
.gx-pick__head { margin: 0; padding: 10px 14px 4px; font-weight: 700; background: var(--bg); border-bottom: 1px solid var(--line); }
.gx-pick__group .gx-pick__item { padding-left: 26px; }
.gx-pick__none { margin: 0; padding: 16px; text-align: center; color: var(--muted); }
.gx-qtyname { font-weight: 600; overflow-wrap: anywhere; }
.gx-stepper { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 10px; align-items: stretch; }
.gx-stepper .gx-iconbtn { width: 52px; height: 100%; min-height: 52px; font-size: 26px; line-height: 1; font-weight: 600; }
.gx-stepper .gx-input { min-height: 52px; font-size: 22px; text-align: center; font-weight: 700; }

/* fournisseur : liste de produits à cocher */
.gx-picklist { border: 1px solid var(--line); border-radius: var(--r); max-height: 420px; overflow-y: auto; background: var(--surface); }
.gx-pickrow { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.gx-pickrow:last-of-type { border-bottom: 0; }
.gx-pickrow:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.gx-pickrow input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }
.gx-pickrow:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
.gx-pickrow__t { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Lot 6 : boutiques, utilisateurs, synchro, sauvegardes, divers ---------- */
.gx-formwrap { width: 100%; max-width: 880px; }
.gx-formactions { align-items: center; }
.gx-fielderr { color: var(--bad); font-size: 13.5px; font-weight: 600; }
.gx-field [aria-invalid="true"] { border-color: var(--bad); }
.gx-input--auto { width: auto; min-width: 170px; }
.gx-choices--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.gx-choices--grid .gx-choice { flex: none; }
.gx-choice small { display: block; font-weight: 500; }
.gx-testresult { font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.gx-testresult.is-ok { color: var(--ok); }
.gx-testresult.is-bad { color: var(--bad); }
.gx-ident { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gx-ident > span:last-child { min-width: 0; display: block; overflow-wrap: anywhere; }
.gx-ident .gx-sub { display: block; font-weight: 400; }
.gx-av--lg { width: 72px; height: 72px; font-size: 28px; }
.gx-profile { display: grid; justify-items: center; gap: 6px; text-align: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.gx-profile b { font-size: var(--t-lg); overflow-wrap: anywhere; }
.gx-feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.gx-feed li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.gx-feed li:last-child { border-bottom: 0; }
.gx-feed li > span:last-child { overflow-wrap: anywhere; }
.gx-perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gx-perms li { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.gx-perms .is-yes .gx-ico { color: var(--ok); }
.gx-perms .is-no { color: var(--muted); }
.gx-perms .is-no .gx-ico { color: var(--muted); }
.gx-roles { margin: 0; }
.gx-roles > div { display: grid; gap: 4px; align-content: start; }
.gx-roles dt { margin: 0; }
.gx-roles dd { margin: 0; }
@container (max-width: 700px) {
    .gx-table--cards .c-wrap { white-space: normal; overflow: visible; text-overflow: clip; }
}
@media (max-width: 768px) {
    .gx-formactions {
        position: sticky; bottom: calc(var(--gx-bar-h) + var(--gx-safe-b) + 8px); z-index: 650; padding: 10px; background: var(--surface);
        border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--elev-up);
    }
    .gx-formactions .gx-btn { flex: 1 1 140px; }
    .gx-feed li { grid-template-columns: minmax(0, 1fr); }
}
[hidden].gx-col, [hidden].gx-form, [hidden].gx-card, .product-section[hidden] { display: none !important; }
.gx-typecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gx-typecard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 18px; text-align: center; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); cursor: pointer; min-height: 44px; }
.gx-typecard:hover, .gx-typecard:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.gx-typecard__icon .gx-ico { width: 36px; height: 36px; color: var(--accent); }
.gx-typecard__title { font-size: 17px; font-weight: 700; }
.gx-typecard__desc { font-size: 14px; color: var(--muted); }
.gx-attrrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gx-varrow { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gx-varrow__name { font-weight: 700; overflow-wrap: anywhere; align-self: center; }
.gx-vrac { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gx-vrac .gx-choice { border: 0; background: transparent; min-width: 96px; padding: 0; }
.gx-vrac .vrac-weight-price { flex: 0 1 150px; }
.gx-vrac .vrac-stock-calc { margin-left: auto; }
.vrac-stock-calc.active { color: var(--ok); font-weight: 600; }
@media (max-width: 768px) {
    .gx-typecards { grid-template-columns: 1fr; }
    .gx-typecard { flex-direction: row; text-align: left; gap: 14px; padding: 16px; flex-wrap: wrap; }
    .gx-typecard__desc { flex-basis: 100%; }
    .gx-attrrow { grid-template-columns: 1fr; align-items: stretch; }
    .gx-varrow { grid-template-columns: 1fr 1fr; align-items: end; }
    .gx-varrow__name { grid-column: 1 / -1; }
    .gx-varrow .gx-field:nth-of-type(2) { grid-column: 1 / -1; }
    .gx-varrow__rm { grid-column: 1 / -1; }
}
.gx-body .gx-table .c-main > a, .gx-body .gx-table .c-main .gx-ident a { color: var(--ink); text-decoration: none; font-weight: 600; }
.gx-body .gx-table .c-main > a:hover, .gx-body .gx-table .c-main .gx-ident a:hover { text-decoration: underline; }
@media (max-width: 768px) { .gx-tools .gx-select, .gx-tools .gx-input--auto { flex: 1 1 100%; width: 100%; } }
/* Fiche produit : colonnes, cartes repliables, lignes, images */
details.gx-sect[hidden], .gx-field[hidden], #uploadProgress[hidden] { display: none !important; }
.gx-prodgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.gx-prodcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.gx-sect { padding: 0; }
.gx-sect > summary { list-style: none; cursor: pointer; }
.gx-sect > summary::-webkit-details-marker { display: none; }
.gx-sect__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; min-height: 44px; }
.gx-sect__head h2 { margin: 0; font-size: var(--t-md); letter-spacing: -.01em; }
.gx-sect__head::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); margin-left: auto; }
.gx-sect[open] > .gx-sect__head::after { content: "−"; }
.gx-sect__head .gx-sub { order: 3; flex-basis: 100%; }
.gx-sect[open] > .gx-sect__head { padding-bottom: 0; }
.gx-bigstock { font-size: 28px; font-weight: 700; color: var(--ok); }
.gx-bigstock small { font-size: 14px; font-weight: 400; }
.gx-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gx-row__main { flex: 2 1 200px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.gx-row__meta { flex: 1 1 200px; display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.gx-shop { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.gx-shop__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gx-shop__price { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line); }
.gx-images { display: flex; flex-wrap: wrap; gap: 12px; }
.gx-imgcard { position: relative; width: 128px; height: 128px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--grey-bg); }
.gx-imgcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-imgcard__badge { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 2px 6px; font-size: 12px; font-weight: 600; }
.gx-imgcard__acts { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.gx-imgcard__acts .gx-btn { min-height: 36px; min-width: 36px; padding: 0 8px; }
.gx-progress { background: var(--line); border-radius: 6px; overflow: hidden; height: 12px; }
.gx-progress > div { background: var(--ok); height: 100%; transition: width .3s; }
@media (max-width: 1100px) {
    .gx-prodgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .gx-prodgrid { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
    .gx-prodcol { display: contents; }
    .gx-prodgrid .gx-sect { order: var(--o, 9); }
    .gx-sect__head { padding: 14px 16px; }
    .gx-imgcard { width: calc(50% - 6px); height: auto; aspect-ratio: 1; }
}
.gx-detail { display: block; margin-top: 2px; overflow-wrap: anywhere; font-size: 12px; }
.gx-fname { overflow-wrap: anywhere; font-size: 13px; }
.gx-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.gx-steps code { font-family: var(--f-mono); font-size: 13px; background: var(--grey-bg); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.gx-suggest { list-style: none; margin: 0; padding: 0; }
.gx-suggest > li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.gx-suggest > li:last-child { border-bottom: 0; }
.gx-suggest > li.is-urgent { box-shadow: inset 3px 0 0 var(--bad); padding-left: 12px; }
.gx-suggest > li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.gx-suggest p { margin: 2px 0 0; }
.gx-suggest__side { display: grid; justify-items: end; gap: 2px; flex: none; text-align: right; }
.gx-scrollbox { max-height: 400px; overflow-y: auto; }
.gx-rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--grey-bg); color: var(--grey); font-size: 12px; font-weight: 700; margin-right: 6px; }
.gx-bargauge { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--grey-bg); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.gx-bargauge i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.gx-tile .v.gx-v-money { font-size: clamp(22px, 2.2vw, 30px); }
@media (max-width: 768px) {
    .gx-suggest > li { flex-wrap: wrap; }
    .gx-suggest > li > .gx-btn { flex: 1 1 100%; }
}
.gx-form > .gx-search { flex: none; }
.gx-pagehead > .gx-actions:only-child { margin-left: 0; }
/* Lot 6 : page de connexion (hors gabarit) */
.gx-loginpage { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.gx-login { width: 100%; max-width: 420px; display: grid; gap: 20px; }
.gx-login__brand { display: grid; justify-items: center; gap: 6px; text-align: center; }
.gx-login__brand h1 { margin: 0; font-size: var(--t-2xl); letter-spacing: -.02em; line-height: 1.1; }
.gx-login__brand h1 b { color: var(--accent); }
.gx-login__brand p { margin: 0; }
.gx-login__logo { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.gx-login__theme { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.gx-login__foot { text-align: center; margin: 0; }
.gx-pwd { position: relative; }
.gx-pwd .gx-input { padding-right: 96px; }
.gx-pwd__toggle { position: absolute; right: 4px; top: 0; bottom: 0; min-width: 88px; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; border-radius: var(--r); }
.gx-loginpage, .gx-loginpage *, .gx-loginpage *::before, .gx-loginpage *::after { box-sizing: border-box; }

/* ---------- 22. Menu déroulant et emojis en couleur ---------- */
.gx-em, .gx-ico--emo { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-style: normal; line-height: 1; }
.gx-em { display: inline-block; width: 22px; text-align: center; font-size: 18px; flex: none; }
.gx-ico--emo { display: inline-grid; place-items: center; width: 20px; height: 20px; font-size: 17px; stroke: none; fill: none; flex: none; }
.gx-acc { display: flex; flex-direction: column; gap: 2px; }
.gx-acch .gx-chv { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; opacity: .7; flex: none; margin-top: -3px; }
.gx-acc.is-open .gx-chv { transform: rotate(-135deg); margin-top: 3px; }
.gx-acch .gx-accn { margin-left: auto; margin-right: 8px; }
.gx-acch .gx-accn + .gx-chv { margin-left: 0; }
.gx-acc.is-open .gx-accn { display: none; }
.gx-acc.is-open .gx-accn + .gx-chv { margin-left: auto; }
.gx-acc__body { display: none; flex-direction: column; gap: 2px; margin-left: 20px; padding-left: 8px; border-left: 1px solid var(--nav-line); }
.gx-acc.is-open > .gx-acc__body { display: flex; }
.gx-acc__body .gx-nl { min-height: 40px; font-size: 14.5px; }
@media (min-width: 769px) and (max-width: 1024px) {
    .gx-acc, .gx-acc__body, .gx-acc.is-open > .gx-acc__body { display: contents; }
    .gx-acch { display: none; }
    .gx-nav .gx-nl > span.gx-em { display: inline-block; }
    body.gx-menu-open .gx-acc { display: flex; }
    body.gx-menu-open .gx-acch { display: flex; }
    body.gx-menu-open .gx-acc:not(.is-open) > .gx-acc__body { display: none; }
    body.gx-menu-open .gx-acc.is-open > .gx-acc__body { display: flex; margin-left: 20px; }
}

/* ---------- 23. Identité d'origine : logo, dégradé orange, lien actif ---------- */
.gx-brand { gap: 12px; font-size: 1.5rem; padding: 4px 8px 16px; }
.gx-brand i { width: 42px; height: 42px; border-radius: 12px; background: var(--grad); box-shadow: var(--shadow-orange); }
.gx-brand i svg { width: 24px; height: 24px; stroke: none; fill: none; }
.gx-brand i svg circle, .gx-brand i svg line { stroke-width: inherit; }
.gx-brand b { color: var(--accent-hi); }
.gx-nl[aria-current="page"] { background: rgba(249, 115, 22, .12); color: var(--accent-hi); }
.gx-nl[aria-current="page"]::before { background: var(--accent-hi); }
.gx-btn--pri, .gx-body a.gx-btn--pri, .gx-bulk .gx-btn--pri { background: var(--grad); border-color: transparent; box-shadow: var(--shadow-orange); }
.gx-btn--pri:hover { box-shadow: 0 6px 20px rgba(249, 115, 22, .5); transform: translateY(-1px); }
.gx-login__logo { background: var(--grad); box-shadow: var(--shadow-orange); color: #fff; }

/* ---------- 24. Paniers en cours ---------- */
.gx-cartcard { padding: 0; }
.gx-cartcard > summary { list-style: none; cursor: pointer; }
.gx-cartcard > summary::-webkit-details-marker { display: none; }
.gx-cartsum { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 18px; }
.gx-cartsum__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.gx-cartsum__main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-cartsum__total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gx-cartcard > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; flex: none; margin-top: -4px; }
.gx-cartcard[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.gx-cartbody { padding: 0 18px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 768px) { .gx-cartsum { padding: 12px 14px; flex-wrap: wrap; } .gx-cartbody { padding: 12px 14px 14px; } }

/* Achats : sélection groupée (cases par ligne et boutons « Tout passer en commandé / en reçu ») */
.gx-bulkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.gx-bulkbar .gx-btn[disabled] { opacity: .55; cursor: not-allowed; }
.gx-table th.c-sel, .gx-table td.c-sel { width: 38px; padding-right: 0; text-align: center; }
.gx-table input[type="checkbox"][data-bulk-row], .gx-table input[type="checkbox"][data-bulk-all] { width: 18px; height: 18px; cursor: pointer; }
@container (max-width: 700px) { .gx-table--cards td.c-sel { position: absolute; top: 10px; right: 10px; width: auto; padding: 0; } .gx-table--cards th.c-sel { display: none; } .gx-table--cards tr { position: relative; } }
