@charset "utf-8";
@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("plus-jakarta-sans-latin.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}
:root {
	--fond: #f4f6fa;
	--surface: #ffffff;
	--surface-2: #eef1f7;
	--encre: #0f1733;
	--encre-2: #4f5a73;
	--filet: #dfe4ee;
	--marine: #0a1c55;
	--marine-texte: #e7ecfa;
	--marine-texte-2: #a9b5d9;
	--rouge: #ce1126;
	--ok: #1d7a4f;
	--ok-fond: #e3f3ea;
	--alerte: #a55a00;
	--alerte-fond: #fbefdc;
	--baisse: #b4232f;
	--baisse-fond: #fbe6e8;
	--m-aerocap: #1f6fd6;
	--m-slf: #2f8f3a;
	--m-chapiteaux: #8f3c85;
	--m-dragon: #e07a10;
	--grille: #e6eaf2;
	--ombre: 0 1px 2px rgba(15, 23, 51, .06), 0 8px 24px -16px rgba(15, 23, 51, .25);
	--police: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--fond: #0b1020;
		--surface: #121a33;
		--surface-2: #18213f;
		--encre: #e9edf8;
		--encre-2: #9aa6c4;
		--filet: #243058;
		--marine: #070d24;
		--marine-texte: #e7ecfa;
		--marine-texte-2: #8b97bd;
		--rouge: #ff5263;
		--ok: #4cc38a;
		--ok-fond: #12301f;
		--alerte: #f2a93b;
		--alerte-fond: #33240c;
		--baisse: #ff6b77;
		--baisse-fond: #3a1219;
		--m-aerocap: #5b9dff;
		--m-slf: #5cc46a;
		--m-chapiteaux: #d27fc7;
		--m-dragon: #ffa04a;
		--grille: #1d2748;
		--ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .7);
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--fond: #0b1020;
	--surface: #121a33;
	--surface-2: #18213f;
	--encre: #e9edf8;
	--encre-2: #9aa6c4;
	--filet: #243058;
	--marine: #070d24;
	--marine-texte: #e7ecfa;
	--marine-texte-2: #8b97bd;
	--rouge: #ff5263;
	--ok: #4cc38a;
	--ok-fond: #12301f;
	--alerte: #f2a93b;
	--alerte-fond: #33240c;
	--baisse: #ff6b77;
	--baisse-fond: #3a1219;
	--m-aerocap: #5b9dff;
	--m-slf: #5cc46a;
	--m-chapiteaux: #d27fc7;
	--m-dragon: #ffa04a;
	--grille: #1d2748;
	--ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .7);
}

html, body { height: 100%; }
body {
	background: var(--fond);
	color: var(--encre);
	font: 14px/1.5 var(--police);
}
* { box-sizing: border-box; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rouge); outline-offset: 2px; }

.appli { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100%; }

/* — Barre latérale — */
.lateral {
	background: var(--marine);
	color: var(--marine-texte);
	padding: 22px 14px;
	display: flex;
	flex-direction: column;
	gap: 26px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	overscroll-behavior: contain;
}
/* Barre de défilement discrète quand le menu dépasse la hauteur de l'écran. */
.lateral::-webkit-scrollbar { width: 8px; }
.lateral::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 99px; }
.lateral { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
.marque-appli { display: flex; align-items: center; gap: 10px; padding-inline: 8px; }
.marque-appli__a {
	width: 30px; height: 30px; border-radius: 8px; background: var(--rouge);
	display: grid; place-items: center;
}
.marque-appli__a svg { width: 16px; height: 16px; fill: #fff; }
.marque-appli b { font-weight: 800; letter-spacing: -.01em; font-size: 15px; }
.marque-appli small { display: block; color: var(--marine-texte-2); font-size: 11.5px; font-weight: 500; }
.nav { display: grid; gap: 2px; }
.nav button {
	all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
	padding: 9px 10px; border-radius: 8px; color: var(--marine-texte-2); font-weight: 600;
}
.nav button svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; flex: none; }
.nav button:hover { color: var(--marine-texte); background: rgba(255, 255, 255, .06); }
.nav button[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .11); }
.nav button:focus-visible { outline: 2px solid #fff; }
.lateral__pied { margin-top: auto; padding: 12px 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); font-size: 12px; color: var(--marine-texte-2); }
.lateral__pied strong { color: var(--marine-texte); display: block; margin-bottom: 2px; }

/* — Zone principale — */
.principal { min-width: 0; display: flex; flex-direction: column; }
.filtres {
	position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
	background: color-mix(in oklab, var(--fond) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--filet);
	padding: 12px 28px;
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
}
.filtres h1 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.filtres__titre { margin-right: auto; min-width: 0; }
/* Sur grand écran, les filtres restent en ligne : le conteneur et les commandes mobiles s'effacent. */
.filtres__corps { display: contents; }
.filtres__menu, .filtres__bascule, .filtres__resume { display: none; }
.champ { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--encre-2); font-weight: 600; }
.champ select {
	appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23889' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
	border: 1px solid var(--filet); border-radius: 8px; padding: 7px 28px 7px 10px; color: var(--encre); font-weight: 600;
}
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.puce {
	border: 1px solid var(--filet); background: var(--surface); border-radius: 999px; padding: 5px 11px 5px 9px;
	display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.puce i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.puce[aria-pressed="false"] { opacity: .45; }
.puce--tout { padding-inline: 12px; }
.puce--tout[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--surface); }
.puce--tout[aria-pressed="mixed"] { border-style: dashed; }
.sans-marque > :not(.info-marques) { display: none !important; }
.info-marques { background: var(--surface); border: 1px dashed var(--filet); color: var(--encre-2); padding: 14px 16px; border-radius: 10px; font-weight: 600; }
.interrupteur { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--encre-2); background: none; border: 0; padding: 0; }
.interrupteur span { width: 32px; height: 18px; border-radius: 99px; background: var(--filet); position: relative; transition: background .2s; }
.interrupteur span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.interrupteur[aria-pressed="true"] span { background: var(--encre); }
.interrupteur[aria-pressed="true"] span::after { transform: translateX(14px); }
.bouton {
	display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; padding: 8px 13px; cursor: pointer;
	border: 1px solid var(--encre); background: var(--encre); color: var(--surface); font-weight: 700; font-size: 12.5px;
}
.bouton svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.bouton--leger { background: var(--surface); color: var(--encre); border-color: var(--filet); }

.vue { padding: 24px 28px 48px; display: grid; gap: 18px; }
.vue[hidden] { display: none !important; }
.note { font-size: 12.5px; color: var(--encre-2); margin: -6px 0 0; }

