/* Sitepro Atelier du FAP : direction A « Épuré » (validée le 8 oct. 2026),
   puis maquette « pointillés » (8 oct. 2026) : moins de décor, filets plutôt qu'ombres.
   Règle : pointillé = vide ou inactif (liste déroulante sans choix, liste sans résultat, bouton inactif).
   Neutre et dense, la marque en accent. Modes jour et nuit.
   Le thème vient de <html data-theme="auto|clair|sombre">. */

/* ===== Couleurs ===== */

:root {
	--brand: #1aa7ec;
	--brand-deep: #0a78b4;
	--btn-primary: #0a78b4;
	--brand-night: #081a87;
	--brand-soft: rgba(26, 167, 236, 0.1);
	--bg: #f7f8fa;
	--surface: #ffffff;
	--surface-2: #f3f5f8;
	--text: #111827;
	--muted: #64748b;
	--line: #e7eaef;
	--line-strong: #c3cad3;
	--hover: #f5f7fa;
	--ok: #16a34a;
	--ok-soft: rgba(22, 163, 74, 0.1);
	--warn: #b45309;
	--warn-soft: rgba(245, 158, 11, 0.14);
	--a-completer: #b45309;
	--a-completer-fond: rgba(245, 158, 11, 0.14);
	--bad: #dc2626;
	--bad-soft: rgba(220, 38, 38, 0.08);
	--neutral-soft: #eef1f5;
	--side-bg: #ffffff;
	--side-text: #334155;
	--side-muted: #64748b;
	--side-line: #e7eaef;
	--side-active-bg: rgba(26, 167, 236, 0.1);
	--side-active-text: #0a78b4;
	--side-hover: #f3f6f9;
	--topbar-bg: rgba(255, 255, 255, 0.85);
	--ring: rgba(26, 167, 236, 0.35);
	--shadow: none;
	--shadow-pop: 0 12px 32px rgba(16, 24, 40, 0.12);
	--switch-on: #34c759;
	--switch-off: #e2e6ec;
	--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
	--radius: 8px;
	--radius-small: 6px;
	--side-width: 244px;
	color-scheme: light;
}

/* Mode nuit : anthracite plutôt que noir pur, bordures adoucies, bleus éclaircis pour le texte.
   Le bouton principal garde son bleu profond (texte blanc lisible). */
:root[data-theme="sombre"] {
	--brand-deep: #5cc6fa;
	--brand-soft: rgba(92, 198, 250, 0.14);
	--bg: #0e1014;
	--surface: #16191e;
	--surface-2: #1c2026;
	--text: #e9edf2;
	--muted: #9aa4b2;
	--line: #262b33;
	--line-strong: #414955;
	--hover: #1b1f25;
	--ok: #4ade80;
	--ok-soft: rgba(74, 222, 128, 0.13);
	--warn: #fbbf24;
	--warn-soft: rgba(251, 191, 36, 0.15);
	--a-completer: #e3a948;
	--a-completer-fond: rgba(227, 169, 72, 0.12);
	--bad: #f87171;
	--bad-soft: rgba(248, 113, 113, 0.13);
	--neutral-soft: #242932;
	--side-bg: #121418;
	--side-text: #cfd6df;
	--side-muted: #8b95a3;
	--side-line: #22262d;
	--side-active-bg: rgba(92, 198, 250, 0.13);
	--side-active-text: #7fd3fb;
	--side-hover: #1a1d23;
	--topbar-bg: rgba(14, 16, 20, 0.82);
	--ring: rgba(92, 198, 250, 0.4);
	--shadow: none;
	--shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
	--switch-on: #30d158;
	--switch-off: #39393d;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] {
		--brand-deep: #5cc6fa;
		--brand-soft: rgba(92, 198, 250, 0.14);
		--bg: #0e1014;
		--surface: #16191e;
		--surface-2: #1c2026;
		--text: #e9edf2;
		--muted: #9aa4b2;
		--line: #262b33;
		--line-strong: #414955;
		--hover: #1b1f25;
		--ok: #4ade80;
		--ok-soft: rgba(74, 222, 128, 0.13);
		--warn: #fbbf24;
		--warn-soft: rgba(251, 191, 36, 0.15);
		--a-completer: #e3a948;
		--a-completer-fond: rgba(227, 169, 72, 0.12);
		--bad: #f87171;
		--bad-soft: rgba(248, 113, 113, 0.13);
		--neutral-soft: #242932;
		--side-bg: #121418;
		--side-text: #cfd6df;
		--side-muted: #8b95a3;
		--side-line: #22262d;
		--side-active-bg: rgba(92, 198, 250, 0.13);
		--side-active-text: #7fd3fb;
		--side-hover: #1a1d23;
		--topbar-bg: rgba(14, 16, 20, 0.82);
		--ring: rgba(92, 198, 250, 0.4);
		--shadow: none;
		--shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5);
		--switch-on: #30d158;
		--switch-off: #39393d;
		color-scheme: dark;
	}
}

