/* ==========================================================================
   Toujours Au Poste — Gestion (logiciel interne d'Alexis)
   Base issue du logiciel Epicurador, aux couleurs du site : verts, crème,
   Plus Jakarta Sans (titres) + Inter (texte).
   ========================================================================== */
:root {
	--ink: #1a2e1f; --ink-soft: #3d4a42; --muted: #6b7280;
	--brand: #2d6a4f; --brand-deep: #1b4332; --brand-light: #74c69d;
	--accent: #7ba68a; --cream: #f5f0e8; --paper: #fafaf7; --white: #fff; --line: #e5ddd0;
	--green: #2d6a4f; --green-bg: #e7f2ec; --blue: #1f4f82; --blue-bg: #e6eef7;
	--amber: #8a5a00; --amber-bg: #fdf5e6; --red: #a3241b; --red-bg: #fbe8e6;
	--violet: #5b3a7a; --violet-bg: #efe8f5; --grey: #555b57; --grey-bg: #eceee9;
	--serif: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
	--sans: "Inter", "Segoe UI", system-ui, sans-serif;
	--r: 8px; --side: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.5 var(--sans); color: var(--ink); background: var(--paper); }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font: 700 1.8rem/1.15 var(--serif); letter-spacing: -.01em; }
h2 { font: 700 1.1rem/1.25 var(--serif); margin-bottom: .9rem; }
h3 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .3rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.gi { width: 18px; height: 18px; flex: none; }
.r { text-align: right; }
.g-muted { color: var(--muted); }
.g-red { color: var(--red); }

/* ---------- Coquille ---------- */
.g-side {
	position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30;
	background: var(--brand-deep); color: rgba(244, 237, 227, .8);
	display: flex; flex-direction: column; padding: 18px 12px;
}
.g-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: var(--cream); text-decoration: none; }
.g-brand img { width: 38px; height: auto; }
.g-brand span { font: 700 1rem/1.15 var(--serif); letter-spacing: -.01em; }
.g-brand small { display: block; font: 500 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-light); margin-top: 5px; }
.g-nav, .g-side__foot { display: flex; flex-direction: column; gap: 2px; }
.g-nav a, .g-side__foot a {
	display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r);
	color: inherit; text-decoration: none; font-size: .95rem;
}
.g-nav a:hover, .g-side__foot a:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
.g-nav a[aria-current], .g-side__foot a[aria-current] { background: var(--brand); color: var(--white); }
.g-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: var(--brand-light); color: var(--white); font-size: .75rem; text-align: center; }
.g-side__foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 10px; }
.g-user { font-size: .75rem; color: rgba(244, 237, 227, .5); padding: 8px 12px 0; margin: 0; }
.g-main { margin-left: var(--side); min-height: 100vh; }
.g-top { display: none; }
.g-content { padding: 28px clamp(16px, 3vw, 40px) 80px; max-width: 1320px; }
.g-flash { padding: 0 clamp(16px, 3vw, 40px); max-width: 1320px; }
.g-flash .g-msg:first-child { margin-top: 20px; }

/* ---------- En-têtes d'écran ---------- */
.g-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.g-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.g-sub { margin: 4px 0 0; color: var(--muted); }
.g-back { display: inline-block; font-size: .85rem; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.g-back:hover { color: var(--brand); }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.g-actions form { margin: 0; }

/* ---------- Boutons ---------- */
.g-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line);
	background: var(--white); color: var(--ink); font: 500 .9rem/1.2 var(--sans);
	text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.g-btn:hover { border-color: var(--ink-soft); }
.g-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--white); }
.g-btn--primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.g-btn--danger { color: var(--red); border-color: transparent; background: transparent; }
.g-btn--danger:hover { background: var(--red-bg); border-color: var(--red-bg); }
.g-btn--sm { padding: 6px 10px; font-size: .82rem; }
.g-btn--block { width: 100%; }
.g-btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.g-btn-row form { margin: 0; }
.g-icon-btn { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 6px; cursor: pointer; }
.g-icon-btn:hover { color: var(--red); background: var(--red-bg); }
.g-link { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; text-decoration: none; }

