/* ================================================================
   DPSS — Coque applicative (layout, header, formulaires admin)
   ================================================================
   Sommaire :
     1. Variables globales :root
     2. Shell application
     3. Header
     4. Layout principal (grille menu+contenu, scroll, sidebar)
     5. Footer
     6. Pages admin & formulaires
     7. Profil
     8. Responsive
     9. Composants admin (onglets, boutons, flash)
    10. Droits d'acces

   Source de verite pour la mise en page et les formulaires admin.

   Regle : ne pas dupliquer ces regles dans css/style.css
   (sauf exceptions locales ciblees).

   Conventions : indentation par tabulation ; tokens :root ci-dessous.
   ================================================================ */

/* ============================================================
   1. VARIABLES GLOBALES :root
   ============================================================ */
:root {
	--dpss-bg: #e8eef5;
	--dpss-surface: #ffffff;
	--dpss-surface-muted: #f1f5f9;
	--dpss-border: #cbd5e1;
	--dpss-border-light: #e2e8f0;
	--dpss-text: #0f172a;
	--dpss-text-muted: #64748b;
	--dpss-primary: #0284c7;
	--dpss-primary-hover: #0369a1;
	--dpss-primary-soft: #e0f2fe;
	--dpss-accent: #0d9488;
	--dpss-radius: 12px;
	--dpss-radius-sm: 8px;
	--dpss-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	--dpss-shadow-md: 0 4px 24px rgba(15, 23, 42, 0.08);
	--dpss-header-h: 80px;
	--dpss-shell-top-offset: 78px;
	--dpss-footer-h: 18px;
	--dpss-shell-side-pad: 12px;
	--dpss-shell-edge-top: -10px;
	/* Contrôles formulaires (source unique). */
	--dpss-form-control-h: 20px;
	--dpss-form-control-font: 11px;
	--dpss-form-control-pad-x: 6px;
	--dpss-form-button-h: 22px;
	--dpss-form-button-font: 11px;
	--dpss-form-button-pad-x: 8px;
	--nav-bg-color: #ffffff;
	--contenu-bg-color: #f8fafc;
	/* Planning / admin métier (style.css) — une seule source pour ces teintes */
	--dpss-planning-link: #063058;
	--dpss-planning-link-hover: #02182d;
	--dpss-planning-border-accent: #4a78a8;
	--dpss-planning-heading: #1a3050;
	--dpss-planning-note-link: #0a4a8c;
	--dpss-planning-note-link-hover: #052a52;
	--dpss-planning-hub-border: #cad7eb;
	--dpss-planning-hub-bg: #dae5f4;
	--dpss-planning-pill-border: #9db8d3;
	--dpss-planning-ink: #1d4e89;
	--dpss-planning-cell-bg: #f0f9ff;
	--dpss-planning-section-label: #0f2d4d;
	--dpss-planning-settings-surface: #f0f6fc;
	--dpss-planning-settings-hover: #dce8f5;
	--dpss-planning-muted-blue-border: #7ca4cc;
	--dpss-planning-gradient-a: #d7e7f8;
	--dpss-planning-gradient-b: #8fc0ef;
}

html {
	overflow-y: scroll;
	scroll-behavior: smooth;
}

body {
	font-family:
		system-ui,
		-apple-system,
		"Segoe UI",
		Roboto,
		"Helvetica Neue",
		Arial,
		sans-serif;
	background: var(--dpss-bg);
	background-image: radial-gradient(
		ellipse 120% 80% at 50% -20%,
		rgba(14, 165, 233, 0.12),
		transparent 50%
	);
	font-size: 13px;
	line-height: 1.45;
	color: var(--dpss-text);
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--dpss-primary);
	text-decoration-skip-ink: auto;
}
a:hover {
	color: var(--dpss-primary-hover);
}

/* ============================================================
   2. SHELL APPLICATION
   ============================================================ */

/* Application shell — pleine largeur */
.dpss-app,
.dpss-app {
	border: none;
	background: transparent;
	width: 100%;
	max-width: none;
	margin: 0 auto;
	padding: 0 var(--dpss-shell-side-pad);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100svh;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
}

/* Titre h1 unique au niveau document (lecteurs d'écran) — masqué à l'écran. */
.dpss-visually-hidden:not(:focus):not(:active) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   3. HEADER
   ============================================================ */
.dpss-header,
.dpss-header {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	flex-shrink: 0;
	min-height: var(--dpss-header-h);
	margin: 0;
	padding: 10px 16px;
	border-radius: var(--dpss-radius);
	background: var(--nav-bg-color);
	color: var(--dpss-text);
	box-shadow: var(--dpss-shadow);
	border: 1px solid var(--dpss-border-light);
	position: relative;
	z-index: 10;
}

/* Bandeau maintenance dans le header (visible uniquement par les techniciens niveau >= 4) */
.dpss-maint-banner {
	width: 100%;
	order: 99;
	padding: 3px 16px;
	background: #000;
	color: #ffc107;
	font-size: 12px;
	font-weight: 500;
	text-align: center;
	line-height: 1.4;
}
.dpss-maint-banner__link {
	color: #ffc107;
	text-decoration: none;
}
.dpss-maint-banner__link:hover {
	color: #fff;
	text-decoration: underline;
}

.site-breadcrumb-top {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dpss-header__logo,
.dpss-header__logo {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	min-width: 0;
	background: transparent;
}

/* Logo seul : pas d’encart blanc ni 2e fond — l’image bkg.jpg est affichée telle quelle */
.dpss-header__logo-link {
	display: block;
	background: transparent;
	padding: 0;
	border: none;
	border-radius: 0;
	overflow: visible;
	line-height: 0;
}

.dpss-header__logo-link img {
	display: block;
	height: auto;
	max-height: 50px;
	width: auto;
	max-width: 210px;
}

.dpss-header__center {
	flex: 1 1 220px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	background: transparent;
	border: none;
	text-align: left;
	height: auto;
}

.dpss-header__brand {
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--dpss-text);
	text-shadow: none;
}

