/*
 * GESTION DE GARE — design system V1
 *
 * Feuille unique, sans build ni dépendance externe (ADR-0016 §1 et §5).
 * Organisation : 1. tokens · 2. base · 3. primitives · 4. composants · 5. écrans
 * · 6. responsive · 7. impression.
 *
 * Le branding compagnie n'écrase que --gg-brand-* (validé côté serveur, ADR-0016 §4) ;
 * tout le reste dérive de ces variables pour rester cohérent en clair comme en sombre.
 */

/* ============================================================ 1. TOKENS === */

:root {
    color-scheme: light;

    /* Neutres */
    --gg-bg: #f4f6fb;
    --gg-bg-sunken: #eef1f7;
    --gg-surface: #ffffff;
    --gg-surface-raised: #ffffff;
    --gg-surface-muted: #f8fafc;
    --gg-surface-inverse: #0b1220;
    --gg-border: #e2e8f0;
    --gg-border-strong: #cbd5e1;
    --gg-text: #0f172a;
    --gg-text-soft: #475569;
    --gg-text-muted: #64748b;
    --gg-text-inverse: #f8fafc;

    /* Marque (surchargeable par compagnie) */
    --gg-brand: #0f766e;
    --gg-brand-ink: #ffffff;
    --gg-brand-strong: color-mix(in srgb, var(--gg-brand) 82%, #000);
    --gg-brand-soft: color-mix(in srgb, var(--gg-brand) 12%, var(--gg-surface));
    --gg-brand-border: color-mix(in srgb, var(--gg-brand) 30%, var(--gg-border));
    --gg-sidebar: #0b1220;
    --gg-sidebar-ink: #e2e8f0;
    --gg-accent: #f59e0b;

    /* Sémantique */
    --gg-success: #047857;
    --gg-success-soft: #ecfdf5;
    --gg-warning: #b45309;
    --gg-warning-soft: #fffbeb;
    --gg-danger: #b91c1c;
    --gg-danger-soft: #fef2f2;
    --gg-info: #1d4ed8;
    --gg-info-soft: #eff6ff;

    /* Rayons */
    --gg-r-sm: 8px;
    --gg-r-md: 12px;
    --gg-r-lg: 16px;
    --gg-r-xl: 22px;
    --gg-r-pill: 999px;

    /* Élévation */
    --gg-shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --gg-shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
    --gg-shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --gg-shadow-lg: 0 24px 60px rgba(15, 23, 42, .16);

    /* Espacement (base 4) */
    --gg-s1: 4px;
    --gg-s2: 8px;
    --gg-s3: 12px;
    --gg-s4: 16px;
    --gg-s5: 20px;
    --gg-s6: 24px;
    --gg-s8: 32px;
    --gg-s10: 40px;

    /* Typographie */
    --gg-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --gg-font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
    --gg-fs-xs: .75rem;
    --gg-fs-sm: .82rem;
    --gg-fs-md: .9rem;
    --gg-fs-lg: 1.02rem;

    /* Mouvement */
    --gg-ease: cubic-bezier(.2, .8, .3, 1);
    --gg-dur: .18s;

    /* Gabarit */
    --gg-sidebar-w: 268px;
    --gg-topbar-h: 68px;
    --gg-tap: 44px; /* cible tactile minimale, SKILL §20 */
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --gg-bg: #070b14;
        --gg-bg-sunken: #05080f;
        --gg-surface: #0f1729;
        --gg-surface-raised: #14203a;
        --gg-surface-muted: #131d33;
        --gg-surface-inverse: #e2e8f0;
        --gg-border: #1f2b45;
        --gg-border-strong: #31405f;
        --gg-text: #e8edf7;
        --gg-text-soft: #b6c2d9;
        --gg-text-muted: #8d9ab4;
        --gg-text-inverse: #0b1220;
        --gg-brand-soft: color-mix(in srgb, var(--gg-brand) 26%, #0f1729);
        --gg-brand-border: color-mix(in srgb, var(--gg-brand) 45%, #1f2b45);
        --gg-sidebar: #0a1120;
        --gg-success-soft: color-mix(in srgb, #10b981 18%, #0f1729);
        --gg-warning-soft: color-mix(in srgb, #f59e0b 18%, #0f1729);
        --gg-danger-soft: color-mix(in srgb, #ef4444 18%, #0f1729);
        --gg-info-soft: color-mix(in srgb, #3b82f6 18%, #0f1729);
        --gg-success: #34d399;
        --gg-warning: #fbbf24;
        --gg-danger: #f87171;
        --gg-info: #93b4fd;
        --gg-shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
        --gg-shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
        --gg-shadow-md: 0 10px 30px rgba(0, 0, 0, .5);
        --gg-shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --gg-bg: #070b14;
    --gg-bg-sunken: #05080f;
    --gg-surface: #0f1729;
    --gg-surface-raised: #14203a;
    --gg-surface-muted: #131d33;
    --gg-surface-inverse: #e2e8f0;
    --gg-border: #1f2b45;
    --gg-border-strong: #31405f;
    --gg-text: #e8edf7;
    --gg-text-soft: #b6c2d9;
    --gg-text-muted: #8d9ab4;
    --gg-text-inverse: #0b1220;
    --gg-brand-soft: color-mix(in srgb, var(--gg-brand) 26%, #0f1729);
    --gg-brand-border: color-mix(in srgb, var(--gg-brand) 45%, #1f2b45);
    --gg-sidebar: #0a1120;
    --gg-success-soft: color-mix(in srgb, #10b981 18%, #0f1729);
    --gg-warning-soft: color-mix(in srgb, #f59e0b 18%, #0f1729);
    --gg-danger-soft: color-mix(in srgb, #ef4444 18%, #0f1729);
    --gg-info-soft: color-mix(in srgb, #3b82f6 18%, #0f1729);
    --gg-success: #34d399;
    --gg-warning: #fbbf24;
    --gg-danger: #f87171;
    --gg-info: #93b4fd;
    --gg-shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
    --gg-shadow-sm: 0 2px 10px rgba(0, 0, 0, .45);
    --gg-shadow-md: 0 10px 30px rgba(0, 0, 0, .5);
    --gg-shadow-lg: 0 28px 70px rgba(0, 0, 0, .6);
}

/* Compatibilité : anciennes variables de branding encore posées par les vues. */
.gg-app-body,
.gg-platform-body {
    --gg-brand: var(--gg-primary, #0f766e);
    --gg-sidebar: var(--gg-secondary, #0b1220);
    --gg-accent: var(--gg-accent, #f59e0b);
}

/* ============================================================== 2. BASE === */

* {
    box-sizing: border-box;
}

html {
    font-family: var(--gg-font);
    background: var(--gg-bg);
    color: var(--gg-text);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    line-height: 1.55;
    font-size: 15px;
    background: var(--gg-bg);
    color: var(--gg-text);
}

h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -.015em;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--gg-brand);
}

img {
    max-width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid var(--gg-border);
    margin: var(--gg-s5) 0;
}

code, pre, .gg-mono {
    font-family: var(--gg-font-mono);
}

:focus-visible {
    outline: 2px solid var(--gg-brand);
    outline-offset: 2px;
    border-radius: var(--gg-r-sm);
}

::selection {
    background: color-mix(in srgb, var(--gg-brand) 25%, transparent);
}

.gg-skip-link {
    position: absolute;
    left: -9999px;
    top: var(--gg-s3);
    z-index: 999;
    background: var(--gg-surface);
    color: var(--gg-text);
    padding: var(--gg-s3) var(--gg-s4);
    border-radius: var(--gg-r-md);
    box-shadow: var(--gg-shadow-md);
    font-weight: 700;
}

.gg-skip-link:focus {
    left: var(--gg-s3);
}

.gg-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ======================================================== 3. PRIMITIVES === */

/* --- Texte --- */

.gg-eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: var(--gg-fs-xs);
    font-weight: 800;
    color: var(--gg-brand);
    margin: 0;
}

.gg-muted {
    color: var(--gg-text-muted);
}

.gg-section-note {
    font-size: var(--gg-fs-sm);
    color: var(--gg-text-muted);
    line-height: 1.55;
    margin: var(--gg-s2) 0 0;
}

.gg-numeric {
    font-variant-numeric: tabular-nums;
}

/* --- Boutons --- */

.gg-button {
    border: 1px solid transparent;
    border-radius: var(--gg-r-md);
    padding: 10px 15px;
    min-height: 40px;
    font-size: var(--gg-fs-md);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gg-s2);
    white-space: nowrap;
    background: var(--gg-surface);
    color: var(--gg-text);
    border-color: var(--gg-border-strong);
    transition: background var(--gg-dur) var(--gg-ease), border-color var(--gg-dur) var(--gg-ease),
        color var(--gg-dur) var(--gg-ease), box-shadow var(--gg-dur) var(--gg-ease), transform var(--gg-dur) var(--gg-ease);
}

.gg-button:hover {
    border-color: var(--gg-brand);
    color: var(--gg-brand);
}

.gg-button:active {
    transform: translateY(1px);
}

.gg-button:disabled,
.gg-button[aria-busy="true"] {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.gg-button-primary {
    background: var(--gg-brand);
    color: var(--gg-brand-ink);
    border-color: transparent;
    box-shadow: var(--gg-shadow-xs);
}

.gg-button-primary:hover {
    background: var(--gg-brand-strong);
    color: var(--gg-brand-ink);
    border-color: transparent;
    box-shadow: var(--gg-shadow-sm);
}

.gg-button-secondary {
    background: var(--gg-surface-muted);
    color: var(--gg-text);
    border-color: var(--gg-border);
}

.gg-button-secondary:hover {
    background: var(--gg-brand-soft);
    border-color: var(--gg-brand-border);
    color: var(--gg-text);
}

.gg-button-ghost {
    background: transparent;
    border-color: var(--gg-border);
}

.gg-button-danger {
    background: var(--gg-danger);
    color: #fff;
    border-color: transparent;
}

.gg-button-danger:hover {
    background: color-mix(in srgb, var(--gg-danger) 85%, #000);
    color: #fff;
    border-color: transparent;
}

.gg-button-sm {
    min-height: 32px;
    padding: 5px 11px;
    font-size: var(--gg-fs-sm);
    border-radius: var(--gg-r-sm);
}

.gg-button-lg {
    min-height: 50px;
    padding: 13px 22px;
    font-size: var(--gg-fs-lg);
}

.gg-button-block {
    width: 100%;
}

.gg-icon-button {
    border: 1px solid var(--gg-border);
    background: var(--gg-surface);
    color: var(--gg-text-soft);
    border-radius: var(--gg-r-md);
    min-width: 40px;
    min-height: 40px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: background var(--gg-dur) var(--gg-ease), color var(--gg-dur) var(--gg-ease), border-color var(--gg-dur) var(--gg-ease);
}

.gg-icon-button:hover {
    color: var(--gg-brand);
    border-color: var(--gg-brand-border);
    background: var(--gg-brand-soft);
}

/* Petit voyant de chargement intégré aux boutons occupés. */
.gg-button[aria-busy="true"]::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: gg-spin .7s linear infinite;
}

/* --- Champs --- */

.gg-field {
    display: grid;
    gap: 6px;
    font-size: var(--gg-fs-sm);
    font-weight: 650;
    color: var(--gg-text-soft);
    min-width: 0;
}

.gg-field > span {
    display: flex;
    align-items: center;
    gap: var(--gg-s2);
}

.gg-field input,
.gg-field select,
.gg-field textarea,
.gg-input {
    width: 100%;
    min-height: var(--gg-tap);
    border: 1px solid var(--gg-border-strong);
    border-radius: var(--gg-r-md);
    padding: 10px 13px;
    background: var(--gg-surface);
    color: var(--gg-text);
    font-weight: 500;
    transition: border-color var(--gg-dur) var(--gg-ease), box-shadow var(--gg-dur) var(--gg-ease);
}

.gg-field input[type="checkbox"],
.gg-field input[type="radio"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    accent-color: var(--gg-brand);
}

.gg-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 18px center, right 13px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.gg-field textarea {
    min-height: 96px;
    resize: vertical;
}

.gg-field input:focus,
.gg-field select:focus,
.gg-field textarea:focus,
.gg-input:focus {
    border-color: var(--gg-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gg-brand) 18%, transparent);
    outline: 0;
}

.gg-field input::placeholder,
.gg-field textarea::placeholder {
    color: var(--gg-text-muted);
}

.gg-field-hint {
    font-size: var(--gg-fs-xs);
    font-weight: 500;
    color: var(--gg-text-muted);
}

.gg-field-error {
    font-size: var(--gg-fs-xs);
    font-weight: 700;
    color: var(--gg-danger);
}

.gg-field.is-invalid input,
.gg-field.is-invalid select,
.gg-field.is-invalid textarea {
    border-color: var(--gg-danger);
}

.gg-form-stack {
    display: grid;
    gap: var(--gg-s4);
}

.gg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gg-s4);
}

.gg-form-grid .gg-field-full {
    grid-column: 1 / -1;
}

/* Groupe de cases à cocher (modules d'un plan, options multiples). */
.gg-checkset {
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-md);
    padding: var(--gg-s3) var(--gg-s4) var(--gg-s4);
    margin: 0;
    background: var(--gg-surface-muted);
}

.gg-checkset legend {
    font-size: var(--gg-fs-sm);
    font-weight: 700;
    color: var(--gg-text-soft);
    padding: 0 var(--gg-s2);
}

.gg-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--gg-s2);
    margin-top: var(--gg-s2);
}

.gg-check {
    display: flex;
    align-items: center;
    gap: var(--gg-s2);
    padding: 7px var(--gg-s2);
    border-radius: var(--gg-r-sm);
    font-size: var(--gg-fs-sm);
    font-weight: 600;
    cursor: pointer;
    min-height: 36px;
}

.gg-check:hover {
    background: var(--gg-brand-soft);
}

.gg-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--gg-brand);
    flex: none;
}

.gg-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gg-s2);
    align-items: center;
}

.gg-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gg-s3);
    align-items: flex-end;
}

.gg-inline-form .gg-field {
    min-width: 190px;
    flex: 1;
}

/* --- Puces d'état --- */

.gg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--gg-r-pill);
    background: var(--gg-surface-muted);
    border: 1px solid var(--gg-border);
    font-size: var(--gg-fs-xs);
    font-weight: 750;
    color: var(--gg-text-soft);
    white-space: nowrap;
}

