@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
	--moz-navy: #0B3D78;
	--moz-navy-dark: #082A56;
	--moz-orange: #F7941E;
	--moz-orange-dark: #e07f0f;
	--moz-border: #ECEEF2;
	--moz-bg-input: #F6F7FA;
	--moz-text: #1A2233;
	--moz-text2: #4A5568;
	--moz-muted: #8A93A6;
	--moz-radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Manrope', sans-serif; background: #F6F7FA; color: var(--moz-text); }
a { text-decoration: none; color: inherit; }
h1, h2, h3, .brand { font-family: 'Poppins', sans-serif; }

.layout { display: flex; min-height: 100vh; }

/* Sidebar navy, façon Admin.dc.html */
.sidebar { width: 240px; background: var(--moz-navy); color: #fff; flex-shrink: 0; display: flex; flex-direction: column; padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand {
	display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 0 8px;
	font-size: 15px; font-weight: 800; color: #fff; line-height: 1;
}
.sidebar .brand span { display: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
	padding: 11px 14px; color: #C9D4E8; font-size: 14px; font-weight: 600; border-radius: 8px;
	transition: all .15s ease;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar nav a.active { background: rgba(247,148,30,0.15); color: var(--moz-orange); }
.sidebar nav .nav-section { padding: 16px 14px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: #6B85AC; font-weight: 700; }
.nav-ico { width: 18px; margin-right: 10px; text-align: center; font-size: 13px; flex-shrink: 0; }

.nav-group { margin-top: 2px; }
.nav-group summary {
	display: flex; align-items: center; padding: 11px 14px; color: #C9D4E8; font-size: 13.5px; font-weight: 700;
	border-radius: 8px; cursor: pointer; list-style: none; user-select: none;
	text-transform: uppercase; letter-spacing: .5px;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-group summary span { flex: 1; }
.nav-group summary .chevron { font-size: 10px; transition: transform .15s ease; margin-right: 0; width: auto; }
.nav-group[open] summary .chevron { transform: rotate(180deg); }
.nav-subitems { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px 10px; margin-left: 17px; border-left: 1px solid rgba(255,255,255,0.14); }
.nav-subitems a.nav-branch { padding: 8px 14px 8px 18px; font-size: 13.5px; text-transform: none; letter-spacing: normal; position: relative; }
.nav-subitems a.nav-branch::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 1px; background: rgba(255,255,255,0.14); }
.nav-subitems a.nav-branch.active::before { background: var(--moz-orange); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* Topbar — mêmes classes/valeurs que gestioncomete (assets/css/gg.css), couleurs Mozaik */
.admin-topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap;
	padding: 18px 32px; background: #fff; border-bottom: 1px solid var(--moz-border);
	position: sticky; top: 0; z-index: 40;
}
.gg-topbar-left { min-width: 0; }
.admin-topbar h1 { font-size: 18px; font-weight: 700; margin: 0; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--moz-navy); font-family: 'Poppins', sans-serif; }
.gg-topstats { min-width: 0; }
.admin-user { flex-shrink: 0; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--moz-muted); position: relative; }

.admin-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--moz-muted); margin-bottom: 4px; }
.admin-breadcrumb .sep { color: var(--moz-border); }
.admin-breadcrumb .current { color: var(--moz-text); font-weight: 600; }
.admin-breadcrumb a { color: var(--moz-muted); text-decoration: none; }
.admin-breadcrumb a:hover { color: var(--moz-navy); text-decoration: underline; }

