/*
 * Project Finance — styles for our own Blade views inside the Filament panel.
 *
 * Filament 5 ships prebuilt CSS that only contains the classes Filament itself uses
 * (fi-*), and this app has no Tailwind/Vite build. Tailwind utilities written in our
 * views (grid, absolute, text-sm, bg-primary-500, …) therefore generate no CSS at all.
 * Our views use the plain classes below instead. This file is static (no build step)
 * and is linked on every panel page from AdminPanelProvider (STYLES_AFTER hook).
 *
 * Colours come from Filament's CSS variables (--gray-*, --primary-*, --success-*,
 * --danger-*), so they follow the panel palette; dark mode is the `.dark` class on <html>.
 */

/* ---------- Shared ---------- */
.pf-text-sm { font-size: .875rem; line-height: 1.25rem; }
.pf-muted { color: var(--gray-500); }
.dark .pf-muted { color: var(--gray-400); }
.pf-error { font-size: .875rem; line-height: 1.25rem; color: var(--danger-600); }
.dark .pf-error { color: var(--danger-400); }
.pf-strong { font-weight: 600; }
.pf-stack-sm > * + * { margin-top: .25rem; }
.pf-stack > * + * { margin-top: .75rem; }
.pf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.pf-toolbar label { font-size: .875rem; font-weight: 500; }
.pf-toolbar .fi-input-wrp { width: auto; }
.pf-note { border-radius: .5rem; background: var(--gray-50); padding: .75rem; font-size: .875rem; line-height: 1.25rem; }
.dark .pf-note { background: rgba(255, 255, 255, .05); }
.pf-note-meta { font-size: .75rem; line-height: 1rem; color: var(--gray-500); }
.pf-note-body { margin-top: .25rem; white-space: pre-line; }
.pf-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; font-size: .875rem; line-height: 1.25rem; margin: 0; }
.pf-dl dt { color: var(--gray-500); }
.dark .pf-dl dt { color: var(--gray-400); }
.pf-dl dd { margin: 0; font-weight: 600; }
.pf-dl .pf-dl-wide { grid-column: 1 / -1; }
.pf-dl .pf-dl-wide dd { font-weight: 400; }
@media (min-width: 768px) { .pf-dl { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-cell-pad { padding: .75rem; }
.pf-cell-pad-y { padding: 1rem .75rem; }
.pf-icon-lg { width: 2rem; height: 2rem; }

/* =====================================================================
 * Density pass (all projects): smaller type scale on desktop, compact table rows,
 * a lighter page header, left-aligned tab bars with the inner tabs as an underline.
 * Phones keep the 16 px root (inputs under 16 px make iOS zoom in).
 * ===================================================================== */
@media (min-width: 1024px) {
    html { font-size: 15px; }
}
.fi-header-heading { font-size: 1.5rem; line-height: 2rem; }
@media (min-width: 640px) { .fi-header-heading { font-size: 1.625rem; line-height: 2.125rem; } }
.fi-page-header-main-ctn { row-gap: 1rem; }

/* Table rows: 2.5 instead of 4 spacing units top and bottom; header cells match. */
.fi-ta-text:not(.fi-inline), .fi-ta-text { padding-block: calc(var(--spacing) * 2.5); }
.fi-ta-header-cell { padding-block: calc(var(--spacing) * 2.5); }
.fi-ta-icon:not(.fi-inline), .fi-ta-toggle:not(.fi-inline), .fi-ta-image:not(.fi-inline) { padding-block: calc(var(--spacing) * 2); }
.fi-ta-text-description, .fi-ta-text .fi-ta-text-description { font-size: .8125rem; }

/* Top tab bars start on the left, like the content under them. */
.fi-page-sub-navigation-tabs.fi-tabs:not(.fi-contained) { margin-inline: 0; width: fit-content; max-width: 100%; padding: calc(var(--spacing) * 1); }
.fi-page-sub-navigation-tabs .fi-tabs-item { padding-block: calc(var(--spacing) * 1.5); }
/* Tabs inside a page (Pré-lancement / En cours sections): an underline, not a second floating pill bar. */
.fi-page .fi-sc-tabs > .fi-tabs:not(.fi-contained) {
    margin-inline: 0; padding: 0; border-radius: 0; background: transparent; box-shadow: none;
    border-bottom: 1px solid var(--gray-200); gap: calc(var(--spacing) * 4);
}
.dark .fi-page .fi-sc-tabs > .fi-tabs:not(.fi-contained) { background: transparent; border-bottom-color: rgba(255, 255, 255, .1); }
.fi-page .fi-sc-tabs > .fi-tabs:not(.fi-contained) .fi-tabs-item { border-radius: 0; padding-inline: 0; padding-block: calc(var(--spacing) * 2); margin-bottom: -1px; border-bottom: 2px solid transparent; background: transparent; }
.fi-page .fi-sc-tabs > .fi-tabs:not(.fi-contained) .fi-tabs-item.fi-active { border-bottom-color: var(--primary-600); background: transparent; }
.dark .fi-page .fi-sc-tabs > .fi-tabs:not(.fi-contained) .fi-tabs-item.fi-active { border-bottom-color: var(--primary-400); }
.fi-page .fi-sc-tabs .fi-sc-tabs-tab.fi-active { margin-top: calc(var(--spacing) * 4); }

/* Long names: one line with an ellipsis, the full name in the title. */
.ga-truncate { display: inline-block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Level tag: neutral, not one more coloured badge. */
.ga-level, .pf-lead-level { display: inline-block; padding: 0 .375rem; border-radius: .375rem; border: 1px solid var(--gray-300); color: var(--gray-700); font-size: .75rem; line-height: 1.125rem; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.dark .ga-level, .dark .pf-lead-level { border-color: rgba(255, 255, 255, .2); color: var(--gray-200); }

/* ---------- Relation-manager tabs: instant placeholder while the clicked tab loads ---------- */
.pf-tabs-loading > .fi-sc-tabs-tab { display: none; }
.pf-tabs-loading::after {
    content: "";
    display: block;
    height: 8rem;
    margin-top: 1.5rem;
    border-radius: .75rem;
    background: var(--gray-100);
    animation: pf-pulse 1.2s ease-in-out infinite;
}
.dark .pf-tabs-loading::after { background: rgba(255, 255, 255, .05); }
@keyframes pf-pulse { 50% { opacity: .5; } }

/* ---------- Go Allemagne "Site web" page ---------- */
.pf-site-intro { margin: 1rem 0; }
.pf-site-retry { margin-top: .75rem; }
.pf-site-loading { justify-content: center; padding: 3rem 0; color: var(--gray-500); font-size: .875rem; }
.pf-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8125rem; }
.pf-link { color: var(--primary-600); text-decoration: underline; }
.dark .pf-link { color: var(--primary-400); }
.pf-faq-list { list-style: none; margin: 0; padding: 0; }
.pf-faq-item { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 0; border-top: 1px solid var(--gray-200); }
.pf-faq-item:first-child { border-top: 0; padding-top: 0; }
.dark .pf-faq-item { border-color: rgba(255, 255, 255, .1); }
.pf-faq-move { display: flex; flex-direction: column; flex-shrink: 0; }
.pf-faq-body { flex: 1 1 0%; min-width: 0; }
.pf-faq-other[dir="rtl"] { text-align: right; }
.pf-faq-answer { margin-top: .25rem; }
.pf-faq-other { margin-top: .25rem; color: var(--gray-600); }
.dark .pf-faq-other { color: var(--gray-300); }
.pf-faq-actions { display: flex; align-items: center; gap: .25rem; flex-shrink: 0; }
.pf-faq-state { min-width: 3.5rem; margin-right: .25rem; }
.pf-faq-toggle { position: relative; width: 2.25rem; height: 1.25rem; border-radius: 9999px; background: var(--gray-200); transition: background .15s; flex-shrink: 0; cursor: pointer; }
.dark .pf-faq-toggle { background: rgba(255, 255, 255, .1); }
.pf-faq-toggle--on, .dark .pf-faq-toggle--on { background: var(--primary-600); }
.pf-faq-toggle-dot { position: absolute; top: .125rem; left: .125rem; width: 1rem; height: 1rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.pf-faq-toggle--on .pf-faq-toggle-dot { transform: translateX(1rem); }
@media (max-width: 640px) {
    .pf-faq-item { flex-wrap: wrap; }
    .pf-faq-actions { width: 100%; justify-content: flex-end; }
}
.pf-video-upload { display: flex; flex-direction: column; gap: .5rem; padding: .875rem; border: 1px dashed var(--gray-300); border-radius: .75rem; }
.dark .pf-video-upload { border-color: rgba(255, 255, 255, .15); }
.pf-video-head { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pf-video-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.pf-video-input { font-size: .875rem; max-width: 100%; }
.pf-progress { height: .5rem; border-radius: 9999px; background: var(--gray-200); overflow: hidden; }
.dark .pf-progress { background: rgba(255, 255, 255, .1); }
.pf-progress-bar { height: 100%; background: var(--primary-600); transition: width .2s; }

/* Prerequisites missing in a popup (availability, group): red until filled. */
.pf-missing { border: 1px solid var(--danger-400) !important; background: var(--danger-50) !important; }
.pf-missing .fi-section-header-heading { color: var(--danger-700); }
.dark .pf-missing { border-color: color-mix(in oklab, var(--danger-500) 55%, transparent) !important; background: color-mix(in oklab, var(--danger-500) 10%, transparent) !important; }
.dark .pf-missing .fi-section-header-heading { color: var(--danger-300); }
.pf-field-missing .fi-input-wrp { box-shadow: 0 0 0 1.5px var(--danger-500) !important; }
.pf-field-missing .fi-fo-field-label-content { color: var(--danger-600); }
.dark .pf-field-missing .fi-fo-field-label-content { color: var(--danger-400); }
/* Availability editor: day chips and time presets wrap on phones. */
.pf-avail .fi-fo-toggle-buttons { flex-wrap: wrap; }

/* Go Allemagne: bank transfers waiting for the check (lead file, Payments board) */
.pf-transfer-line { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; margin-top: .5rem; font-size: .8125rem; }
.pf-transfer-line > .pf-muted:last-child { flex-basis: 100%; }
.pf-pay-to-verify { margin-top: .25rem; font-size: .75rem; line-height: 1rem; color: var(--warning-600); font-weight: 500; }
.dark .pf-pay-to-verify { color: var(--warning-400); }
.pf-pay-not-found { margin-top: .25rem; display: flex; }

/* Availability editor: the added ranges of a row, compact */
.pf-avail-ranges .fi-fo-repeater-item { box-shadow: none; }

/* Go Allemagne: WhatsApp not sent, the message ready for wa.me or to copy */
.pf-wa-fallback { display: flex; flex-direction: column; gap: .75rem; }
.pf-wa-text { width: 100%; font-size: .875rem; line-height: 1.375rem; padding: .625rem .75rem; border: 1px solid var(--gray-300); border-radius: .5rem; background: var(--gray-50); color: var(--gray-950); resize: vertical; white-space: pre-wrap; }
.dark .pf-wa-text { border-color: rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #fff; }
.pf-wa-preview { font-size: .875rem; line-height: 1.375rem; padding: .625rem .75rem; border: 1px solid var(--gray-200); border-radius: .5rem; background: var(--gray-50); color: var(--gray-950); overflow-wrap: anywhere; }
.dark .pf-wa-preview { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .05); color: #fff; }
.pf-wa-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---------- Signature Allemande ---------- */
.sa-file .pf-lead-dl .sa-wide, .pf-lead-file .pf-lead-dl .sa-wide { grid-column: 1 / -1; }
.sa-file .pf-lead-dl .sa-wide dd { font-weight: 400; white-space: pre-line; }
.sa-head-actions { margin-left: auto; display: inline-flex; gap: .5rem; }
.sa-subhead-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.sa-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; border-radius: .5rem; padding: .625rem .75rem; font-size: .875rem; background: var(--gray-50); }
.dark .sa-callout { background: rgba(255, 255, 255, .05); }
.sa-callout--warning { background: color-mix(in oklab, var(--warning-500) 12%, transparent); color: var(--warning-700); }
.dark .sa-callout--warning { color: var(--warning-300); }
.sa-items { list-style: none; margin: 0; padding: 0; }
.sa-items > * + * { margin-top: .5rem; }
.sa-item { border: 1px solid var(--gray-200); border-radius: .5rem; padding: .625rem .75rem; }
.dark .sa-item { border-color: rgba(255, 255, 255, .1); }
.sa-item > * + * { margin-top: .25rem; }
.sa-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .5rem; }
.sa-item-actions { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.sa-shots { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.sa-shots img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: .375rem; border: 1px solid var(--gray-200); }
.dark .sa-shots img { border-color: rgba(255, 255, 255, .1); }
.sa-list { list-style: none; margin: 0; padding: 0; }
.sa-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .625rem; padding: .375rem 0; border-bottom: 1px solid var(--gray-100); }
.dark .sa-list li { border-color: rgba(255, 255, 255, .06); }
.sa-warn { color: var(--warning-600); font-weight: 500; }
.dark .sa-warn { color: var(--warning-400); }
.sa-neg { color: var(--danger-600); }
.sa-pos { color: var(--success-600); }
.dark .sa-neg { color: var(--danger-400); }
.dark .sa-pos { color: var(--success-400); }
.sa-dl { margin-top: .75rem; }
.sa-notes { margin-top: .75rem; white-space: pre-line; }
.sa-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 768px) { .sa-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sa-card-line { display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: .875rem; margin: 0; }
.sa-card-line + .sa-card-line { margin-top: .375rem; }
.sa-link { color: var(--primary-600); }
.dark .sa-link { color: var(--primary-400); }
.sa-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 768px) { .sa-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sa-step { display: flex; flex-direction: column; gap: .125rem; border: 1px solid var(--gray-200); border-radius: .5rem; padding: .625rem .75rem; }
.dark .sa-step { border-color: rgba(255, 255, 255, .1); }
.sa-step:hover { background: var(--gray-50); }
.dark .sa-step:hover { background: rgba(255, 255, 255, .05); }
.sa-step-n { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.sa-step-label { font-size: .8125rem; color: var(--gray-500); }
.dark .sa-step-label { color: var(--gray-400); }
/* Signature Allemande phase 2: profit figures, breakdown table, order-taking window calendar. */
.sa-kpis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 768px) { .sa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sa-kpi { display: flex; flex-direction: column; gap: .125rem; border-radius: .75rem; padding: .875rem 1rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); outline: 1px solid rgba(3, 7, 18, .05); }
.dark .sa-kpi { background: var(--gray-900); outline-color: rgba(255, 255, 255, .1); }
.sa-kpi-label { font-size: .8125rem; font-weight: 500; color: var(--gray-500); }
.dark .sa-kpi-label { color: var(--gray-400); }
.sa-kpi-value { font-size: 1.5rem; line-height: 2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sa-kpi-hint { font-size: .75rem; color: var(--gray-500); }
.dark .sa-kpi-hint { color: var(--gray-400); }
.sa-breakdown { width: 100%; border-collapse: collapse; }
.sa-breakdown th { text-align: left; font-weight: 500; color: var(--gray-500); padding: .375rem .5rem; border-bottom: 1px solid var(--gray-200); }
.sa-breakdown td { padding: .375rem .5rem; border-bottom: 1px solid var(--gray-100); }
.sa-breakdown th:not(:first-child), .sa-breakdown td:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sa-breakdown tfoot td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--gray-300); }
.dark .sa-breakdown th { color: var(--gray-400); border-color: rgba(255, 255, 255, .1); }
.dark .sa-breakdown td { border-color: rgba(255, 255, 255, .06); }
.dark .sa-breakdown tfoot td { border-color: rgba(255, 255, 255, .15); }
.sa-window-line { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 .75rem; }
.sa-cal-months { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.sa-cal { width: 15rem; max-width: 100%; }
.sa-cal-title { font-size: .8125rem; font-weight: 600; margin-bottom: .375rem; }
.sa-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.sa-cal-wd { font-size: .6875rem; text-align: center; color: var(--gray-400); }
.sa-cal-day { position: relative; font-size: .75rem; text-align: center; line-height: 1.75rem; border-radius: .25rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.sa-cal-day sub { font-size: .5625rem; margin-left: 1px; }
.sa-cal-in { background: color-mix(in oklab, var(--primary-500) 22%, transparent); color: var(--gray-950); font-weight: 500; }
.dark .sa-cal-in { color: #fff; }
.sa-cal-shared { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--primary-500) 30%, transparent) 0 4px, color-mix(in oklab, var(--warning-500) 30%, transparent) 4px 8px); }
.sa-cal-today { outline: 2px solid var(--primary-600); outline-offset: -2px; }
.sa-cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; margin-top: .75rem; }
.sa-cal-key { display: inline-block; width: .875rem; height: .875rem; border-radius: .2rem; }
.sa-cal-key + .sa-cal-key, .sa-cal-legend .sa-cal-key:not(:first-child) { margin-left: .75rem; }

/* Signature Allemande phase 3: refused callout, clickable KPI (money held by livreurs). */
.sa-callout--danger { background: color-mix(in oklab, var(--danger-500) 12%, transparent); color: var(--danger-700); }
.dark .sa-callout--danger { color: var(--danger-300); }
a.sa-kpi--link { text-decoration: none; color: inherit; transition: outline-color .15s; }
a.sa-kpi--link:hover { outline-color: var(--primary-500); }

/* Go Allemagne: sign-up page versions (A/B test) */
.pf-ab-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.pf-ab-scroll { overflow-x: auto; }
.pf-ab-table td { vertical-align: middle; }
.pf-ab-name { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.pf-ab-url { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: .125rem; max-width: 22rem; overflow-wrap: anywhere; }
.pf-ab-weight { width: 5rem; display: inline-flex; }
.pf-ab-best td { background: color-mix(in oklab, var(--success-500) 8%, transparent); }
.pf-ab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .75rem; }
.pf-ab-notes { margin-top: .75rem; }
.pf-ab-notes > * + * { margin-top: .25rem; }
.pf-variant-badge { margin-left: .25rem; }
@media (max-width: 767px) {
    .pf-ab-url { max-width: none; justify-content: flex-end; }
    .pf-ab-table td:first-child .pf-ab-url { justify-content: flex-start; }
}

/* ---------- GA: sign-up page editor (texts left, live preview right) ---------- */
.ga-ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 1024px) { .ga-ed { grid-template-columns: minmax(20rem, 2fr) minmax(0, 3fr); } }
.ga-ed-form > * + * { margin-top: .75rem; }
.ga-ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.ga-ed-form > .ga-ed-bar { position: sticky; top: 4.5rem; z-index: 5; padding: .5rem .75rem; border-radius: .75rem; background: #fff; box-shadow: 0 0 0 1px rgba(3, 7, 18, .08); }
.dark .ga-ed-form > .ga-ed-bar { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.ga-ed-actions { display: flex; gap: .5rem; margin-left: auto; }
.ga-ed-locales { display: inline-flex; border-radius: .5rem; padding: .125rem; background: var(--gray-100); }
.dark .ga-ed-locales { background: rgba(255, 255, 255, .06); }
.ga-ed-tab { position: relative; padding: .25rem .75rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; color: var(--gray-600); }
.dark .ga-ed-tab { color: var(--gray-300); }
.ga-ed-tab--on { background: #fff; color: var(--gray-950); box-shadow: 0 1px 2px rgba(3, 7, 18, .1); }
.dark .ga-ed-tab--on { background: var(--gray-700); color: #fff; }
.ga-ed-dot { position: absolute; top: .25rem; right: .25rem; width: .375rem; height: .375rem; border-radius: 9999px; background: var(--warning-500); }
.ga-ed-dirty { font-size: .875rem; font-weight: 600; color: var(--warning-700); }
.dark .ga-ed-dirty { color: var(--warning-400); }
.ga-ed-fields > * + * { margin-top: 1rem; }
.ga-ed-field > * + * { margin-top: .375rem; }
.ga-ed-label { display: flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500; }
.ga-ed-state { font-size: .75rem; font-weight: 500; color: var(--warning-700); }
.dark .ga-ed-state { color: var(--warning-400); }
.ga-ed-saved { font-size: .75rem; font-weight: 500; color: var(--success-600); }
.dark .ga-ed-saved { color: var(--success-400); }
.ga-ed-textarea { resize: vertical; min-height: 4.5rem; }
.ga-ed-invalid .fi-input-wrp { box-shadow: 0 0 0 1px var(--danger-600); }
.ga-ed-image { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.ga-ed-image img { height: 6rem; max-width: 12rem; object-fit: cover; border-radius: .5rem; background: var(--gray-100); }
.ga-ed-image-actions { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1; }
.ga-ed-file { align-self: flex-start; cursor: pointer; padding: .375rem .75rem; border-radius: .5rem; font-size: .875rem; font-weight: 500; box-shadow: 0 0 0 1px rgba(3, 7, 18, .15); }
.dark .ga-ed-file { box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.ga-ed-file:hover { background: var(--gray-50); }
.dark .ga-ed-file:hover { background: rgba(255, 255, 255, .05); }
.ga-ed-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ga-ed-image-actions:has(.ga-ed-file-input:focus-visible) .ga-ed-file { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.ga-ed-preview { position: sticky; top: 4.5rem; display: flex; flex-direction: column; gap: .5rem; }
.ga-ed-stage { display: flex; justify-content: center; border-radius: .75rem; padding: .75rem; background: var(--gray-100); height: calc(100vh - 9rem); min-height: 32rem; }
.dark .ga-ed-stage { background: rgba(255, 255, 255, .04); }
.ga-ed-frame { width: 100%; height: 100%; border: 0; border-radius: .5rem; background: #fff; box-shadow: 0 1px 3px rgba(3, 7, 18, .15); }
.ga-ed-frame--phone { width: 390px; max-width: 100%; }
@media (max-width: 1023px) { .ga-ed-preview { position: static; } .ga-ed-stage { height: 80vh; } }
.pf-ab-edit { margin-left: .25rem; }

/* Stock livres (Devoiri): books, reorders, monthly sales. */
.stk-scroll { overflow-x: auto; }
.stk-table { font-size: .875rem; min-width: 46rem; }
.stk-table td { vertical-align: top; }
.stk-sub { font-size: .75rem; line-height: 1rem; color: var(--gray-500); margin-top: .125rem; }
.dark .stk-sub { color: var(--gray-400); }
.stk-actions { display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin-top: .375rem; }
.stk-big { font-size: 1.125rem; font-weight: 600; }
.stk-inactive { opacity: .55; }
.stk-line { display: inline-block; margin-right: 1rem; }
.stk-actions { align-items: center; }
.stk-left { color: var(--warning-600); font-weight: 500; }
.dark .stk-left { color: var(--warning-400); }
/* One-line status of the stock, above the books. */
.stk-summary { display: flex; flex-wrap: wrap; gap: .375rem; }
.stk-summary-item { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 9999px; font-size: .8125rem; font-weight: 500; background: #fff; box-shadow: 0 0 0 1px rgba(3, 7, 18, .08); }
.dark .stk-summary-item { background: rgba(255, 255, 255, .05); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.stk-dot { width: .5rem; height: .5rem; border-radius: 9999px; background: var(--gray-400); flex: none; }
.stk-tone-success .stk-dot { background: var(--success-500); }
.stk-tone-danger .stk-dot { background: var(--danger-500); }
.stk-tone-danger { color: var(--danger-700); }
.dark .stk-tone-danger { color: var(--danger-400); }
.stk-tone-info .stk-dot { background: var(--info-500); }
/* First visit: nothing configured yet. */
.stk-firstrun { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1rem 1.25rem; border-radius: .75rem; border: 1px dashed var(--primary-400); background: var(--primary-50); }
.dark .stk-firstrun { background: rgba(255, 255, 255, .03); border-color: var(--primary-600); }
.stk-firstrun > div { flex: 1 1 18rem; }
.stk-firstrun p + p { margin-top: .25rem; }

/* Exchange rates: lines with a missing or provisional rate. */
.pf-fx-note { font-size: .875rem; color: var(--gray-500); margin-bottom: .75rem; }
.pf-fx-list { font-size: .875rem; list-style: none; margin: 0; padding: 0; }
.pf-fx-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.dark .pf-fx-list li { border-color: rgba(255, 255, 255, .08); }
.pf-fx-count { color: var(--gray-500); white-space: nowrap; }
.pf-fx-badge { display: inline-block; margin-left: .375rem; padding: 0 .375rem; border-radius: .375rem; font-size: .7rem; font-weight: 600; }
.pf-fx-badge.is-missing { background: var(--danger-50); color: var(--danger-700); }
.pf-fx-badge.is-provisional { background: var(--warning-50); color: var(--warning-700); }
.dark .pf-fx-badge.is-missing { background: rgba(239, 68, 68, .15); color: var(--danger-300); }
.dark .pf-fx-badge.is-provisional { background: rgba(245, 158, 11, .15); color: var(--warning-300); }

/* Overview: projects of the month, extra rows (unassigned Meta, personal) and the total. */
.pf-ov-scroll { overflow-x: auto; }
.pf-ov-table { width: 100%; min-width: 40rem; font-size: .875rem; border-collapse: collapse; }
.pf-ov-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); padding: .5rem .75rem .5rem 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.pf-ov-table td { padding: .55rem .75rem .55rem 0; border-bottom: 1px solid rgba(0, 0, 0, .06); vertical-align: middle; }
.pf-ov-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-ov-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid rgba(0, 0, 0, .12); }
.dark .pf-ov-table th, .dark .pf-ov-table td { border-color: rgba(255, 255, 255, .08); }
.dark .pf-ov-table tfoot td { border-top-color: rgba(255, 255, 255, .16); }
.pf-ov-extra td { color: var(--gray-600); font-style: italic; }
.dark .pf-ov-extra td { color: var(--gray-400); }
.pf-ov-inactive td { opacity: .7; }
.pf-ov-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 9999px; margin-right: .4rem; vertical-align: middle; }
.pf-ov-name { font-weight: 600; }
a.pf-ov-name:hover { text-decoration: underline; }
.pf-ov-tag { margin-left: .375rem; font-size: .7rem; color: var(--gray-500); }
.pf-ov-foot { margin-top: .75rem; font-size: .75rem; color: var(--gray-500); }
.pf-ov-toggle { margin-left: .5rem; font-weight: 600; color: var(--primary-600); }
.dark .pf-ov-toggle { color: var(--primary-400); }
.pf-pos { color: var(--success-600); font-weight: 600; }
.pf-neg { color: var(--danger-600); font-weight: 600; }
.dark .pf-pos { color: var(--success-400); }
.dark .pf-neg { color: var(--danger-400); }

/* Agency client page (Rosa Media). */
.pf-cl-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
@media (min-width: 640px) { .pf-cl-head { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-cl-head dt { font-size: .75rem; color: var(--gray-500); }
.pf-cl-head dd { margin: 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-cl-contact { margin-top: .75rem; font-size: .875rem; }
.pf-cl-campaign { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; font-size: .875rem; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.dark .pf-cl-campaign { border-color: rgba(255, 255, 255, .08); }
/* ---------------------------------------------------------------- Accueil (GaInbox): key figures, then À faire */
.ga-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0; margin: 0; border: 1px solid var(--gray-200); border-radius: .75rem; background: #fff; overflow: hidden; }
.ga-kpi { padding: .75rem 1rem; border-left: 1px solid var(--gray-100); }
.ga-kpi:first-child { border-left: 0; }
.ga-kpi-label { font-size: .75rem; line-height: 1rem; color: var(--gray-500); }
.ga-kpi-value { margin: .125rem 0 0; font-size: 1.375rem; line-height: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gray-950); white-space: nowrap; }
.dark .ga-kpis { border-color: rgba(255, 255, 255, .1); background: var(--gray-900); }
.dark .ga-kpi { border-left-color: rgba(255, 255, 255, .06); }
.dark .ga-kpi-label { color: var(--gray-400); }
.dark .ga-kpi-value { color: #fff; }

@media (max-width: 640px) {
    .ga-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ga-kpi:nth-child(odd) { border-left: 0; }
    .ga-kpi:nth-child(n+3) { border-top: 1px solid var(--gray-100); }
    .ga-kpi-value { font-size: 1.125rem; }
}

/* Stock livres, simple layout: one books table (stacked cards on a phone), folded "Détails" and movements. */
.stk-books { font-size: .875rem; }
.stk-books td { vertical-align: top; }
.stk-books .stk-row-actions { width: 1%; }
.stk-books .stk-actions { margin-top: 0; justify-content: flex-end; flex-wrap: nowrap; }
.stk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.stk-monthly { min-width: 0; }
@media (max-width: 640px) {
    .stk-books thead { display: none; }
    .stk-books, .stk-books tbody, .stk-books tr, .stk-books td { display: block; width: 100%; }
    .stk-books tr { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; padding: .75rem; margin-bottom: .5rem; border: 1px solid var(--gray-200); border-radius: .5rem; }
    .dark .stk-books tr { border-color: rgba(255, 255, 255, .1); }
    .stk-books td, .stk-books td:not(:first-child) { padding: 0; border: 0; text-align: left; white-space: normal; }
    .stk-books td.stk-book { grid-column: 1 / -1; }
    .stk-books td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--gray-500); }
    .stk-books td.stk-row-actions { grid-column: 1 / -1; width: 100%; }
    .stk-books .stk-actions { justify-content: flex-start; flex-wrap: wrap; margin-top: .25rem; }
}
.stk-history { margin-top: .5rem; }
.stk-history-list { margin-top: .5rem; }
.stk-link { background: none; border: 0; padding: 0; font-size: .8125rem; color: var(--primary-600); cursor: pointer; }
.stk-link:hover { text-decoration: underline; }
.dark .stk-link { color: var(--primary-400); }
.stk-fold { border-radius: .75rem; background: #fff; box-shadow: 0 0 0 1px rgba(3, 7, 18, .05), 0 1px 2px rgba(0, 0, 0, .05); }
.dark .stk-fold { background: var(--gray-900); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.stk-fold-head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; width: 100%; padding: .75rem 1rem; background: none; border: 0; text-align: left; cursor: pointer; }
.stk-fold-title { font-weight: 600; font-size: .9375rem; }
.stk-fold-chevron { width: 1.25rem; height: 1.25rem; margin-left: auto; color: var(--gray-400); transition: transform .15s; }
.stk-fold-chevron-open { transform: rotate(180deg); }
.stk-fold-body { padding: 0 1rem 1rem; }
.stk-part + .stk-part { margin-top: 1.25rem; }
.stk-part-title { font-weight: 600; font-size: .875rem; margin-bottom: .375rem; }
.stk-moves { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.stk-move { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .625rem; padding: .375rem 0; border-bottom: 1px solid var(--gray-100); }
.dark .stk-move { border-color: rgba(255, 255, 255, .06); }
.stk-move-date { font-size: .75rem; min-width: 6.75rem; font-variant-numeric: tabular-nums; }
.stk-move-qty { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.5rem; }
.stk-pos { color: var(--success-600); }
.dark .stk-pos { color: var(--success-400); }
.stk-move-note { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.stk-more { margin-top: .5rem; }
[x-cloak] { display: none !important; }

/* Stock livres: where the books that left are (parcels) */
.stk-where { white-space: normal; }
.stk-chip { display: inline-block; margin: 0 .25rem .2rem 0; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; line-height: 1.4; border: 1px solid transparent; white-space: nowrap; }
.stk-chip-prep { background: rgb(254 243 199); color: rgb(146 64 14); border-color: rgb(253 230 138); }
.stk-chip-transit { background: rgb(219 234 254); color: rgb(30 64 175); border-color: rgb(191 219 254); }
.stk-chip-return { background: rgb(254 226 226); color: rgb(153 27 27); border-color: rgb(254 202 202); }
.stk-chip-done { background: rgb(220 252 231); color: rgb(22 101 52); border-color: rgb(187 247 208); }
.dark .stk-chip-prep { background: rgb(120 53 15 / .35); color: rgb(253 230 138); border-color: rgb(120 53 15); }
.dark .stk-chip-transit { background: rgb(30 58 138 / .35); color: rgb(191 219 254); border-color: rgb(30 58 138); }
.dark .stk-chip-return { background: rgb(127 29 29 / .35); color: rgb(254 202 202); border-color: rgb(127 29 29); }
.dark .stk-chip-done { background: rgb(20 83 45 / .35); color: rgb(187 247 208); border-color: rgb(20 83 45); }
/* ---------- Gestion: currency + EUR rate line (ProjectRate) ---------- */
.pf-rate-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .875rem; line-height: 1.25rem; color: var(--gray-500); }
.dark .pf-rate-line { color: var(--gray-400); }
.pf-rate-line.pf-rate-warn { color: var(--warning-700); font-weight: 500; }
.dark .pf-rate-line.pf-rate-warn { color: var(--warning-400); }
.pf-rate-btn { border: 1px solid var(--gray-300); border-radius: .375rem; padding: .0625rem .5rem; font-size: .75rem; line-height: 1.25rem; font-weight: 500; color: var(--gray-700); background: transparent; cursor: pointer; }
.pf-rate-btn:hover { background: var(--gray-50); }
.dark .pf-rate-btn { border-color: var(--gray-600); color: var(--gray-200); }
.dark .pf-rate-btn:hover { background: rgba(255, 255, 255, .05); }
.pf-rate-warn .pf-rate-btn { border-color: var(--warning-500); color: var(--warning-700); }
.dark .pf-rate-warn .pf-rate-btn { color: var(--warning-400); }

/* ---------------------------------------------------------------- Group file (GroupFile): one row of tabs, then compact rows */
.ga-grp-file-tabs { overflow-x: auto; scrollbar-width: thin; }
.ga-gf-rows { list-style: none; margin: 0 0 .75rem; padding: 0; }
.ga-gf-rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .5rem 0; border-bottom: 1px solid var(--gray-100); }
.ga-gf-rows > li:last-child { border-bottom: 0; }
.dark .ga-gf-rows > li { border-bottom-color: rgba(255, 255, 255, .06); }
.ga-gf-rows > li > .pf-muted { flex: 1 1 10rem; min-width: 0; }

/* ---------------------------------------------------------------- Virements à vérifier: one compact block per transfer */
.fi-ta-split .fi-ta-stack .fi-ta-text { padding-block: .125rem; }
.fi-ta-split .fi-ta-stack { row-gap: 0; }

/* ---------- Go Allemagne: Cours (phase 3) ---------- */
/* Seats: one cell per place — confirmed solid, held in Finance hatched, free outlined. The group's fill at a glance. */
.ga-seats { display: flex; flex-direction: column; gap: .375rem; }
.ga-seats-row { display: flex; flex-wrap: wrap; gap: 3px; }
.ga-seat { display: inline-block; width: .875rem; height: .875rem; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--gray-300); background: transparent; flex: none; }
.ga-seats--compact .ga-seat { width: .75rem; height: .75rem; }
.ga-seat--confirmed { background: var(--primary-600); box-shadow: none; }
.ga-seat--held { box-shadow: inset 0 0 0 1.5px var(--warning-500); background: repeating-linear-gradient(135deg, var(--warning-400) 0 2px, transparent 2px 4px); }
.dark .ga-seat { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.dark .ga-seat--confirmed { background: var(--primary-400); box-shadow: none; }
.ga-seats-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .875rem; margin: 0; font-size: .8125rem; line-height: 1.25rem; color: var(--gray-700); font-variant-numeric: tabular-nums; }
.ga-seats-legend > span { display: inline-flex; align-items: center; gap: .3125rem; }
.ga-seats-legend .ga-seat { width: .625rem; height: .625rem; }
.dark .ga-seats-legend { color: var(--gray-300); }

/* Potentiels banner */
.ga-suggest { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .25rem .75rem; align-items: start; padding: .75rem 1rem; border-radius: .75rem; background: var(--primary-50); border: 1px solid var(--primary-200); }
.dark .ga-suggest { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
.ga-suggest-icon { width: 1.375rem; height: 1.375rem; margin-top: .3125rem; color: var(--primary-600); }
.ga-suggest-list { list-style: none; margin: 0; padding: 0; }
.ga-suggest-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .375rem 1rem; padding: .3125rem 0; }
.ga-suggest-item + .ga-suggest-item { border-top: 1px solid var(--primary-100); }
.dark .ga-suggest-item + .ga-suggest-item { border-top-color: rgba(255, 255, 255, .08); }
.ga-suggest-text { font-size: .9375rem; line-height: 1.375rem; color: var(--gray-800); }
.dark .ga-suggest-text { color: var(--gray-100); }
.ga-suggest-more { grid-column: 2; justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-size: .8125rem; font-weight: 600; color: var(--primary-700); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dark .ga-suggest-more { color: var(--primary-400); }

/* Phase / view chips (Groupes: À venir · En cours · Terminés; Calendrier: Semaine · Liste · Horaires) */
.ga-phase-tabs { display: flex; gap: .375rem; overflow-x: auto; scrollbar-width: none; margin: .25rem 0 .125rem; }
.ga-phase-tab { display: inline-flex; align-items: center; gap: .4375rem; flex: none; padding: .375rem .875rem; border-radius: 9999px; border: 1px solid var(--gray-200); background: #fff; font-size: .875rem; font-weight: 500; color: var(--gray-700); text-decoration: none; }
.ga-phase-tab:hover { border-color: var(--gray-300); color: var(--gray-950); }
.ga-phase-tab:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.ga-phase-tab--active { background: var(--gray-950); border-color: var(--gray-950); color: #fff; }
.ga-phase-tab--active:hover { color: #fff; }
.ga-phase-tab--active .ga-grp-dot { box-shadow: 0 0 0 2px var(--gray-950), 0 0 0 3px rgba(255, 255, 255, .5); }
.ga-phase-tab .ga-grp-dot { width: .5rem; height: .5rem; }
.ga-phase-count { font-variant-numeric: tabular-nums; font-size: .8125rem; opacity: .7; }
.dark .ga-phase-tab { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .12); color: var(--gray-300); }
.dark .ga-phase-tab--active { background: #fff; border-color: #fff; color: var(--gray-950); }

/* Group cards */
.ga-cg-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.ga-cg-filters .fi-input-wrp { width: auto; min-width: 10rem; }
.ga-cg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1rem; align-items: stretch; }
.ga-cg-card { display: flex; flex-direction: column; gap: .875rem; padding: 1rem 1.125rem; border-radius: .75rem; background: #fff; border: 1px solid var(--gray-200); }
.dark .ga-cg-card { background: var(--gray-900); border-color: rgba(255, 255, 255, .1); }
.ga-cg-card-head { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ga-cg-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; line-height: 1.5rem; font-weight: 700; color: var(--gray-950); text-decoration: none; }
.ga-cg-name:hover, .ga-cg-name:focus-visible { color: var(--primary-700); text-decoration: underline; text-underline-offset: 3px; }
.dark .ga-cg-name { color: #fff; }
.ga-cg-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0; font-size: .875rem; line-height: 1.25rem; }
.ga-cg-facts dt { font-size: .75rem; color: var(--gray-500); }
.ga-cg-facts dd { margin: 0; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.dark .ga-cg-facts dd { color: var(--gray-100); }
.ga-cg-wide { grid-column: span 2; }
.ga-cg-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--gray-100); }
.dark .ga-cg-card-foot { border-top-color: rgba(255, 255, 255, .08); }
.ga-cg-students { display: flex; flex-wrap: wrap; gap: .25rem .375rem; margin: 0; padding: 0; list-style: none; font-size: .8125rem; line-height: 1.25rem; }
.ga-cg-students li { padding: 0 .5rem; border-radius: 999px; background: var(--gray-100); color: var(--gray-800); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-cg-students li.is-held { background: transparent; box-shadow: inset 0 0 0 1px var(--gray-300); color: var(--gray-600); }
.ga-cg-students li.is-unpaid::after { content: " •"; color: var(--warning-600); }
.ga-cg-students li.is-more { background: transparent; color: var(--gray-500); }
.dark .ga-cg-students li { background: rgba(255, 255, 255, .08); color: var(--gray-200); }
.dark .ga-cg-students li.is-held, .dark .ga-cg-students li.is-more { background: transparent; color: var(--gray-400); }
.ga-cg-empty { padding: 1.25rem; border-radius: .75rem; border: 1px dashed var(--gray-300); color: var(--gray-600); }

/* Group page */
.ga-gp { display: flex; flex-direction: column; gap: 1.25rem; }
.ga-gp-head { display: flex; flex-direction: column; gap: 1rem; padding: 1.125rem 1.25rem; border-radius: .875rem; background: #fff; border: 1px solid var(--gray-200); }
.dark .ga-gp-head { background: var(--gray-900); border-color: rgba(255, 255, 255, .1); }
.ga-gp-head-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1rem; }
.ga-gp-ident { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .625rem; min-width: 0; }
.ga-gp-level { font-size: .875rem; line-height: 1.375rem; padding: 0 .5rem; }
.ga-gp-title { margin: 0; font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -.01em; color: var(--gray-950); overflow-wrap: anywhere; }
.dark .ga-gp-title { color: #fff; }
.ga-gp-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ga-gp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .75rem 1.25rem; margin: 0; font-size: .875rem; line-height: 1.25rem; }
.ga-gp-facts dt { font-size: .75rem; color: var(--gray-500); margin-bottom: .125rem; }
.ga-gp-facts dd { margin: 0; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.dark .ga-gp-facts dd { color: var(--gray-100); }
.ga-gp-link { color: var(--primary-700); text-decoration: none; }
.ga-gp-link:hover, .ga-gp-link:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.dark .ga-gp-link { color: var(--primary-400); }
.ga-gp-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) { .ga-gp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ga-gp-col { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.ga-gp-rows { list-style: none; margin: 0; padding: 0; }
.ga-gp-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .625rem 0; }
.ga-gp-row + .ga-gp-row { border-top: 1px solid var(--gray-100); }
.dark .ga-gp-row + .ga-gp-row { border-top-color: rgba(255, 255, 255, .06); }
.ga-gp-row-main { min-width: 0; flex: 1 1 auto; }
.ga-gp-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; font-size: .875rem; line-height: 1.25rem; }
.ga-gp-row-meta { display: flex; flex-wrap: wrap; gap: 0 .75rem; margin-top: .125rem; font-size: .8125rem; line-height: 1.125rem; color: var(--gray-500); }
.ga-gp-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .375rem .75rem; }
.ga-gp-row--past .ga-gp-row-title { color: var(--gray-500); }
.ga-gp-row--cancelled .ga-gp-row-title > .pf-strong { text-decoration: line-through; }
.ga-gp-tel { color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.ga-gp-expired { color: var(--danger-600); font-weight: 600; }
.ga-gp-past-toggle { margin-bottom: .25rem; }
@media (max-width: 640px) {
    .ga-gp-head { padding: 1rem; }
    .ga-gp-title { font-size: 1.25rem; line-height: 1.75rem; }
    .ga-gp-head-actions { width: 100%; }
    .ga-gp-row { align-items: flex-start; }
    .ga-gp-row:has(.ga-gp-row-actions) { flex-direction: column; align-items: stretch; }
    .ga-gp-row-actions { justify-content: flex-start; }
}

/* Calendar session popover: next to the block, a bottom sheet on a phone */
.ga-pop-layer { position: fixed; inset: 0; z-index: 40; }
.ga-pop { position: fixed; width: 23rem; max-width: calc(100vw - 1rem); padding: .875rem 1rem 1rem; border-radius: .75rem; background: #fff; border: 1px solid var(--gray-200); box-shadow: 0 12px 32px -12px rgba(3, 7, 18, .35), 0 2px 6px rgba(3, 7, 18, .08); }
.dark .ga-pop { background: var(--gray-900); border-color: rgba(255, 255, 255, .12); }
.ga-pop--sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; border-radius: 1rem 1rem 0 0; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
.ga-pop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ga-pop-title { font-size: 1rem; line-height: 1.375rem; font-weight: 700; color: var(--gray-950); overflow-wrap: anywhere; }
.dark .ga-pop-title { color: #fff; }
.ga-pop-close { flex: none; width: 2rem; height: 2rem; margin: -.375rem -.5rem 0 0; border: 0; border-radius: .5rem; background: none; font-size: 1.375rem; line-height: 1; color: var(--gray-500); cursor: pointer; }
.ga-pop-close:hover, .ga-pop-close:focus-visible { background: var(--gray-100); color: var(--gray-900); }
.ga-pop-when { margin: .25rem 0 0; font-size: .875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gray-800); }
.dark .ga-pop-when { color: var(--gray-200); }
.ga-pop-meta { margin: .125rem 0 0; font-size: .8125rem; color: var(--gray-500); }
.ga-pop-actions { display: flex; flex-direction: column; gap: .5rem; margin-top: .875rem; }
.ga-pop-grid { display: flex; flex-wrap: wrap; gap: .375rem; }
.ga-pop-grid .fi-btn { flex: 1 1 auto; }
.ga-pop-actions .fi-btn { justify-content: center; }
.ga-pop-open { align-self: flex-start; margin-top: .125rem; font-size: .875rem; font-weight: 600; color: var(--primary-700); text-decoration: underline; text-underline-offset: 2px; }
.dark .ga-pop-open { color: var(--primary-400); }
@media (prefers-reduced-motion: no-preference) { .ga-pop--sheet { animation: ga-pop-up .16s ease-out; } }
@keyframes ga-pop-up { from { transform: translateY(1rem); opacity: 0; } to { transform: none; opacity: 1; } }

/* Teacher page */
.ga-teacher-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
@media (min-width: 1024px) { .ga-teacher-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ga-teacher-group { display: flex; flex-wrap: wrap; align-items: center; gap: .125rem .5rem; padding: .375rem 0; }
.ga-teacher-group + .ga-teacher-group { border-top: 1px solid var(--gray-100); }
.dark .ga-teacher-group + .ga-teacher-group { border-top-color: rgba(255, 255, 255, .06); }

/* ---------------------------------------------------------------- Administration (phase 4): Vue d'ensemble, Intégrations & paramètres */
.ga-ov-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.ga-ov-periods { margin: 0; }
.ga-ov-periods .ga-phase-tab { cursor: pointer; }
.ga-ov-range { margin: 0; font-size: .875rem; color: var(--gray-500); }
.ga-ov-block > * + * { margin-top: .625rem; }
.ga-ov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.ga-ov-heading { white-space: nowrap; margin: 0; font-size: 1rem; line-height: 1.5rem; font-weight: 600; color: var(--gray-950); }
.ga-ov-subheading { display: flex; align-items: center; gap: .25rem; margin: 0 0 .375rem; font-size: .875rem; font-weight: 600; color: var(--gray-950); }
.ga-ov-figures .ga-kpi-label { display: flex; align-items: center; gap: .25rem; }
.ga-ov-info { display: inline-flex; padding: 0; border: 0; background: none; color: var(--gray-400); cursor: help; border-radius: 9999px; }
.ga-ov-info:hover { color: var(--gray-600); }
.ga-ov-info:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 1px; }
.ga-ov-info-icon { width: .875rem; height: .875rem; }
.ga-ov-now { margin: .125rem 0 0; font-size: .6875rem; line-height: 1rem; color: var(--gray-400); }
.ga-ov-value--success { color: var(--success-700) !important; }
.ga-ov-value--danger { color: var(--danger-700) !important; }
.ga-ov-figures { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: 1px; background: var(--gray-200); }
.ga-ov-figures .ga-kpi { background: #fff; border: 0 !important; }
.dark .ga-ov-figures { background: rgba(255, 255, 255, .08); }
.dark .ga-ov-figures .ga-kpi { background: var(--gray-900); }
@media (max-width: 639px) {
    .ga-ov-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ga-ov-figures .ga-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .ga-ov-head { flex-wrap: wrap; gap: .25rem 1rem; }
}
.ga-ov-figures .ga-kpi-value { white-space: normal; }
.ga-ov-note { margin: 0; font-size: .8125rem; color: var(--gray-500); }
.ga-ov-balances { padding: .75rem 1rem; border: 1px solid var(--gray-200); border-radius: .75rem; background: #fff; }
.ga-ov-balance-list { margin: 0 0 .5rem; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .25rem 1.5rem; }
.ga-ov-balance { display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; padding: .25rem 0; border-bottom: 1px dashed var(--gray-200); }
.ga-ov-amount { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dark .ga-ov-heading, .dark .ga-ov-subheading { color: #fff; }
.dark .ga-ov-balances { background: var(--gray-900); border-color: rgba(255, 255, 255, .1); }
.dark .ga-ov-balance { border-bottom-color: rgba(255, 255, 255, .08); }
.dark .ga-ov-value--success { color: var(--success-400) !important; }
.dark .ga-ov-value--danger { color: var(--danger-400) !important; }
@media (max-width: 639px) {
    .ga-ov-range { width: 100%; }
}
.ga-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.ga-settings-foot { margin: .75rem 0 0; }
.ga-integrations { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; }
.ga-integration { padding: .75rem; border: 1px solid var(--gray-200); border-radius: .625rem; }
.ga-integration > * + * { margin-top: .375rem; }
.ga-integration-main { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ga-integration-name { font-weight: 600; font-size: .875rem; }
.ga-integration-detail { margin: 0; font-size: .8125rem; color: var(--gray-500); overflow-wrap: anywhere; }
.dark .ga-integration { border-color: rgba(255, 255, 255, .1); }

/* ---- Owner feedback 26/10/2026 ---------------------------------------------------------------------------- */
/* Due dates: the date in words + a small red "En retard" badge (never a number of days). */
.pf-late-badge, .pf-today-badge { display: inline-block; margin-left: .375rem; padding: 0 .375rem; border-radius: .375rem; font-size: .6875rem; line-height: 1.125rem; font-weight: 600; vertical-align: middle; white-space: nowrap; }
.pf-late-badge { color: var(--danger-700); background: var(--danger-50); box-shadow: inset 0 0 0 1px var(--danger-200); }
.pf-today-badge { color: var(--warning-700); background: var(--warning-50); box-shadow: inset 0 0 0 1px var(--warning-200); }
.dark .pf-late-badge { color: var(--danger-300); background: rgba(239, 68, 68, .12); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .3); }
.dark .pf-today-badge { color: var(--warning-300); background: rgba(245, 158, 11, .12); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .3); }
.pf-due { white-space: nowrap; }
.ga-task-due .pf-late-badge, .ga-task-due .pf-today-badge { margin-left: 0; margin-top: .125rem; }
.ga-task-due { display: flex; flex-direction: column; align-items: flex-start; }

/* Élèves & Ventes: "Regrouper par" chips. */
.pf-grouping { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.pf-grouping-label { font-size: .8125rem; color: var(--gray-500); margin-right: .25rem; }
.pf-grouping-chip { font-size: .8125rem; line-height: 1.25rem; padding: .125rem .625rem; border-radius: 999px; border: 1px solid var(--gray-200); background: transparent; color: var(--gray-700); cursor: pointer; }
.pf-grouping-chip:hover { background: var(--gray-50); }
.pf-grouping-chip.is-active { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.dark .pf-grouping-chip { border-color: rgba(255, 255, 255, .15); color: var(--gray-200); }
.dark .pf-grouping-chip:hover { background: rgba(255, 255, 255, .05); }
.dark .pf-grouping-chip.is-active { background: var(--primary-500); border-color: var(--primary-500); color: #fff; }

/* Dépenses par nature. */
.pf-kinds-table { font-size: .875rem; }
.pf-kinds-table tbody th, .pf-kinds-table tfoot th { text-align: left; font-weight: 500; padding: .3125rem .5rem; border-bottom: 1px solid var(--gray-100); color: inherit; }
.pf-kinds-table td { font-variant-numeric: tabular-nums; }
.pf-kinds-sub th { padding-left: 1.5rem !important; font-weight: 400 !important; color: var(--gray-500) !important; }
.pf-kinds-sub td { color: var(--gray-500); }
.pf-kinds-upcoming th, .pf-kinds-upcoming td { font-style: italic; color: var(--gray-500) !important; font-weight: 400 !important; }
.pf-kinds-tag { margin-left: .375rem; font-size: .6875rem; font-style: normal; padding: 0 .375rem; border-radius: .375rem; background: var(--gray-100); color: var(--gray-600); }
.pf-kinds-table tfoot th { font-weight: 600; }
.pf-kinds-in th, .pf-kinds-in td, .pf-kinds-result th, .pf-kinds-result td { border-top: 0 !important; }
.pf-kinds-pos { color: var(--success-600); } .pf-kinds-neg { color: var(--danger-600); }
.dark .pf-kinds-table tbody th, .dark .pf-kinds-table tfoot th { border-color: rgba(255, 255, 255, .06); }
.dark .pf-kinds-tag { background: rgba(255, 255, 255, .08); color: var(--gray-300); }
.dark .pf-kinds-pos { color: var(--success-400); } .dark .pf-kinds-neg { color: var(--danger-400); }
.ga-ov-kinds { max-width: 36rem; }

/* Finances: key totals strip, compact ledger tables. */
.pf-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.25rem; margin: 0; padding: .5rem .75rem; border-radius: .5rem; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--gray-200); font-size: .875rem; }
.pf-strip-period { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); }
.pf-strip-item { display: flex; gap: .375rem; align-items: baseline; }
.pf-strip-item dt { color: var(--gray-500); }
.pf-strip-item dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pf-strip-success { color: var(--success-600); } .pf-strip-danger { color: var(--danger-600); }
.dark .pf-strip { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.dark .pf-strip-success { color: var(--success-400); } .dark .pf-strip-danger { color: var(--danger-400); }
.pf-compact-table .fi-ta-cell { padding-top: .375rem; padding-bottom: .375rem; }
.pf-compact-table .fi-ta-cell > .fi-ta-col, .pf-compact-table .fi-ta-text { padding-top: 0; padding-bottom: 0; }
.pf-compact-table .fi-ta-text-item { font-variant-numeric: tabular-nums; }
.pf-compact-table .fi-ta-group-header { padding-top: .375rem; padding-bottom: .375rem; }
.pf-compact-table .fi-ta-summary-row-heading, .pf-compact-table .fi-ta-summary-header-cell { padding-top: .25rem; padding-bottom: .25rem; }
.pf-compact-table .fi-ta-row.fi-ta-summary-row td, .pf-compact-table .fi-ta-summary-row td { padding-top: .25rem; padding-bottom: .25rem; font-size: .8125rem; }
.pf-pay-table td, .pf-pay-table th { padding-top: .375rem; padding-bottom: .375rem; }
.pf-pay-table .ga-board-num { font-variant-numeric: tabular-nums; }

/* Sessions: "Rejoindre" / "Replay" / "Pas de replay". */
.pf-session-link { display: inline-flex; align-items: center; font-size: .75rem; line-height: 1.25rem; font-weight: 600; padding: 0 .5rem; border-radius: .375rem; white-space: nowrap; text-decoration: none; }
a.pf-session-link--join { color: #fff; background: var(--primary-600); }
a.pf-session-link--join:hover { background: var(--primary-500); }
a.pf-session-link--replay { color: var(--primary-700); box-shadow: inset 0 0 0 1px var(--primary-300); }
a.pf-session-link--replay:hover { background: var(--primary-50); }
.pf-session-link--none { color: var(--gray-500); font-weight: 500; }
.dark a.pf-session-link--replay { color: var(--primary-300); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.dark a.pf-session-link--replay:hover { background: rgba(255, 255, 255, .05); }
.ga-pop-link { margin: .25rem 0 .5rem; }
.ga-gp-row .pf-session-link, .ga-teacher-group .pf-session-link { margin-left: auto; }
.pf-kinds-table tfoot th, .pf-kinds-table tfoot td { border-top: 0; border-bottom: 1px solid var(--gray-100); }
.pf-kinds-table .pf-kinds-total th, .pf-kinds-table .pf-kinds-total td { border-top: 1px solid var(--gray-300); }
.dark .pf-kinds-table tfoot th, .dark .pf-kinds-table tfoot td { border-bottom-color: rgba(255, 255, 255, .06); }
.dark .pf-kinds-table .pf-kinds-total th, .dark .pf-kinds-table .pf-kinds-total td { border-top-color: rgba(255, 255, 255, .15); }
/* Compact ledgers: month subtotal and total as slim rows. */
.pf-compact-table .fi-ta-summary-row-heading-cell { padding-block: .375rem; font-size: .8125rem; color: var(--gray-600); }
.pf-compact-table .fi-ta-text-summary { padding-block: .375rem; row-gap: 0; color: var(--gray-700); font-weight: 600; }
.pf-compact-table .fi-ta-summary-row { background: var(--gray-50); }
.dark .pf-compact-table .fi-ta-summary-row { background: rgba(255, 255, 255, .02); }
.dark .pf-compact-table .fi-ta-text-summary { color: var(--gray-200); }
.pf-compact-table .fi-ta-group-header { padding-block: .3125rem; }
@media (max-width: 640px) {
    .pf-strip { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; }
    .pf-strip-period { grid-column: 1 / -1; }
    .pf-strip-item { flex-direction: column; gap: 0; }
    .pf-strip-item dt { font-size: .75rem; }
}
@media (max-width: 640px) {
    /* Phone: the compact ledgers fit the width (labels wrap), the amount stays in view. */
    .pf-compact-table .fi-ta-cell, .pf-compact-table .fi-ta-header-cell { white-space: normal !important; }
    .pf-compact-table .fi-ta-text, .pf-compact-table .fi-ta-text-item, .pf-compact-table .fi-ta-text-item-label { white-space: normal !important; overflow-wrap: anywhere; }
    .pf-compact-table .fi-ta-text { padding-inline: .5rem; }
    .pf-compact-table .fi-ta-text-summary { padding-inline: .5rem; }
    .pf-compact-table .fi-ta-summary-row-heading-cell { white-space: normal; }
}
@media (max-width: 640px) {
    .pf-compact-table .pf-nowrap, .pf-compact-table .pf-nowrap .fi-ta-text, .pf-compact-table .pf-nowrap .fi-ta-text-item { white-space: nowrap !important; overflow-wrap: normal; }
}
@media (max-width: 640px) {
    .pf-compact-table .pf-label-cell { min-width: 9.5rem; }
    .pf-compact-table .pf-label-cell .fi-ta-text-description, .pf-compact-table .pf-label-cell .fi-ta-text-item-description { white-space: nowrap; }
}