.gg-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .8;
}

.gg-chip-success {
    background: var(--gg-success-soft);
    color: var(--gg-success);
    border-color: color-mix(in srgb, var(--gg-success) 28%, transparent);
}

.gg-chip-warning {
    background: var(--gg-warning-soft);
    color: var(--gg-warning);
    border-color: color-mix(in srgb, var(--gg-warning) 28%, transparent);
}

.gg-chip-danger {
    background: var(--gg-danger-soft);
    color: var(--gg-danger);
    border-color: color-mix(in srgb, var(--gg-danger) 28%, transparent);
}

.gg-chip-info {
    background: var(--gg-info-soft);
    color: var(--gg-info);
    border-color: color-mix(in srgb, var(--gg-info) 28%, transparent);
}

.gg-chip-plain::before {
    display: none;
}

/* --- Alertes --- */

.gg-alert {
    padding: var(--gg-s3) var(--gg-s4);
    border-radius: var(--gg-r-md);
    font-size: var(--gg-fs-md);
    border: 1px solid var(--gg-border);
    background: var(--gg-surface-muted);
    display: grid;
    gap: 2px;
}

.gg-alert strong {
    font-weight: 800;
}

.gg-alert-danger {
    background: var(--gg-danger-soft);
    color: var(--gg-danger);
    border-color: color-mix(in srgb, var(--gg-danger) 30%, transparent);
}