.dpss-header__brand-sub {
	font-weight: 500;
	color: var(--dpss-text-muted);
	font-size: 0.95em;
	margin-left: 0.35em;
}

.site-breadcrumb.site-breadcrumb-top {
	margin: 0;
	padding: 0;
	font-size: 12px;
}

.site-breadcrumb a {
	color: var(--dpss-primary);
	text-decoration: none;
}
.site-breadcrumb a:hover {
	color: var(--dpss-primary-hover);
	text-decoration: underline;
}
.site-breadcrumb-sep {
	color: var(--dpss-text-muted);
	margin: 0 4px;
	font-weight: 300;
}
.site-breadcrumb-current {
	font-weight: 600;
	color: var(--dpss-text);
}

/* Surbrillance douce sur les lignes de tableaux admin */
.admin-table {
	border-collapse: collapse;
	font-size: 12px;
}
.admin-table thead th {
	border-bottom: 2px solid var(--dpss-border);
}
.admin-table thead {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #dce4ed;
}
.admin-table tbody tr + tr {
	border-top: 1px solid var(--dpss-border-light);
}
.admin-table tbody tr:hover td,
.admin-table tbody tr:hover th {
	background-color: var(--dpss-surface);
}
.planning-code-row {
	cursor: pointer;
}
.planning-code-row:hover td {
	background-color: #f0f4ff;
}
.admin-user-row {
	cursor: pointer;
}
.admin-user-row:hover td {
	background-color: #f0f4ff;
}

