/**
 * MDT LSPD — thème clair premium : blancs, ombres douces, accents sobres (pas « gaming »).
 */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --bg: #f0f1f3;
  --bg-warm: #fafafa;
  --surface: #ffffff;
  --surface-2: #f8f9fa;

  --stroke: #e8eaed;
  --stroke-strong: #dadce0;

  --text: #1a1d21;
  --text2: #5f6368;
  --muted: #80868b;

  --accent: #1a365d;
  --accent-light: #2c5282;
  --accent-soft: rgba(26, 54, 93, 0.08);

  --gold: #b8860b;
  --gold-soft: rgba(184, 134, 11, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 8px 32px rgba(26, 54, 93, 0.08);

  --r: 14px;
  --r-sm: 8px;
  --sidebar-w: 304px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --bg-panel: var(--surface);
  --bg-elevated: var(--surface-2);
  --border: var(--stroke);
}

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

html {
  -webkit-font-smoothing: antialiased;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
a:hover {
  color: var(--accent);
  text-shadow: none;
}

/* Fond : mesh très léger (tons crème / bleu glacier) */
.login-page,
.app {
  position: relative;
  isolation: isolate;
}

.login-page::before,
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(ellipse 100% 80% at 50% -30%, rgba(255, 255, 255, 0.9), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(219, 234, 254, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(254, 243, 199, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(226, 232, 240, 0.5), transparent 45%), var(--bg-warm);
  animation: mesh-drift 28s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  0% {
    filter: saturate(1);
    transform: scale(1);
  }
  100% {
    filter: saturate(1.05);
    transform: scale(1.01);
  }
}

.login-page::after,
.app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 45%, black 20%, transparent 72%);
}

/* ——— Connexion ——— */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.login-watermark {
  position: fixed;
  bottom: -6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  width: min(72vw, 22rem);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
}

.login-seal {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 0.35rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--surface-2));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
}

.login-back {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.login-back a {
  color: var(--accent-light);
  font-weight: 600;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2.25rem 2rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  animation: card-enter 0.6s var(--ease) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-inst-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.login-inst-jurisdiction {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-inst-dept {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.login-rule {
  height: 1px;
  margin: 0 0 1.25rem;
  border: none;
  background: linear-gradient(90deg, transparent, var(--gold-soft), rgba(26, 54, 93, 0.12), transparent);
}

.login-inst-subtitle {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-page .login-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  color: var(--text);
  background: linear-gradient(135deg, #0f172a 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-page .login-sub {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.login-page .login-alert {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.login-page .login-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(180deg, #234876 0%, var(--accent) 100%);
  box-shadow: var(--shadow-md), 0 2px 8px rgba(26, 54, 93, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.login-page .login-btn-primary:hover {
  box-shadow: var(--shadow-lg), 0 4px 16px rgba(26, 54, 93, 0.3);
  transform: translateY(-2px);
  text-decoration: none;
}

.login-page .login-btn-primary:active {
  transform: translateY(0);
}

.login-foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--stroke);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ——— Boutons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--surface-2);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text2);
  border-color: var(--stroke);
}

.btn-secondary:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--stroke-strong);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* ——— App ——— */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100vh;
  padding: 1.5rem 0 1rem;
  background: var(--surface);
  border-right: 1px solid var(--stroke);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.04);
}

.sidebar-brand {
  padding: 0 1.25rem 1.35rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--stroke);
}