.gg-alert-success {
    background: var(--gg-success-soft);
    color: var(--gg-success);
    border-color: color-mix(in srgb, var(--gg-success) 30%, transparent);
}

.gg-alert-info {
    background: var(--gg-info-soft);
    color: var(--gg-info);
    border-color: color-mix(in srgb, var(--gg-info) 30%, transparent);
}

.gg-alert-warning {
    background: var(--gg-warning-soft);
    color: var(--gg-warning);
    border-color: color-mix(in srgb, var(--gg-warning) 30%, transparent);
}

/* --- Grilles --- */

.gg-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gg-s5);
}

.gg-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gg-s5);
}

.gg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: var(--gg-s5);
}

/* --- Chargement --- */

.gg-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gg-border-strong);
    border-top-color: var(--gg-brand);
    border-radius: 50%;
    animation: gg-spin .7s linear infinite;
    display: inline-block;
    flex: none;
}

@keyframes gg-spin {
    to {
        transform: rotate(360deg);
    }
}

.gg-loading-card {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-lg);
    padding: var(--gg-s6);
    display: flex;
    align-items: center;
    gap: var(--gg-s3);
    color: var(--gg-text-muted);
}

.gg-skeleton {
    height: 14px;
    border-radius: var(--gg-r-sm);
    background: linear-gradient(90deg, var(--gg-surface-muted), var(--gg-border), var(--gg-surface-muted));
    background-size: 200% 100%;
    animation: gg-shimmer 1.3s infinite linear;
}