/* Logo : version claire ou blanche selon le mode. */
.logo--sombre {
	display: none !important;
}

:root[data-theme="sombre"] .logo--clair {
	display: none !important;
}

:root[data-theme="sombre"] .logo--sombre {
	display: block !important;
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] .logo--clair {
		display: none !important;
	}

	:root[data-theme="auto"] .logo--sombre {
		display: block !important;
	}
}

/* ===== Base ===== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.45;
	color: var(--text);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--brand-deep);
	text-decoration: none;
}

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

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Icônes au trait (helper icone()). */
.ic {
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ===== Mise en page connectée ===== */

.page-app {
	min-height: 100vh;
}

.side {
	position: fixed;
	inset: 0 auto 0 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: var(--side-width);
	padding: 12px 10px;
	border-right: 1px solid var(--side-line);
	background: var(--side-bg);
	color: var(--side-text);
	transition: width 0.25s ease;
}

.marque {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	padding: 8px 8px 14px;
	border-bottom: 1px solid var(--side-line);
}

.marque__lien {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 10px;
	min-width: 0;
	max-width: 200px;
	overflow: hidden;
	color: inherit;
	transition: max-width 0.25s ease, opacity 0.15s ease;
}

/* Bouton « réduire / agrandir » : icône de panneau à droite du logo, comme Mail ou Notes sur Mac. */
.side__bascule {
	display: grid;
	flex: none;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: var(--radius-small);
	background: none;
	color: var(--side-muted);
	cursor: pointer;
}

.side__bascule:hover {
	background: var(--side-hover);
	color: var(--side-text);
}

.marque img {
	display: block;
	width: 92px;
	height: auto;
}

.nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nav__lien {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-small);
	font-weight: 500;
	color: var(--side-text);
}

.nav__lien:hover {
	background: var(--side-hover);
}

.nav__lien.is-active,
.nav__lien.is-active:hover {
	background: var(--btn-primary);
	color: #ffffff;
}

.nav__lien.is-active .nav__compteur {
	background: rgba(255, 255, 255, 0.25);
}

.nav__texte {
	overflow: hidden;
	max-width: 180px;
	white-space: nowrap;
	transition: max-width 0.25s ease, opacity 0.15s ease;
}

/* Rail : le nombre de nouveaux leads devient un point sur l'icône. */
.nav__point {
	display: none;
	position: absolute;
	top: 5px;
	left: 26px;
	width: 9px;
	height: 9px;
	border: 2px solid var(--side-bg);
	border-radius: 50%;
	background: var(--brand);
}

.nav__compteur {
	margin-left: auto;
	min-width: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--brand);
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	color: #ffffff;
	text-align: center;
}

.side__bas {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: auto;
}

/* Menu du compte : bulle au-dessus du nom (details/summary, fermée aussi par app.js). */
.compte {
	position: relative;
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid var(--side-line);
}

.compte__bouton {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius-small);
	list-style: none;
	cursor: pointer;
}

.compte__bouton::-webkit-details-marker {
	display: none;
}

.compte__bouton:hover,
.compte[open] .compte__bouton {
	background: var(--side-hover);
}