.sidebar-brand .brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.sidebar-brand .brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand .brand-jurisdiction {
  margin: 0 0 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-brand .brand-dept {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.sidebar-brand h1 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  letter-spacing: -0.03em;
  color: var(--text);
  background: linear-gradient(135deg, #0f172a, var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-brand span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--stroke-strong);
  border-radius: 99px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0 0.65rem;
}

.nav-sidebar-groups {
  padding: 0 0.65rem;
}

.nav-group {
  margin-bottom: 0.35rem;
  border-radius: 10px;
}

.nav-group-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-group-summary::-webkit-details-marker {
  display: none;
}

.nav-group-summary::marker {
  display: none;
}

.nav-group-summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.15rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.nav-group[open] > .nav-group-summary {
  color: var(--text2);
}

.nav-group[open] > .nav-group-summary::after {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.nav-group-summary:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-sublist {
  list-style: none;
  margin: 0.1rem 0 0.45rem;
  padding: 0 0 0 0.35rem;
}

.nav-sublist li {
  margin: 0;
}

.nav-sublist a.nav-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  margin-bottom: 1px;
  border-radius: 8px;
  color: var(--text2);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nav-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  min-height: 1.15rem;
  padding: 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: #b91c1c;
  border-radius: 99px;
  flex-shrink: 0;
}

.nav-channel-label {
  flex: 1;
  min-width: 0;
  display: block;
}

.nav-sublist a.nav-channel:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-sublist a.nav-channel.active {
  color: var(--accent);
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.07), rgba(26, 54, 93, 0.04));
  box-shadow: inset 0 0 0 1px rgba(26, 54, 93, 0.12);
}