.gg-skeleton-row {
    display: grid;
    gap: var(--gg-s3);
}

.gg-skeleton-title {
    height: 22px;
    width: 40%;
}

@keyframes gg-shimmer {
    to {
        background-position: -200% 0;
    }
}

/* ======================================================== 4. COMPOSANTS === */

/* --- Panneaux --- */

.gg-panel {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-lg);
    box-shadow: var(--gg-shadow-xs);
    overflow: hidden;
    min-width: 0;
}

.gg-panel-header {
    padding: var(--gg-s4) var(--gg-s5);
    border-bottom: 1px solid var(--gg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--gg-s3);
    flex-wrap: wrap;
    background: linear-gradient(180deg, var(--gg-surface-muted), var(--gg-surface));
}

.gg-panel-header h2 {
    font-size: var(--gg-fs-lg);
    margin: 0;
}

.gg-panel-header-actions {
    display: flex;
    gap: var(--gg-s2);
    flex-wrap: wrap;
    align-items: center;
}

.gg-panel-body {
    padding: var(--gg-s5);
}

.gg-panel-body > :first-child {
    margin-top: 0;
}

.gg-panel-flush .gg-panel-body {
    padding: 0;
}

/* --- Indicateurs --- */

.gg-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--gg-s4);
}

.gg-metric {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-lg);
    padding: var(--gg-s5);
    box-shadow: var(--gg-shadow-xs);
    position: relative;
    overflow: hidden;
}

.gg-metric::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--gg-brand);
    opacity: .85;
}

.gg-metric-label {
    font-size: var(--gg-fs-xs);
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--gg-text-muted);
    font-weight: 800;
}

.gg-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 6px;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.gg-metric-note {
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    margin-top: 4px;
}

/* --- Listes clé/valeur --- */

.gg-kv {
    display: grid;
    gap: var(--gg-s2);
    margin: 0;
}

.gg-kv-row {
    display: grid;
    grid-template-columns: minmax(140px, 38%) 1fr;
    gap: var(--gg-s3);
    padding: 9px 0;
    border-bottom: 1px dashed var(--gg-border);
    font-size: var(--gg-fs-md);
}

.gg-kv-row:last-child {
    border-bottom: 0;
}

.gg-kv-key {
    color: var(--gg-text-muted);
    font-weight: 650;
    font-size: var(--gg-fs-sm);
}

.gg-kv-value {
    font-weight: 650;
    word-break: break-word;
}

/* --- Tableaux --- */

.gg-table-wrap {
    overflow: auto;
    max-width: 100%;
}

.gg-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.gg-table th,
.gg-table td {
    padding: 12px var(--gg-s4);
    text-align: left;
    border-bottom: 1px solid var(--gg-border);
    font-size: var(--gg-fs-sm);
    vertical-align: middle;
}

.gg-table th {
    font-size: var(--gg-fs-xs);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gg-text-muted);
    background: var(--gg-surface-muted);
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 800;
    white-space: nowrap;
}

.gg-table tbody tr {
    transition: background var(--gg-dur) var(--gg-ease);
}