/* ---------- Messages ---------- */
.g-msg { padding: 11px 14px; border-radius: var(--r); background: var(--grey-bg); margin: 0 0 12px; }
.g-msg--ok { background: var(--green-bg); color: var(--green); }
.g-msg--err { background: var(--red-bg); color: var(--red); }
.g-alert { padding: 14px 16px; border-radius: var(--r); background: var(--amber-bg); color: var(--amber); margin-bottom: 20px; border-left: 4px solid var(--amber); }

/* ---------- Cartes & grilles ---------- */
.g-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 18px; }
.g-card--accent { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(45, 106, 79, .08); }
.g-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.g-cols--doc { grid-template-columns: 1fr 1.4fr; }
.g-cols--view { grid-template-columns: minmax(0, 1fr) 340px; }
.g-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g-narrow { max-width: 760px; }
.g-empty { color: var(--muted); padding: 10px 0; margin: 0; }
td.g-empty { padding: 28px 14px; text-align: center; }

.g-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.g-kpi { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.g-kpi:hover { border-color: var(--brand); }
.g-kpi span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.g-kpi strong { font: 700 1.6rem/1.15 var(--serif); color: var(--brand); }
.g-kpi small { color: var(--muted); }

.g-list { list-style: none; margin: 0; padding: 0; }
.g-list li + li { border-top: 1px solid var(--line); }
.g-list a { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 2px; text-decoration: none; color: var(--ink); }
.g-list a:hover strong { color: var(--brand); }
.g-list strong { font-weight: 500; }
.g-list span { flex: none; color: var(--muted); font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.g-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; }
.g-dl dt { color: var(--muted); font-size: .88rem; }
.g-dl dd { margin: 0; }
.g-message { white-space: normal; background: var(--paper); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font: 500 .75rem/1.6 var(--sans); white-space: nowrap; vertical-align: middle; }
.badge--grey { background: var(--grey-bg); color: var(--grey); }
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--blue { background: var(--blue-bg); color: var(--blue); }
.badge--amber { background: var(--amber-bg); color: var(--amber); }
.badge--red { background: var(--red-bg); color: var(--red); }
.badge--violet { background: var(--violet-bg); color: var(--violet); }

/* ---------- Tables ---------- */
.g-table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; }
.g-table th { text-align: left; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.g-table th.r { text-align: right; }
.g-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.g-table tbody tr:last-child td { border-bottom: 0; }
.g-table tbody tr:hover { background: #f7faf8; }
.g-table--plain td { padding: 9px 4px; }
.g-total td { font-weight: 600; border-top: 2px solid var(--ink); }
.g-strong { font-weight: 500; color: var(--ink); text-decoration: none; }
.g-strong:hover { color: var(--brand); text-decoration: underline; }
.g-thumb { width: 64px; }
.g-thumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--cream); display: block; }
.g-ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-inline { display: flex; gap: 6px; align-items: center; margin: 0; }
.g-stock { width: 64px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.g-stock.is-low { border-color: var(--amber); background: var(--amber-bg); }

/* ---------- Onglets & filtres ---------- */
.g-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.g-tabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.g-tabs a:hover { color: var(--ink); }
.g-tabs a[aria-current] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.g-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.g-filters input, .g-filters select { padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; background: var(--white); min-width: 240px; }

/* ---------- Formulaires ---------- */
.g-field { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--ink-soft); margin-bottom: 14px; min-width: 0; }
.g-field input, .g-field select, .g-field textarea,
.g-line input, .g-line select, .g-line textarea {
	width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r);
	background: var(--white); font: 400 .95rem/1.4 var(--sans); color: var(--ink);
}
.g-field input:focus, .g-field select:focus, .g-field textarea:focus, .g-line input:focus, .g-line select:focus, .g-line textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(45, 106, 79, .1); }
.g-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.g-row--3 { grid-template-columns: 1fr 2fr 1fr; }
.g-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: .92rem; cursor: pointer; }
.g-check input { margin-top: 3px; accent-color: var(--brand); }
.g-hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.g-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.g-seg label { padding: 8px 16px; cursor: pointer; }
.g-seg input { accent-color: var(--brand); margin-right: 6px; }
.g-seg label:has(input:checked) { background: var(--cream); color: var(--brand); }
.g-bar {
	position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px;
	padding: 14px 0; margin-top: 4px; background: linear-gradient(to top, var(--paper) 70%, transparent);
}
.g-bar .g-btn--danger { margin-right: auto; }
.g-photo img { width: 140px; border-radius: 8px; background: var(--cream); margin-bottom: 10px; }
.g-form-inline { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 12px; align-items: end; }
.g-form-inline .g-field { margin: 0; }