/* Ancienne nav simple (si réutilisée ailleurs) */
.nav-list a:not(.nav-channel) {
  display: block;
  padding: 0.65rem 1rem;
  margin-bottom: 4px;
  border-radius: 10px;
  color: var(--text2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-list a:not(.nav-channel):hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-list a:not(.nav-channel).active {
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(26, 54, 93, 0.1);
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1rem 0;
  border-top: 1px solid var(--stroke);
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.user-mini img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--stroke);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.user-mini .name {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.user-mini .role {
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.main {
  flex: 1;
  padding: 2rem 2.25rem 2.5rem;
  overflow: auto;
  max-width: 1100px;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
  letter-spacing: -0.04em;
  color: var(--text);
  background: linear-gradient(135deg, #0f172a 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text2);
  max-width: 42rem;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--stroke);
}

.grid {
  display: grid;
  gap: 1.15rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.card,
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover,
.panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card h3,
.panel h3 {
  margin: 0 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat {
  font-family: var(--mono);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
}

.form-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(26, 54, 93, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

th {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.15s var(--ease);
}

tbody tr:hover td {
  background: rgba(26, 54, 93, 0.04);
}

.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.badge-on {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.badge-off {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}

.flex {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}

.empty {
  color: var(--muted);
  padding: 1.1rem 0.5rem;
}

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--stroke);
  }
  .sidebar-scroll {
    max-height: min(48vh, 360px);
  }
  .main {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-page::before,
  .app::before {
    animation: none;
  }
  .login-card {
    animation: none;
  }
}

.report-modal {
  max-width: min(42rem, 96vw);
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.report-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.report-modal-inner {
  padding: 1.25rem 1.35rem 1.35rem;
}

.report-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.report-modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.report-modal-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.report-modal-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 1rem;
}

.report-modal-attachments {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.report-att-item {
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.report-att-item img,
.report-att-item video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #0f172a;
}

.report-att-caption {
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text2);
  border-top: 1px solid var(--stroke);
}

.report-att-caption a {
  color: var(--accent);
  font-weight: 600;
}

.report-modal-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
  border-top: 1px solid var(--stroke);
}

.citizen-photo-row .citizen-photo-preview-wrap {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.citizen-photo-preview {
  width: 120px;
  min-height: 120px;
  border-radius: var(--r-sm);
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.citizen-photo-preview img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  display: block;
}

.citizen-photo-hint {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.citizen-remove-photo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
}

.citizen-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--stroke);
  vertical-align: middle;
  background: var(--surface-2);
}

/* ——— Présence (calendrier) ——— */
.presence-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.presence-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.presence-toolbar-group label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.presence-select {
  min-width: 9rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.presence-toolbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.presence-calendar {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.presence-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--stroke);
  width: 100%;
  box-sizing: border-box;
}

.presence-cal-weekdays > * {
  min-width: 0;
}

.presence-cal-wd {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.35rem;
  text-align: center;
  min-width: 0;
}

.presence-cal-wd-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--text2);
  hyphens: auto;
  word-break: break-word;
}

.presence-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(6.25rem, auto);
  gap: 2px;
  background: var(--stroke);
  padding: 2px;
  width: 100%;
  box-sizing: border-box;
}

.presence-cal-days > * {
  min-width: 0;
}

.presence-cal-cell.presence-cal-empty {
  background: var(--surface-2);
  min-height: 6.25rem;
}

button.presence-cal-day {
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 6.25rem;
  padding: 0.5rem 0.25rem 0.65rem;
  margin: 0;
  border: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.12s var(--ease);
}

button.presence-cal-day:active {
  transform: scale(0.98);
}

.presence-cal-num {
  font-size: clamp(1.2rem, 2.8vw, 1.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.presence-cal-user-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 0.15rem;
  margin-top: 0.1rem;
}

.presence-cal-avatar-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.presence-cal-avatar-dot-present {
  background: #22c55e;
  box-shadow: 0 0 0 1px #16a34a;
}

.presence-cal-avatar-dot-absent {
  background: #f97316;
  box-shadow: 0 0 0 1px #ea580c;
}

.presence-cal-user-name {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  letter-spacing: -0.02em;
}

.presence-cal-status-empty {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

button.presence-cal-day:hover {
  background: rgba(26, 54, 93, 0.07);
}

button.presence-cal-day.presence-cal-today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* Jour choisi pour la vue équipe (liste des présents ce jour-là) */
button.presence-cal-day.presence-cal-team-focus {
  box-shadow: inset 0 0 0 2px #4f46e5;
}

button.presence-cal-day.presence-cal-today.presence-cal-team-focus {
  box-shadow: inset 0 0 0 2px #4f46e5;
}

button.presence-cal-day.presence-cal-present {
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  color: #14532d;
}

button.presence-cal-day.presence-cal-present:hover {
  background: linear-gradient(180deg, #d1fae5 0%, #bbf7d0 100%);
}

button.presence-cal-day.presence-cal-absent {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #9a3412;
}

button.presence-cal-day.presence-cal-absent:hover {
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
}

.presence-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text2);
}

.presence-legend-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.presence-legend-present {
  background: #86efac;
  border: 1px solid #16a34a;
}

.presence-legend-absent {
  background: #fdba74;
  border: 1px solid #ea580c;
}

.presence-legend-note {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.presence-day-dialog .presence-dialog-sub {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.presence-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.presence-btn-present {
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%) !important;
  color: #14532d !important;
  border: 1px solid #86efac !important;
}

.presence-btn-present:hover {
  background: linear-gradient(180deg, #d1fae5 0%, #bbf7d0 100%) !important;
}

.presence-btn-absent {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%) !important;
  color: #9a3412 !important;
  border: 1px solid #fdba74 !important;
}

.presence-btn-absent:hover {
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%) !important;
}

.presence-team-intro {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.presence-team-overview {
  min-height: 2rem;
}

.presence-team-loading {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.presence-team-day {
  margin-bottom: 1.25rem;
}

.presence-team-day:last-child {
  margin-bottom: 0;
}

.presence-team-day-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.presence-team-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.presence-team-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.presence-team-list li:last-child {
  border-bottom: none;
}

.presence-team-name {
  font-weight: 500;
  color: var(--text);
}

.presence-team-status {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
}

.presence-team-dot-neutral {
  background: var(--muted) !important;
  border-color: var(--border) !important;
}

@media (max-width: 640px) {
  .presence-toolbar-nav {
    margin-left: 0;
    width: 100%;
  }
}

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

/* Inventaire coffre */
.vault-toolbar {
  margin-bottom: 1rem;
}

.vault-search {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
}

.vault-new {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.vault-new-input {
  flex: 1;
  min-width: 12rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
}

.vault-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.vault-list-card {
  padding: 0;
  overflow: hidden;
}

.vault-list-card > .empty,
.vault-list-card > .vault-muted {
  padding: 1.35rem 1.45rem;
  margin: 0;
}

.vault-table-wrap {
  overflow-x: auto;
}

.vault-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.vault-table th,
.vault-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}

.vault-table th {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--surface-2);
}

.vault-table tbody tr:last-child td {
  border-bottom: none;
}

.vault-name {
  font-weight: 500;
}

.vault-qty-num {
  font-family: var(--mono);
  font-weight: 600;
}

.vault-col-qty {
  width: 6.5rem;
}

.vault-actions {
  white-space: normal;
  min-width: 18rem;
}

.vault-actions-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}

.vault-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.vault-action-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  min-width: 4.5rem;
}

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

.vault-qty-input {
  width: 4.5rem;
  padding: 0.35rem 0.45rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
}

.vault-actions .btn-sm {
  margin-right: 0;
}

@media (max-width: 720px) {
  .vault-table .vault-col-actions {
    min-width: 10rem;
  }
}

/* Page carrière (dashboard) */
.career-hero .career-display-name {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0.45rem 0 1rem;
  line-height: 1.25;
}

.career-grade-block {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke);
}