.gg-table tbody tr:hover {
    background: var(--gg-brand-soft);
}

.gg-table tbody tr:last-child td {
    border-bottom: 0;
}

.gg-table td.gg-numeric,
.gg-table th.gg-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.gg-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gg-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gg-s3);
    align-items: center;
    justify-content: space-between;
    padding: var(--gg-s3) var(--gg-s5);
    border-bottom: 1px solid var(--gg-border);
    background: var(--gg-surface);
}

.gg-table-count {
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    font-weight: 700;
}

.gg-search {
    position: relative;
    min-width: 220px;
    flex: 1;
    max-width: 380px;
}

.gg-search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--gg-border-strong);
    border-radius: var(--gg-r-pill);
    padding: 8px 14px 8px 34px;
    background: var(--gg-surface);
    color: var(--gg-text);
}

.gg-search::before {
    content: "⌕";
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gg-text-muted);
    font-size: 1rem;
}

.gg-search input:focus {
    border-color: var(--gg-brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gg-brand) 18%, transparent);
    outline: 0;
}

/* --- État vide --- */

.gg-empty-state {
    padding: var(--gg-s10) var(--gg-s6);
    text-align: center;
    border: 1px dashed var(--gg-border-strong);
    border-radius: var(--gg-r-lg);
    background: var(--gg-surface-muted);
    color: var(--gg-text-muted);
}

.gg-empty-state h3 {
    margin: 0 0 6px;
    color: var(--gg-text);
    font-size: var(--gg-fs-lg);
}

.gg-empty-state p {
    margin: 0;
    font-size: var(--gg-fs-md);
}

.gg-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto var(--gg-s3);
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    font-weight: 800;
    color: var(--gg-brand);
    font-size: 1.2rem;
}

.gg-empty-actions {
    margin-top: var(--gg-s4);
    display: flex;
    gap: var(--gg-s2);
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Onglets / segments --- */

.gg-tabs {
    display: flex;
    gap: var(--gg-s1);
    border-bottom: 1px solid var(--gg-border);
    overflow-x: auto;
    padding: 0 var(--gg-s2);
}

.gg-tab {
    border: 0;
    background: transparent;
    padding: 11px var(--gg-s4);
    font-size: var(--gg-fs-md);
    font-weight: 700;
    color: var(--gg-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.gg-tab:hover {
    color: var(--gg-text);
}

.gg-tab.is-active {
    color: var(--gg-brand);
    border-bottom-color: var(--gg-brand);
}

/* --- Journal / chronologie --- */

.gg-timeline {
    display: grid;
    gap: var(--gg-s4);
    margin: 0;
    padding: 0 0 0 var(--gg-s5);
    list-style: none;
    border-left: 2px solid var(--gg-border);
}

.gg-timeline li {
    position: relative;
}

.gg-timeline li::before {
    content: "";
    position: absolute;
    left: calc(var(--gg-s5) * -1 - 5px);
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gg-brand);
    box-shadow: 0 0 0 3px var(--gg-surface);
}

.gg-timeline-time {
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    font-weight: 700;
}

.gg-timeline-title {
    font-weight: 700;
}

.gg-timeline-note {
    font-size: var(--gg-fs-sm);
    color: var(--gg-text-soft);
}

/* --- Boîte de dialogue --- */

.gg-dialog {
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-xl);
    padding: 0;
    width: min(560px, calc(100vw - 32px));
    background: var(--gg-surface);
    color: var(--gg-text);
    box-shadow: var(--gg-shadow-lg);
}

.gg-dialog::backdrop {
    background: rgba(8, 12, 22, .55);
    backdrop-filter: blur(3px);
}

.gg-dialog-header {
    padding: var(--gg-s5) var(--gg-s6) var(--gg-s3);
    display: grid;
    gap: 4px;
}

.gg-dialog-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.gg-dialog-body {
    padding: 0 var(--gg-s6) var(--gg-s5);
    display: grid;
    gap: var(--gg-s4);
    max-height: min(60vh, 560px);
    overflow: auto;
}

.gg-dialog-footer {
    padding: var(--gg-s4) var(--gg-s6);
    border-top: 1px solid var(--gg-border);
    display: flex;
    justify-content: flex-end;
    gap: var(--gg-s2);
    background: var(--gg-surface-muted);
    flex-wrap: wrap;
}

.gg-dialog-wide {
    width: min(860px, calc(100vw - 32px));
}

/* --- Notifications éphémères --- */

.gg-toast-region {
    position: fixed;
    right: var(--gg-s5);
    bottom: var(--gg-s5);
    display: grid;
    gap: var(--gg-s2);
    z-index: 500;
    max-width: min(420px, calc(100vw - 40px));
}

.gg-toast {
    background: var(--gg-surface-inverse);
    color: var(--gg-text-inverse);
    border-radius: var(--gg-r-md);
    padding: 12px var(--gg-s4);
    box-shadow: var(--gg-shadow-lg);
    font-size: var(--gg-fs-sm);
    font-weight: 650;
    display: flex;
    align-items: center;
    gap: var(--gg-s2);
    animation: gg-toast-in .22s var(--gg-ease);
}

.gg-toast.is-error {
    background: var(--gg-danger);
    color: #fff;
}

.gg-toast.is-success {
    background: var(--gg-success);
    color: #fff;
}

@keyframes gg-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* --- Divers --- */

.gg-json {
    background: #0b1220;
    color: #a7f3d0;
    border-radius: var(--gg-r-md);
    padding: var(--gg-s4);
    white-space: pre-wrap;
    overflow: auto;
    font-size: var(--gg-fs-xs);
    line-height: 1.6;
    max-height: 420px;
    margin: 0;
}

.gg-brand-mark {
    width: 58px;
    height: 58px;
    border-radius: var(--gg-r-xl);
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: .04em;
    background: var(--gg-surface);
    color: var(--gg-brand);
    box-shadow: var(--gg-shadow-sm);
    flex: none;
}

.gg-brand-mark-small {
    width: 42px;
    height: 42px;
    border-radius: var(--gg-r-md);
    font-size: var(--gg-fs-sm);
}

.gg-company-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--gg-r-md);
    padding: 5px;
    flex: none;
}