/* Ligne de détail inline (consultation collaborateurs) */
tr.admin-user-detail-row td {
	padding: 0;
	background: var(--dpss-surface, #fafafa);
	border-top: none;
	border-bottom: 2px solid var(--dpss-planning-border-accent, #2563eb);
}
.admin-user-detail-card,
.admin-user-edit-card {
	padding: 12px 16px 8px 16px;
	animation: admin-detail-fadein 0.15s ease-out;
}
@keyframes admin-detail-fadein {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}
.admin-user-detail-card h4 {
	margin: 0 0 8px 0;
	font-size: 15px;
}
.admin-user-detail-card .admin-readonly-fiche {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}
.admin-user-detail-card .admin-readonly-fiche p {
	margin: 2px 0;
	font-size: 12px;
}
.admin-user-detail-actions {
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.admin-table--codes th,
.admin-table--codes td {
	white-space: nowrap;
	padding: 5px 8px;
}

.planning-code-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.25em;
	padding: 2px 6px;
	border-radius: 3px;
	font-weight: 600;
	font-size: 11px;
	letter-spacing: 0.03em;
	font-family: 'Segoe UI', system-ui, sans-serif;
	border: 1px solid rgba(0,0,0,0.2);
	line-height: 1;
	text-align: center;
}

/* Message 'Aucun résultat' visuel */
.admin-table-empty {
	text-align: center;
	padding: 32px 16px;
	color: var(--dpss-text-muted);
}
.admin-table-empty__icon {
	display: block;
	font-size: 28px;
	margin-bottom: 8px;
	opacity: 0.5;
}
.admin-table-empty__text {
	font-size: 12px;
	font-weight: 500;
}
.admin-table-empty__hint {
	display: block;
	font-size: 11px;
	margin-top: 4px;
	opacity: 0.7;
}

/* Carte utilisateur dans le menu latéral */
.dpss-header__user {
	flex: 0 1 auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	text-align: right;
	font-size: 13px;
	font-weight: 500;
	max-width: 42%;
	min-width: 8rem;
	line-height: 1.35;
}

/* Bouton Déconnexion intégré dans l'en-tête (ressemble à un lien) */
.logout-form-inline {
	display: inline;
	margin: 0;
	padding: 0;
}
.logout-btn-as-link {
	display: inline-block;
	margin: 4px 0;
	padding: 2px 8px;
	border: 1px solid var(--dpss-border, #c0c8d4);
	border-radius: 3px;
	background: var(--dpss-bg-raised, #f8f9fa);
	color: var(--dpss-text, #333);
	font: inherit;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.6;
	transition:
		background 0.15s,
		border-color 0.15s;
}
.logout-btn-as-link:hover {
	background: var(--dpss-bg-hover, #e9ecef);
	border-color: var(--dpss-primary, #0056b3);
	color: var(--dpss-primary, #0056b3);
}

.dpss-header__name {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
}

.dpss-header__profile-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: var(--dpss-radius-sm);
	background: var(--dpss-surface);
	border: 1px solid var(--dpss-border-light);
	text-decoration: none;
	color: var(--dpss-text);
	position: relative;
	transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.dpss-header__profile-link:hover {
	background: var(--dpss-primary-soft);
	border-color: var(--dpss-primary);
	box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}
.dpss-header__profile-link:hover .dpss-header__badge {
	background: var(--dpss-primary);
	color: var(--dpss-surface);
}

.dpss-header__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--dpss-primary-soft);
	color: var(--dpss-primary-hover);
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	min-height: 18px;
	flex-shrink: 0;
}

.dpss-header__hub-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	margin-left: 6px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--dpss-primary-soft);
	color: var(--dpss-primary-hover);
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	min-height: 18px;
	flex-shrink: 0;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.dpss-header__hub-btn:hover {
	background: var(--dpss-primary);
	color: var(--dpss-surface);
}

.dpss-header__orga-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	top: -3px;
	margin: 0 8px 0 0;
	width: 38px;
	height: 38px;
	border-radius: 8px;
	background: transparent;
	color: var(--dpss-text-secondary, #64748b);
	font-size: 24px;
	flex-shrink: 0;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}
.dpss-header__orga-btn:hover {
	background: var(--dpss-bg-muted, #f1f5f9);
	color: var(--dpss-primary, #2563eb);
}
.dpss-header__orga-icon {
	display: block;
	line-height: 1;
}

.dpss-header__sector-form {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 0;
}

.dpss-header__tools {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	flex-wrap: wrap;
	vertical-align: middle;
	margin-right: 10px;
}

.dpss-header__nav-toggle {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	font-size: 16px;
	font-weight: 400;
	font-family: inherit;
	border: 1px solid var(--dpss-border);
	border-radius: 50%;
	background: var(--dpss-surface);
	color: var(--dpss-text-muted);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	line-height: 1;
}
.dpss-header__nav-toggle:hover {
	background: var(--dpss-bg-hover, #e9ecef);
	border-color: var(--dpss-primary, #0056b3);
	color: var(--dpss-primary, #0056b3);
}

/* ≤480px : téléphone */
@media (max-width: 480px) {
	.dpss-header__nav-toggle {
		width: 30px;
		height: 30px;
		font-size: 18px;
	}
}

/* ============================================================
   4. LAYOUT PRINCIPAL (grille menu+contenu, scroll, sidebar)
   ============================================================ */

/* Grille principale */
.dpss-main-columns,
.dpss-main-columns {
	display: grid;
	grid-template-columns: 168px minmax(320px, 1fr);
	column-gap: 16px;
	align-items: start;
	align-content: start;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0;
	overflow: hidden;
	padding: 0;
}

body.dpss-hide-leftnav .dpss-main-columns,
body.dpss-hide-leftnav .dpss-main-columns {
	grid-template-columns: minmax(0, 1fr);
}

body.dpss-hide-leftnav .dpss-sidebar--left {
	display: none !important;
}

.dpss-main,
.dpss-main {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	box-sizing: border-box;
}
.dpss-main {
	height: 100%;
}

/* Chaîne de conteneurs scroll principal (source de vérité shell). */
.dpss-page-shell {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	min-width: 0;
}

.dpss-page-shell__region {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	min-width: 0;
}

.dpss-page-shell__scroll {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	min-height: 0;
	min-width: 0;
	width: 100%;
	max-height: none;
	overflow-x: auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--dpss-border-light);
	border-radius: var(--dpss-radius);
	background: var(--dpss-surface);
	padding: 16px 18px;
	box-sizing: border-box;
	box-shadow: var(--dpss-shadow);
}

.dpss-main {
	height: auto;
	align-self: start;
}

.dpss-page-shell__content {
	display: block;
	overflow: visible;
	min-height: 0;
	min-width: 0;
}

.dpss-page-shell__content > section.admin-page {
	display: block;
	overflow: visible;
	min-height: 0;
}

/* Page Effectifs du jour — largeur max réduite, aligné à gauche */
body.rub-gestion_accueil .dpss-page-shell__content {
	max-width: 1400px;
}

#planning-root,
.planning-main {
	display: block;
	overflow: visible;
	min-height: 0;
	width: 100%;
	box-sizing: border-box;
}

#planning-root {
	--planning-grid-v-offset: 300px;
}

.planning-main {
	overflow: visible;
}

/* ------------------------------------------------------------
 * Page planning : scroll vertical interne sans overflow extérieur
 * ────────────────────────────────────────────────────────────
 * Toute la chaîne DOM, du shell jusqu'au scrollport, reçoit
 * display:flex; flex-direction:column; flex:1 1 auto; min-height:0
 * pour que .planning-table-scrollport prenne exactement la hauteur
 * restante du viewport (moins le header, la navigation compacte
 * et la barre de défilement horizontal).
 *
 * Aucun maillon intermédiaire n'a overflow:hidden (uniquement
 * .dpss-page-shell__scroll en haut de chaîne) afin de préserver
 * le bon fonctionnement de position:sticky sur <thead> et synopsis.
 *
 * Liens de navigation des mois : ne pas utiliser d'ancre
 * (#planning-month-X) car le scroll automatique vers le <th>
 * dans un scrollport à overflow:hidden fait remonter le thead
 * sticky, coupant le header visuellement.
 */
body.rub-planning .dpss-page-shell__scroll {
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
body.rub-planning .dpss-page-shell__content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning .dpss-page-shell__content section.admin-page {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning #planning-root {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning .planning-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning .admin-card--planning-grid {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning .planning-year-scroll {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
body.rub-planning .planning-table-scrollport {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: scroll;
	overflow-x: scroll;
}
/* ------------------------------------------------------------ */

/* Colonnes latérales */
.dpss-sidebar__inner {
	min-height: 0;
}

.dpss-sidebar,
.dpss-sidebar--left {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border: 1px solid var(--dpss-border-light);
	border-radius: var(--dpss-radius);
	background: var(--dpss-surface);
	box-shadow: var(--dpss-shadow);
	overflow: hidden;
	height: 100%;
}

.dpss-sidebar__inner {
	display: flex;
	flex-direction: column;
	padding: 12px 14px;
	height: 100%;
	max-height: 600px;
	box-sizing: border-box;
	overflow-y: auto;
	overflow-x: hidden;
}

.dpss-leftnav__body {
	flex: 0 0 auto;
}

/* Pied du menu latéral (collé en bas) */
.dpss-leftnav-footer {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--dpss-border-light, #e2e8f0);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.dpss-leftnav-footer__link {
	display: block;
	padding: 6px 10px;
	border-radius: var(--dpss-radius-sm);
	border: 1px solid var(--dpss-border-light);
	background: var(--dpss-surface);
	color: var(--dpss-text);
	text-decoration: none;
	font-size: 11px;
	font-weight: 500;
	transition: background 0.15s, border-color 0.15s;
}
.dpss-leftnav-footer__link:hover {
	background: var(--dpss-primary-soft, #f1f5f9);
	border-color: rgba(2, 132, 199, 0.35);
}
.dpss-leftnav-footer__link.menu_bg {
	background: var(--dpss-primary-soft, #e0f2fe);
	border-color: var(--dpss-border-light, #bae6fd);
	border-left: 3px solid var(--dpss-primary, #0ea5e9);
	font-weight: 700;
	padding-left: 8px;
}
.dpss-leftnav-footer__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 12px;
	height: 12px;
	padding: 0 2px;
	border-radius: 6px;
	background: #dc3545;
	color: #fff;
	font-size: 8px;
	font-weight: 700;
	line-height: 1;
	vertical-align: middle;
	margin-left: 3px;
}

.dpss-sidebar--left nav ul {
	list-style: none;
	margin: 0 0 12px 0;
	padding: 0;
	text-align: left;
}

.dpss-sidebar--left nav ul:last-child {
	margin-bottom: 0;
}

.dpss-sidebar--left li {
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0 0 8px 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
}

/* Espacements UX demandés: Déconnexion→Mon profil (50), Mon profil→Mon planning (10), Mon planning→Gestion (50). */
.dpss-sidebar--left nav[aria-label="Compte et connexion"] {
	margin-bottom: 50px;
}
.dpss-sidebar--left nav[aria-label="Espace collaborateur"] ul {
	margin-bottom: 0;
}
.dpss-sidebar--left nav[aria-label="Espace collaborateur"] li {
	margin-bottom: 10px;
}
.dpss-sidebar--left nav[aria-label="Espace collaborateur"] li:last-child {
	margin-bottom: 0;
}
.dpss-sidebar--left nav[aria-label="Administration"] {
	margin-top: 50px;
}

/* Bloc "Guide" niveau 1 : rendu léger (pas bouton). */
.dpss-sidebar--left nav[aria-label="Guide utilisateurs"] {
	margin-top: 50px;
}

.dpss-sidebar--left li a {
	display: block;
	padding: 10px 12px;
	border-radius: var(--dpss-radius-sm);
	border: 1px solid var(--dpss-border-light);
	background: var(--dpss-surface);
	color: var(--dpss-text);
	text-decoration: none;
	font-size: 12px;
	font-weight: 500;
	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		color 0.15s ease,
		box-shadow 0.15s ease;
}

.dpss-sidebar--left li a:hover {
	background: var(--dpss-primary-soft);
	border-color: rgba(2, 132, 199, 0.35);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
	color: var(--dpss-text);
}

/* Bouton menu actif : bleu très clair (indépendant de --dpss-primary) */
.dpss-sidebar--left li.menu_bg a,
.dpss-sidebar--left li.coll_bg a {
	background: var(--dpss-primary-soft, #e0f2fe);
	border-color: var(--dpss-border-light, #bae6fd);
	border-left: 3px solid var(--dpss-primary, #0ea5e9);
	color: var(--dpss-text, #0c4a6e);
	font-weight: 700;
	padding-left: 10px;
	box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1);
}

.dpss-sidebar--left li.menu_bg a:hover,
.dpss-sidebar--left li.coll_bg a:hover {
	background: var(--dpss-primary-soft, #bae6fd);
	border-color: var(--dpss-border-light, #7dd3fc);
	color: var(--dpss-primary-hover, #082f49);
}

/* ============================================================
   5. FOOTER
   ============================================================ */

/* Pied de page */
.dpss-footer,
.dpss-footer {
	position: relative;
	z-index: auto;
	flex-shrink: 0;
	min-height: var(--dpss-footer-h);
	margin-top: 0;
	padding: 4px 4px 30px 4px;
	text-align: center;
	font-size: 12px;
	line-height: 1.2;
	color: var(--dpss-text-muted);
	border: none;
	background: transparent;
}

/* Lien bascule vers la version mobile dans le footer desktop */
.dpss-footer__switch-link {
	display: inline-block;
	margin-left: 12px;
	color: var(--dpss-text-muted);
	font-size: 12px;
	text-decoration: underline;
	opacity: 0.7;
}
.dpss-footer__switch-link:hover {
	opacity: 1;
}

/* Barre « version bureau sur mobile » — sticky en bas */
.dpss-footer--forced-desktop {
	position: sticky;
	bottom: 0;
	z-index: 200;
	flex-shrink: 0;
	margin-top: auto;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
	padding: 10px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: #64748b;
	text-align: left;
	min-height: 52px;
	box-sizing: border-box;
}
.dpss-footer__bar-msg {
	font-weight: 500;
}
.dpss-footer__bar-link {
	font-size: 13px;
	font-weight: 600;
	color: #0284c7;
	text-decoration: none;
	padding: 10px 16px;
	min-height: 44px;
	border: 1px solid #bae6fd;
	border-radius: 8px;
	background: #f0f9ff;
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s;
}
.dpss-footer__bar-link:hover,
.dpss-footer__bar-link:focus-visible {
	background: #e0f2fe;
	border-color: #7dd3fc;
	color: #0369a1;
	text-decoration: none;
}

/* ============================================================
   6. PAGES ADMIN & FORMULAIRES
   ============================================================ */

/* Titres de page */
#gestion.header {
	padding-top: 0;
	margin-bottom: 4px;
}

/* En-tête sticky pour les pages Gestion (créer, modifier, paramètres, etc.) :
   le titre reste visible pendant le scroll de la liste des collaborateurs. */
#gestion.header.admin-header-sticky {
	position: sticky;
	top: -16px;
	z-index: 100;
	background: var(--dpss-surface);
	padding: 16px 16px 4px 16px;
	margin: -16px -18px 4px -18px;	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	box-sizing: content-box;
}
#gestion.header.admin-header-sticky .admin-main-title {
	font-size: 18px;
}

/* Grille page absences & courbes (liste | graphique) : 2 colonnes.
 * Sélecteur sur .dpss-code-chart-main-grid uniquement (classe dédiée) pour ne pas dépendre du parent.
 * Ancrage haut : colonne graphique en flux bloc (pas de flex). */
.dpss-code-chart-main-grid {
	display: grid;
	grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
	gap: 1.25rem 1.5rem;
	align-items: start;
	align-content: start;
	justify-items: stretch;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
.dpss-code-chart-main-grid__list,
.dpss-code-chart-main-grid__chart {
	min-width: 0;
	align-self: start;
	justify-self: stretch;
}
.dpss-code-chart-main-grid__chart {
	display: block;
	margin: 0;
	padding: 0;
	height: fit-content;
}
.dpss-code-chart-main-grid__chart .dpss-code-monthly-block {
	margin-top: 0;
	width: 100%;
}
.dpss-code-chart-main-grid__chart .dpss-code-pie-chart-heading {
	margin-top: 0;
}

/* ≤768px : tablette */
@media (max-width: 768px) {
	.dpss-code-chart-main-grid {
		grid-template-columns: 1fr;
	}
}
.dpss-code-chart-main-grid__list .dpss-code-chart-intro {
	max-width: 100%;
	margin-bottom: 0.75rem;
}

/* Carte formulaire sticky dans les sections Gestion (ex: créer/modifier code horaire).
   Reste visible pendant le scroll de la légende des codes en dessous. */
.admin-card--form-sticky {
	position: sticky;
	top: 40px;
	z-index: 50;
}

.admin-main-title {
	display: block;
	margin: 0 0 12px 0;
	padding: 10px 0;
	border: none;
	background: linear-gradient(
		180deg,
		var(--dpss-surface-muted) 0%,
		var(--dpss-surface) 100%
	);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--dpss-text);
	box-shadow: 0 1px 0 var(--dpss-border-light);
	width: 100%;
	box-sizing: border-box;
}

.admin-page {
	padding: 4px 0 16px 0;
	font-size: 13px;
}

.admin-card {
	border: 1px solid var(--dpss-border-light);
	border-radius: var(--dpss-radius-sm);
	background: var(--dpss-surface-muted);
	padding: 14px 16px;
	margin: 12px 0;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.admin-card h4 {
	margin: 0 0 12px 0;
	padding: 8px 12px;
	border: none;
	border-radius: 6px;
	background: linear-gradient(90deg, rgba(2, 132, 199, 0.12), transparent);
	font-size: 14px;
	font-weight: 700;
	color: var(--dpss-text);
}

.admin-card-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}
.admin-card-titlebar h4 {
	margin: 0;
	padding: 8px 12px;
	border: none;
	background: linear-gradient(90deg, rgba(2, 132, 199, 0.12), transparent);
	font-size: 14px;
	font-weight: 700;
	color: var(--dpss-text);
}

.admin-page input[type="text"],
.admin-page input[type="password"],
.admin-page select,
.admin-page input[type="number"],
.admin-page input[type="date"],
.admin-page input[type="time"],
.admin-page input[type="search"] {
	height: var(--dpss-form-control-h);
	border-radius: var(--dpss-radius-sm);
	border: 1px solid var(--dpss-border);
	padding: 0 var(--dpss-form-control-pad-x);
	font-size: var(--dpss-form-control-font);
	box-sizing: border-box;
}

/* Synoptique effectifs : minimum opérationnel CR/BI (valeurs 1–4 uniquement). */
.admin-page #staffing_cr_min_op,
.admin-page #staffing_bi_min_op {
	width: 52px;
	min-width: 52px;
	max-width: 52px;
	padding-left: 6px;
	padding-right: 6px;
	text-align: center;
}

.admin-page button,
.admin-page input[type="submit"] {
	height: var(--dpss-form-button-h);
	padding: 0 var(--dpss-form-button-pad-x);
	border-radius: var(--dpss-radius-sm);
	border: 1px solid var(--dpss-primary);
	background: var(--dpss-primary);
	color: var(--dpss-surface);
	font-weight: 600;
	font-size: var(--dpss-form-button-font);
	cursor: pointer;
	transition:
		background 0.15s,
		filter 0.15s;
	box-sizing: border-box;
}

.admin-page button:hover,
.admin-page input[type="submit"]:hover {
	filter: brightness(1.06);
}

.admin-page button:focus-visible,
.admin-page input[type="submit"]:focus-visible,
.admin-page a:focus-visible,
.admin-page input:focus-visible,
.admin-page select:focus-visible,
.admin-page textarea:focus-visible {
	outline: 2px solid var(--dpss-primary);
	outline-offset: 2px;
}

/* Espace visuel supplémentaire avant les actions sous un bloc de texte. */
.admin-page .admin-card form > button,
.admin-page .admin-card form > input[type="submit"],
.admin-page .admin-card form > p > button,
.admin-page .admin-card form > p > input[type="submit"] {
	margin-top: 10px;
}
/* Exception: la barre compacte planning garde ses actions alignées en ligne. */
.admin-page .admin-card form.planning-pdf-export-form--compact > button,
.admin-page
	.admin-card
	form.planning-pdf-export-form--compact
	> input[type="submit"] {
	margin-top: 0;
}

/* Pas de marge forcée sur les barres d'actions compactes. */
.admin-page .admin-toolbar button,
.admin-page .admin-toolbar input[type="submit"] {
	margin-top: 0;
}

/* Barre Enregistrer sous le titre du planning */
.planning-save-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px 0;
	padding: 8px 0;
	flex-wrap: wrap;
}
.planning-save-bar .planning-head-save-status {
	font-size: 11px;
	line-height: 1.25;
}
.planning-save-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: var(--dpss-text-muted);
}

/* Disposition en deux colonnes pour les pages d'administration */
.admin-columns-2 {
	display: flex;
	flex-flow: row wrap;
	gap: 20px;
	align-items: stretch;
}
.admin-columns-2 > .admin-col {
	flex: 1 1 0;
	min-width: 320px;
}
.admin-columns-2 > .admin-col:first-child {
	flex: 0 0 480px;
	min-width: 0;
}
.admin-columns-2 > .admin-col > .admin-card {
	margin: 0 0 12px 0;
}

.admin-table--roles td {
	vertical-align: middle;
}
.admin-table--roles td form {
	display: inline;
}
.admin-table--roles td form button {
	line-height: 1.2;
}
.admin-columns-2 .admin-table-wrap {
	max-height: 530px;
}
.admin-table-pagination {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0;
}
.admin-columns-2 .admin-col:first-child .admin-card--form-sticky {
	max-height: 530px;
	overflow-y: auto;
}

/* Champs formulaire en colonne (label au-dessus, input en dessous) */
.gp-field {
	margin-bottom: 10px;
}
.gp-field label {
	display: block;
	margin-bottom: 2px;
	font-weight: 600;
}
.admin-card .gp-field input,
.admin-card .gp-field select {
	max-width: 100%;
	box-sizing: border-box;
}
.admin-card .gp-field input[type="text"] {
	width: 100px;
}
.admin-card .gp-field input[type="checkbox"] {
	width: auto;
}
.gp-field--actions {
	margin-top: 14px;
}

/* Grille compacte pour les champs codes horaires */
.gp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
	gap: 6px 10px;
}
.gp-field--compact {
	margin-bottom: 0;
}
.gp-field--compact label {
	font-size: 11px;
}
.gp-field--compact input,
.gp-field--compact select {
	font-size: 11px;
	padding: 2px 5px;
	height: auto;
	min-height: 22px;
	width: auto;
}
.gp-field--compact input[type="color"] {
	width: 3rem;
	height: 22px;
	padding: 0 2px;
}
.gp-field--compact input[type="number"] {
	width: 80px;
}
.gp-row-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 6px 0 8px 0;
}
.gp-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: normal;
}
.admin-page .planning-save-btn {
	font-size: 11px;
	font-weight: 700;
	color: var(--dpss-planning-heading);
	background: #dce4ed;
	border: 1px solid #b8c9da;
	border-radius: 10px;
	padding: 3px 14px;
	height: auto;
	vertical-align: middle;
	flex-shrink: 0;
}
.admin-page .planning-save-btn:hover {
	background: #cbd6e3;
	border-color: #a0b6cd;
}
.admin-page .planning-save-btn.planning-save-state--dirty {
	background: #e8772a;
	color: var(--dpss-surface);
	border-color: #d0661e;
}
.admin-page .planning-save-btn.planning-save-state--dirty:hover {
	background: #d66a21;
}

/* ============================================================
   7. PROFIL
   ============================================================ */
.admin-profile-form {
	max-width: 560px;
}
.profile-fields-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 16px;
	margin-bottom: 12px;
}
.profile-field {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 4px 0;
}
.profile-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--dpss-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.profile-value {
	font-size: 14px;
	color: var(--dpss-text);
	padding: 2px 0;
}
.profile-telephone-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}
.profile-telephone-row label {
	flex-shrink: 0;
}
.profile-telephone-row input {
	flex: 1;
	max-width: 280px;
	font-size: 13px;
	padding: 4px 8px;
}
.profile-actions {
	margin-top: 12px;
}
.admin-page .planning-save-btn.planning-save-state--saved {
	background: #1a6b3c;
	color: var(--dpss-surface);
	border-color: #14522e;
}
.admin-page .planning-save-btn.planning-save-state--saved:hover {
	background: #14522e;
}
/* Envoi en cours (POST serveur) : libellé + indicateur visuel immédiat */
.admin-page .planning-save-btn.planning-save-state--pending {
	position: relative;
	padding-left: 28px;
	cursor: wait;
	background: #c5d3e4;
	border-color: #8fa9c4;
	color: var(--dpss-planning-heading);
	pointer-events: none;
	opacity: 0.96;
}
.admin-page .planning-save-btn.planning-save-state--pending::before {
	content: "";
	position: absolute;
	left: 10px;
	top: 50%;
	width: 12px;
	height: 12px;
	margin-top: -6px;
	box-sizing: border-box;
	border: 2px solid rgba(26, 48, 80, 0.28);
	border-top-color: #1a3050;
	border-radius: 50%;
	animation: dpss-planning-save-spin 0.65s linear infinite;
}
@keyframes dpss-planning-save-spin {
	to {
		transform: rotate(360deg);
	}
}
html.planning-save-is-pending .planning-save-bar {
	cursor: wait;
}

.planning-wrap {
	border-radius: var(--dpss-radius-sm);
	border-color: var(--dpss-border-light) !important;
}

.admin-links--nested {
	list-style: none;
	margin: 0.5rem 0 0 0;
	padding: 0 0 0 1rem;
	border-left: 2px solid var(--dpss-border-light);
}
.admin-links--nested li {
	margin: 0.35rem 0;
}

.error {
	color: #b91c1c;
	font-weight: 500;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */

/* Responsive */
/* ≤1100px : desktop réduit */
@media (max-width: 1100px) {
	.dpss-main-columns,
	.dpss-main-columns {
		grid-template-columns: 150px minmax(240px, 1fr);
		column-gap: 12px;
	}
}

/* ≤900px : breakpoint principal (tablette large / petit desktop) */
@media (max-width: 900px) {
	.dpss-app,
	.dpss-app {
		padding: var(--dpss-shell-top-offset) 12px 20px;
	}
	.dpss-footer,
	.dpss-footer {
		position: static;
	}
	.dpss-header,
	.dpss-header {
		flex-wrap: nowrap;
		min-height: var(--dpss-header-h);
		max-height: var(--dpss-header-h);
		padding: 8px 12px;
	}
	.site-breadcrumb-top {
		display: none;
	}
	.dpss-header__center,
	.dpss-header__center {
		display: flex;
		align-items: center;
		min-width: 0;
	}
	.dpss-main-columns,
	.dpss-main-columns {
		position: static;
		width: 100%;
		overflow: visible;
		grid-template-columns: 1fr;
		row-gap: 16px;
		min-height: calc(
			100vh - var(--dpss-shell-top-offset) - var(--dpss-footer-h) - 20px
		);
		min-height: calc(
			100svh - var(--dpss-shell-top-offset) - var(--dpss-footer-h) - 20px
		);
		height: auto;
		max-height: none;
	}

	.dpss-main,
	.dpss-main {
		order: 1;
	}

	.dpss-page-shell__scroll {
		max-height: none;
	}

	.dpss-header__user,
	.dpss-header__user {
		max-width: 100%;
		justify-content: flex-start;
		text-align: left;
	}

	/* Connexion (rub=entrer) : pas de colonne menu ni bouton « Menu » sur vue étroite. */
	body.rub-entrer .dpss-sidebar--left,
	body.rub-entrer .dpss-sidebar--left {
		display: none !important;
	}
	body.rub-entrer .dpss-header__nav-toggle {
		display: none !important;
	}
}

/* ≤768px : tablette (responsive général) */
@media (max-width: 768px) {
	.dpss-header,
	.dpss-header {
		flex-wrap: wrap;
		min-height: auto;
		max-height: none;
		padding: 8px 12px;
		gap: 6px;
	}
	.dpss-app,
	.dpss-app {
		--dpss-shell-top-offset: 36px;
	}
	.dpss-header__logo-link img {
		max-height: 36px;
		max-width: 150px;
	}
	.dpss-header__user,
	.dpss-header__user {
		font-size: 12px;
		min-width: 0;
		max-width: 100%;
		width: 100%;
		justify-content: flex-start;
		text-align: left;
	}
	.logout-btn-as-link {
		font-size: 11px;
		padding: 1px 8px;
		margin: 2px 0;
	}
	.dpss-page-shell__scroll {
		padding: 12px;
	}
}

/* ≤480px : téléphone (responsive fin) */
@media (max-width: 480px) {
	.dpss-header,
	.dpss-header {
		flex-wrap: wrap;
		min-height: auto;
		max-height: none;
		padding: 6px 8px;
		gap: 4px;
	}
	.dpss-app,
	.dpss-app {
		--dpss-shell-top-offset: 32px;
	}
	.dpss-header__logo-link img {
		max-height: 36px;
		max-width: 140px;
	}
	.dpss-header__user,
	.dpss-header__user {
		font-size: 11px;
		min-width: 0;
		max-width: 100%;
		width: 100%;
		justify-content: flex-start;
		text-align: left;
	}
	.logout-btn-as-link {
		font-size: 12px;
		padding: 1px 6px;
		margin: 2px 0;
	}
	.dpss-page-shell__scroll {
		padding: 10px;
	}
}

/* ==============================
   Frame reset desktop (source de vérité)
   Stabilise la coque: header fixe visuel, zone secondaire immobile, scroll interne uniquement.
   ============================== */
@media (min-width: 901px) {
	html,
	body {
		height: 100%;
	}
	body.dpss-layout {
		overflow: hidden;
	}
	body[data-dpss-forced-desktop="1"].dpss-layout,
	body[data-dpss-forced-desktop="1"].dpss-layout {
		overflow: visible;
	}
	/* Forced-desktop sur mobile : footer toujours visible */
	body[data-dpss-forced-desktop="1"] .dpss-app {
		overflow: visible;
		min-height: 100vh;
		min-height: 100svh;
		height: auto;
	}
	body[data-dpss-forced-desktop="1"] .dpss-app .dpss-main-columns {
		flex: 1 0 auto;
	}
	.dpss-app,
	.dpss-app {
		height: 100svh;
		min-height: 100svh;
		margin-top: var(--dpss-shell-edge-top);
		padding: 0 var(--dpss-shell-side-pad) 8px;
		display: grid;
		grid-template-rows: var(--dpss-header-h) minmax(0, 1fr) var(
				--dpss-footer-h
			);
		row-gap: 8px;
	}
	.dpss-header,
	.dpss-header {
		position: relative;
		min-height: var(--dpss-header-h);
		max-height: var(--dpss-header-h);
		margin: 0;
	}
	.dpss-main-columns,
	.dpss-main-columns {
		position: relative;
		display: grid;
		grid-template-columns: 168px minmax(0, 1fr);
		column-gap: 16px;
		height: 100%;
		min-height: 0;
		max-height: none;
		overflow: hidden;
	}
	.dpss-main,
	.dpss-main {
		height: 100%;
		min-height: 0;
	}
	.dpss-sidebar__inner,
	.dpss-page-shell__scroll {
		height: 100%;
		min-height: 0;
		overflow: auto;
	}
	.dpss-footer,
	.dpss-footer {
		position: relative;
		margin: 0;
	}
}

/* ==============================
   Vue bureau forcée sur écran étroit (prefer_desktop=1)
   Restaure le flux normal de la page : sans cela, height:100vh + overflow:hidden
   du conteneur principal bloque tout scroll sur mobile.
   ============================== */
@media (max-width: 900px) {
	body[data-prefer-desktop="1"] .dpss-app,
	body[data-prefer-desktop="1"] .dpss-app {
		height: auto;
		min-height: 100vh;
		min-height: 100svh;
		overflow-x: hidden;
		overflow-y: auto;
	}
	body[data-prefer-desktop="1"] .dpss-main-columns,
	body[data-prefer-desktop="1"] .dpss-main-columns {
		overflow: visible;
	}
	body[data-prefer-desktop="1"] .dpss-main,
	body[data-prefer-desktop="1"] .dpss-main,
	body[data-prefer-desktop="1"] .dpss-page-shell,
	body[data-prefer-desktop="1"] .dpss-page-shell__region,
	body[data-prefer-desktop="1"] .dpss-page-shell__scroll,
	body[data-prefer-desktop="1"] .dpss-page-shell__scroll,
	body[data-prefer-desktop="1"] .dpss-page-shell__scroll {
		height: auto;
		max-height: none;
		min-height: 0;
		overflow: visible;
	}
}

/* ============================================================
   9. COMPOSANTS ADMIN (header, onglets, boutons, flash)
   ============================================================ */

/* En-tete standardise */
#gestion.header.header--planning-with-actions {
	padding: 16px 0 12px 0;
	margin: 0;
	background: var(--dpss-surface);
	border-bottom: 1px solid var(--dpss-border-light);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
#gestion.header.header--planning-with-actions .admin-main-title {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

/* Organigramme : disposition en colonne */
body.rub-organigramme #gestion.header.header--planning-with-actions {
	flex-direction: column;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 24px;
}
body.rub-organigramme #gestion.header.header--planning-with-actions .admin-main-title {
	flex: none;
	text-align: left;
	width: auto;
	max-width: none;
}
.orga-header-sub {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	width: 100%;
}
.orga-header-sub .admin-subtitle {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
}
.orga-header-actions {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}
.orga-header-actions .admin-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 500;
	border: 1px solid var(--dpss-planning-border, #b0c4d8);
	border-radius: 4px;
	background: var(--dpss-surface, #fff);
	color: var(--dpss-planning-link, #10263d);
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
}
.orga-header-actions .admin-btn:hover {
	background: var(--dpss-planning-settings-hover, #c9dff0);
	color: var(--dpss-planning-link-hover, #0b1f33);
}
/* Barre d'onglets secondaire (entre le header et le contenu). */
.admin-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 8px 0 4px 0;
	margin: 0 0 12px 0;
}
.admin-tabs .admin-tab {
	display: inline-block;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	color: var(--dpss-text-muted, #4a6a8a);
	background: transparent;
	border: 1px solid transparent;
	border-radius: 6px;
	text-decoration: none;
	transition:
		background 0.12s ease,
		border-color 0.12s ease,
		color 0.12s ease;
}
.admin-tabs .admin-tab:hover {
	background: var(--dpss-primary-soft, #e8f0fa);
	border-color: var(--dpss-border-light, #c8d8e8);
	color: var(--dpss-text, #0d2b45);
}
.admin-tabs .admin-tab.is-active {
	background: var(--dpss-planning-settings-hover, #dce8f5);
	border-color: var(--dpss-border, #a8c4dd);
	color: var(--dpss-text, #0d2b45);
	font-weight: 700;
}

/* Boutons d'action admin (bleu clair, texte foncé, style pill comme Exporter PDF) */
.admin-page .admin-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--dpss-planning-border-accent, #2d6da3);
	background: var(--dpss-primary-soft, #d8e8f7);
	color: var(--dpss-planning-link, #10263d);
	font-weight: 600;
	font-size: 10px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	height: auto;
	min-height: 20px;
}
.admin-page .admin-btn:hover {
	background: var(--dpss-planning-settings-hover, #c9dff0);
	color: var(--dpss-planning-link-hover, #0b1f33);
}
.admin-page .admin-btn-danger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid #c94a4a;
	background: #fce8e8;
	color: #8b1a1a;
	font-weight: 600;
	font-size: 10px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	height: auto;
	min-height: 20px;
}
.admin-page .admin-btn-danger:hover {
	background: #f5d6d6;
	border-color: #b33a3a;
}
.admin-page .admin-btn--restore {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid #2e7d32;
	background: #e8f5e9;
	color: #1b5e20;
	font-weight: 600;
	font-size: 10px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	height: auto;
	min-height: 20px;
}
.admin-page .admin-btn--restore:hover {
	background: #c8e6c9;
	border-color: #1b5e20;
}

/* Notification flash — toast en haut à droite */
.dpss-flash-container {
	position: fixed;
	top: 88px;
	right: 20px;
	z-index: 10000;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 420px;
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.dpss-flash {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: var(--dpss-radius-sm);
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.12);
	font-size: 12px;
	line-height: 1.4;
	animation: dpssFlashIn 0.3s ease;
}
@keyframes dpssFlashIn {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: translateY(0); }
}
.dpss-flash--success {
	background: #f0fdf4;
	border: 1px solid #86efac;
	color: #166534;
}
.dpss-flash--error {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}
.dpss-flash__icon {
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}
.dpss-flash__text {
	flex: 1;
}
.dpss-flash__close {
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	padding: 0 2px;
	opacity: 0.5;
	color: inherit;
}
.dpss-flash__close:hover {
	opacity: 1;
}

/* Indicateur de connexion — pastille dans le header */
.dpss-header__profile-link::before {
	content: '';
	position: absolute;
	top: 2px;
	right: 2px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	border: 2px solid var(--dpss-surface);
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Bouton de déconnexion dans le header */
.dpss-header__logout-form {
	display: inline-flex;
	margin: 0;
	margin-left: 6px;
	padding: 0;
}
.dpss-header__logout-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid var(--dpss-border);
	border-radius: 50%;
	background: var(--dpss-surface);
	color: var(--dpss-text-muted);
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	line-height: 1;
}
.dpss-header__logout-btn:hover {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #dc2626;
}

/* ============================================================
   10. DROITS D'ACCES
   ============================================================ */

/* Légende */
.access-legend-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 3px;
	vertical-align: middle;
	margin-right: 4px;
	position: relative;
	top: -1px;
}
.access-legend-dot--editable { background: #e8f5e9; border: 2px solid #66bb6a; }
.access-legend-dot--oblig    { background: #e3f2fd; border: 2px solid #42a5f5; }
.access-legend-dot--blocked  { background: #fff3e0; border: 2px solid #ffa726; }

/* Cellules éditables (fond vert pâle) */
.access-td-editable { background: #e8f5e9; }
.access-td-editable input[type="checkbox"] { cursor: pointer; accent-color: #43a047; }

/* Cellules obligatoires / héritées (fond bleu pâle, cochées, grisées) */
.access-td-oblig { background: #e3f2fd; }
.access-td-oblig input[type="checkbox"] { opacity: 0.65; cursor: not-allowed; accent-color: #1e88e5; }

/* Cellules bloquées / réservées (fond orange pâle, décochées, grisées) */
.access-td-blocked { background: #fff3e0; }
.access-td-blocked input[type="checkbox"] { opacity: 0.40; cursor: not-allowed; accent-color: #e65100; }

/* Lignes du tableau — contraste léger */
.access-row:hover td { filter: brightness(0.97); }