.career-matricule-block {
  margin-top: 0.75rem;
}

.career-matricule-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin: 0.35rem 0 0;
  color: var(--accent-light);
}

.matricule-badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  color: var(--accent-light);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  vertical-align: middle;
}

.org-agent-name .matricule-badge {
  margin-right: 0.35rem;
}

.effectif-agent-cell .matricule-badge {
  margin-right: 0.35rem;
}

.career-grade-value {
  font-size: 1.12rem;
  font-weight: 600;
  margin: 0.35rem 0 0.5rem;
  color: var(--accent-light);
}

/* Vitrine accueil (public) — photo de fond + cartes lisibles, bande bleue logo */
.landing-page {
  --landing-navy: #1a365d;
  --landing-navy-light: #2c5282;
  --landing-paper: #ffffff;
  --landing-bg: #f0f2f5;
  --landing-text: #1a202c;
  --landing-muted: #5f6368;

  margin: 0;
  min-height: 100vh;
  color: var(--landing-text);
  background-color: #0f172a;
  background-image: linear-gradient(
      160deg,
      rgba(15, 23, 42, 0.82) 0%,
      rgba(15, 23, 42, 0.55) 38%,
      rgba(15, 23, 42, 0.78) 100%
    ),
    url('/img/landing/accueil-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .landing-page {
    background-attachment: scroll;
  }
}

.landing-page a {
  color: var(--landing-navy-light);
}

.landing-page a:hover {
  color: var(--landing-navy);
}

/* Les liens-boutons : .landing-page a gagne sur .landing-btn-* (texte bleu sur fond bleu sinon). */
.landing-page a.landing-btn-solid {
  color: #fff;
}

.landing-page a.landing-btn-solid:hover {
  color: #fff;
}

.landing-page a.landing-btn-outline {
  color: var(--landing-navy);
}

.landing-page a.landing-btn-outline:hover {
  color: var(--landing-navy);
}

.landing-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
  align-items: stretch;
}

/* Bande bleue latérale — logo : fichier dans /img/branding/ (voir LISEZMOI.txt) */
.landing-rail {
  flex: 0 0 112px;
  width: 112px;
  background: linear-gradient(180deg, #1e3a5f 0%, #1a365d 45%, #152a45 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.75rem 1.25rem;
  gap: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
}

.landing-rail-logo-link {
  display: block;
  line-height: 0;
  border-radius: 12px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.landing-rail-logo-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.landing-rail-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.landing-rail-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.landing-rail-acronym {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.95);
}

.landing-rail-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.75);
  max-width: 5.5rem;
  line-height: 1.35;
}

.landing-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.landing-topbar {
  background: var(--landing-paper);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.landing-topbar-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.landing-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.landing-topbar-logo {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.landing-brand-line {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-brand-title {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--landing-text);
}

.landing-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.landing-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  border: 1px solid #c5ccd6;
  color: var(--landing-navy);
  background: var(--landing-paper);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.landing-btn-outline:hover {
  border-color: var(--landing-navy-light);
  background: rgba(26, 54, 93, 0.04);
}

.landing-btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  border: none;
  color: #fff;
  background: var(--landing-navy);
  box-shadow: var(--shadow-sm);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

.landing-btn-solid:hover {
  background: #153252;
  transform: translateY(-1px);
}

.landing-main-flow {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.landing-hero {
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
  padding: 1.75rem 1.5rem 0;
}

.landing-hero-inner {
  background: var(--landing-paper);
  border: 1px solid #e2e8f0;
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--landing-navy);
}

.landing-hero-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--landing-navy-light);
}