/* ============================================================ 5. ÉCRANS === */

/* --- Connexion --- */

.gg-auth-page {
    background:
        radial-gradient(1100px 520px at 15% -10%, color-mix(in srgb, var(--gg-brand) 45%, transparent), transparent 60%),
        linear-gradient(135deg, #0b1220 0%, #10263a 52%, #0c3b36 100%);
    display: grid;
    place-items: center;
    padding: var(--gg-s8);
    min-height: 100vh;
}

.gg-auth-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: var(--gg-surface);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(2, 6, 23, .45);
    border: 1px solid color-mix(in srgb, #fff 8%, transparent);
}

.gg-auth-brand {
    padding: 62px 58px;
    background:
        radial-gradient(600px 300px at 80% 0%, color-mix(in srgb, var(--gg-brand) 55%, transparent), transparent 70%),
        linear-gradient(160deg, #0b1220, #0d3b38);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--gg-s5);
}

.gg-auth-brand h1 {
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.05;
    margin: 0;
    max-width: 13ch;
}

.gg-auth-brand p {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 52ch;
    margin: 0;
}

.gg-auth-points {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gg-s2);
}

.gg-auth-points span {
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--gg-r-pill);
    padding: 7px 13px;
    font-size: var(--gg-fs-sm);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(4px);
}

.gg-auth-card {
    padding: 56px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--gg-s5);
    background: var(--gg-surface);
}

.gg-auth-card h2 {
    font-size: 1.9rem;
    margin: 4px 0 0;
}

.gg-auth-footnote {
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* --- Pages neutres (sélecteur de compagnie) --- */

.gg-neutral-page {
    background: var(--gg-bg);
    min-height: 100vh;
}

.gg-topbar {
    min-height: var(--gg-topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--gg-s8);
    gap: var(--gg-s5);
}

.gg-topbar-light {
    background: var(--gg-surface);
    border-bottom: 1px solid var(--gg-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.gg-wordmark {
    font-weight: 850;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    gap: var(--gg-s2);
}

.gg-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--gg-s3);
}

.gg-user-chip {
    padding: 7px 13px;
    border-radius: var(--gg-r-pill);
    background: var(--gg-surface-muted);
    border: 1px solid var(--gg-border);
    font-size: var(--gg-fs-sm);
    font-weight: 650;
}

.gg-page {
    padding: var(--gg-s10) var(--gg-s8) 72px;
    max-width: 1320px;
    margin: auto;
}

.gg-page-narrow {
    max-width: 1000px;
}

.gg-page-heading {
    margin-bottom: var(--gg-s6);
}

.gg-page-heading h1 {
    font-size: clamp(1.7rem, 2.6vw, 2.35rem);
    margin: 6px 0;
}

.gg-page-heading-inline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--gg-s5);
}

.gg-company-card {
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    border-radius: var(--gg-r-lg);
    padding: var(--gg-s5);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--gg-s4);
    align-items: center;
    box-shadow: var(--gg-shadow-xs);
    transition: transform var(--gg-dur) var(--gg-ease), box-shadow var(--gg-dur) var(--gg-ease), border-color var(--gg-dur) var(--gg-ease);
}

.gg-company-card:hover {
    transform: translateY(-2px);
    border-color: var(--gg-brand-border);
    box-shadow: var(--gg-shadow-md);
}

.gg-company-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--gg-r-md);
    display: grid;
    place-items: center;
    background: var(--gg-brand-soft);
    color: var(--gg-brand);
    font-weight: 850;
}

.gg-company-card h2 {
    font-size: var(--gg-fs-lg);
    margin: 0 0 4px;
}

.gg-company-card p,
.gg-company-card small {
    margin: 0;
    color: var(--gg-text-muted);
}

/* --- Application (compagnie / plateforme) --- */

.gg-app-body {
    background: var(--gg-bg);
}

.gg-app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--gg-sidebar-w) minmax(0, 1fr);
}

.gg-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--gg-sidebar);
    color: var(--gg-sidebar-ink);
    padding: var(--gg-s5) var(--gg-s3);
    display: flex;
    flex-direction: column;
    gap: var(--gg-s5);
    z-index: 50;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.gg-platform-sidebar {
    background: #0a1020;
}