/* Menu déroulant du profil */
.admin-user-menu { position: relative; }
.admin-user-menu > button {
	display: flex; align-items: center; gap: 8px; background: none; border: none; font-family: inherit;
	font-size: 13px; color: var(--moz-text); cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.admin-user-menu > button:hover { background: var(--moz-bg-input); }
.admin-user-menu > button .bi-person-circle { font-size: 26px; color: var(--moz-muted); }
.admin-user-menu .menu {
	display: none; position: absolute; right: 0; top: 100%; margin-top: 6px; min-width: 200px;
	background: #fff; border: 1px solid var(--moz-border); border-radius: 10px;
	box-shadow: 0 12px 24px rgba(11,61,120,.14); overflow: hidden; z-index: 100;
}
.admin-user-menu.open .menu { display: block; }
.admin-user-menu .menu a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--moz-text); white-space: nowrap; }
.admin-user-menu .menu a:hover { background: var(--moz-bg-input); }
.admin-user-menu .menu hr { border: none; border-top: 1px solid var(--moz-border); margin: 0; }
.admin-user-menu .menu a.menu-full { justify-content: space-between; }

.gg-topbar-ident { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; text-align: right; }
.gg-topbar-ident .gg-topbar-company { font-size: 13px; font-weight: 700; color: var(--moz-navy); white-space: nowrap; }
.gg-topbar-ident .gg-topbar-user { font-size: 11.5px; color: var(--moz-muted); }

.gg-avatar {
	display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
	flex-shrink: 0; background: var(--moz-bg-input); color: var(--moz-navy); font-size: 12px; font-weight: 700;
	vertical-align: middle; overflow: hidden;
}
.gg-avatar img { width: 100%; height: 100%; object-fit: cover; }