/* ---------- Éditeur de lignes ---------- */
.g-lines__head, .g-line { display: grid; grid-template-columns: minmax(0, 3fr) 60px 78px 84px 100px 72px 110px 36px; gap: 8px; align-items: start; }
.g-lines[data-franchise="1"] .g-lines__head, .g-lines[data-franchise="1"] .g-line { grid-template-columns: minmax(0, 3fr) 60px 78px 84px 100px 110px 36px; }
.g-lines[data-devis="1"] .g-lines__head, .g-lines[data-devis="1"] .g-line { grid-template-columns: minmax(0, 3fr) 60px 78px 84px 100px 72px 70px 120px 36px; }
.g-lines[data-devis="1"][data-franchise="1"] .g-lines__head, .g-lines[data-devis="1"][data-franchise="1"] .g-line { grid-template-columns: minmax(0, 3fr) 60px 78px 84px 100px 70px 120px 36px; }
.g-line [data-k="cat"] { color: var(--muted); }
.g-line__rec { display: flex; align-items: center; gap: 5px; padding-top: 9px; font-size: .82rem; color: var(--muted); cursor: pointer; }
.g-line__rec input { accent-color: var(--brand); width: 16px; height: 16px; }
.g-line.is-rec { background: linear-gradient(90deg, var(--green-bg), transparent 70%); border-radius: 6px; }
.g-line.is-rec .g-line__rec { color: var(--brand); font-weight: 600; }
.g-totals__mens { color: var(--brand); border-top: 1px dashed var(--line); }
.g-lines__head { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.g-line { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.g-line__desig { display: flex; flex-direction: column; gap: 6px; }
.g-line__desig textarea { font-size: .85rem; color: var(--ink-soft); resize: vertical; }
.g-line__tot { padding-top: 9px; font-weight: 500; white-space: nowrap; }
[data-add] { margin-top: 12px; }
.g-totals { margin: 16px 0 0 auto; max-width: 320px; }
.g-totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.g-totals__ttc { border-top: 2px solid var(--ink); margin-top: 4px; font-size: 1.1rem; }
.g-totals__ttc strong { color: var(--brand); }

/* ---------- Aperçu document ---------- */
.g-preview { background: #e8ece6; border-radius: 12px; padding: 20px; overflow-x: auto; }
.g-preview .doc { background: var(--white); padding: 34px 38px; box-shadow: 0 8px 30px rgba(0, 0, 0, .08); min-width: 620px; }
.g-panel .g-card { padding: 18px; }
.g-panel .g-card p { margin: 0 0 10px; }
.g-panel h2 { font-size: 1.15rem; }

/* ---------- Connexion ---------- */
.g-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 70% 30%, #2d6a4f, var(--brand-deep) 60%, #0d2219); }
.g-login__box { width: 100%; max-width: 380px; background: var(--paper); border-radius: 16px; padding: 34px 30px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 14px; }
.g-login__box img { width: 170px; margin: 0 auto 4px; }
.g-login__box h1 { text-align: center; font-size: 1.6rem; margin-bottom: 4px; }
.g-login__box label:not(.g-check) { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--ink-soft); }
.g-login__box input:not([type="checkbox"]) { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; }
.g-login__box .g-btn { padding: 12px; }
.g-login__lost { text-align: center; font-size: .85rem; color: var(--muted); }

/* ---------- Page client publique ---------- */
.g-public { background: #e8ece6; padding: 0 0 50px; }
.g-public__bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: var(--brand-deep); color: var(--cream); }
.g-public__accept { max-width: 800px; margin: 24px auto 0; padding: 0 16px; }
.g-accept { background: var(--white); border: 2px solid var(--brand); border-radius: 12px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.g-public__doc { max-width: 800px; margin: 24px auto 0; padding: 0 16px; overflow-x: auto; }
.g-public__doc .doc { background: var(--white); padding: 40px 44px; box-shadow: 0 10px 40px rgba(0, 0, 0, .08); min-width: 620px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.g-kpis { grid-template-columns: repeat(2, 1fr); }
	.g-cols--view { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.g-side { transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
	.g-side.is-open { transform: none; }
	.g-main { margin-left: 0; }
	.g-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: var(--brand-deep); }
	.g-top__brand { color: var(--cream); text-decoration: none; font: 700 .95rem/1 var(--serif); }
	.g-burger { background: none; border: 0; color: var(--cream); padding: 6px; cursor: pointer; }
	.g-cols, .g-cols--doc, .g-grid2 { grid-template-columns: 1fr; }
	.g-form-inline { grid-template-columns: 1fr; }
	.g-content { padding-top: 20px; }
	.g-lines__head { display: none; }
	.g-line, .g-lines[data-franchise="1"] .g-line, .g-lines[data-devis="1"] .g-line, .g-lines[data-devis="1"][data-franchise="1"] .g-line { grid-template-columns: 1fr 1fr 1fr; }
	.g-line__desig { grid-column: 1 / -1; }
	.g-line__tot { grid-column: 1 / 3; }
}
@media (max-width: 560px) {
	h1 { font-size: 1.6rem; }
	.g-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
	.g-kpi strong { font-size: 1.45rem; }
	.g-row, .g-row--3 { grid-template-columns: 1fr; }
	.g-filters input, .g-filters select { min-width: 0; width: 100%; }
	.g-head .g-actions { width: 100%; }
	.g-dl { grid-template-columns: 1fr; gap: 2px; }
	.g-dl dd { margin-bottom: 8px; }
	.g-accept { flex-direction: column; align-items: stretch; }
}


/* ==========================================================================
   Modules Toujours Au Poste : pipeline, historique, abonnements, finances
   ========================================================================== */
.g-mb { margin-bottom: 14px; }
.g-small { font-size: .85rem; }
.g-amber { color: var(--amber); }
.g-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.g-alert--red { background: var(--red-bg); color: var(--red); }
.g-alert a { color: inherit; font-weight: 600; }
.g-kpis--3 { grid-template-columns: repeat(3, 1fr); }
.g-kpi--hero { background: var(--brand-deep); border-color: var(--brand-deep); }
.g-kpi--hero span, .g-kpi--hero small { color: rgba(245, 240, 232, .78); }
.g-kpi--hero strong { color: var(--white); }
.g-kpi--hero:hover { border-color: var(--brand); }
.g-list strong small { display: block; font-weight: 400; font-size: .82rem; margin-top: 1px; }
.g-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.g-toolbar .g-hint { margin: 0; max-width: 760px; }
.g-head .g-filters { margin: 0; }

/* Pipeline en colonnes (défilement horizontal sur petit écran) */
.g-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.g-col { background: var(--cream); border-radius: 12px; padding: 10px; min-height: 140px; }
.g-col__head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; flex-wrap: wrap; }
.g-col__head small { margin-left: auto; }
.g-pcard { display: flex; flex-direction: column; gap: 3px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; text-decoration: none; color: var(--ink); font-size: .88rem; transition: border-color .15s, box-shadow .15s; }
.g-pcard:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(27, 67, 50, .08); }
.g-pcard strong { font-weight: 600; font-size: .95rem; }
.g-pcard small { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.g-pcard small .gi { width: 14px; height: 14px; }
.g-pcard.is-due { border-left: 3px solid var(--red); }

/* Entonnoir (accueil) */
.g-funnel__row { display: grid; grid-template-columns: 130px 40px 1fr; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.g-funnel__row:last-child { border-bottom: 0; }
.g-funnel__row:hover b { color: var(--brand); }
.g-funnel__row b { font: 700 1.1rem/1 var(--serif); text-align: right; }

/* Historique */
.g-timeline { list-style: none; margin: 0; padding: 0; }
.g-timeline__item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.g-timeline__item:last-child { border-bottom: 0; }
.g-timeline__item > .gi { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--grey-bg); color: var(--grey); }
.g-timeline__item--appel > .gi { background: var(--blue-bg); color: var(--blue); }
.g-timeline__item--email > .gi { background: var(--violet-bg); color: var(--violet); }
.g-timeline__item--rdv > .gi { background: var(--amber-bg); color: var(--amber); }
.g-timeline__item--etape > .gi { background: var(--green-bg); color: var(--green); }
.g-timeline__item p { margin: 2px 0 0; }
.g-btn-row--dates { margin: -4px 0 6px; }

/* Jauges de seuils */
.g-gauge { margin-bottom: 16px; }
.g-gauge__top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 6px; flex-wrap: wrap; }
.g-gauge__bar { height: 10px; border-radius: 99px; background: var(--grey-bg); overflow: hidden; margin-bottom: 4px; }
.g-gauge__bar i { display: block; height: 100%; border-radius: 99px; }
.g-gauge__bar .is-green { background: var(--brand); }
.g-gauge__bar .is-amber { background: #d99a1e; }
.g-gauge__bar .is-red { background: var(--red); }

/* Barres mensuelles (CSS pur) */
.g-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 170px; padding-top: 10px; }
.g-bars__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.g-bars__track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.g-bars__col > i, .g-bars__pair i { display: block; width: 100%; max-width: 34px; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; }
.g-bars__pair { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; flex: 1; }
.g-bars__pair i { max-width: 16px; }
.g-bars__pair i.is-out { background: var(--accent); opacity: .6; }
.g-bars__col small { font-size: .72rem; color: var(--muted); text-transform: capitalize; }
.g-legend { display: flex; gap: 14px; align-items: center; font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.g-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--brand); vertical-align: -1px; }
.g-dot.is-out { background: var(--accent); opacity: .6; }

/* URSSAF : formulaire repliable */
.g-details summary { list-style: none; display: inline-flex; }
.g-details summary::-webkit-details-marker { display: none; }
.g-form-mini { display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)) auto; gap: 8px; align-items: end; margin-top: 10px; }
.g-form-mini .g-field { margin: 0; }