.grille-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--filet); border-radius: 12px; padding: 16px 16px 10px; display: grid; gap: 4px; }
.kpi__lib { font-size: 12px; color: var(--encre-2); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.kpi__val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi__bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.kpi__bas canvas { width: 96px !important; height: 30px !important; }
.evol { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.evol--hausse { color: var(--ok); background: var(--ok-fond); }
.evol--baisse { color: var(--baisse); background: var(--baisse-fond); }
.evol--neutre { color: var(--encre-2); background: var(--surface-2); }
.kpi__n1 { font-size: 11.5px; color: var(--encre-2); }

.ligne { display: grid; gap: 14px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.ligne--egale { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.carte { background: var(--surface); border: 1px solid var(--filet); border-radius: 12px; padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.carte__tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.carte h2 { font-size: 14.5px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.carte__tete small { color: var(--encre-2); font-size: 12px; }
.carte__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lien-export { all: unset; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--encre-2); display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 6px; }
.lien-export:hover { color: var(--encre); background: var(--surface-2); }
.lien-export svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }
.recherche-tableau { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.recherche-tableau input { font: inherit; font-size: 13px; width: 220px; max-width: 46vw; border: 1px solid var(--filet); border-radius: 8px; padding: 6px 10px; background: var(--surface); color: var(--encre); }
.recherche-tableau input:focus { outline: 2px solid var(--rouge); outline-offset: 1px; border-color: transparent; }
.recherche-tableau__info { color: var(--encre-2); font-size: 12px; white-space: nowrap; }
.graph { position: relative; height: 280px; }
.graph canvas { max-width: 100%; }
.graph--bas { height: 230px; }

.tableau-boite { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--filet); white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); font-weight: 700; }
th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
th button:focus-visible { outline: 2px solid var(--rouge); }
th[aria-sort="ascending"] button::after { content: "▲"; font-size: 9px; }
th[aria-sort="descending"] button::after { content: "▼"; font-size: 9px; }
td.num, th.num { text-align: right; }
/* En-tête collé sous le bandeau des filtres (décalage posé par collerEntetes() dans app.js) :
   fond plein pour masquer les lignes qui passent dessous, au-dessus de la colonne figée sur téléphone. */
thead.colle > tr > * { position: relative; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--filet); will-change: transform; }
.tableau-boite thead.colle > tr > .fige { z-index: 3; }
/* Tableaux qui défilent dans leur propre boîte (simulation, import) : en-tête collé en CSS. */
.simu-boite thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--filet); }
.tableau-boite.simu-boite thead th.fige { top: 0; z-index: 3; }
/* Ligne survolée : teinte propre (≠ fond des détails dépliés), y compris dans les tableaux imbriqués. */
:root { --survol: color-mix(in oklab, var(--m-aerocap) 24%, var(--surface)); }
tbody > tr:hover > td, tbody > tr:hover > th { background: var(--survol); }
tbody > tr.detail-produits:hover > td { background: var(--surface-2); }
th.rang, td.rang { width: 1%; padding-right: 2px; color: var(--encre-2); font-size: 12px; }
.pastille { display: inline-flex; align-items: center; gap: 6px; }
.pastille i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.etat { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.etat--ok { color: var(--ok); background: var(--ok-fond); }
.etat--alerte { color: var(--alerte); background: var(--alerte-fond); }
.etat--neutre { color: var(--encre-2); background: var(--surface-2); }
.mono { font-family: var(--mono); font-size: 12px; }

.liste-simple { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.liste-simple li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.liste-rang li { padding: 4px 6px; border-radius: 6px; }
.liste-rang li:hover { background: var(--survol); }
.liste-rang .rang { display: inline-block; min-width: 2.2em; color: var(--encre-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.liste-rang .part { color: var(--encre-2); font-weight: 400; font-size: 11.5px; }
.liste-plus { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.liste-plus small { color: var(--encre-2); }
.barre { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; grid-column: 1 / -1; }
.barre span { display: block; height: 100%; background: var(--c, var(--encre)); border-radius: 99px; }

.toast {
	position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
	background: var(--encre); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13px;
	opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.bandeau-fictif {
	font-size: 12px; font-weight: 700; color: var(--alerte); background: var(--alerte-fond); border-radius: 99px;
	padding: 4px 10px;
}

@media (max-width: 1100px) {
	.grille-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ligne, .ligne--egale { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.vue { padding: 16px 12px 40px; gap: 14px; }
	.carte { padding: 14px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* — Ajouts de l'outil réel — */
body { margin: 0; }
.dates { display: none; gap: 6px; align-items: center; }
.dates.visible { display: inline-flex; }
.dates input {
	background: var(--surface); border: 1px solid var(--filet); border-radius: 8px; padding: 6px 8px;
	color: var(--encre); font: inherit; font-weight: 600; font-size: 12.5px;
}
.chargement .vue { opacity: .45; transition: opacity .15s; pointer-events: none; }
.erreur { background: var(--baisse-fond); color: var(--baisse); padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.vide { color: var(--encre-2); font-size: 13px; padding: 8px 0; }
.lateral__pied a { color: var(--marine-texte); }
.deconnexion { all: unset; cursor: pointer; text-decoration: underline; color: var(--marine-texte); margin-top: 6px; display: inline-block; }

/* — Page de connexion — */
.connexion { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.connexion form {
	width: min(380px, 100%); background: var(--surface); border: 1px solid var(--filet); border-radius: 14px;
	padding: 28px 26px; display: grid; gap: 14px; box-shadow: var(--ombre);
}
.connexion h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.connexion label { display: grid; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--encre-2); }
.connexion input {
	border: 1px solid var(--filet); border-radius: 8px; padding: 10px 11px; font: inherit; color: var(--encre); background: var(--surface);
}
.connexion .bouton { justify-content: center; padding: 11px; }
td.texte { white-space: normal; min-width: 240px; }
#t-activites th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--encre); }
#t-activites .ligne-activite td, #t-activites .ligne-activite th { background: var(--surface-2); font-weight: 700; }
#t-paniers tr.ligne-activite td { background: var(--surface-2); font-weight: 700; }
#t-paniers tr.ligne-activite:hover td { background: var(--survol); }
#t-paniers .note-cellule { color: var(--encre-2); font-weight: 400; font-size: 12px; }
#t-activites td.sous { padding-left: 30px; color: var(--encre-2); }
#t-activites tr.depliable, #t-produits tr.depliable { cursor: pointer; }
#t-activites tr.depliable:hover td, #t-activites tr.depliable:hover th, #t-activites tr.depliable:focus-visible td, #t-produits tr.depliable:hover td, #t-produits tr.depliable:focus-visible td { background: var(--survol); }
#t-activites tr.depliable > :first-child::before, #t-produits tr.depliable > :first-child::before { content: "▸"; display: inline-block; width: 1em; color: var(--encre-2); transition: transform .15s; }
#t-activites tr.depliable[aria-expanded="true"] > :first-child::before, #t-produits tr.depliable[aria-expanded="true"] > :first-child::before { transform: rotate(90deg); }
#t-activites tr.detail-produits > td, #t-produits tr.detail-produits > td { background: var(--surface-2); padding: 10px 14px 14px 30px; }
table.mini { width: 100%; font-size: 12.5px; border-collapse: collapse; }
table.mini th { text-align: left; font-size: 11px; color: var(--encre-2); font-weight: 600; padding: 4px 8px; }
table.mini td { padding: 5px 8px; border-top: 1px solid var(--filet); }
table.mini .num { text-align: right; }
.prix-date { display: block; font-size: 10.5px; font-weight: 400; color: var(--encre-2); white-space: nowrap; }
.lien-tous { margin-top: 8px; background: none; border: 0; padding: 0; color: var(--rouge); font-weight: 700; cursor: pointer; font-size: 12.5px; }
.filtre-actif { background: var(--surface); border: 1px solid var(--filet); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filtre-actif button { margin-left: auto; background: none; border: 1px solid var(--filet); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-weight: 600; font-size: 12px; }
#t-activites .ligne-total th, #t-activites .ligne-total td { font-weight: 800; border-top: 2px solid var(--encre); }

/* — Écran Budget — */
table.budget td, table.budget th { padding: 6px 6px; }
table.budget input {
	width: 100%; min-width: 70px; text-align: right; font-size: 13px; font: inherit; font-variant-numeric: tabular-nums;
	border: 1px solid var(--filet); border-radius: 6px; padding: 5px 6px; background: var(--surface); color: var(--encre);
}
table.budget input:disabled { border-color: transparent; background: transparent; color: var(--encre); }
table.budget input.modifie { border-color: var(--alerte); background: var(--alerte-fond); }
table.budget .reel td, table.budget .reel th { color: var(--encre-2); font-size: 12.5px; }
table.budget tr.ligne-activite th { text-align: left; }
table.budget-hebdo { min-width: 560px; }
table.budget-hebdo tbody th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--encre); }
table.budget-hebdo th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
table.budget-hebdo th[scope="row"] small { color: var(--encre-2); font-weight: 400; margin-left: 4px; }
table.budget-hebdo tr.ligne-activite th { text-align: left; padding-top: 16px; font-size: 14px; }
table.budget-hebdo tr.ligne-activite:first-child th { padding-top: 6px; }
table.budget-hebdo tr.ligne-activite--sous th { font-size: 13px; font-weight: 600; color: var(--encre-2); }
table.budget-hebdo tr.en-cours td, table.budget-hebdo tr.en-cours th { background: var(--surface-2); }
table.budget-hebdo .ligne-total th, table.budget-hebdo .ligne-total td { font-weight: 700; border-top: 1px solid var(--filet); }
table.budget-hebdo .ligne-total--complet th, table.budget-hebdo .ligne-total--complet td { font-weight: 600; color: var(--encre-2); border-top: 0; }
/* Objectifs (écran Budget) : la colonne « dont Allemagne » en retrait, comme sa ligne dans le tableau annuel. */
table.budget-objectifs .col-dont { color: var(--encre-2); }
table.budget tr.ligne-activite--sous th { color: var(--encre-2); font-weight: 600; }
table.budget th small { color: var(--encre-2); font-weight: 400; text-transform: none; letter-spacing: 0; }
table.budget-hebdo.chargement-local { opacity: .5; }
/* L'hebdo : un jour par ligne, une marque par colonne ; montant, puis « / objectif · % » en dessous. */
table.hebdo { min-width: 640px; }
table.hebdo th, table.hebdo td { padding-inline: 8px; }
table.hebdo thead th { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--encre); font-weight: 700; white-space: normal; vertical-align: bottom; }
table.hebdo thead th .pastille { justify-content: flex-end; }
table.hebdo thead th.col-dont { font-weight: 600; color: var(--encre-2); }
table.hebdo tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--encre); }
table.hebdo th small, table.hebdo td small { display: block; color: var(--encre-2); font-weight: 400; font-size: 12px; }
table.hebdo tbody th small { white-space: normal; max-width: 11em; }
table.hebdo td small.hebdo-qui { font-size: 11.5px; max-width: 13em; margin: 0 0 4px auto; white-space: normal; }
table.hebdo td b { font-variant-numeric: tabular-nums; }
table.hebdo td { font-variant-numeric: tabular-nums; }
.hebdo-pct { font-weight: 700; color: var(--encre); }
.hebdo-pct.atteint { color: var(--ok); }
table.hebdo tr.hebdo-jour--aujourdhui > * { background: var(--surface-2); }
table.hebdo tr.hebdo-jour--avenir > *, table.hebdo tr.hebdo-jour--repos > th, table.hebdo .hebdo-calme { color: var(--encre-2); }
table.hebdo .ligne-total > * { border-top: 2px solid var(--filet); }
table.hebdo .ligne-total td b { font-weight: 800; }
table.hebdo .hebdo-reste > * { background: var(--surface-2); border-top: 0; }
.budget-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.budget-actions__fin { margin-left: auto; display: inline-flex; gap: 12px; align-items: center; }
.budget-actions input { width: 70px; border: 1px solid var(--filet); border-radius: 8px; padding: 6px 8px; font: inherit; background: var(--surface); color: var(--encre); }
#budget-etat { font-size: 12.5px; font-weight: 600; color: var(--encre-2); }

[hidden] { display: none !important; }
th.colonne-ref, td.colonne-ref { background: color-mix(in oklab, var(--rouge) 7%, transparent); }
.kpi__cmp { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--encre-2); padding-top: 4px; }
.kpi__cmp + .kpi__cmp { border-top: 1px dashed var(--filet); }
.kpi { padding-bottom: 12px; }
.kpi { display: flex; flex-direction: column; }
.kpi__val + .kpi__cmp, .kpi__bas + .kpi__cmp { margin-top: auto; }
.titre-section { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin: 10px 0 -4px; padding-top: 6px; border-top: 1px solid var(--filet); }
.titre-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }

/* Quotidien et détail par marque */
.barre-jour { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.barre-jour strong { font-size: 16px; margin-left: 6px; }
.barre-jour .note { flex-basis: 100%; }
.barre-jour input[type="date"] { border: 1px solid var(--filet); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--encre); font: inherit; }
.bouton-jour { border: 1px solid var(--filet); background: var(--surface); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-weight: 700; color: var(--encre); }
.grille-kpi--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi__periode { font-weight: 500; color: var(--encre-2); margin-left: 6px; }
.kpi__pied { border-top: 1px dashed var(--filet); margin-top: 4px; }
table.detail-marques td.note-cellule { color: var(--encre-2); }
table.detail-marques .ligne-total td, table.detail-marques .ligne-total th { font-weight: 700; border-top: 2px solid var(--filet); }
/* Détail des ventes du jour : bascule toutes marques / par marque, lignes de marque dépliables. */
.carte__tete .seg-puces { margin-left: auto; }
.carte__tete .seg-puces + .lien-export { margin-left: 0; }
#ventes-resume { flex: 1 1 200px; }
#t-quotidien-ventes tr.groupe-marque { cursor: pointer; }
#t-quotidien-ventes tr.groupe-marque td { font-weight: 600; }
#t-quotidien-ventes tr.groupe-marque:hover td, #t-quotidien-ventes tr.groupe-marque:focus-visible td { background: var(--survol); }
#t-quotidien-ventes tr.groupe-marque > :first-child::before { content: "▸"; display: inline-block; width: 1em; color: var(--encre-2); transition: transform .15s; }
#t-quotidien-ventes tr.groupe-marque[aria-expanded="true"] > :first-child::before { transform: rotate(90deg); }
#t-quotidien-ventes tr.sous-ligne td:first-child { padding-left: 1.8em; }
#t-quotidien-ventes .ventes-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11px; color: var(--encre-2); margin-top: 3px; }
#t-quotidien-ventes .ventes-ref .pastille { font-size: 11px; }
#t-quotidien-ventes .ligne-total td, #t-quotidien-ventes .ligne-total th { font-weight: 700; border-top: 2px solid var(--filet); }
body[data-vue="quotidien"] .champ[for="periode"], body[data-vue="quotidien"] #dates, body[data-vue="quotidien"] .champ[for="reference"] { display: none; }
/* Évolution des prix : la comparaison à une autre année n'a pas de sens ici. */
body[data-vue="prix"] .champ[for="reference"] { display: none; }
.graph--prix { height: 340px; }
.prix-choix { min-width: 0; flex: 1 1 260px; }
.prix-choix select { min-width: 0; width: 100%; max-width: 520px; text-overflow: ellipsis; }
#t-prix tr.prix-ligne { cursor: pointer; }
#t-prix tr.prix-ligne:focus-visible > td { background: var(--survol); }
#t-prix tr.prix-ligne--choisie > td { background: var(--surface-2); }
#t-prix tr.prix-ligne--choisie > td:first-child { font-weight: 700; }

/* Menu en groupes */
.nav__titre { margin: 14px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.nav__titre:first-child { margin-top: 0; }

.note.base-ca { margin: 0 0 12px; }

/* Encadrés « Calcul » : méthode, exclusions et points à surveiller */
.aide-btn { all: unset; cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--encre-2); border: 1px solid var(--filet); border-radius: 999px; padding: 1px 8px; margin-right: auto; position: relative; }
.aide-btn:hover, .aide-btn[aria-expanded="true"] { color: var(--encre); background: var(--surface-2); }
.aide-btn:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }
.aide-btn--alerte::after { content: ""; position: absolute; top: -2px; right: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--alerte); }
.aide { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; margin: 10px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--encre-2); }
.aide dl { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; }
.aide dt { font-weight: 700; color: var(--encre); }
.aide dd { margin: 0; }
.aide ul { margin: 0; padding-left: 16px; }
.aide .aide__alerte { color: var(--alerte); }
.aide__periode { margin: 8px 0 0; font-size: 11.5px; }
@media (max-width: 640px) { .aide dl { grid-template-columns: 1fr; } .aide dd { margin-bottom: 4px; } }
.nb-declis { color: var(--encre-2); font-size: 11.5px; white-space: nowrap; }

/* Marges : alerte de couverture et éditeur de relevé */
.note--alerte { color: var(--alerte); background: var(--alerte-fond); border-radius: 8px; padding: 8px 12px; margin: 0; }
.releve-editeur { border: 1px solid var(--filet); border-radius: 10px; padding: 14px; margin: 10px 0; display: grid; gap: 10px; }
.releve-barre { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.releve-barre input[type="date"], .releve-barre input[type="text"] { font: inherit; border: 1px solid var(--filet); border-radius: 6px; padding: 5px 8px; background: var(--surface); color: var(--encre); }
.releve-note { flex: 1 1 260px; }
.releve-note input { width: 100%; }
.releve-import { cursor: pointer; }
table.releve td.texte { max-width: 360px; font-size: 12px; color: var(--encre-2); }
table.releve tr.ligne-activite th { padding-top: 14px; }
#t-marges-produits tr.depliable { cursor: pointer; }
#t-marges-produits tr.depliable:hover td, #t-marges-produits tr.depliable:focus-visible td { background: var(--survol); }
#t-marges-produits tr.depliable > :first-child::before { content: "▸"; display: inline-block; width: 1em; color: var(--encre-2); transition: transform .15s; }
#t-marges-produits tr.depliable[aria-expanded="true"] > :first-child::before { transform: rotate(90deg); }
#t-marges-produits tr.detail-produits > td { background: var(--surface-2); padding: 10px 14px 14px 30px; }

/* Simulateur de marge */
.simu-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0; font-size: 12.5px; color: var(--encre-2); }
.simu-barre input { width: 64px; font: inherit; text-align: right; border: 1px solid var(--filet); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--encre); }
.simu-totaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 10px; }
.simu-totaux > div { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.simu-totaux span:first-child { display: block; font-size: 11.5px; color: var(--encre-2); margin-bottom: 2px; }
.simu-avant { color: var(--encre-2); }
.simu-boite { max-height: 560px; overflow: auto; }
table.simu-table input { min-width: 64px; }
table.simu-table td.texte small { color: var(--encre-2); }
.bouton-simuler { font-size: 11.5px; }
.bouton-courbe { font-size: 11.5px; white-space: nowrap; }

/* Fenêtre du simulateur */
dialog.simu { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 40px); border: 1px solid var(--filet); border-radius: 14px; padding: 18px 20px; background: var(--surface); color: var(--encre); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.simu::backdrop { background: rgba(10, 16, 32, .55); }
.simu__tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 4px; }
.simu__tete h2 { margin: 0; font-size: 17px; }
.simu__tete small { color: var(--encre-2); }
.simu__fermer { all: unset; cursor: pointer; font-size: 18px; padding: 2px 8px; border-radius: 6px; color: var(--encre-2); }
.simu__fermer:hover, .simu__fermer:focus-visible { background: var(--surface-2); color: var(--encre); }
.simu-verdict { margin: 0 0 10px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.simu-verdict--manque { background: var(--baisse-fond); }
.simu-verdict--gain { background: var(--ok-fond); }
table.simu-table td small.simu-avant { display: block; font-size: 11px; white-space: nowrap; }
table.simu-table input { min-width: 74px; }
dialog.simu[open] { display: flex; flex-direction: column; gap: 6px; }
dialog.simu .simu-boite { flex: 1 1 auto; min-height: 140px; max-height: none; overflow: auto; }
dialog.simu > .note, dialog.simu > .budget-actions { flex: 0 0 auto; }

/* ⓘ d'un indicateur : bouton, explication dépliée sous le chiffre. */
.kpi__info { border: 1px solid var(--filet); background: var(--surface); color: var(--encre-2); border-radius: 999px; font: inherit; font-size: 12px; line-height: 1; padding: 3px 6px; cursor: pointer; }
.kpi__info:hover, .kpi__info[aria-expanded="true"] { color: var(--encre); border-color: var(--encre-2); }
.kpi__aide { margin: 6px 0 0; padding-top: 8px; border-top: 1px dashed var(--filet); font-size: 12px; line-height: 1.45; color: var(--encre-2); }
/* Meilleures ventes en Allemagne : références et libellés passent à la ligne pour laisser voir le CA. */
#t-de-produits td { white-space: normal; }
#t-de-produits td:nth-child(2) { min-width: 100px; max-width: 150px; overflow-wrap: break-word; }
#t-de-produits td.rang, #t-de-produits td:nth-child(4), #t-de-produits td:nth-child(5) { white-space: nowrap; }

/* Rôles : écran Utilisateurs, dialogue « Mot de passe ». */
body.vue-sans-filtres .filtres__corps, body.vue-sans-filtres .filtres__bascule, body.vue-sans-filtres .filtres__resume { display: none !important; }
.moi { display: block; color: var(--marine-texte); font-weight: 600; margin-top: 6px; }
.compte-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.compte-form input { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--filet); border-radius: 8px; background: var(--surface); color: var(--encre); min-width: 0; }
.compte-form select, #t-utilisateurs select { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--filet); border-radius: 8px; background: var(--surface); color: var(--encre); }
.mdp-provisoire { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.mdp-provisoire p { margin: 4px 0; }
.mdp-provisoire textarea { display: block; width: 100%; max-width: 640px; box-sizing: border-box; margin: 6px 0; font: 13px/1.5 ui-monospace, Menlo, monospace; padding: 8px 10px; border: 1px solid var(--filet); border-radius: 8px; background: var(--surface); color: var(--encre); resize: vertical; field-sizing: content; max-height: 60vh; }
.mdp-provisoire code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; background: var(--surface); padding: 2px 8px; border-radius: 6px; user-select: all; }
#t-utilisateurs tr.inactif td { color: var(--encre-2); }
.compte-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.droit-non { color: var(--encre-2); }
.droit-oui { font-weight: 600; }
.droit-modif { font-weight: 700; color: var(--ok); }
.droit-case { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 4px; }
.droit-case input { width: 17px; height: 17px; accent-color: var(--accent, #1f6fd6); cursor: pointer; margin: 0; }
#t-roles tr.t-roles__sep td { font-weight: 600; color: var(--encre-2); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; padding-top: 14px; }
dialog.mdp { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--filet); border-radius: 14px; padding: 20px; background: var(--surface); color: var(--encre); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.mdp::backdrop { background: rgba(10, 16, 32, .55); }
dialog.mdp form { display: grid; gap: 12px; }
dialog.mdp h2 { margin: 0; font-size: 17px; }
dialog.mdp label { display: grid; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--encre-2); }
dialog.mdp input { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--filet); border-radius: 8px; background: var(--surface); color: var(--encre); }