.gg-topstats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gg-topstats .stat {
	display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--moz-muted);
	background: var(--moz-bg-input); border: 1px solid var(--moz-border); border-radius: 999px; padding: 6px 12px 6px 11px;
	transition: box-shadow .15s ease, transform .15s ease;
}
.gg-topstats .stat:hover { box-shadow: 0 4px 12px rgba(11,61,120,.1); transform: translateY(-1px); }
.gg-topstats .stat b { font-size: 13px; font-weight: 700; color: var(--moz-navy); }
.gg-topstats .stat.blue { background: #EEF5FB; border-color: #DCEAF6; color: #3E7BA6; }
.gg-topstats .stat.blue b { color: #2A6FA8; }
.gg-topstats .stat.orange { background: #FBF3E8; border-color: #F3E3C9; color: #B98A45; }
.gg-topstats .stat.orange b { color: var(--moz-orange-dark); }

.admin-content { padding: 28px 32px; flex: 1; }

@media (max-width: 900px) {
	.gg-topstats { display: none; }
	.gg-topbar-ident { display: none; }
}

.content { padding: 32px 40px; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; font-weight: 800; color: var(--moz-navy); }

.btn {
	display: inline-block; background: var(--moz-navy); color: #fff; padding: 11px 18px;
	border-radius: 8px; border: none; cursor: pointer; font-size: 13.5px; font-weight: 700;
	font-family: 'Poppins', sans-serif; transition: background .15s ease;
}
.btn:hover { background: #0d4a92; color: #fff; }
.btn-secondary { background: #fff; color: var(--moz-muted); border: 1.5px solid var(--moz-border); }
.btn-secondary:hover { background: var(--moz-bg-input); }
.btn-danger { background: #D14343; }
.btn-danger:hover { background: #b73838; }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 7px; }

.btn-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; padding: 0; border-radius: 7px; margin: 0 2px;
	background: var(--moz-bg-input); color: var(--moz-navy); border: 1px solid var(--moz-border);
	cursor: pointer; font-size: 13px; transition: all .15s ease; vertical-align: middle;
}
.btn-icon:hover { background: var(--moz-navy); color: #fff; border-color: var(--moz-navy); }
.btn-icon.danger { color: #D14343; }
.btn-icon.danger:hover { background: #D14343; color: #fff; border-color: #D14343; }
.actions-cell { white-space: nowrap; text-align: right; }

.card {
	background: #fff; border-radius: 14px; border: none;
	padding: 26px; margin-bottom: 22px;
	box-shadow: 0 1px 2px rgba(11,61,120,.04), 0 10px 28px rgba(11,61,120,.06);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-box {
	background: #fff; border-radius: 14px; border: none;
	padding: 20px; box-shadow: 0 1px 2px rgba(11,61,120,.04), 0 10px 28px rgba(11,61,120,.06);
	transition: transform .15s ease, box-shadow .15s ease;
}
.stat-box:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(11,61,120,.06), 0 16px 32px rgba(11,61,120,.08); }
.stat-box h3 { font-size: 24px; font-weight: 700; color: var(--moz-navy); line-height: 1.2; }
.stat-box p { color: var(--moz-muted); font-size: 12.5px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
table th, table td { text-align: left; padding: 12px 14px; font-size: 13.5px; border-bottom: 1px solid #F1F3F7; }
table th { color: var(--moz-muted); font-weight: 700; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; border-bottom: 1px solid var(--moz-border); background: transparent; }
table tr:hover td { background: #FAFBFD; }
table td.name-cell { font-weight: 700; color: var(--moz-navy); }

form .form-group { margin-bottom: 16px; }
form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--moz-text); }
form input, form select, form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--moz-border); border-radius: 8px;
	font-size: 14px; background: #fff; color: var(--moz-text); font-family: 'Manrope', sans-serif; transition: border-color .15s ease;
}
form input:focus, form select:focus, form textarea:focus {
	outline: none; border-color: var(--moz-navy);
}
form textarea { min-height: 120px; }

.field-icon { position: relative; }
.field-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--moz-muted); font-size: 13px; pointer-events: none; z-index: 2; }
.field-icon > input, .field-icon > select { padding-left: 38px; }
.field-icon > textarea { padding-left: 38px; }
.field-icon.textarea > i { top: 18px; transform: none; }
.field-icon .moz-datepicker input[type=text] { padding-left: 38px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-green { background: #E6F4EA; color: #1E7B34; }
.badge-yellow { background: #FFF3E0; color: #C9720B; }
.badge-gray { background: #F1F3F7; color: var(--moz-muted); }
.badge-red { background: #FBEAEA; color: #C0392B; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #E6F4EA; color: #1E7B34; }
.alert-error { background: #FBEAEA; color: #C0392B; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F6F7FA; }
.login-box { background: #fff; padding: 40px; border-radius: 14px; width: 380px; box-shadow: 0 20px 40px rgba(11,61,120,0.1); }
.login-box .brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.login-box .brand-row .logo {
	width: 38px; height: 38px; border-radius: 8px; background: var(--moz-navy); color: var(--moz-orange);
	display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 18px;
}
.login-box .brand-row .name { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 15px; color: var(--moz-navy); line-height: 1; }
.login-box .brand-row .sub { font-size: 10.5px; color: var(--moz-muted); font-weight: 600; }
.login-box h1 { text-align: center; margin-bottom: 6px; color: var(--moz-navy); font-size: 20px; }
.login-box p.sub { text-align: center; color: var(--moz-muted); margin-bottom: 24px; font-size: 13px; }
.login-box .btn { width: 100%; text-align: center; background: var(--moz-orange); padding: 13px; margin-top: 6px; }
.login-box .btn:hover { background: var(--moz-orange-dark); }

/* ---------- DataTables (tri, filtre Excel, pagination, export, sélection de ligne) ---------- */
.dt-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dt-buttons { display: flex; gap: 6px; }
.dt-btn {
	display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0 !important;
	border-radius: 8px !important; border: 1px solid var(--moz-border) !important; background: #fff !important;
	color: var(--moz-navy) !important; font-size: 14px; cursor: pointer;
}
.dt-btn:hover { background: var(--moz-bg-input) !important; }
.dataTables_length { font-size: 13px; color: var(--moz-muted); }
.dataTables_length select {
	padding: 7px 10px; border: 1px solid var(--moz-border); border-radius: 8px; font-size: 13px; margin: 0 6px; background: #fff;
}
.dataTables_filter { font-size: 13px; color: var(--moz-muted); }
.dataTables_filter label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dataTables_filter input {
	padding: 9px 14px 9px 34px; border: 1px solid var(--moz-border); border-radius: 8px; font-size: 13.5px;
	background: var(--moz-bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238A93A6' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center;
	background-size: 14px; min-width: 220px;
}
.dataTables_filter input:focus { outline: none; border-color: var(--moz-navy); background-color: #fff; }

table.dataTable { margin-top: 0 !important; }
table.dataTable thead th { position: relative; cursor: pointer; padding-right: 20px !important; }
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
	font-family: "bootstrap-icons"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	font-size: 11px; color: var(--moz-border);
}
table.dataTable thead th.sorting::after { content: "\f284"; }
table.dataTable thead th.sorting_asc::after { content: "\f148"; color: var(--moz-navy); }
table.dataTable thead th.sorting_desc::after { content: "\f12e"; color: var(--moz-navy); }

.dt-filter-row th { padding: 6px 8px !important; background: var(--moz-bg-input); border-bottom: 1px solid var(--moz-border) !important; }

table.dataTable tbody tr { cursor: pointer; transition: background .1s ease; }
table.dataTable tbody tr.selected td { background: #E8F0FB !important; }
table.dataTable tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--moz-navy); }

.dt-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 12.5px; color: var(--moz-muted); }
.dataTables_paginate { display: flex; gap: 4px; }
.dataTables_paginate .paginate_button {
	padding: 6px 12px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; font-size: 12.5px;
}
.dataTables_paginate .paginate_button:hover { background: var(--moz-bg-input); }
.dataTables_paginate .paginate_button.current { background: var(--moz-navy); color: #fff !important; }
.dataTables_paginate .paginate_button.disabled { color: var(--moz-border) !important; cursor: not-allowed; }
.dataTables_info { color: var(--moz-muted); }

/* Custom date picker (mêmes classes que le site public mozaik) */
.moz-datepicker{position:relative;}
.moz-datepicker input[type=text]{cursor:pointer;background:#fff;}
.moz-dp-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:1100;background:#fff;border:1px solid var(--moz-border);border-radius:10px;box-shadow:0 12px 28px rgba(11,61,120,.16);padding:14px;width:280px;}
.moz-dp-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.moz-dp-header button{background:var(--moz-bg-input);border:none;width:28px;height:28px;border-radius:6px;cursor:pointer;font-size:16px;color:var(--moz-navy);font-weight:700;}
.moz-dp-header button:hover{background:var(--moz-border);}
.moz-dp-label{font-family:'Poppins',sans-serif;font-weight:700;font-size:13.5px;color:var(--moz-navy);}
.moz-dp-year{width:100%;margin-bottom:10px;padding:6px 8px;border:1px solid var(--moz-border);border-radius:6px;font-size:13px;color:var(--moz-navy);}
.moz-dp-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;}
.moz-dp-dow{text-align:center;font-size:11px;font-weight:700;color:var(--moz-muted);padding:4px 0;}
.moz-dp-day{text-align:center;font-size:13px;padding:7px 0;border-radius:6px;cursor:pointer;color:var(--moz-text);}
.moz-dp-day:hover{background:var(--moz-bg-input);}
.moz-dp-day.selected{background:var(--moz-navy);color:#fff;font-weight:700;}

/* Éditeur riche (Quill) */
.moz-editor { background: #fff; border-radius: 8px; overflow: hidden; }
.moz-editor .ql-toolbar.ql-snow { border: 1px solid var(--moz-border); border-bottom: none; border-radius: 8px 8px 0 0; background: var(--moz-bg-input); }
.moz-editor .ql-container.ql-snow { border: 1px solid var(--moz-border); border-radius: 0 0 8px 8px; font-family: 'Manrope', sans-serif; font-size: 14px; }
.moz-editor .ql-editor { min-height: 200px; }
.moz-editor .ql-editor.ql-blank::before { color: var(--moz-muted); font-style: normal; }
.moz-editor .ql-snow.ql-toolbar button:hover, .moz-editor .ql-snow .ql-toolbar button:hover,
.moz-editor .ql-snow.ql-toolbar button.ql-active, .moz-editor .ql-snow .ql-toolbar button.ql-active { color: var(--moz-navy); }
.moz-editor .ql-snow.ql-toolbar button:hover .ql-stroke, .moz-editor .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--moz-navy); }
.moz-editor .ql-snow.ql-toolbar button:hover .ql-fill, .moz-editor .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--moz-navy); }

/* Ligne de facturation/devis : description en textarea + recherche formation */
.moz-ligne-desig { position: relative; }
.moz-ligne-desig textarea { width: 100%; min-height: 38px; resize: vertical; padding: 9px 12px 9px 34px; border: 1px solid var(--moz-border); border-radius: 8px; font-family: 'Manrope', sans-serif; font-size: 13.5px; }
.moz-desig-icon { position: absolute; left: 12px; top: 12px; color: var(--moz-muted); font-size: 13px; pointer-events: none; z-index: 2; }
.moz-desig-dropdown { z-index: 300; background: #fff; border: 1px solid var(--moz-border); border-radius: 8px; box-shadow: 0 12px 24px rgba(11,61,120,.14); max-height: 240px; overflow-y: auto; }
.moz-desig-dropdown.hidden { display: none; }
.moz-desig-dropdown-item { padding: 9px 12px; font-size: 13px; cursor: pointer; color: var(--moz-text); border-bottom: 1px solid var(--moz-border); }
.moz-desig-dropdown-item:last-child { border-bottom: none; }
.moz-desig-dropdown-item:hover { background: var(--moz-bg-input); }

/* Cartes de rubrique (page d'accueil de section) */
.moz-section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.moz-section-card {
	background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 1px 2px rgba(11,61,120,.04), 0 10px 28px rgba(11,61,120,.06);
	display: flex; flex-direction: column; gap: 12px; transition: transform .15s ease, box-shadow .15s ease;
}
.moz-section-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(11,61,120,.06), 0 16px 32px rgba(11,61,120,.08); }
.moz-section-card .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--moz-bg-input); color: var(--moz-navy); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.moz-section-card .label { font-weight: 700; color: var(--moz-navy); font-size: 15px; }

/* Modales (patron gestioncomete : admin-modal-overlay / admin-modal) */
.hidden { display: none !important; }
.admin-modal-overlay {
	position: fixed; inset: 0; background: rgba(11,61,120,.35);
	display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.admin-modal {
	background: #fff; border-radius: 14px; padding: 24px; width: 480px; max-width: 100%;
	box-shadow: 0 20px 48px rgba(0,0,0,.25); max-height: 85vh; overflow-y: auto;
}
.admin-modal h3 { font-size: 16px; font-weight: 700; color: var(--moz-navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.admin-modal.wide { width: 640px; }
.admin-modal-overlay:not(.hidden) { animation: mozOverlayFadeIn .15s ease; }
.admin-modal-overlay:not(.hidden) .admin-modal { animation: mozModalScaleIn .18s cubic-bezier(.2,.8,.2,1); }
@keyframes mozOverlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mozModalScaleIn { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* Barre d'outils + tableau, disposition gestioncomete (admin-toolbar / admin-table-wrap) */
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-toolbar .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-table-wrap { background: #fff; border-radius: 14px; overflow: auto; box-shadow: 0 1px 2px rgba(11,61,120,.04), 0 10px 28px rgba(11,61,120,.06); padding: 4px; }
.admin-table-wrap table { margin: 0; }

.admin-dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .admin-dash-grid { grid-template-columns: 1fr; } }

.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--moz-border); }
.admin-card-head h2 { margin: 0; padding: 0; border: none; font-size: 15px; font-weight: 700; color: var(--moz-navy); }
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--moz-border); color: var(--moz-navy); display: flex; align-items: center; gap: 8px; }

.admin-form-actions { display: flex; gap: 10px; margin-top: 16px; }

.gg-recap { width: 100%; border-collapse: collapse; }
.gg-recap td { padding: 7px 0; font-size: 13.5px; }
.gg-recap td:first-child { color: var(--moz-muted); text-align: left; }
.gg-recap td:last-child { text-align: right; font-weight: 600; }
.gg-recap tr.total td { border-top: 1px solid var(--moz-border); font-size: 16px; font-weight: 700; padding-top: 10px; color: var(--moz-navy); }
.gg-recap .en-lettres { font-size: 12px; color: var(--moz-muted); font-style: italic; font-weight: 400; }

/* Onglets (page Paramètres) */
.moz-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--moz-border); margin-bottom: 20px; }
.moz-tab { padding: 10px 18px; font-weight: 600; font-size: 13.5px; color: var(--moz-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.moz-tab.active { color: var(--moz-navy); border-bottom-color: var(--moz-orange); }
.moz-tab-panel { display: none; }
.moz-tab-panel.active { display: block; }

/* Arborescence Dossiers (patron gestioncomete : gg-tree) */
.moz-tree { display: flex; flex-direction: column; gap: 2px; }
.moz-tree-header { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 9px; cursor: pointer; }
.moz-tree-header:hover { background: var(--moz-bg-input); }
.moz-tree-header .chevron { flex-shrink: 0; font-size: 12px; color: var(--moz-muted); transition: transform .15s ease; }
.moz-tree-node.ouvert > .moz-tree-header .chevron { transform: rotate(90deg); }
.moz-tree-header .icon { flex-shrink: 0; font-size: 17px; color: #F7941E; }
.moz-tree-header .main { min-width: 0; flex: 1; }
.moz-tree-header .title { font-size: 13.5px; font-weight: 600; color: var(--moz-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moz-tree-header .sub { font-size: 12px; color: var(--moz-muted); margin-top: 1px; }
.moz-tree-header .side { flex-shrink: 0; display: flex; gap: 12px; font-size: 15px; color: var(--moz-muted); }
.moz-tree-header .side i:hover { color: var(--moz-navy); }
.moz-tree-children { display: none; padding-left: 30px; margin-left: 17px; border-left: 1px solid var(--moz-border); }
.moz-tree-node.ouvert > .moz-tree-children { display: block; }
.moz-tree-file { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; }
.moz-tree-file:hover { background: var(--moz-bg-input); }
.moz-tree-file .icon { flex-shrink: 0; font-size: 15px; color: var(--moz-muted); width: 20px; text-align: center; }
.moz-tree-file .main { min-width: 0; flex: 1; font-size: 13px; }
.moz-tree-file .main a { color: inherit; text-decoration: none; }
.moz-tree-file .main a:hover { color: var(--moz-navy); }
.moz-tree-file .side { flex-shrink: 0; display: flex; gap: 10px; font-size: 14px; color: var(--moz-muted); }
.moz-tree-file .side a { color: inherit; }
.moz-tree-file .side i:hover, .moz-tree-file .side a:hover { color: var(--moz-navy); }

/* Classeurs (patron gestioncomete : gg-classeur-card) */
.moz-classeurs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.moz-classeur-card {
  position: relative; display: flex; align-items: center; background: #fff; border: 1px solid transparent;
  border-radius: 12px; padding: 14px; box-shadow: 0 1px 2px rgba(11,61,120,.04), 0 6px 16px rgba(11,61,120,.05);
  transition: box-shadow .15s ease;
}
.moz-classeur-card:hover { box-shadow: 0 6px 18px rgba(11,61,120,.14); }
.moz-classeur-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.moz-classeur-numero {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700;
}
.moz-classeur-main { min-width: 0; }
.moz-classeur-nom { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--moz-text); }
.moz-classeur-sub { font-size: 11.5px; color: var(--moz-muted); margin-top: 1px; }
.moz-classeur-priorite { position: absolute; top: 8px; right: 8px; font-size: 15px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.moz-classeur-priorite.normal { color: #16a34a; }
.moz-classeur-priorite.important { color: #d97706; }
.moz-classeur-priorite.urgent { color: #dc2626; }
.moz-classeur-kebab {
  position: absolute; bottom: 6px; right: 6px; width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; color: var(--moz-muted); cursor: pointer; border: none; background: none;
}
.moz-classeur-kebab:hover, .moz-classeur-kebab.active { background: rgba(0,0,0,.06); color: var(--moz-text); }
.moz-classeur-menu {
  position: absolute; bottom: 34px; right: 6px; min-width: 140px; background: #fff;
  border: 1px solid var(--moz-border); border-radius: 10px; box-shadow: 0 6px 18px rgba(11,61,120,.15);
  padding: 4px; z-index: 5; display: none;
}
.moz-classeur-menu.open { display: block; }
.moz-classeur-menu a, .moz-classeur-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left;
  padding: 7px 10px; font-size: 13px; border-radius: 7px; cursor: pointer; color: var(--moz-text); text-decoration: none;
}
.moz-classeur-menu a:hover, .moz-classeur-menu button:hover { background: var(--moz-bg-input); }
.moz-classeur-menu .danger { color: #dc2626; }
.moz-classeur-menu .danger:hover { background: #fef2f2; }
.moz-classeur-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.moz-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: inline-block;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--moz-border) inset; transition: transform .1s ease, box-shadow .15s ease;
}
.moz-swatch:hover { transform: scale(1.1); }
.moz-swatch.selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--moz-navy); }

/* Case "Se souvenir de moi" (login) */
.moz-remember-check { position: relative; display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--moz-text); cursor: pointer; margin: 4px 0 16px; user-select: none; }
.moz-remember-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.moz-remember-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--moz-border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s, border-color .15s; }
.moz-remember-box i { font-size: 11px; color: #fff; opacity: 0; transform: scale(.6); transition: opacity .1s, transform .1s; }
.moz-remember-check input:checked + .moz-remember-box { background: var(--moz-navy); border-color: var(--moz-navy); }
.moz-remember-check input:checked + .moz-remember-box i { opacity: 1; transform: scale(1); }
.moz-remember-check input:focus-visible + .moz-remember-box { outline: 2px solid var(--moz-orange); outline-offset: 2px; }

/* Toggle switch (actif/inactif) */
.moz-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13.5px; color: var(--moz-text); }
.moz-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.moz-toggle-track { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #D8DEE8; flex-shrink: 0; transition: background .18s ease; }
.moz-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(11,61,120,.25); transition: transform .18s ease; }
.moz-toggle input:checked + .moz-toggle-track { background: var(--moz-navy); }
.moz-toggle input:checked + .moz-toggle-track .moz-toggle-thumb { transform: translateX(18px); }
.moz-toggle input:focus-visible + .moz-toggle-track { outline: 2px solid var(--moz-orange); outline-offset: 2px; }
.moz-toggle-label { font-weight: 400; }

/* Stepper numérique (+/-) */
.moz-stepper { display: inline-flex; align-items: center; gap: 8px; }
.moz-stepper-btn {
	width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--moz-border);
	background: var(--moz-bg-input); color: var(--moz-text2); font-size: 15px; font-weight: 700;
	display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.moz-stepper-btn:hover { background: #ECEEF2; border-color: var(--moz-navy); color: var(--moz-navy); }
.moz-stepper-btn:active { transform: scale(.94); }
.moz-stepper input[type="number"] {
	width: 56px; text-align: center; padding: 6px 4px; border: 1px solid var(--moz-border); border-radius: 8px; font-size: 13.5px;
	-moz-appearance: textfield;
}
.moz-stepper input[type="number"]::-webkit-outer-spin-button,
.moz-stepper input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