/* Connexion */
.g-login__brand { text-align: center; font: 800 1.2rem/1 var(--serif); color: var(--brand-deep); margin: 8px 0 0; }
.g-login__box img { width: 64px; }

/* Impression (livre des recettes) */
.g-print-only { display: none; }
@media print {
	.g-side, .g-top, .g-head, .g-tabs, .g-toolbar, .g-flash { display: none !important; }
	.g-main { margin: 0; }
	.g-content { padding: 0; }
	.g-print-only { display: block; margin: 0 0 12px; }
	.g-table-wrap { border: 0; }
	body { background: #fff; }
}
@media (max-width: 900px) {
	.g-kpis--3 { grid-template-columns: 1fr; }
	.g-form-mini { grid-template-columns: 1fr 1fr; }
	.g-funnel__row { grid-template-columns: 110px 30px 1fr; }
	.g-board { grid-auto-columns: minmax(240px, 82vw); }
	.g-bars { gap: 3px; }
}

/* Les colonnes de grille ne doivent jamais être élargies par leur contenu (tableaux) */
.g-cols > *, .g-grid2 > * { min-width: 0; }

/* ---------- Projets & tickets ---------- */
.g-mt { margin-top: 12px; }
.g-projets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.g-pcard--projet { margin: 0; gap: 5px; padding: 14px 16px; }
.g-pcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.g-pcard__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.g-pcard--projet.has-tickets { border-left: 3px solid var(--red); }
.g-count--inline { display: inline-block; margin-left: 4px; }
.g-check--field { align-self: end; margin-bottom: 14px; }
.g-copy { display: flex; gap: 6px; }
.g-copy input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: .8rem/1.3 var(--sans); color: var(--ink-soft); background: var(--paper); }
.g-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-thread__msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.g-thread__msg p { margin: 4px 0 0; }
.g-thread__msg small { color: var(--muted); }
.g-thread__msg--equipe { align-self: flex-end; background: var(--green-bg); border-color: transparent; }
.g-thread__msg.is-interne { background: var(--amber-bg); border: 1px dashed #d9b46a; }
.g-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.g-support { min-height: 100vh; padding: 24px 16px 60px; }
.g-support__box { max-width: 640px; margin: 0 auto; background: var(--white); border-radius: 16px; padding: 28px clamp(18px, 4vw, 36px); box-shadow: 0 10px 40px rgba(0, 0, 0, .06); }
.g-support__brand { display: flex; align-items: center; gap: 10px; font: 800 1.05rem/1 var(--serif); color: var(--brand-deep); margin: 0 0 18px; }
.g-support h1 { font-size: 1.5rem; margin-bottom: 6px; }
.g-support .g-sub { margin-bottom: 18px; }
.g-dl code, .g-dl dd { overflow-wrap: anywhere; }