/* Quotidien : cinq tuiles (dont les règlements acceptés). */
#kpi-quotidien { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* Top clients : meilleur client (nom + CA), badges de type, contact sous le nom. */
#kpi-topclients .kpi:first-child .kpi__val { font-size: 17px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
#kpi-topclients .kpi:first-child .kpi__val small { display: block; font-size: 15px; font-weight: 700; color: var(--encre-2); margin-top: 3px; }
.tc-nom { font-weight: 700; }
.tc-contact { display: block; font-size: 11.5px; font-weight: 500; color: var(--encre-2); margin-top: 1px; overflow-wrap: anywhere; }
#t-topclients td:first-child { max-width: 24rem; }
/* Segments : critères en groupes de puces (rien de coché = tout), puce choisie pleine. */
.seg-groupes { display: grid; gap: 10px; margin-top: 10px; }
.seg-groupe { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px; align-items: center; }
.seg-groupe__lib { font-size: 12px; font-weight: 700; color: var(--encre-2); }
.seg-puces .puce[aria-pressed="false"] { opacity: 1; color: var(--encre-2); }
.seg-puces .puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--surface); }
.seg-puces select { appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23889' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
	border: 1px solid var(--filet); border-radius: 8px; padding: 6px 28px 6px 10px; color: var(--encre); font-weight: 600; font-size: 12.5px; max-width: 100%; }