.landing-hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--landing-text);
}

.landing-hero-lead {
  margin: 0 0 1.35rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--landing-muted);
  max-width: 44rem;
}

.landing-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.landing-split {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 960px) {
  .landing-split {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 1.5rem;
  }
}

.landing-main-column {
  padding: 1.25rem 1.35rem;
  border-radius: var(--r);
  background: var(--landing-paper);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
}

.landing-main-column h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.landing-main-column p {
  margin: 0;
  color: var(--landing-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.landing-main-column strong {
  color: var(--landing-text);
  font-weight: 700;
}

.landing-sidebar {
  border-radius: var(--r);
  background: var(--landing-paper);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.landing-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.landing-tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.8rem 0.6rem;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--landing-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.landing-tab:hover {
  color: var(--landing-text);
  background: rgba(26, 54, 93, 0.05);
}

.landing-tab[aria-selected="true"] {
  color: var(--landing-navy);
  background: var(--landing-paper);
  border-bottom-color: var(--landing-navy);
}

.landing-tab-panels {
  padding: 1.1rem 1.2rem 1.25rem;
  flex: 1;
}

.landing-tab-panel {
  animation: landing-fade 0.35s var(--ease);
}

.landing-tab-panel[hidden] {
  display: none;
}

@keyframes landing-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-tab-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--landing-text);
}

.landing-tab-panel p,
.landing-tab-panel li {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--landing-muted);
}

.landing-tab-panel ul {
  margin: 0;
  padding-left: 1.1rem;
}

.landing-tab-panel li:last-child {
  margin-bottom: 0;
}

.landing-news-item {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #edf0f4;
}

.landing-news-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.landing-news-date {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--landing-navy-light);
  margin-bottom: 0.2rem;
}

.landing-news-item-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--landing-text);
  line-height: 1.3;
}

.landing-news-meta {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: var(--landing-muted);
}

.landing-news-body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--landing-muted);
}

.landing-tab-hint {
  margin: 0;
  font-size: 0.8rem;
  color: #80868b;
}

.landing-footer {
  margin-top: auto;
  padding: 1rem 1.5rem 1.35rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.landing-footer p {
  margin: 0;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .landing-shell {
    flex-direction: column;
  }

  .landing-rail {
    flex: none;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 1.25rem;
    gap: 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
  }

  .landing-rail-text {
    align-items: flex-start;
    text-align: left;
  }

  .landing-rail-label {
    max-width: none;
  }
}

.form-row .req {
  color: #b91c1c;
}

.recruitment-msg {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
}

.recruitment-msg-ok {
  background: #ecfdf5;
  color: #14532d;
  border: 1px solid #86efac;
}

.recruitment-msg-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.recruitment-admin-card {
  overflow: hidden;
}

.recruitment-admin-actions {
  white-space: normal;
  max-width: 22rem;
}

.recruitment-admin-actions .btn-sm {
  margin: 0.15rem 0.15rem 0.15rem 0;
}

.recruitment-badge-pending {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d;
}

/* — Demande de remboursement (lignes + note) — */
.rb-lines-fieldset {
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  background: var(--surface-2);
}

.rb-lines-fieldset legend {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0.35rem;
}

.rb-lines-table {
  margin-top: 0.75rem;
  --rb-col-check: 2.75rem;
  --rb-col-amount: 8.5rem;
}

.rb-lines-head,
.rb-line,
.rb-total-line {
  display: grid;
  grid-template-columns: var(--rb-col-check) minmax(0, 1fr) var(--rb-col-amount);
  align-items: center;
  column-gap: 0.75rem;
}

.rb-lines-head {
  padding-bottom: 0.55rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--stroke);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rb-lines-head .rb-col-amount,
.rb-total-line .rb-col-amount {
  text-align: right;
  padding-right: 1.6rem;
}

.rb-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rb-line {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--stroke);
}

.rb-line:last-child {
  border-bottom: none;
}

.rb-line-check {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  cursor: pointer;
}

.rb-line-check input[type='checkbox'] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent, #1a365d);
}

.rb-line-name {
  font-size: 0.95rem;
  line-height: 1.3;
}