.gg-sidebar-brand {
    display: flex;
    align-items: center;
    gap: var(--gg-s3);
    padding: 4px var(--gg-s2) var(--gg-s4);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    min-width: 0;
}

.gg-sidebar-brand strong,
.gg-sidebar-brand small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gg-sidebar-brand small {
    font-size: var(--gg-fs-xs);
    color: #94a3b8;
    margin-top: 2px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gg-nav {
    display: grid;
    gap: 2px;
    overflow: auto;
    padding-right: 2px;
    align-content: start;
}

.gg-nav-group {
    font-size: var(--gg-fs-xs);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #64748b;
    font-weight: 800;
    padding: var(--gg-s4) var(--gg-s3) 6px;
}

.gg-nav-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    text-align: left;
    padding: 10px var(--gg-s3);
    border-radius: var(--gg-r-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--gg-s3);
    font-size: var(--gg-fs-md);
    font-weight: 650;
    position: relative;
    transition: background var(--gg-dur) var(--gg-ease), color var(--gg-dur) var(--gg-ease);
}

.gg-nav-item > span:first-child {
    width: 22px;
    text-align: center;
    color: #8da2bd;
    font-size: 1rem;
    flex: none;
}

.gg-nav-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

.gg-nav-item.is-active {
    background: color-mix(in srgb, var(--gg-brand) 88%, #000);
    color: #fff;
    box-shadow: var(--gg-shadow-sm);
}

.gg-nav-item.is-active > span:first-child {
    color: #fff;
}

.gg-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: var(--gg-s1);
    padding: var(--gg-s3) var(--gg-s2) 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.gg-nav-link {
    font-size: var(--gg-fs-sm);
    color: #94a3b8;
    padding: 7px var(--gg-s2);
    border-radius: var(--gg-r-sm);
}

.gg-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.gg-app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gg-app-topbar {
    min-height: var(--gg-topbar-h);
    background: color-mix(in srgb, var(--gg-surface) 86%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gg-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gg-s2) var(--gg-s6);
    position: sticky;
    top: 0;
    z-index: 35;
    gap: var(--gg-s4);
}

.gg-context-block {
    display: flex;
    align-items: center;
    gap: var(--gg-s3);
    min-width: 0;
    flex: 1; /* le contexte gare garde la place ; les actions ne s'étirent pas */
}

.gg-topbar-actions {
    flex: none;
}

.gg-context-label {
    font-size: var(--gg-fs-xs);
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--gg-text-muted);
    font-weight: 800;
}

.gg-station-switcher {
    display: flex;
    align-items: center;
    gap: var(--gg-s2);
    min-width: 0;
}

.gg-station-switcher > strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gg-station-switcher > span {
    font-size: var(--gg-fs-sm);
    color: var(--gg-text-muted);
}

.gg-context-menu {
    position: relative;
}

.gg-context-menu summary {
    list-style: none;
    cursor: pointer;
    font-size: var(--gg-fs-xs);
    color: var(--gg-brand);
    font-weight: 800;
    padding: 6px 10px;
    border: 1px solid var(--gg-brand-border);
    border-radius: var(--gg-r-pill);
    background: var(--gg-brand-soft);
}

.gg-context-menu summary::-webkit-details-marker {
    display: none;
}

.gg-context-popover {
    position: absolute;
    top: 36px;
    left: 0;
    min-width: 260px;
    background: var(--gg-surface);
    border: 1px solid var(--gg-border);
    box-shadow: var(--gg-shadow-lg);
    border-radius: var(--gg-r-md);
    padding: 6px;
    display: grid;
    z-index: 100;
    max-height: 320px;
    overflow: auto;
}

.gg-context-popover a {
    padding: 10px var(--gg-s3);
    border-radius: var(--gg-r-sm);
    font-size: var(--gg-fs-sm);
}

.gg-context-popover a:hover {
    background: var(--gg-brand-soft);
    color: var(--gg-text);
}

.gg-user-meta {
    text-align: right;
    line-height: 1.3;
}

.gg-user-meta strong {
    display: block;
    font-size: var(--gg-fs-md);
}

.gg-user-meta span {
    display: block;
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    text-transform: capitalize;
}

.gg-workspace {
    padding: var(--gg-s6);
    max-width: 1580px;
    width: 100%;
    margin: auto;
    flex: 1;
}

.gg-heading-actions {
    display: flex;
    gap: var(--gg-s2);
    flex-wrap: wrap;
}

.gg-content {
    display: grid;
    gap: var(--gg-s5);
    align-content: start;
}

/* --- Billetterie : plan de sièges --- */

.gg-seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
    gap: var(--gg-s2);
}

.gg-seat {
    border: 1px solid var(--gg-border-strong);
    background: var(--gg-surface);
    color: var(--gg-text);
    border-radius: var(--gg-r-md);
    padding: 9px 6px;
    min-height: var(--gg-tap);
    cursor: pointer;
    text-align: center;
    font-size: var(--gg-fs-sm);
    font-weight: 800;
    line-height: 1.25;
    transition: transform var(--gg-dur) var(--gg-ease), border-color var(--gg-dur) var(--gg-ease), background var(--gg-dur) var(--gg-ease);
}