#seg-resume { flex: 1 1 200px; }
/* Part des pros : le pourcentage sur une jauge fine (lisible d'un coup d'œil pour comparer les modèles). */
.seg-part { display: inline-block; min-width: 76px; padding-bottom: 4px; text-align: right;
	background: linear-gradient(var(--encre), var(--encre)) left bottom / var(--p) 3px no-repeat, linear-gradient(var(--filet), var(--filet)) left bottom / 100% 3px no-repeat; }
#seg-pros-info { flex: 1 1 200px; }
#t-seg-matrice tfoot th, #t-seg-matrice tfoot td { font-weight: 700; border-top: 2px solid var(--filet); }
@media (max-width: 760px) { .seg-groupe { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.tc-type { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tc-type--pro { background: rgba(46, 112, 49, .14); color: #2e7031; }
.tc-type--part { background: var(--surface-2); color: var(--encre-2); }
.tc-type--mp { background: rgba(176, 106, 0, .16); color: #a6630a; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .tc-type--pro { background: rgba(80, 200, 120, .18); color: #7fd99a; }
	:root:not([data-theme="light"]) .tc-type--mp { background: rgba(255, 180, 80, .18); color: #ffc368; }
}
:root[data-theme="dark"] .tc-type--pro { background: rgba(80, 200, 120, .18); color: #7fd99a; }
:root[data-theme="dark"] .tc-type--mp { background: rgba(255, 180, 80, .18); color: #ffc368; }

/* ---------- Tunnel / entonnoir ---------- */
.funnel { display: flex; flex-direction: column; align-items: center; padding: 8px 0 2px; }
.funnel__seg { position: relative; min-width: 150px; max-width: 100%; height: 66px; display: flex; align-items: center; justify-content: center; }
.funnel__shape { position: absolute; inset: 0; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.funnel__txt { position: relative; z-index: 1; color: #fff; text-align: center; padding: 0 12px; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.funnel__lib { display: block; font-weight: 700; font-size: 13.5px; }
.funnel__val { display: block; font-size: 12px; font-weight: 600; opacity: .96; }
.funnel__conv { font-size: 12px; color: var(--encre-2); font-weight: 700; margin: 2px 0; letter-spacing: .02em; }
.tunnel-fuites { display: flex; gap: 28px; flex-wrap: wrap; }
.tunnel-fuite__val { font-size: 22px; font-weight: 800; color: #c0392b; }
.tunnel-fuite__lib { font-size: 12.5px; color: var(--encre-2); max-width: 340px; }
@media (max-width: 760px) { .funnel__seg { min-width: 130px; height: 60px; } .funnel__lib { font-size: 12.5px; } }

/* ---------- Téléphone et tablette en portrait ----------
   Menu en tiroir (libellés, rubriques, compte), bandeau collé réduit à une ligne :
   ☰ · titre + résumé des filtres · bouton « Filtres » qui déplie période, marques et comparaison. */
@media (max-width: 900px) {
	.appli { grid-template-columns: minmax(0, 1fr); }
	.lateral {
		position: fixed; inset: 0 auto 0 0; z-index: 30; width: min(300px, 86vw); height: 100dvh;
		padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
		gap: 20px; box-shadow: 0 0 40px rgba(0, 0, 0, .35);
		transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s;
	}
	.menu-ouvert .lateral { transform: none; visibility: visible; transition: transform .22s ease; }
	.voile { position: fixed; inset: 0; z-index: 29; background: rgba(10, 16, 32, .5); }
	.menu-ouvert { overflow: hidden; }
	.nav button { padding: 11px 10px; }

	.filtres { padding: 8px 12px; gap: 8px 10px; flex-wrap: nowrap; }
	.filtres.ouvert { flex-wrap: wrap; }
	.filtres__menu, .filtres__bascule { display: inline-flex; }
	.filtres__menu {
		all: unset; cursor: pointer; flex: none; width: 40px; height: 40px; border-radius: 10px;
		display: grid; place-items: center; color: var(--encre); background: var(--surface); border: 1px solid var(--filet);
	}
	.filtres__menu svg, .filtres__bascule svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
	.filtres__menu:focus-visible { outline: 2px solid var(--rouge); }
	.filtres__titre { flex: 1 1 auto; }
	.filtres h1 { font-size: 16.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.filtres__resume { display: block; font-size: 11.5px; color: var(--encre-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.filtres__bascule {
		flex: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
		border: 1px solid var(--filet); background: var(--surface); color: var(--encre); font-weight: 700; font-size: 12.5px;
	}
	.filtres__bascule[aria-expanded="true"] { background: var(--encre); border-color: var(--encre); color: var(--surface); }
	.filtres__corps { display: none; }
	.filtres.ouvert .filtres__corps {
		display: flex; flex-direction: column; align-items: stretch; gap: 12px; flex-basis: 100%;
		max-height: calc(100dvh - 80px); overflow-y: auto; padding: 6px 0 4px;
	}
	.filtres__corps .champ { justify-content: space-between; }
	.filtres__corps .champ select { flex: 1 1 auto; max-width: 260px; }
	.filtres__corps .dates.visible { display: flex; flex-wrap: wrap; }
	.filtres__corps .bouton { align-self: flex-start; }
	.puce { padding: 7px 12px 7px 10px; }

	/* Indicateurs sur deux colonnes : un écran entier en montre quatre au lieu d'un. */
	.grille-kpi, .grille-kpi--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	#kpi-quotidien { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.kpi { padding: 12px 12px 10px; }
	.kpi__val { font-size: 21px; overflow-wrap: anywhere; }
	.kpi__bas { min-height: 26px; }
	.kpi__bas canvas { width: 100% !important; max-width: 96px; height: 24px !important; }
	.kpi__cmp { flex-wrap: wrap; gap: 2px 6px; font-size: 11.5px; }

	/* Tableaux : la colonne qui nomme la ligne (classe « fige », posée par figerColonnes() dans app.js)
	   reste visible pendant le défilement horizontal. */
	.tableau-boite { -webkit-overflow-scrolling: touch; }
	.tableau-boite .fige { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--filet); }
	.tableau-boite tr.ligne-activite > .fige, .tableau-boite tr.ligne-total > .fige { background: var(--surface-2); }
	.tableau-boite > table > tbody > tr:hover > .fige { background: var(--survol); }
	td.texte { min-width: 130px; max-width: 46vw; }
	th, td { padding: 8px 8px; }

	.graph { height: 240px; }
	.champ { max-width: 100%; min-width: 0; }
	.champ select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
	.recherche-tableau { margin-left: 0; flex: 1 1 100%; }
	.recherche-tableau input { flex: 1 1 auto; width: auto; max-width: none; }

	dialog.simu { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; padding: 14px 12px; }
}
@media (max-width: 420px) {
	/* Le résumé sous le titre dit déjà quels filtres sont actifs : le bouton se réduit à son icône. */
	.filtres__bascule { width: 40px; padding: 0; justify-content: center; }
	.filtres__bascule span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.kpi__lib { font-size: 11.5px; }
	.kpi__info { padding: 2px 5px; font-size: 11px; align-self: flex-start; }
}
@media (max-width: 340px) {
	.grille-kpi, .grille-kpi--2, #kpi-quotidien { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Live ---------- */
body[data-vue="live"] .champ[for="periode"], body[data-vue="live"] #dates, body[data-vue="live"] .champ[for="reference"] { display: none; }
.live-barre { margin-bottom: 0; }
.live-barre .seg-puces { margin-left: auto; }
.live-point { width: 10px; height: 10px; border-radius: 50%; background: var(--rouge); box-shadow: 0 0 0 0 color-mix(in oklab, var(--rouge) 50%, transparent); animation: live-pouls 2s infinite; }
@keyframes live-pouls { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-point { animation: none; } }
.live-tv__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.live-tv__actions a.bouton { text-decoration: none; }
#live-tv-etat { font-size: 12.5px; color: var(--encre-2); }
/* Bouton « Relancer la fusée » : tremble pendant l'envoi, décolle à la réponse, compte à rebours jusqu'aux télés. */
#live-tv-fusee { font-variant-numeric: tabular-nums; transition: background .25s, color .25s, border-color .25s; }
#live-tv-fusee:disabled { cursor: default; }
#live-tv-fusee .bouton-fusee__ico { flex: none; }
#live-tv-fusee.envoi .bouton-fusee__ico { animation: bf-tremble .09s linear infinite; }
#live-tv-fusee.envoyee { background: var(--encre); color: var(--surface); border-color: var(--encre); }
#live-tv-fusee.envoyee .bouton-fusee__ico { animation: bf-decolle 1.6s cubic-bezier(.5, 0, .75, .4) both, bf-flotte 1.2s ease-in-out 1.6s infinite alternate; }
#live-tv-fusee.arrivee { background: var(--rouge); color: #fff; border-color: var(--rouge); }
#live-tv-fusee.arrivee .bouton-fusee__ico { animation: bf-decolle 1.2s cubic-bezier(.5, 0, .75, .4) both; }
@keyframes bf-tremble { 25% { transform: translate(-1px, 1px); } 50% { transform: translate(1px, -1px); } 75% { transform: translate(-1px, -1px); } }
@keyframes bf-decolle { 0% { transform: none; opacity: 1; } 45% { transform: translate(9px, -14px); opacity: 0; } 46% { transform: translate(-9px, 14px); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bf-flotte { from { transform: translateY(1px); } to { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { #live-tv-fusee .bouton-fusee__ico { animation: none !important; } }
.live-marques { display: grid; gap: 6px; }
.live-ligne {
	display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(170px, 1.2fr) 64px minmax(160px, 2fr);
	grid-template-areas: "nom val pct jauge" "nom bas bas bas"; align-items: center; column-gap: 16px; row-gap: 4px;
	padding: 10px 4px; border-bottom: 1px solid var(--filet);
}
.live-ligne--sous { padding-block: 6px 10px; }
.live-ligne--sous .live-ligne__nom { padding-left: 24px; }
.live-ligne--sous .live-ligne__val b { font-size: 16px; }
.live-ligne--sous .live-jauge { height: 8px; }
.live-ligne--total { border-bottom: 0; background: var(--surface-2); border-radius: 10px; padding-inline: 10px; }
.live-ligne__nom { grid-area: nom; display: grid; gap: 2px; font-weight: 600; }
.live-ligne__nom small, .live-ligne__bas { color: var(--encre-2); font-size: 12px; font-weight: 400; }
.live-ligne__val { grid-area: val; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-ligne__val b { font-size: 20px; letter-spacing: -.01em; }
.live-ligne__val span { color: var(--encre-2); font-size: 13px; }
.live-ligne__pct { grid-area: pct; white-space: nowrap; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.live-ligne__pct.atteint { color: var(--ok); }
.live-ligne__bas { grid-area: bas; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.live-ligne__bas b { color: var(--ok); }
.live-jauge { grid-area: jauge; height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.live-ligne--total .live-jauge { background: var(--surface); }
.live-jauge span { display: block; height: 100%; background: var(--c); border-radius: 99px; transition: width .6s; }
.aujourdhui-titre { margin: 18px 0 6px; font-size: 14px; font-weight: 700; }
.aujourdhui-titre small { margin-left: 6px; color: var(--encre-2); font-weight: 400; font-size: 12px; }
/* Quotidien : commandes du jour, une ligne par commande, fiche client dépliée au clic. */
.cmd-filtre { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 14px 0 6px; }
.cmd-filtre .aujourdhui-titre { margin: 0; }
.cmd-tag { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--alerte-fond); color: var(--alerte); font-weight: 700; }
.cmd-jour { list-style: none; margin: 0; padding: 0; }
.cmd-jour > li { border-bottom: 1px solid var(--filet); }
.cmd-jour > li.vide { border: 0; }
.cmd-jour__ligne { display: grid; grid-template-columns: 12px 44px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; width: 100%; padding: 8px 4px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.cmd-jour__ligne::before { content: "▸"; color: var(--encre-2); transition: transform .15s; }
.cmd-jour__ligne[aria-expanded="true"]::before { transform: rotate(90deg); }
.cmd-jour__ligne:hover, .cmd-jour__ligne[aria-expanded="true"] { background: var(--survol); }
.cmd-jour__ligne time { color: var(--encre-2); font-variant-numeric: tabular-nums; }
.cmd-jour__produit { min-width: 0; overflow-wrap: anywhere; }
.cmd-jour__produit i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.cmd-jour__produit small { color: var(--encre-2); }
.cmd-jour__meta { display: block; font-size: 11.5px; }
.cmd-jour__ligne b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmd-jour__fiche { background: var(--surface-2); padding: 10px 14px 12px 72px; font-size: 13px; }
.cmd-jour__fiche dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.cmd-jour__fiche dt { color: var(--encre-2); }
.cmd-jour__fiche dd { margin: 0; overflow-wrap: anywhere; }
.cmd-jour__contenu { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--filet); display: grid; gap: 3px; }
.cmd-jour__contenu li { display: flex; justify-content: space-between; gap: 12px; }
.cmd-jour__contenu span { min-width: 0; overflow-wrap: anywhere; }
.cmd-jour__contenu b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) {
	.cmd-jour__fiche { padding-left: 12px; padding-right: 12px; }
	.cmd-jour__fiche dl { gap: 4px 10px; }
}
.live-flux { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow-y: auto; }
.live-flux li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid var(--filet); font-size: 13px; }
.live-flux li.vide { display: block; border: 0; }
.live-flux time { color: var(--encre-2); font-variant-numeric: tabular-nums; }
.live-flux__produit { min-width: 0; overflow-wrap: anywhere; }
.live-flux__produit i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.live-flux__produit small { color: var(--encre-2); }
.live-flux__marque { display: block; font-size: 11.5px; }
.live-flux b { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
	.live-ligne { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom pct" "val val" "jauge jauge" "bas bas"; }
	.live-barre .seg-puces { margin-left: 0; }
}

/* ---------- Cross-selling ---------- */
.cross-choix__ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cross-choix .note { margin: 0; }
.cross-puce { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.cross-puce button { all: unset; cursor: pointer; padding: 0 4px; border-radius: 4px; font-weight: 700; }
.cross-puce button:focus-visible { outline: 2px solid var(--rouge); }
.cross-taux { display: inline-grid; grid-template-columns: 70px auto; gap: 8px; align-items: center; justify-content: end; }
.cross-taux .barre { grid-column: auto; }
#t-cross-ancres tr.depliable { cursor: pointer; }
.kpi__sur { font-size: 15px; color: var(--encre-2); font-weight: 600; }

/* ---------- Mode TV (tv.php) ---------- */
.tv { min-height: 100vh; background: var(--fond); color: var(--encre); font-family: var(--police); padding: clamp(16px, 1.8vw, 36px); display: grid; gap: clamp(14px, 1.6vw, 28px); align-content: start; }
.tv__tete { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.tv__tete h1 { font-size: clamp(20px, 2.2vw, 40px); margin: 0; letter-spacing: -.02em; }
.tv__tete small { color: var(--encre-2); font-size: clamp(12px, 1vw, 18px); }
.tv__total { display: grid; }
/* Objectif du jour : les ventes et l'objectif de part et d'autre ; entre les deux (écran large) ou dessous, la jauge,
   le % et le reste à faire. */
.tv__bloc.tv__vedette { grid-template-columns: minmax(0, 1fr); grid-template-areas: "v" "obj" "milieu"; gap: clamp(8px, 1vw, 18px) clamp(20px, 2.4vw, 48px); align-items: end; }
.tv__vedette-v { grid-area: v; } .tv__vedette-obj { grid-area: obj; } .tv__vedette-milieu { grid-area: milieu; display: grid; gap: clamp(6px, .7vw, 14px); }
@media (min-width: 601px) { .tv__bloc.tv__vedette { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "v obj" "milieu milieu"; } .tv__vedette-obj { text-align: right; } }
@media (min-width: 901px) {
	/* Écart franc entre le CA du jour et la jauge + % (sinon le % semble faire partie du montant). */
	.tv__bloc.tv__vedette { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "v milieu obj"; column-gap: clamp(40px, 4.5vw, 96px); }
	.tv__vedette .tv__jauge { height: clamp(16px, 1.5vw, 30px); }
	.tv__vedette .tv__pct { font-size: clamp(24px, 2.6vw, 52px); }
}
.tv__vedette-obj .tv__grand { color: var(--encre-2); }
.tv__unite { margin-left: .25em; font-size: .4em; font-weight: 700; letter-spacing: 0; }
.tv__jauge { --c: var(--encre); grid-area: auto; height: clamp(20px, 2.4vw, 48px); }
.tv__vedette--ok .tv__jauge { --c: var(--ok); }
.tv__vedette-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(16px, 2vw, 40px); font-size: clamp(14px, 1.4vw, 28px); color: var(--encre-2); }
.tv__vedette-bas b { color: var(--encre); }
.tv__vedette--ok .tv__vedette-bas b { color: var(--ok); }
.tv__pct { font-size: clamp(26px, 3.2vw, 64px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tv__bloc { background: var(--surface); border: 1px solid var(--filet); border-radius: 16px; padding: clamp(14px, 1.4vw, 28px); display: grid; gap: 6px; min-width: 0; align-content: start; }
/* Mode TV : chaque marque est une carte (nom, montant, % ; jauge ; reste et N-1), toutes au même format,
   sans mise en avant d'une marque. */
.tv .live-marques { gap: clamp(6px, .6vw, 12px); }
.tv .live-ligne { background: var(--surface-2); border-bottom: 0; border-radius: 12px; padding: clamp(8px, .5vw, 12px) clamp(12px, 1vw, 20px);
	grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "nom val pct" "jauge jauge jauge"; align-items: end; column-gap: clamp(12px, 1.4vw, 28px); row-gap: clamp(4px, .4vw, 8px); }
/* Sous le nom : commandes, reste à faire et N-1 sur une ligne (la carte garde deux rangées). */
.tv .live-ligne__nom .live-ligne__bas { display: block; grid-area: auto; line-height: 1.3; }
.tv .live-ligne__nom .live-ligne__bas .evol { margin-left: .2em; }
.tv .live-ligne__nom .pastille { white-space: normal; align-items: baseline; }
.tv .live-ligne__nom .pastille i { flex: none; }
/* Le montant et « / objectif TTC » passent l'un sous l'autre quand la colonne est étroite, jamais l'un sur l'autre. */
.tv .live-ligne__val { white-space: normal; text-align: right; }
.tv .live-ligne__val b, .tv .live-ligne__val span { white-space: nowrap; }
.tv .live-ligne__val span { display: inline-block; }
.tv__bloc h2 { margin: 0; font-size: clamp(13px, 1.05vw, 20px); color: var(--encre-2); font-weight: 700; }
.tv__grand { font-size: clamp(30px, 4.2vw, 84px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tv__sous { font-size: clamp(13px, 1.05vw, 20px); color: var(--encre-2); }
.tv .live-ligne__val { line-height: 1.05; }
.tv .live-ligne__val b { font-size: clamp(26px, 2.9vw, 58px); letter-spacing: -.02em; }
.tv .live-ligne__nom { font-size: clamp(16px, 1.35vw, 27px); line-height: 1.15; }
.tv .live-ligne__pct { font-size: clamp(18px, 1.7vw, 34px); line-height: 1; }
.tv .live-ligne__val span { font-size: clamp(13px, 1.1vw, 22px); }
.tv .live-ligne__bas, .tv .live-ligne__nom small { font-size: clamp(12px, 1vw, 20px); }
.tv .live-jauge { height: clamp(10px, .8vw, 16px); background: var(--surface); }
@media (max-width: 760px) {
	.tv .live-ligne { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nom pct" "val val" "jauge jauge"; }
	.tv .live-ligne__val { text-align: left; }
}
/* Commandes du jour : une liste, la plus récente en haut. */
.tv .live-flux { max-height: none; }
/* Petite police et une commande par ligne : heure | produit (tronqué) | marque | montant. */
.tv .live-flux { gap: 0; }
.tv .live-flux li { font-size: clamp(12px, .85vw, 17px); grid-template-columns: 2.8em minmax(0, 1fr) auto auto; column-gap: clamp(6px, .6vw, 12px); padding-block: clamp(3px, .3vw, 6px); align-items: baseline; }
.tv .live-flux__produit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv .live-flux__marque { display: inline; font-size: .85em; color: var(--encre-2); white-space: nowrap; }
@media (max-width: 600px) {
	.tv .live-flux li { grid-template-columns: 2.8em minmax(0, 1fr) auto; }
	.tv .live-flux__marque { grid-column: 2; grid-row: 2; }
	.tv .live-flux__produit { white-space: normal; }
}
.tv__corps { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "jour" "marques" "fil" "periodes"; gap: clamp(12px, 1.4vw, 24px); }
.tv__total { grid-area: jour; } .tv__marques { grid-area: marques; } .tv__periodes { grid-area: periodes; } .tv__fil { grid-area: fil; }
@media (max-width: 900px) { .tv__fil .live-flux li:nth-child(n+16) { display: none; } }
/* Écran large : l'objectif du jour sur toute la largeur ; dessous, les marques à gauche et les commandes du jour
   à droite ; en bas, la semaine et le mois côte à côte. */
@media (min-width: 901px) {
	.tv__corps { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "jour jour" "marques fil" "periodes periodes"; }
	.tv__corps .tv__periodes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	/* La liste prend la hauteur des marques sans jamais l'agrandir : les commandes les plus anciennes qui ne
	   tiennent pas sont masquées (rogner() dans tv.php). */
	.tv__fil { contain: size; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
	.tv__fil .live-flux { min-height: 0; overflow: hidden; align-content: start; }
}
/* Écran en paysage : la page occupe toute la hauteur et se réduit (--z, calculé par tv.php) pour tenir sans défilement. */
@media (min-width: 901px) and (orientation: landscape) {
	.tv { display: flex; flex-direction: column; zoom: var(--z, 1); min-height: calc(100vh / var(--z, 1)); }
	.tv__corps { flex: 1 0 auto; }
}
.tv__erreur { color: var(--baisse); }
/* Avancement de la semaine et du mois, sous l'objectif du jour. Repère = objectif à date. */
.tv__periodes { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(12px, 1.4vw, 24px); }
.tv__periodes:empty { display: none; }
.tv__periode { gap: clamp(6px, .7vw, 12px); }
.tv__periode h2 { display: grid; line-height: 1.25; margin-right: auto; }
.tv__periode h2 span { font-weight: 500; font-size: .85em; }
.tv__periode-chiffres { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(12px, 1.4vw, 28px); font-variant-numeric: tabular-nums; }
.tv__periode-chiffres b { font-size: clamp(22px, 2.4vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.tv__periode-chiffres span { font-size: clamp(14px, 1.3vw, 26px); color: var(--encre-2); }
.tv__periode-chiffres .tv__periode-pct { font-size: clamp(20px, 2vw, 40px); }
@media (max-width: 600px) { .tv__periode h2 { flex-basis: 100%; } .tv__periode-val { margin-right: auto; } }
.tv__periode--ok .tv__periode-pct, .tv__periode--ok .tv__periode-bas b { color: var(--ok); }
.tv__periode-jauge { position: relative; padding: 4px 0; }
.tv__periode-jauge .live-jauge { --c: var(--encre); grid-area: auto; height: clamp(12px, 1.2vw, 24px); }
.tv__periode--ok .live-jauge { --c: var(--ok); }
.tv__repere { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--rouge); }
.tv__periode-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(12px, 1.4vw, 28px); font-size: clamp(12px, 1.05vw, 20px); color: var(--encre-2); }
.tv__periode-bas b { color: var(--encre); }
.tv__repere-legende { display: inline-block; width: 3px; height: 1em; margin-right: .4em; vertical-align: -.15em; border-radius: 2px; background: var(--rouge); }
/* Cotillons et bandeau « Nouvelle vente » (mode TV) */
.tv__cotillons { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }
.tv__annonce {
	position: fixed; left: 50%; top: clamp(16px, 4vh, 60px); transform: translate(-50%, -30px); z-index: 21; opacity: 0;
	background: var(--encre); color: var(--surface); border-radius: 18px; padding: clamp(12px, 1.4vw, 28px) clamp(18px, 2.4vw, 48px);
	display: grid; gap: 4px; text-align: center; max-width: calc(100% - 32px); box-shadow: var(--ombre);
	transition: opacity .35s, transform .35s;
}
.tv__annonce.visible { opacity: 1; transform: translate(-50%, 0); }
.tv__annonce b { font-size: clamp(18px, 2.2vw, 44px); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.tv__annonce b i { width: .55em; height: .55em; border-radius: 50%; background: var(--c); }
.tv__annonce span { font-size: clamp(14px, 1.4vw, 28px); opacity: .9; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .tv__annonce { transition: none; } }
/* Bouton du son (mode TV) : bien visible tant que le son n'est pas activé */
.tv__son { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; opacity: 1 !important; background: var(--rouge); border-color: var(--rouge); color: #fff; font-weight: 700; }
.tv__son svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; }
.tv__son[aria-pressed="true"] { background: var(--surface); border-color: var(--filet); color: var(--encre-2); font-weight: 600; }
/* Écran Live : même bouton, plus discret (son coupé par défaut sur les postes de travail) */
.live-barre .tv__son { background: var(--surface); border-color: var(--filet); color: var(--encre-2); font-weight: 600; }
.live-barre .tv__son[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--surface); }
.live-barre .tv__son + .seg-puces { margin-left: 0; }

/* Rubrique Contacts (copie du CRM) : comparaison avec la période précédente, le menu « Comparer à » ne s'applique pas. */
body[data-vue="appels"] .champ[for="reference"], body[data-vue="entonnoir"] .champ[for="reference"],
body[data-vue="origine"] .champ[for="reference"], body[data-vue="referencement"] .champ[for="reference"] { display: none; }
.note--crm { margin: 0; }
.pastille--neutre { --c: var(--encre-2); }
table.chaleur { border-collapse: separate; border-spacing: 3px; }
table.chaleur th, table.chaleur td { border: 0; border-radius: 5px; padding: 6px 7px; white-space: nowrap; }
table.chaleur thead th { font-weight: 600; color: var(--encre-2); font-size: 12px; }
table.chaleur tbody th { text-align: left; font-weight: 600; }
table.chaleur td.fort { color: var(--surface); font-weight: 700; }
table.chaleur td.total { font-weight: 700; background: var(--surface-2); }
/* Requêtes et adresses de pages : longues, elles passent à la ligne au lieu d'élargir le tableau. */
.texte-long { display: inline-block; min-width: 12ch; max-width: 44ch; white-space: normal; overflow-wrap: break-word; }

/* — Live et mode TV : bilan de la veille (fusée), affiché jusqu'à 10 h 30 (assets/veille.js) — */
.veille { position: relative; display: grid; grid-template-columns: clamp(96px, 12vw, 150px) minmax(0, 1fr); grid-template-areas: "scene texte" "scene resultat"; gap: 10px clamp(12px, 2vw, 32px); align-items: center; align-content: center; background: var(--marine); color: var(--marine-texte); border-radius: 16px; padding: clamp(12px, 1.6vw, 24px) clamp(14px, 2vw, 32px); overflow: hidden; }
.veille:has(.veille__fermer) { padding-right: 52px; }
.veille__scene { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: color-mix(in oklab, #000 22%, var(--marine)); }
.veille__scene:focus-visible { outline: 2px solid var(--marine-texte); outline-offset: 2px; }
.veille__scene { grid-area: scene; align-self: center; }
.veille__texte { grid-area: texte; display: grid; gap: 4px; min-width: 0; }
.veille__resultat { grid-area: resultat; display: grid; gap: 6px; min-width: 0; }
@media (min-width: 1100px) { .veille { grid-template-columns: clamp(96px, 9vw, 150px) minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "scene texte resultat"; } }
.veille__sur { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--marine-texte-2); }
.veille__titre { margin: 0; font-size: clamp(20px, 2.4vw, 32px); line-height: 1.12; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; }
.veille__chiffres { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.veille__chiffres span { flex-basis: 100%; }
.veille__chiffres span { color: var(--marine-texte-2); }
.veille__chiffres span b { color: var(--marine-texte); }
.veille__pct { font-size: clamp(22px, 2.6vw, 36px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.veille--ok .veille__pct { color: #f2b705; }
.veille__blague { margin: 0; color: var(--marine-texte); }
.veille__marques { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--marine-texte-2); }
.veille__marques li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.veille__marques i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.veille__marques b { color: var(--marine-texte); font-variant-numeric: tabular-nums; }
.veille__marques b.atteint { color: #6fe0a5; }
.veille__fermer { all: unset; box-sizing: border-box; position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; cursor: pointer; color: var(--marine-texte-2); }
.veille__fermer:hover { background: color-mix(in oklab, #fff 10%, transparent); color: #fff; }
.veille__fermer:focus-visible { outline: 2px solid var(--marine-texte); }
.veille__fermer svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 520px) {
	.veille { grid-template-columns: 80px minmax(0, 1fr); grid-template-areas: "scene texte" "resultat resultat"; }
	.veille__titre { font-size: 19px; }
	.veille__chiffres { font-size: 13.5px; }
}
@media (min-width: 1100px) { .tv .veille { grid-template-columns: clamp(96px, 8vw, 200px) minmax(0, 1.1fr) minmax(0, 1fr); } }
.tv .veille__titre { font-size: clamp(20px, 2.6vw, 52px); }
.tv .veille__sur, .tv .veille__marques { font-size: clamp(12px, 1vw, 20px); }
.tv .veille__chiffres, .tv .veille__blague { font-size: clamp(14px, 1.3vw, 26px); }
.tv .veille__pct { font-size: clamp(22px, 3vw, 60px); }

/* La scène (SVG 160 × 160). Sans la classe « joue » (mouvements réduits, ou avant le lancement) : l'état final. */
.vf { display: block; width: 100%; height: 100%; }
.vf-etoiles circle { fill: #fff; opacity: .8; }
.vf-compte text { fill: #fff; font: 800 46px var(--police); text-anchor: middle; opacity: 0; transform-box: fill-box; transform-origin: center; }
.vf-tour rect { fill: #3b4c8c; }
.vf-tour path { fill: none; stroke: #3b4c8c; stroke-width: 1.2; }
.vf-corps { fill: #f4f6fa; }
.vf-nez, .vf-aileron { fill: #ce1126; }
.vf-hublot { fill: #0a1c55; stroke: #a9b5d9; stroke-width: 2.5; }
.vf-reflet { fill: #fff; opacity: .7; }
.vf-tuyere { fill: #8b97bd; }
.vf-flamme__ext { fill: #f2b705; }
.vf-flamme__int { fill: #fff3c4; }
.vf-fumee circle, .vf-toux circle { fill: #d5dbea; opacity: 0; transform-box: fill-box; transform-origin: center; }
.vf-sol { fill: #16286b; }
.vf-pfff { fill: #a9b5d9; font: italic 600 15px var(--police); opacity: 0; }
.vf-secoue, .vf-fusee, .vf-flamme { transform-box: view-box; }
.vf-fusee { transform-origin: 80px 140px; }
.vf-flamme { transform-origin: 80px 139px; }
.veille--ok .vf-fusee { transform: translate(44px, -88px) rotate(38deg) scale(.38); }
.veille--rate .vf-fusee { transform: rotate(-6deg); }
.veille--rate .vf-flamme { transform: scale(0); }
.veille--rate .vf-pfff { opacity: .9; }

.joue .vf-etoiles circle { animation: vf-scintille 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); }
.joue .vf-compte text { animation: vf-compte .4s ease-out both; }
.joue .vf-compte text:nth-child(2) { animation-delay: .4s; }
.joue .vf-compte text:nth-child(3) { animation-delay: .8s; }
.joue .vf-secoue { animation: vf-tremble .09s linear 1.2s 12; }
.joue .vf-fumee circle { animation: vf-fumee 3.2s ease-out 1.25s both; }
.joue .vf-fumee circle:nth-child(2n) { animation-delay: 1.4s; }
.joue.veille--ok .vf-secoue { animation: vf-tremble .09s linear 1.2s 12, vf-flotte 3.2s ease-in-out 6.4s infinite; }
.joue.veille--ok .vf-fusee { animation: vf-decolle 4s 2.2s both; }
.joue.veille--ok .vf-flamme { animation: vf-allume .3s ease-out 1.2s both, vf-vacille .12s linear 1.5s infinite alternate; }
.joue.veille--rate .vf-fusee { animation: vf-hoquet 1.8s 2s both; }
.joue.veille--rate .vf-flamme { animation: vf-panne 1.9s linear 1.2s both; }
.joue.veille--rate .vf-fumee circle { animation-duration: 2.2s; }
.joue.veille--rate .vf-pfff { animation: vf-pfff .8s ease-out 3.6s both; }
.joue.veille--rate .vf-toux circle { animation: vf-toux 4.5s ease-out 4.4s infinite; }
.joue.veille--rate .vf-toux circle:nth-child(2) { animation-delay: 4.65s; }
@keyframes vf-scintille { 50% { opacity: .2; } }
@keyframes vf-compte { 0% { opacity: 0; transform: scale(1.8); } 25% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.9); } }
@keyframes vf-tremble { 25% { transform: translate(-1px, .6px); } 50% { transform: translate(1px, -.4px); } 75% { transform: translate(-.6px, -.2px); } }
@keyframes vf-flotte { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes vf-fumee { 0% { opacity: 0; transform: scale(0); } 20% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: translateY(-4px) scale(1.7); } }
@keyframes vf-allume { from { transform: scale(.2, 0); } to { transform: scale(1, 1); } }
@keyframes vf-vacille { from { transform: scale(.9, .85); } to { transform: scale(1.08, 1.15); } }
@keyframes vf-decolle {
	0% { transform: translateY(0); opacity: 1; animation-timing-function: cubic-bezier(.55, 0, .85, .45); }
	48% { transform: translateY(-210px); opacity: 1; }
	49%, 75% { transform: translate(44px, -88px) rotate(38deg) scale(.38); opacity: 0; }
	100% { transform: translate(44px, -88px) rotate(38deg) scale(.38); opacity: 1; }
}
@keyframes vf-panne {
	0% { transform: scale(.2, 0); } 12% { transform: scale(1, 1); } 24% { transform: scale(.8, .55); } 36% { transform: scale(1, 1.1); }
	50% { transform: scale(.55, .35); } 62% { transform: scale(.85, .7); } 78% { transform: scale(.35, .2); } 88% { transform: scale(.5, .3); } 100% { transform: scale(0); }
}
@keyframes vf-hoquet {
	0% { transform: none; animation-timing-function: ease-out; } 30% { transform: translateY(-24px); }
	42% { transform: translateY(-25px) rotate(-2deg); animation-timing-function: ease-in; } 64% { transform: rotate(0deg); }
	74% { transform: translateY(-5px) rotate(-3deg); } 84% { transform: rotate(-4deg); } 100% { transform: rotate(-6deg); }
}
@keyframes vf-pfff { from { opacity: 0; transform: translateY(6px); } to { opacity: .9; transform: none; } }
@keyframes vf-toux { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 8% { opacity: .9; } 40% { opacity: 0; transform: translate(-8px, -14px) scale(1.4); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .veille .vf * { animation: none !important; } }

/* — Mode TV : décollage plein écran quand l’objectif du jour est atteint (LamVeille.decoller, veille.js) —
   Sous les cotillons du mode TV (z-index 20). Repères (= LamVeille.TEMPS, veille.js ; voix bin/fusee-voix.sh) : 3-2-1 à 0,2 / 1,2 / 2,2 s, allumage 2,7 s,
   décollage + « Objectif Saturne ! » 3,7 s, message 4,6 s. */
.decollage { position: fixed; inset: 0; z-index: 19; overflow: hidden; display: grid; place-items: center; cursor: pointer;
	background: radial-gradient(120% 90% at 50% 112%, #16286b 0%, #0a1c55 55%, #050b26 100%); color: #fff; animation: dc-entre .3s ease-out both; }
.decollage--sort { animation: dc-sort .6s ease-in both; }
.decollage__etoiles i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .8; animation: vf-scintille 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.29s); }
.decollage__etoiles i:nth-child(3n) { width: 2px; height: 2px; }
.decollage__compte { position: absolute; left: 0; right: 0; top: 0; height: 36vh; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.decollage__compte b { grid-area: 1 / 1; font: 800 clamp(72px, 26vh, 300px) / 1 var(--police); color: #fff; opacity: 0; animation: vf-compte .8s ease-out .2s both; }
.decollage__compte b:nth-child(2) { animation-delay: 1.2s; }
.decollage__compte b:nth-child(3) { animation-delay: 2.2s; }
.decollage__cap { position: absolute; left: 0; right: 0; top: 0; height: 36vh; z-index: 2; display: flex; align-items: center; justify-content: center; gap: .3em; margin: 0; padding: 0 4vw;
	font: 800 clamp(28px, 6vw, 120px) / 1.05 var(--police); letter-spacing: -.02em; color: #f2b705; text-align: center; pointer-events: none; opacity: 0; animation: dc-texte .8s cubic-bezier(.2, 1.4, .4, 1) 3.7s both; }
.decollage__cap svg { flex: none; width: 1.3em; height: 1.3em; }
.decollage__sol { position: absolute; left: 0; right: 0; bottom: 0; height: 5vh; background: #16286b; }
.decollage__fusee { position: absolute; left: 50%; bottom: 3vh; height: min(62vh, 110vw); aspect-ratio: 1 / 2; transform: translateX(-50%); animation: dc-monte 3s cubic-bezier(.55, 0, .85, .45) 3.7s both; }
.decollage__svg { width: 100%; height: 100%; animation: dc-tremble .08s linear 2.7s 12; }
.decollage .vf-flamme { transform-box: view-box; transform-origin: 80px 139px; animation: vf-allume .3s ease-out 2.7s both, vf-vacille .12s linear 3s infinite alternate; }
.decollage__fumee { position: absolute; left: 0; right: 0; bottom: -14vmin; height: 40vmin; pointer-events: none; filter: blur(5px); }
.decollage__fumee i { position: absolute; bottom: 0; width: 34vmin; height: 34vmin; border-radius: 50%; background: #d5dbea; opacity: 0; animation: dc-fumee 4.5s ease-out 2.8s both; }
.decollage__fumee i:nth-child(1) { left: calc(50% - 17vmin); animation-delay: 2.8s; }
.decollage__fumee i:nth-child(2) { left: calc(50% - 40vmin); animation-delay: 3s; }
.decollage__fumee i:nth-child(3) { left: calc(50% + 6vmin); animation-delay: 3s; }
.decollage__fumee i:nth-child(4) { left: calc(50% - 64vmin); animation-delay: 3.3s; }
.decollage__fumee i:nth-child(5) { left: calc(50% + 30vmin); animation-delay: 3.3s; }
.decollage__fumee i:nth-child(6) { left: calc(50% - 88vmin); animation-delay: 3.6s; }
.decollage__fumee i:nth-child(7) { left: calc(50% + 54vmin); animation-delay: 3.6s; }
.decollage__texte { position: relative; z-index: 1; max-width: 92vw; text-align: center; opacity: 0; animation: dc-texte .8s cubic-bezier(.2, 1.4, .4, 1) 4.6s both; }
.decollage__texte h2 { margin: 0; font-size: clamp(34px, 7.5vw, 150px); line-height: 1.02; letter-spacing: -.03em; color: #fff; overflow-wrap: anywhere; }
.decollage__chiffres { margin: .35em 0 0; font-size: clamp(22px, 4vw, 84px); font-weight: 800; letter-spacing: -.02em; color: #f2b705; font-variant-numeric: tabular-nums; }
.decollage__detail { margin: .5em 0 0; font-size: clamp(15px, 1.8vw, 36px); color: #e7ecfa; }
.decollage__aide { position: absolute; bottom: 12px; right: 16px; font-size: 12px; color: #a9b5d9; opacity: 0; animation: dc-entre .4s ease-out 5.5s both; }
.decollage--calme .decollage__texte, .decollage--calme .decollage__aide { opacity: 1; animation: none; }
@keyframes dc-entre { from { opacity: 0; } to { opacity: 1; } }
@keyframes dc-sort { to { opacity: 0; } }
@keyframes dc-tremble { 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -1px); } 75% { transform: translate(-2px, -1px); } }
@keyframes dc-monte { from { transform: translate(-50%, 0); } to { transform: translate(-50%, -175vh); } }
@keyframes dc-fumee { 0% { opacity: 0; transform: scale(.2); } 18% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: translateY(-14vmin) scale(1.9); } }
@keyframes dc-texte { from { opacity: 0; transform: translateY(30px) scale(.85); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .decollage, .decollage * { animation: none !important; } }

/* — Budget du mois atteint : la fusée se pose sur Saturne (LamVeille.atterrir, veille.js ; src/saturne.php) —
   Scène reprise de l'artefact « Fusée sur Saturne ». Mode TV et Live, sous les cotillons du mode TV (z-index 20).
   Repères (= LamVeille.TEMPS_SATURNE) : Saturne monte à 0 s, descente 0,9 s → pose 4,9 s, drapeau 5,3 s, message 5,5 s, sortie 12,2 s.
   La scène (dessin 1120 × 740) occupe le bas de l'écran, hauteur --scene ; le texte, la place au-dessus. */
.atterrissage { --scene: min(64vh, 66vw); position: fixed; inset: 0; z-index: 19; overflow: hidden; cursor: pointer; color: #fff;
	background: radial-gradient(120% 90% at 50% 100%, #12266b 0%, #0a1c55 38%, #070d24 100%); animation: dc-entre .5s ease-out both; }
.atterrissage--sort { animation: dc-sort .8s ease-in both; }
.atterrissage__scene { position: absolute; left: 0; right: 0; bottom: 0; height: var(--scene); pointer-events: none; }
.atterrissage__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.atterrissage__haut { position: absolute; left: 0; right: 0; top: 0; bottom: calc(var(--scene) - .02 * var(--scene)); }
.atterrissage__texte { position: absolute; inset: 3vh 4vw 1vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.atterrissage__sur { margin: 0 0 .5em; font: 700 clamp(12px, min(1.7vw, 2.5vh), 30px) / 1.2 var(--police); letter-spacing: .27em; text-transform: uppercase; color: #ffd66b; }
.atterrissage__texte h2 { margin: 0; max-width: 100%; font-size: clamp(26px, min(5.2vw, 8vh), 112px); line-height: 1.05; letter-spacing: -.02em; color: #fff; overflow-wrap: anywhere; text-wrap: balance; }
.atterrissage__chiffres { margin: .45em 0 0; font-size: clamp(16px, min(2.4vw, 3.8vh), 50px); font-weight: 700; color: #a9b5d9; font-variant-numeric: tabular-nums; }
.atterrissage__detail { margin: .4em 0 0; font-size: clamp(13px, min(1.6vw, 2.5vh), 32px); color: #e7ecfa; }
.atterrissage__eclats { position: absolute; inset: 0; pointer-events: none; }
.lfs-eclat { position: absolute; width: calc(32px * var(--t)); height: calc(32px * var(--t)); margin: calc(-16px * var(--t)) 0 0 calc(-16px * var(--t)); animation: lfs-eclat 1.5s ease-in-out infinite alternate backwards; }
.atterrissage__aide { animation-delay: 6.5s; }
.atterrissage .decollage__etoiles i { animation-duration: 3s; }
/* Le dessin : mêmes animations que l'artefact (transform-origin 0 0 = pieds de la fusée, centre local). */
.lfs-planete { animation: lfs-leve 1.5s cubic-bezier(.2, .8, .3, 1) backwards, lfs-choc .5s 4.9s ease-out; }
.lfs-descente { animation: lfs-descente 4s .9s cubic-bezier(.25, .6, .3, 1) backwards; }
.lfs-tangage { animation: lfs-tangage 4s .9s ease-out backwards; }
.lfs-appui { animation: lfs-appui .45s 4.9s ease-out; }
.lfs-feu { opacity: 0; transform: scale(.4, 0); animation: lfs-feu 4.15s .9s linear backwards; }
.lfs-feu g { animation: lfs-vacille .09s linear 60 alternate; }
.lfs-poussiere ellipse { opacity: 0; animation: lfs-poussiere .95s 4.9s ease-out; }
.lfs-onde { opacity: 0; animation: lfs-onde .9s 4.9s ease-out; }
.lfs-drapeau { animation: lfs-drapeau .6s 5.3s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.lfs-texte { animation: lfs-texte .7s cubic-bezier(.2, .8, .3, 1) backwards; }
@media (max-height: 420px) { .atterrissage__detail { display: none; } }
@keyframes lfs-leve { from { transform: translateY(560px); } }
@keyframes lfs-choc { 35% { transform: translateY(7px); } }
@keyframes lfs-descente { from { transform: translateY(-1300px); } }
@keyframes lfs-tangage { 0% { transform: rotate(-4deg); } 30% { transform: rotate(3deg); } 60% { transform: rotate(-2deg); } 85% { transform: rotate(1deg); } }
@keyframes lfs-appui { 35% { transform: scale(1.05, .93); } 70% { transform: scale(.99, 1.02); } }
@keyframes lfs-feu { 0% { opacity: 1; transform: scale(1, 1.3); } 85% { opacity: 1; transform: scale(1, .85); } 96% { opacity: 1; transform: scale(.8, .4); } 100% { opacity: 0; transform: scale(.4, 0); } }
@keyframes lfs-vacille { from { transform: scale(.94, .86); } to { transform: scale(1.04, 1.1); } }
@keyframes lfs-poussiere { from { opacity: .9; transform: translateX(0) scale(.3); } to { opacity: 0; transform: translateX(var(--dx)) scale(1.7); } }
@keyframes lfs-onde { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(3.4); } }
@keyframes lfs-drapeau { from { transform: scale(1, 0); } }
@keyframes lfs-texte { from { opacity: 0; transform: translateY(26px); } }
@keyframes lfs-eclat { from { opacity: 0; transform: scale(.2); } }
@media (prefers-reduced-motion: reduce) { .atterrissage, .atterrissage * { animation: none !important; } }

/* Quotidien sur aujourd'hui : les factures du jour n'existent pas encore. */
#quotidien-attente p { margin: 0; color: var(--encre-2); }
#quotidien-attente a { color: var(--encre); font-weight: 600; }

/* Tableau de chiffres replié sous son graphique (« Voir les chiffres… ») */
.repli { border-top: 1px solid var(--filet); padding-top: 10px; }
.repli > summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--encre-2); list-style-position: inside; }
.repli > summary small { font-weight: 400; margin-left: 6px; }
.repli[open] > summary { margin-bottom: 10px; }

/* Base de calcul de l'écran, sous le titre (détail au survol) */
.base-vue { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--encre-2); font-size: 11.5px; font-weight: 600; cursor: help; white-space: nowrap; }
.base-vue[hidden] { display: none; }
/* Filtre sans effet sur l'écran affiché */
.filtre-inactif { opacity: .45; }
.filtre-inactif button, .filtre-inactif select { cursor: not-allowed; }

/* Onglets d'un écran (Produits / Vendus avec, Marges / Évolution des prix) */
.onglets { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--filet); }
.onglet { all: unset; cursor: pointer; padding: 8px 14px; font-size: 14px; font-weight: 700; color: var(--encre-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglet:hover { color: var(--encre); }
.onglet[aria-current="page"] { color: var(--encre); border-bottom-color: var(--encre); }
.onglet:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; border-radius: 4px; }

/* ---------- Acquisition : ajouts propres à l'outil (le reste est la feuille de LAM Stats) ---------- */
/* État d'une source (écran Raccordements) : puce de couleur et texte, jamais de contour coloré. */
.source { display: inline-flex; align-items: baseline; gap: 6px; }
.source i { width: 8px; height: 8px; border-radius: 50%; background: var(--encre-2); flex: none; transform: translateY(-1px); }
.source--ok i { background: var(--ok); }
.source--ko i { background: var(--alerte); }
.source--attente { color: var(--encre-2); }
.source__detail { display: block; color: var(--encre-2); margin-left: 14px; }
.liste-aide { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.5; max-width: 90ch; }
.liste-aide code { font-size: .92em; overflow-wrap: anywhere; }