.compte__identite {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.compte__identite strong {
	overflow: hidden;
	font-size: 13px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.compte__identite span {
	font-size: 12px;
	color: var(--side-muted);
}

.compte__fleche {
	width: 14px;
	height: 14px;
	margin-left: auto;
	color: var(--side-muted);
	transition: transform 0.15s ease;
}

.compte:not([open]) .compte__fleche {
	transform: rotate(180deg);
}

.compte__bulle {
	position: absolute;
	right: 0;
	bottom: calc(100% + 4px);
	left: 0;
	z-index: 30;
	padding: 4px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-pop);
}

.compte__bulle form {
	margin: 0;
}

.compte__choix {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 10px;
	border: 0;
	border-radius: var(--radius-small);
	background: none;
	font-weight: 500;
	color: var(--text);
	text-align: left;
	cursor: pointer;
}

.compte__choix:hover,
.compte__choix:focus-visible,
.compte__choix.is-active {
	background: var(--hover);
	color: var(--text);
}

.compte__choix .ic {
	width: 16px;
	height: 16px;
}

.compte__choix--rouge,
.compte__choix--rouge:hover {
	color: var(--bad);
}

.compte__separateur {
	margin: 4px 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.main {
	margin-left: var(--side-width);
	min-width: 0;
	transition: margin-left 0.25s ease;
}

/* ===== Barre latérale réduite en rail d'icônes (ordinateur seulement) ===== */

@media (min-width: 901px) {
	.side-reduite .side {
		width: 64px;
	}

	.side-reduite .main {
		margin-left: 64px;
	}

	.side-reduite .marque {
		justify-content: center;
		gap: 0;
		padding: 8px 0 14px;
	}

	.side-reduite .marque__lien,
	.side-reduite .nav__texte {
		max-width: 0;
		opacity: 0;
	}

	.side-reduite .marque__lien {
		flex: 0 0 0;
	}

	.side-reduite .nav__lien {
		gap: 0;
		padding: 8px 13px;
	}

	.side-reduite .nav__compteur {
		display: none;
	}

	.side-reduite .nav__point {
		display: block;
	}

	.side-reduite .compte__bouton {
		justify-content: center;
		padding: 8px 0;
	}

	.side-reduite .compte__identite,
	.side-reduite .compte__fleche {
		display: none;
	}

	

	.side-reduite .compte__bulle {
		right: auto;
		width: 210px;
	}

	/* Nom de l'entrée au survol d'une icône. */
	.side-reduite .nav__lien:hover::after,
	.side-reduite .compte:not([open]) .compte__bouton:hover::after {
		content: attr(data-bulle);
		position: absolute;
		top: 50%;
		left: calc(100% + 12px);
		z-index: 40;
		padding: 4px 8px;
		border-radius: var(--radius-small);
		background: var(--text);
		font-size: 12px;
		font-weight: 500;
		color: var(--bg);
		white-space: nowrap;
		transform: translateY(-50%);
		pointer-events: none;
	}

	.side-reduite .compte__bouton {
		position: relative;
	}
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 8px 24px;
	border-bottom: 1px solid var(--line);
	background: var(--topbar-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

/* Bouton du menu : seulement sur petit écran (la classe .btn le réaffichait partout). */
.topbar .topbar__menu {
	display: none;
}

.topbar__lieu {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: var(--muted);
}

.topbar__droite {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

/* Le contenu occupe toute la largeur, même sur grand écran (listes, tableau de bord). */
.contenu {
	padding: 24px;
}

/* En-tête de page : titre, sous-titre, actions. */
.page-tete {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.page-tete__titres {
	min-width: 0;
}

.page-tete h1 {
	margin: 0;
	font-size: 22px;
	font-weight: 650;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.page-tete__ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}

.page-tete__sous {
	margin: 2px 0 0;
	color: var(--muted);
}

.page-tete__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.retour {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
}

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

.retour .ic {
	width: 16px;
	height: 16px;
}

/* ===== Boutons (communs à tout sitepro) ===== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 34px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: var(--radius-small);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.btn .ic {
	width: 16px;
	height: 16px;
}

.btn:disabled,
.btn:disabled:hover {
	border: 1px dashed var(--line-strong);
	background: transparent;
	font-weight: 500;
	color: var(--muted);
	cursor: not-allowed;
	filter: none;
}

.btn--primaire {
	background: var(--btn-primary);
	color: #ffffff;
}

.btn--primaire:hover:not(:disabled) {
	filter: brightness(1.08);
	color: #ffffff;
}

.btn--secondaire {
	border-color: var(--line-strong);
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--shadow);
}

.btn--secondaire:hover:not(:disabled) {
	background: var(--hover);
	color: var(--text);
}

.btn--discret {
	background: transparent;
	color: var(--muted);
}

.btn--discret:hover:not(:disabled) {
	background: var(--hover);
	color: var(--text);
}

.btn--danger {
	border-color: var(--line);
	background: var(--surface);
	color: var(--bad);
}

.btn--danger:hover:not(:disabled) {
	background: var(--bad-soft);
}

.btn--icone {
	width: 34px;
	padding: 0;
}

.btn--petit {
	height: 28px;
	padding: 0 9px;
	font-size: 12px;
}

.btn--bloc {
	width: 100%;
	height: 40px;
}

/* ===== Messages ===== */

.alerte {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 16px;
	padding: 10px 14px;
	border: 1px solid transparent;
	border-radius: var(--radius-small);
	font-size: 13px;
	transition: opacity 0.4s ease;
}

.alerte--erreur {
	border-color: var(--bad-soft);
	background: var(--bad-soft);
	color: var(--bad);
}

.alerte--succes {
	border-color: var(--ok-soft);
	background: var(--ok-soft);
	color: var(--ok);
}

.alerte.is-masque {
	opacity: 0;
}

/* ===== Barre d'outils : recherche et filtres ===== */

.outils {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

/* La recherche prend la place libre de la barre d'outils, jusqu'à 640 px. */
.recherche {
	position: relative;
	flex: 1 1 360px;
	min-width: 240px;
	max-width: 640px;
}

.recherche input {
	width: 100%;
	height: 34px;
	padding: 0 34px 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-small);
	background: var(--surface);
}

.recherche input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--ring);
}

.recherche .ic {
	position: absolute;
	top: 9px;
	right: 10px;
	width: 16px;
	height: 16px;
	color: var(--muted);
	pointer-events: none;
}

/* Filtre par centre (liste des leads) : liste déroulante native présentée en bouton menu.
   Bleue quand un centre est choisi. Sans JavaScript, un bouton « Afficher » envoie le choix. */
.choix-centre {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.choix-centre select {
	height: 34px;
	padding: 0 32px 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-small);
	background: var(--surface);
	font-weight: 500;
	color: var(--text);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.choix-centre select:hover {
	border-color: var(--muted);
}

.choix-centre select:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--ring);
}

.choix-centre select.is-actif {
	border-color: var(--brand);
	background: var(--brand-soft);
	color: var(--brand-deep);
}

.js .choix-centre__ok {
	display: none;
}

.segments {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 2px;
	border: 1px solid var(--line);
	border-radius: var(--radius-small);
	background: var(--surface-2);
}

.pilule {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	padding: 0 10px;
	border: 0;
	border-radius: 5px;
	background: transparent;
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
	cursor: pointer;
}

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

.pilule[aria-pressed="true"] {
	background: var(--surface);
	box-shadow: 0 0 0 1px var(--line);
	color: var(--text);
}

.pilule__nb {
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* ===== Tableaux denses ===== */

.cadre {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.tableau {
	width: 100%;
	border-collapse: collapse;
}

.tableau th {
	height: 40px;
	padding: 0 14px;
	border-bottom: 1px solid var(--line);
	font-size: 12px;
	font-weight: 500;
	color: var(--muted);
	text-align: left;
	white-space: nowrap;
}

.tableau td {
	height: 60px;
	padding: 8px 14px;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}

.tableau tbody tr {
	transition: background-color 0.12s ease;
}

.tableau tbody tr:hover {
	background: var(--hover);
}

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

.vide {
	margin: 12px;
	padding: 32px 16px;
	border: 1px dashed var(--line-strong);
	border-radius: var(--radius-small);
	color: var(--muted);
	text-align: center;
}

/* ===== Pastilles d'état (icône + texte) ===== */

.pastille {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	white-space: nowrap;
}

.pastille__icone {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 6px;
}

.pastille__icone .ic {
	width: 12px;
	height: 12px;
	stroke-width: 2.2;
}

.pastille small {
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
}

.pastille--ok .pastille__icone { background: var(--ok-soft); color: var(--ok); }
.pastille--info .pastille__icone { background: var(--brand-soft); color: var(--brand-deep); }
.pastille--attente .pastille__icone { background: var(--warn-soft); color: var(--warn); }
.pastille--alerte .pastille__icone { background: var(--bad-soft); color: var(--bad); }
.pastille--neutre .pastille__icone { background: var(--neutral-soft); color: var(--muted); }

/* ===== Tableau de bord (direction « Pilotage », 8 oct. 2026) ===== */

/* Couleurs des statuts de lead dans les graphiques. */
:root {
	--statut-nouveau: #1aa7ec;
	--statut-en-cours: #f59e0b;
	--statut-traite: #16a34a;
}

:root[data-theme="sombre"] {
	--statut-en-cours: #fbbf24;
	--statut-traite: #4ade80;
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] {
		--statut-en-cours: #fbbf24;
		--statut-traite: #4ade80;
	}
}

/* Période : liens présentés comme les pilules d'un contrôle segmenté. */
.pilule[aria-current="page"] {
	background: var(--surface);
	box-shadow: 0 0 0 1px var(--line);
	color: var(--text);
}

a.pilule:hover {
	text-decoration: none;
}

/* Largeur plafonnée et centrée : sur très grand écran, une courbe et des lignes
   étirées sur toute la largeur se lisent mal. La colonne de droite et la hauteur
   de la courbe suivent la largeur pour garder les proportions de la maquette. */
.page-tdb {
	max-width: 1680px;
	margin-inline: auto;
}

.tdb {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(320px, 26%, 420px);
	align-items: start;
	gap: 14px;
}

.tdb .cadre {
	overflow: visible;
}

.evolution {
	padding: 1px 7px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.graphe {
	position: relative;
	height: clamp(230px, 16vw, 300px);
	margin-top: 6px;
	border-radius: var(--radius-small);
}

.graphe:focus {
	outline: none;
}

.graphe:focus-visible {
	box-shadow: 0 0 0 3px var(--ring);
}

.graphe__sans-js {
	margin: 0;
	padding-top: 90px;
	font-size: 13px;
	color: var(--muted);
	text-align: center;
}

.js .graphe__sans-js {
	display: none;
}

/* Hors du flux : le dessin, à la largeur en pixels du dernier tracé, ne doit pas
   empêcher la colonne de rétrécir quand la fenêtre se réduit (il est redessiné ensuite). */
.graphe svg {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	overflow: visible;
	font-family: var(--font);
}

.graphe__axe { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Blocs titrés */
.tdb-bloc__tete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px 4px;
}

.tdb-bloc__titre {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}

.compteur {
	min-width: 20px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--brand-soft);
	font-size: 12px;
	font-weight: 600;
	color: var(--brand-deep);
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Leads à traiter */
.a-traiter {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.a-traiter li + li {
	border-top: 1px solid var(--line);
}

.tdb .vide {
	margin: 10px 18px 18px;
	padding: 24px 16px;
}

/* Suivi des statuts : barre segmentée et légende */
.suivi {
	display: block;
	margin: 4px 0 14px;
	border-radius: 4px;
}

/* Une seule colonne tant que la courbe n'a pas la place d'être à côté de la colonne de droite. */
@media (max-width: 1280px) {
	.tdb {
		grid-template-columns: minmax(0, 1fr);
	}

	
}

@media (max-width: 640px) {
	

	

	

	.graphe {
		height: 190px;
	}

	

	

	

	/* Période sur toute la largeur : cibles plus grandes au doigt. */
	.page-tdb .page-tete .segments {
		width: 100%;
	}

	.page-tdb .page-tete .pilule {
		flex: 1 1 0;
		justify-content: center;
	}

	
}

/* ===== Fiches et formulaires en groupes ===== */

/* Page fiche : en-tête, messages, bandeau et formulaire ont la même largeur,
   pour que les boutons du haut restent alignés sur le bord de la fiche. */
.page-fiche {
	max-width: 780px;
}

.fiche {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 24px;
}

/* Grand écran (zone de contenu d'environ 1000 px et plus) : fiche sur deux colonnes, pleine largeur. */
@media (min-width: 1300px) {
	.page-fiche {
		max-width: none;
	}

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

	
}

.groupe__manque {
	font-size: 12px;
	font-weight: 500;
	color: var(--a-completer);
}

.groupe__titre {
	margin: 0 0 8px 2px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--muted);
	text-transform: uppercase;
}

.groupe__aide {
	margin: 8px 2px 0;
	font-size: 12px;
	color: var(--muted);
}

.liste {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.ligne {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	align-items: center;
	column-gap: 12px;
	min-height: 50px;
	padding: 6px 14px;
	border-bottom: 1px solid var(--line);
}

.ligne:last-child {
	border-bottom: 0;
}

.ligne > label {
	font-weight: 500;
}

.champ {
	width: 100%;
	min-width: 0;
	height: 34px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--radius-small);
	background: transparent;
	color: var(--text);
	text-align: right;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.champ:hover {
	background: var(--hover);
}

.champ:focus {
	outline: none;
	border-color: var(--brand);
	background: var(--surface);
	box-shadow: 0 0 0 3px var(--ring);
	text-align: left;
}

.champ::placeholder {
	color: var(--muted);
	opacity: 0.75;
}

/* Champ vide qui compte dans « à compléter » : pastille douce à droite,
   masquée dès qu'on clique dans le champ ou qu'il est rempli. */
.ligne:has(.a-completer) {
	position: relative;
}

.a-completer {
	position: absolute;
	top: 50%;
	right: 24px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--a-completer-fond);
	font-size: 12px;
	font-weight: 500;
	color: var(--a-completer);
	transform: translateY(-50%);
	pointer-events: none;
}

.ligne:has(.champ:focus) .a-completer,
.ligne:has(.champ--a-completer:not(:placeholder-shown)) .a-completer {
	display: none;
}

select.champ {
	justify-self: end;
	width: auto;
	min-width: 220px;
	max-width: 100%;
	border-color: var(--line-strong);
	background: var(--surface);
	text-align-last: left;
	cursor: pointer;
}

select.champ:has(option[value=""]:checked) {
	border-style: dashed;
	background: transparent;
	color: var(--muted);
}

.slug {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-width: 0;
}

.slug .champ {
	width: auto;
	max-width: 220px;
	padding-left: 2px;
	text-align: left;
}

.ligne--erreur .champ {
	border-color: var(--bad);
}

.ligne__erreur {
	grid-column: 1 / -1;
	margin: 2px 0 6px;
	font-size: 12px;
	color: var(--bad);
	text-align: right;
}

/* Horaires : jour, plage horaire, interrupteur « ouvert ». */
.ligne--jour {
	grid-template-columns: 110px minmax(0, 1fr) auto;
}

.ligne--jour:has(.switch input:not(:checked)) .ligne__erreur {
	display: none;
}

/* Interrupteur à la Apple. */
.switch {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

.switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.switch__piste {
	position: relative;
	width: 46px;
	height: 28px;
	border-radius: 999px;
	background: var(--switch-off);
	transition: background-color 0.2s ease;
}

.switch__piste::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease;
}

.switch input:checked + .switch__piste {
	background: var(--switch-on);
}

.switch input:checked + .switch__piste::after {
	transform: translateX(18px);
}

.switch input:focus-visible + .switch__piste {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

.lien-action {
	display: inline-flex;
	margin: 10px 2px 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 13px;
	font-weight: 500;
	color: var(--brand-deep);
	cursor: pointer;
}

.js-seulement {
	display: none !important;
}

.js .js-seulement {
	display: inline-flex !important;
}

/* Bandeau « modifications non enregistrées » (affiché par app.js). */
.bandeau-modif {
	position: sticky;
	top: 64px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	padding: 8px 8px 8px 14px;
	border: 1px solid var(--warn-soft);
	border-radius: var(--radius-small);
	background: color-mix(in srgb, var(--warn) 12%, var(--surface));
	font-size: 13px;
	font-weight: 500;
	color: var(--warn);
}

/* ===== Fiche lead ===== */

.copier {
	margin-left: 8px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 12px;
	font-weight: 500;
	color: var(--brand-deep);
	cursor: pointer;
}

/* ===== Corbeille ===== */

/* Accès à la corbeille : à droite des outils de la liste. */
.vers-corbeille {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 34px;
	margin-left: auto;
	padding: 0 10px;
	border-radius: var(--radius-small);
	font-size: 13px;
	font-weight: 500;
	color: var(--muted);
}

.vers-corbeille:hover {
	background: var(--surface-2);
	color: var(--text);
}

.vers-corbeille .ic {
	width: 16px;
	height: 16px;
}

.note-corbeille {
	margin: 12px 2px 0;
	font-size: 12px;
	color: var(--muted);
}

/* Bouton discret en rouge (corbeille, suppression). */
.btn--rouge,
.btn--rouge:hover:not(:disabled) {
	color: var(--bad);
}

.btn--danger-plein,
.btn--danger-plein:hover:not(:disabled) {
	background: var(--bad);
	color: #ffffff;
}

/* Fenêtre de confirmation : carte centrée, fond de page flouté, apparition douce. */
.modale {
	width: min(400px, calc(100vw - 32px));
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--surface);
	color: var(--text);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}

.modale::backdrop {
	background: rgba(15, 23, 42, 0.28);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

:root[data-theme="sombre"] .modale::backdrop {
	background: rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] .modale::backdrop {
		background: rgba(0, 0, 0, 0.45);
	}
}

.modale[open] {
	animation: modale-entree 0.18s ease-out;
}

.modale[open]::backdrop {
	animation: modale-voile 0.18s ease-out;
}

@keyframes modale-entree {
	from {
		opacity: 0;
		transform: translateY(6px) scale(0.98);
	}
}

@keyframes modale-voile {
	from {
		opacity: 0;
	}
}

.modale__corps {
	padding: 24px 24px 20px;
	text-align: center;
}

.modale__icone {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: var(--bad-soft);
	color: var(--bad);
}

.modale__icone .ic {
	width: 22px;
	height: 22px;
}

.modale__titre {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 650;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.modale__texte {
	margin: 0;
	color: var(--muted);
	text-wrap: pretty;
}

.modale__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 0 24px 24px;
}

.modale__actions .btn {
	height: 38px;
	white-space: normal;
	line-height: 1.2;
}

/* Fiche à la corbeille : bandeau pointillé rouge, champs en lecture seule. */
.bandeau-corbeille {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	padding: 8px 8px 8px 14px;
	border: 1px dashed var(--bad);
	border-radius: var(--radius-small);
	font-size: 13px;
	font-weight: 500;
	color: var(--bad);
}

.bandeau-corbeille form {
	margin: 0;
}

.fiche__lecture {
	display: contents;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.fiche__lecture:disabled .champ,
.fiche__lecture:disabled .switch {
	cursor: default;
	opacity: 0.7;
}

.fiche__lecture:disabled .lien-action {
	display: none !important;
}

/* En lecture seule, pas d'invitation à compléter. */
.fiche__lecture:disabled .groupe__manque,
.fiche__lecture:disabled .a-completer {
	display: none;
}

/* Message avec action (« Annuler » après une mise à la corbeille). */
.alerte--actions {
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}

.alerte--actions form {
	margin: 0;
}

.lien-action--alerte {
	margin: 0;
	color: inherit;
	text-decoration: underline;
}

/* ===== Réglages ===== */

.carte {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.themes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	border: 0;
}

.theme {
	display: block;
	text-align: center;
	cursor: pointer;
}

.theme__radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.theme__apercu {
	position: relative;
	display: block;
	height: 88px;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 10px;
	box-shadow: 0 0 0 1px var(--line);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.theme__radio:checked ~ .theme__apercu {
	border-color: var(--btn-primary);
}

.theme__radio:focus-visible ~ .theme__apercu {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
}

.theme__nom {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 500;
}

.theme__radio:checked ~ .theme__nom {
	font-weight: 600;
	color: var(--brand-deep);
}

/* Aperçus miniatures : couleurs fixes, ils montrent chaque mode tel quel. */
.mini { position: absolute; inset: 0; display: flex; }
.mini__side { width: 30%; padding: 8px 6px; }
.mini__main { flex: 1; padding: 10px; }
.mini__barre { display: block; height: 6px; margin-bottom: 6px; border-radius: 3px; }
.mini__carte { display: block; height: 24px; margin-top: 6px; border-radius: 6px; }
.mini--clair .mini__side { background: #ffffff; border-right: 1px solid #e7eaef; }
.mini--clair .mini__main { background: #f7f8fa; }
.mini--clair .mini__barre { background: #cbd5e1; }
.mini--clair .mini__carte { background: #ffffff; border: 1px solid #e7eaef; }
.mini--sombre .mini__side { background: #121418; border-right: 1px solid #22262d; }
.mini--sombre .mini__main { background: #0e1014; }
.mini--sombre .mini__barre { background: #3a404b; }
.mini--sombre .mini__carte { background: #16191e; border: 1px solid #262b33; }
.mini--moitie { clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%); }

.note {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--muted);
}

.note > span {
	display: none;
}

.themes-form:has(input[value="clair"]:checked) .note__clair,
.themes-form:has(input[value="sombre"]:checked) .note__sombre,
.themes-form:has(input[value="auto"]:checked) .note__auto-clair {
	display: inline;
}

@media (prefers-color-scheme: dark) {
	.themes-form:has(input[value="auto"]:checked) .note__auto-clair {
		display: none;
	}

	.themes-form:has(input[value="auto"]:checked) .note__auto-sombre {
		display: inline;
	}
}

.themes-form__actions {
	margin-top: 16px;
}

.js .themes-form__actions {
	display: none;
}

/* ===== Connexion et pages d'erreur ===== */

.page-auth {
	min-height: 100vh;
}

.auth {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 24px 16px;
}

.auth__carte {
	width: 100%;
	max-width: 380px;
	padding: 32px 28px 28px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
}

.auth__carte--centre {
	text-align: center;
}

.auth__titre {
	margin: 0;
	font-size: 20px;
	font-weight: 650;
	letter-spacing: -0.02em;
	text-align: center;
}

.auth__sous {
	margin: 4px 0 22px;
	color: var(--muted);
	text-align: center;
}

/* Liens sous le formulaire (mot de passe oublié, renvoyer un code, retour). */
.auth__liens {
	margin: 16px 0 0;
	font-size: 13px;
	text-align: center;
}

.auth__liens--deux {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.auth__note {
	color: var(--muted);
}

.case {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: var(--muted);
	cursor: pointer;
}

.case input {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin: 2px 0 0;
	accent-color: var(--btn-primary);
}

.alerte__ligne {
	display: block;
}

/* Règles du mot de passe, cochées pendant la saisie (app.js). */
.regles {
	display: grid;
	gap: 3px;
	margin: -4px 0 4px;
	padding: 0;
	list-style: none;
	font-size: 12.5px;
	color: var(--muted);
}

.regles li::before {
	content: "○";
	display: inline-block;
	width: 18px;
}

.regles li.is-ok {
	color: var(--ok);
}

.regles li.is-ok::before {
	content: "✓";
}

.erreur__code {
	margin: 0 0 6px;
	font-size: 40px;
	font-weight: 650;
	letter-spacing: -0.03em;
	color: var(--brand);
}

.formulaire {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.champ-bloc {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.champ-bloc__libelle {
	font-size: 13px;
	font-weight: 500;
}

.champ-bloc__saisie {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-small);
	background: var(--surface);
	color: var(--text);
}

.champ-bloc__saisie:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--ring);
}

/* ===== Mouvements réduits ===== */

@media (prefers-reduced-motion: reduce) {
	.modale[open],
	.modale[open]::backdrop {
		animation: none;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

/* ===== Mobile : le menu devient un panneau qui glisse ===== */

@media (max-width: 900px) {
	.side {
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: var(--shadow-pop);
	}

	.side.is-open {
		transform: translateX(0);
	}

	.main {
		margin-left: 0;
	}

	.topbar {
		padding: 8px 16px;
	}

	.topbar .topbar__menu {
		display: inline-flex;
	}

	.side__bascule {
		display: none;
	}

	.contenu {
		padding: 16px;
	}

	

	select.champ {
		justify-self: stretch;
		min-width: 0;
		width: 100%;
	}

	.ligne {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 2px;
		padding: 10px 14px;
	}

	.champ,
	select.champ {
		padding-left: 0;
		text-align: left;
		text-align-last: left;
	}

	.slug {
		justify-content: flex-start;
	}

	.ligne--jour {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	

	.ligne--jour .switch {
		grid-column: 2;
		grid-row: 1;
	}

	

	.ligne__erreur {
		text-align: left;
	}

	

	.themes {
		gap: 10px;
	}

	.theme__apercu {
		height: 72px;
	}
}

/* Page d’erreur affichée dans l’interface connectée. */
.contenu .auth__carte { margin: 40px auto; }

/* ===== Petit écran : chaque ligne de liste devient une carte =====
   Première cellule (nom ou date) sur toute la largeur, les autres à la suite.
   Ne concerne que les listes en cadre. */

@media (max-width: 640px) {
	.outils .recherche {
		flex: 1 1 100%;
	}

	.segments {
		flex-wrap: nowrap;
		max-width: 100%;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.choix-centre {
		flex: 1 1 auto;
	}

	.choix-centre select {
		flex: 1 1 auto;
		min-width: 0;
	}

	.pilule {
		flex: 0 0 auto;
	}

	.cadre .tableau thead {
		display: none;
	}

	.cadre .tableau,
	.cadre .tableau tbody {
		display: block;
	}

	.cadre .tableau tr {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 6px 14px;
		padding: 12px 14px;
		border-bottom: 1px solid var(--line);
	}

	.cadre .tableau tbody tr:last-child {
		border-bottom: 0;
	}

	.cadre .tableau td {
		display: block;
		height: auto;
		padding: 0;
		border: 0;
	}

	.cadre .tableau td:first-child {
		flex: 1 1 100%;
	}
}

/* ===== Comptes (9 oct. 2026, maquette validée) ===== */

.alerte--info {
	border-color: var(--line);
	background: var(--brand-soft);
	color: var(--text);
}

.note-bas {
	margin: 10px 2px 0;
	font-size: 12px;
	color: var(--muted);
}

.role {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--neutral-soft);
	font-size: 12px;
	font-weight: 550;
	white-space: nowrap;
}

.role--centre {
	background: var(--brand-soft);
	color: var(--brand-deep);
}

/* Lien d'invitation ou de réinitialisation à transmettre à la main (e-mail non envoyé). */
.lien-a-transmettre {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-small);
	background: var(--warn-soft);
	font-size: 13px;
}

.lien-a-transmettre p {
	margin: 0 0 8px;
}

.lien-a-transmettre__champ {
	display: flex;
	gap: 8px;
}

.lien-a-transmettre__champ input {
	flex: 1 1 auto;
	min-width: 0;
	height: 30px;
	padding: 0 10px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-small);
	background: var(--surface);
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 12px;
}

/* Lignes des fiches : case à cocher à droite, action à droite, détail, journal. */
.ligne--case {
	cursor: pointer;
}

.ligne--case:hover {
	background: var(--hover);
}

.ligne--case__droite {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.ligne--case__droite small {
	font-size: 12px;
	color: var(--muted);
}

.ligne--case input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--btn-primary);
}

.liste--erreur {
	border-color: var(--bad);
}

.ligne__erreur--groupe {
	margin: 8px 2px 0;
	text-align: left;
}

.ligne--action {
	grid-template-columns: minmax(0, 1fr) auto;
}

.ligne--action form {
	display: flex;
}

.ligne--action .lien-action {
	margin: 0;
	white-space: nowrap;
}

.lien-action--rouge {
	color: var(--bad);
}

.ligne--detail {
	grid-template-columns: minmax(0, 1fr) auto;
	min-height: 40px;
	padding-left: 28px;
	font-size: 13px;
}

.ligne--detail small {
	font-size: 12px;
	color: var(--muted);
	text-align: right;
}

.ligne--journal {
	grid-template-columns: 82px minmax(0, 1fr);
	align-items: start;
	min-height: 0;
	padding-top: 9px;
	padding-bottom: 9px;
	font-size: 13px;
}

.ligne--journal time {
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

/* Accès d'un compte centre ; rubriques futures en pointillé (règle : pointillé = inactif). */
.acces {
	margin: 0;
	padding: 0;
	list-style: none;
}

.acces .ligne {
	grid-template-columns: minmax(0, 1fr) auto;
}

.liste--vide {
	border-style: dashed;
	border-color: var(--line-strong);
	background: transparent;
}

.zone-danger {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.zone-danger .groupe__aide {
	margin: 0;
}

@media (max-width: 640px) {
	.ligne--detail {
		padding-left: 14px;
	}

	.ligne--journal {
		grid-template-columns: 72px minmax(0, 1fr);
	}
}