.rb-line-amount-wrap {
  display: grid;
  grid-template-columns: 1fr 1.25rem;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.rb-line-amount {
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 0.9rem;
  text-align: right;
  background: var(--surface);
  color: var(--text);
}

.rb-line-amount:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rb-currency {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.rb-total-line {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--stroke);
}

.rb-total-line .rb-col-type {
  text-align: right;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text2);
}

.rb-total-line .rb-col-amount strong {
  font-size: 1.1rem;
  color: var(--accent, #1d4ed8);
}

.rb-autres-panel {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.rb-autres-panel[hidden] {
  display: none;
}

.rb-autres-help {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.rb-autres-help strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
}

.rb-autres-panel label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
}

.rb-autres-panel textarea {
  width: 100%;
  min-height: 4.5rem;
  resize: vertical;
}

@media (max-width: 520px) {
  .rb-lines-table {
    --rb-col-check: 2.25rem;
    --rb-col-amount: 6.75rem;
  }

  .rb-lines-head .rb-col-amount,
  .rb-total-line .rb-col-amount {
    padding-right: 1.35rem;
  }
}

.rb-doc-body {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text);
  max-height: 50vh;
  overflow: auto;
}

.rb-doc-modal-inner {
  max-width: 36rem;
}

/* Page effectif — organigramme et liste */
.effectif-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.effectif-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.effectif-view-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}

.effectif-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: calc(var(--r-sm) - 2px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.effectif-tab.active {
  background: var(--accent);
  color: #fff;
}

.effectif-panel[hidden] {
  display: none !important;
}

.effectif-agent-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.effectif-row-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1rem 0 2.5rem;
  width: 100%;
}

.org-tier {
  width: 100%;
  max-width: 96rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tier-head {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  margin-bottom: 0.85rem;
}

.org-tier-count {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.org-tier-line {
  width: 3px;
  height: 1.35rem;
  background: linear-gradient(to bottom, var(--accent), var(--stroke));
  opacity: 0.55;
}

.org-tier-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 0.75rem 0.5rem;
}

.org-tier-connector {
  width: 3px;
  height: 1.5rem;
  background: var(--stroke);
  margin: 0.2rem 0;
}

.org-agent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 10rem;
  max-width: 14rem;
  min-height: 5.5rem;
  padding: 1.1rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.org-agent-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.org-agent-card .badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
}

/* Avatar sidebar cliquable */
.user-avatar-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
}

.user-avatar-btn img {
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.user-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-modal-inner {
  max-width: 28rem;
}

.avatar-modal-inner input[type='file'] {
  width: 100%;
  margin: 0.75rem 0;
}

.rb-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.rb-draft-meta {
  margin-top: 0.5rem;
}

.compta-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.compta-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.career-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.career-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.career-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.career-card-entry {
  margin: 0 0 1rem;
}

.career-log-preview,
.career-log-full {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.career-log-preview li,
.career-log-full li {
  margin-bottom: 0.35rem;
}

.career-log-date {
  color: var(--muted);
  font-size: 0.82rem;
}

.career-log-empty {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.career-log-modal-inner {
  max-width: 40rem;
}

.career-log-list {
  max-height: 50vh;
  overflow: auto;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 1rem;
  align-items: start;
}

.dispatch-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dispatch-panel-head h3 {
  margin: 0;
}

.dispatch-agent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dispatch-agent-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--stroke);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dispatch-agent-btn.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.25);
}

.dispatch-agent-btn.assigned {
  opacity: 0.72;
}

.dispatch-agent-grade {
  font-size: 0.78rem;
  color: var(--muted);
}

.dispatch-pairs {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dispatch-pair {
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  padding: 0.85rem;
  background: var(--surface-2);
}

.dispatch-pair.selected {
  border-color: var(--accent);
}

.dispatch-pair-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.dispatch-pair-label {
  flex: 1;
  font: inherit;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--stroke);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.dispatch-pair-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  min-height: 1.5rem;
}

.dispatch-pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  font-size: 0.82rem;
}

.dispatch-remove-agent {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--muted);
}

@media (max-width: 900px) {
  .dispatch-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .effectif-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .effectif-view-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .effectif-tab {
    flex: 1;
    text-align: center;
  }
}