.gg-seat small {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--gg-text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gg-seat:hover:not(:disabled) {
    border-color: var(--gg-brand);
    transform: translateY(-1px);
}

.gg-seat.is-selected {
    background: var(--gg-brand);
    color: var(--gg-brand-ink);
    border-color: var(--gg-brand);
}

.gg-seat.is-selected small {
    color: rgba(255, 255, 255, .85);
}

.gg-seat.is-unavailable,
.gg-seat:disabled {
    background: var(--gg-surface-muted);
    color: var(--gg-text-muted);
    cursor: not-allowed;
    border-style: dashed;
}

.gg-seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gg-s4);
    font-size: var(--gg-fs-xs);
    color: var(--gg-text-muted);
    margin-bottom: var(--gg-s3);
}

.gg-seat-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gg-seat-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid var(--gg-border-strong);
    background: var(--gg-surface);
}

.gg-seat-legend i.is-selected {
    background: var(--gg-brand);
    border-color: var(--gg-brand);
}

.gg-seat-legend i.is-unavailable {
    background: var(--gg-surface-muted);
    border-style: dashed;
}

/* ======================================================== 6. RESPONSIVE === */

/* Déclaré avant les media queries : sinon cette règle écraserait l'affichage
   du bouton de menu mobile (même spécificité, la dernière l'emporte). */
.gg-mobile-only {
    display: none;
}

@media (max-width: 1100px) {
    .gg-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .gg-app-layout {
        grid-template-columns: 1fr;
    }

    .gg-sidebar {
        position: fixed;
        left: calc(var(--gg-sidebar-w) * -1 - 20px);
        width: var(--gg-sidebar-w);
        box-shadow: var(--gg-shadow-lg);
        transition: left var(--gg-dur) var(--gg-ease);
    }

    .gg-sidebar.is-open {
        left: 0;
    }

    .gg-mobile-only {
        display: inline-grid;
    }

    .gg-workspace {
        padding: var(--gg-s5);
    }

    .gg-user-meta {
        display: none;
    }

    .gg-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .gg-auth-page {
        padding: 0;
        background: var(--gg-surface);
    }

    .gg-auth-shell {
        grid-template-columns: 1fr;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        border: 0;
    }

    .gg-auth-brand {
        padding: var(--gg-s8) var(--gg-s6) var(--gg-s6);
        gap: var(--gg-s3);
    }

    .gg-auth-brand h1 {
        font-size: 1.75rem;
        max-width: none;
    }

    .gg-auth-brand p,
    .gg-auth-points {
        display: none;
    }

    .gg-auth-card {
        padding: var(--gg-s8) var(--gg-s5);
    }

    .gg-page {
        padding: var(--gg-s6) var(--gg-s4) var(--gg-s10);
    }

    .gg-topbar {
        padding: 0 var(--gg-s4);
    }

    .gg-page-heading-inline {
        display: block;
    }

    .gg-heading-actions {
        margin-top: var(--gg-s4);
    }

    .gg-grid-3,
    .gg-form-grid {
        grid-template-columns: 1fr;
    }

    .gg-app-topbar {
        padding: var(--gg-s2) var(--gg-s4);
    }

    .gg-workspace {
        padding: var(--gg-s4) var(--gg-s3) var(--gg-s8);
    }

    .gg-context-label {
        display: none;
    }

    .gg-station-switcher > span {
        display: none;
    }

    .gg-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gg-panel-body {
        padding: var(--gg-s4);
    }

    .gg-kv-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    /* Sur téléphone, le tableau défile horizontalement plutôt que d'empiler
       chaque cellule sur plusieurs lignes : les lignes restent lisibles. */
    .gg-table td,
    .gg-table th {
        white-space: nowrap;
        padding: 10px var(--gg-s3);
    }

    .gg-toast-region {
        right: var(--gg-s3);
        left: var(--gg-s3);
        bottom: var(--gg-s3);
        max-width: none;
    }
}

@media (max-width: 440px) {
    .gg-metrics {
        grid-template-columns: 1fr;
    }

    .gg-user-chip {
        display: none;
    }

    /* Sous 440px, le contexte gare passe sur sa propre ligne : le nom de la gare
       reste lisible au lieu d'être tronqué par les actions. */
    .gg-app-topbar {
        flex-wrap: wrap;
        row-gap: var(--gg-s2);
        padding-bottom: var(--gg-s2);
    }

    .gg-app-topbar > .gg-context-block {
        order: 3;
        flex-basis: 100%;
    }

    .gg-button {
        padding: 10px 12px;
    }
}

/* ======================================================== 7. IMPRESSION === */

@media print {
    .gg-sidebar,
    .gg-app-topbar,
    .gg-topbar,
    .gg-heading-actions,
    .gg-toast-region,
    .gg-table-toolbar,
    .gg-button {
        display: none !important;
    }

    .gg-app-layout {
        grid-template-columns: 1fr;
    }

    .gg-panel {
        border-color: #999;
        box-shadow: none;
        break-inside: avoid;
    }

    body {
        background: #fff;
        color: #000;
    }
}
