/* ============================================================
   Rotation des journaliers — identité visuelle
   Palette : PMS 3308 C (vert profond) / PMS 376 C (vert lime)
   ============================================================ */

:root {
  --violet: #043836;
  --violet-dark: #032b29;
  --indigo: #0a5a56;
  --blue: #0ea5e9;
  --cyan: #06b6d4;
  --green: #99BA22;
  --amber: #f59e0b;
  --orange: #f97316;
  --pink: #99BA22;
  --red: #ef4444;

  --ink: #1f2d2c;
  --muted: #667978;
  --line: #e3eceb;
  --surface: #ffffff;
  --bg: #f4f8f7;

  --shadow-sm: 0 4px 14px rgba(4, 56, 54, .06);
  --shadow: 0 14px 35px rgba(4, 56, 54, .11);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-size: .95rem;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 92% -12%, rgba(4, 56, 54, .14), transparent 62%),
    radial-gradient(760px 460px at -12% 22%, rgba(153, 186, 34, .12), transparent 60%),
    radial-gradient(620px 420px at 70% 108%, rgba(4, 56, 54, .08), transparent 60%);
}

/* ---------- Coque : menu latéral + zone principale ---------- */
.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
  width: 266px;
  flex: 0 0 266px;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(165deg, #022625 0%, #043836 48%, #075a56 100%);
}
.sidebar::after {
  content: "";
  position: absolute;
  right: -130px;
  top: 70px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .055);
  pointer-events: none;
}
.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px 14px;
  position: relative;
  z-index: 1;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-mark {
  width: 42px; height: 42px;
  flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 13px;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #99BA22, #bfdc4b);
  box-shadow: 0 8px 20px rgba(153, 186, 34, .32);
}
.brand-text strong { display: block; font-size: 1.05rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.brand-text small { display: block; color: #cfe4a0; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-close {
  border: 0; background: rgba(255, 255, 255, .12); color: #fff;
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
}

.sidebar-scroll { flex: 1; overflow-y: auto; position: relative; z-index: 1; padding-right: 2px; }
.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 10px; }

.nav-label {
  margin: 16px 12px 7px;
  color: #97b5b3;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 13px;
  color: #dceceb;
  text-decoration: none;
  font-size: .89rem;
  font-weight: 650;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.side-link:hover { background: rgba(255, 255, 255, .10); color: #fff; transform: translateX(2px); }
.side-link.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(255, 255, 255, .21), rgba(255, 255, 255, .06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 8px 18px rgba(2, 24, 23, .22);
}
.side-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 17%; bottom: 17%;
  width: 4px;
  border-radius: 0 6px 6px 0;
  background: var(--tone, #99BA22);
}
.side-icon {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 1rem;
  background: rgba(255, 255, 255, .10);
  color: var(--tone-soft, #dce9c1);
  transition: background .18s, color .18s;
}
.side-link.active .side-icon {
  background: var(--tone, #99BA22);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}
.side-link .side-arrow { margin-left: auto; font-size: .7rem; opacity: .8; }
.tone-violet { --tone: #99BA22; --tone-soft: #e3f0b8; }
.tone-cyan   { --tone: #22c7df; --tone-soft: #a5f3fc; }
.tone-green  { --tone: #99BA22; --tone-soft: #e3f0b8; }
.tone-amber  { --tone: #fbbf24; --tone-soft: #fde68a; }
.tone-pink   { --tone: #99BA22; --tone-soft: #e3f0b8; }
.tone-blue   { --tone: #60a5fa; --tone-soft: #bfdbfe; }

.sidebar-footer { margin-top: auto; padding: 16px 6px 0; position: relative; z-index: 1; }
.side-tip {
  border-radius: 14px;
  padding: 12px 13px;
  font-size: .76rem;
  line-height: 1.45;
  color: #ded8fa;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .13);
}
.side-tip strong { display: block; color: #fff; font-size: .8rem; margin-bottom: 3px; }
.side-tip i { color: #99BA22; margin-right: 5px; }
.sidebar-backdrop { display: none; }

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

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 30px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.topbar-logo {
  display: block;
  height: 38px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
.topbar-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--violet);
  font-size: 1.2rem;
  place-items: center;
}
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; }
.breadcrumbs span { overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs i { font-size: .65rem; color: #b9bdd4; }
.breadcrumbs strong { color: var(--ink); font-weight: 750; overflow: hidden; text-overflow: ellipsis; }
.date-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  background: #e8f1f0;
  color: #043836;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .85rem;
  box-shadow: var(--shadow-sm);
}
.user-chip::after { margin-left: 2px; }
.avatar {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #043836, #99BA22);
}
.dropdown-menu { border: 0; border-radius: 15px; box-shadow: var(--shadow); padding: 8px; }
.dropdown-item { border-radius: 9px; font-size: .87rem; font-weight: 600; }
.dropdown-item i { color: var(--violet); }
.dropdown-item.text-danger i { color: var(--red); }

/* ---------- En-tête à images défilantes ---------- */
.showcase {
  position: relative;
  height: 214px;
  overflow: hidden;
  background: linear-gradient(115deg, #022625, #075a56);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.showcase::before, .showcase::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 64px;
  z-index: 2;
  pointer-events: none;
}
.showcase::before { left: 0; background: linear-gradient(90deg, rgba(4, 56, 54, .90), transparent); }
.showcase::after { right: 0; background: linear-gradient(270deg, rgba(4, 56, 54, .90), transparent); }
.showcase-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: showcase-scroll 44s linear infinite;
}
.showcase:hover .showcase-track { animation-play-state: paused; }
.showcase-group { display: flex; gap: 14px; padding-right: 14px; }
.showcase-slide {
  position: relative;
  flex: 0 0 340px;
  height: calc(100% - 24px);
  margin: 12px 0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(10, 5, 40, .28);
}
.showcase-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 34px 14px 13px;
  color: #fff;
  background: linear-gradient(0deg, rgba(15, 8, 40, .90), rgba(15, 8, 40, 0));
}
.showcase-icon {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, .20);
  backdrop-filter: blur(6px);
}
.showcase-copy { min-width: 0; }
.showcase-copy strong { display: block; font-size: .88rem; font-weight: 800; line-height: 1.2; }
.showcase-copy small { display: block; font-size: .72rem; opacity: .84; line-height: 1.3; }
@keyframes showcase-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (max-width: 575.98px) {
  .showcase { height: 166px; }
  .showcase::before, .showcase::after { width: 32px; }
  .showcase-slide { flex-basis: 244px; }
  .showcase-caption { padding: 28px 11px 10px; gap: 8px; }
  .showcase-icon { width: 29px; height: 29px; flex-basis: 29px; font-size: .9rem; }
  .showcase-copy strong { font-size: .8rem; }
  .showcase-copy small { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-track { animation: none; }
  .showcase { overflow-x: auto; }
}

/* ---------- Contenu ---------- */
.page { flex: 1; width: 100%; max-width: 1500px; margin: 0 auto; padding: 26px 30px 56px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.page-heading-copy { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-icon {
  width: 50px; height: 50px;
  flex: 0 0 50px;
  display: grid; place-items: center;
  border-radius: 15px;
  color: #fff;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #043836, #0a5a56);
  box-shadow: 0 10px 22px rgba(4, 56, 54, .28);
}
.page-heading h1 { margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.page-heading p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; max-width: 720px; }
.eyebrow { display: block; color: var(--violet); font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }

.section-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 12px;
  font-size: 1.03rem;
  font-weight: 750;
}
.section-heading::before {
  content: "";
  width: 5px; height: 21px;
  border-radius: 6px;
  background: linear-gradient(180deg, #043836, #99BA22);
}
.section-heading i { color: var(--violet); }

/* ---------- Cartes ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 22px; }
.card-header { padding: 15px 22px; background: #f7fbfa; border-bottom: 1px solid var(--line); font-weight: 750; }
.card h5, .card h6 { font-weight: 750; }
.panel-accent { position: relative; }
.panel-accent::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #043836, #99BA22, #0ea5e9);
}

/* ---------- Indicateurs ---------- */
.metric {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 122px;
  padding: 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.metric::after {
  content: "";
  position: absolute;
  right: -28px; bottom: -40px;
  width: 124px; height: 124px;
  border-radius: 50%;
  background: var(--metric-tint, #eee8ff);
  opacity: .55;
}
.metric small { display: block; color: var(--muted); font-weight: 700; font-size: .76rem; margin-bottom: 8px; }
.metric strong { display: block; font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.metric .metric-icon {
  position: absolute;
  top: 16px; right: 17px;
  z-index: 1;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 1.05rem;
  color: var(--metric-color, #043836);
  background: var(--metric-bg, #e8f1f0);
}
.metric.is-link { transition: transform .18s, box-shadow .18s; }
.metric.is-link:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(4, 56, 54, .15); color: var(--ink); }
.metric-violet { --metric-color: #043836; --metric-bg: #e8f1f0; --metric-tint: #d4e4e2; }
.metric-cyan   { --metric-color: #0891b2; --metric-bg: #e0f7fb; --metric-tint: #cff6fd; }
.metric-amber  { --metric-color: #d97706; --metric-bg: #fff3d6; --metric-tint: #ffedc2; }
.metric-green  { --metric-color: #6f8a14; --metric-bg: #f0f7d9; --metric-tint: #e3efbf; }
.metric-pink   { --metric-color: #99BA22; --metric-bg: #f0f7d9; --metric-tint: #e3efbf; }

/* ---------- Pied de page avec code QR d'accès à l'application ---------- */
.app-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
  padding: 14px 30px;
}
.app-footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-footer-qr {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.app-footer-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-footer-copy strong { font-size: .82rem; font-weight: 800; }
.app-footer-copy span { color: var(--muted); font-size: .76rem; }
.app-footer-brand {
  margin-left: auto;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Boutons ---------- */
.btn {
  border-radius: 11px;
  font-weight: 700;
  padding: .55rem 1.05rem;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: .34rem .65rem; font-size: .8rem; border-radius: 9px; }
.btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #043836, #075a56);
  box-shadow: 0 8px 18px rgba(4, 56, 54, .26);
}
.btn-primary:hover, .btn-primary:focus { color: #fff; background: linear-gradient(135deg, #075a56, #043836); }
.btn-success {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #99BA22, #7ea116);
  box-shadow: 0 7px 16px rgba(153, 186, 34, .24);
}
.btn-success:hover, .btn-success:focus { color: #fff; background: linear-gradient(135deg, #a8c93a, #6f8a14); }
.btn-danger {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #e11d48);
  box-shadow: 0 7px 16px rgba(239, 68, 68, .22);
}
.btn-danger:hover, .btn-danger:focus { color: #fff; background: linear-gradient(135deg, #fb8da3, #be123c); }
.btn-outline-primary { border-color: #b7d0ce; color: #043836; background: #fff; }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: #fff; background: #043836; border-color: #043836; }
.btn-outline-success { border-color: #d6e8a3; color: #6f8a14; background: #fff; }
.btn-outline-success:hover, .btn-outline-success:focus { color: #fff; background: #99BA22; border-color: #99BA22; }
.btn-outline-danger { border-color: #f8cbd2; color: #d92d46; background: #fff; }
.btn-outline-danger:hover, .btn-outline-danger:focus { color: #fff; background: #d92d46; border-color: #d92d46; }
.btn-outline-secondary { border-color: #dfe1ee; color: #626a8a; background: #fff; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus { color: #fff; background: #626a8a; border-color: #626a8a; }

/* ---------- Formulaires ---------- */
.form-label { margin-bottom: .35rem; color: #474e70; font-size: .8rem; font-weight: 700; }
.form-control, .form-select {
  border-radius: 11px;
  border-color: #e1e3f1;
  padding: .6rem .8rem;
  font-size: .88rem;
}
.form-control:focus, .form-select:focus {
  border-color: #6aa39f;
  box-shadow: 0 0 0 .2rem rgba(4, 56, 54, .15);
}
.form-control-sm, .form-select-sm { padding: .35rem .55rem; font-size: .8rem; border-radius: 9px; }
.form-check-input { cursor: pointer; }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(4, 56, 54, .15); border-color: var(--violet); }
input[data-datepicker] {
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23043836' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 1rem 1rem;
  padding-right: 2.4rem;
}
.flatpickr-calendar { font-family: inherit; border-radius: 14px; box-shadow: var(--shadow) !important; }
.flatpickr-day.selected { background: var(--violet); border-color: var(--violet); }

/* ---------- Messages ---------- */
.alert {
  --alert-color: #043836;
  --alert-bg: #edf5f4;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  border: 0;
  border-left: 4px solid var(--alert-color);
  border-radius: 14px;
  padding: .85rem 1rem;
  color: #2f4442;
  background: var(--alert-bg);
  box-shadow: var(--shadow-sm);
  font-size: .87rem;
  margin-bottom: 14px;
}
.alert::before {
  content: "i";
  flex: 0 0 21px;
  width: 21px; height: 21px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--alert-color);
  font-weight: 800;
  font-size: .72rem;
  line-height: 1;
}
.alert-success { --alert-color: #6f8a14; --alert-bg: #f4f9e3; }
.alert-success::before { content: "✓"; }
.alert-danger  { --alert-color: #ef4444; --alert-bg: #fff1f2; }
.alert-danger::before { content: "!"; }
.alert-warning { --alert-color: #f59e0b; --alert-bg: #fffbeb; }
.alert-warning::before { content: "!"; }
.alert-info    { --alert-color: #0ea5e9; --alert-bg: #f0f9ff; }
.alert-secondary { --alert-color: #6f8785; --alert-bg: #f3f7f6; }
.alert-light { --alert-color: #99BA22; --alert-bg: #f7fbef; }
.alert .btn-close { margin-left: auto; flex: 0 0 auto; }
.flash-stack { margin-bottom: 18px; }

/* ---------- Tableaux ---------- */
.table-responsive {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table { margin: 0; vertical-align: middle; --bs-table-bg: transparent; }
.table thead th {
  padding: 12px 14px;
  white-space: nowrap;
  background: linear-gradient(180deg, #f7fbfa, #edf5f4);
  border-bottom: 1px solid var(--line);
  color: #043836;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.table tbody td { padding: 12px 14px; border-top: 1px solid #edf2f1; color: #2f4442; font-size: .87rem; }
.table tbody tr:hover { background: #f7fbfa; }
.table-striped tbody tr:nth-of-type(odd) { background: #fbfdfc; }
.table-striped tbody tr:nth-of-type(odd):hover { background: #f7fbfa; }
.table-bordered > :not(caption) > * > * { border-color: #ecedf7; }
.table thead th:first-child, .table tbody td:first-child { padding-left: 18px; }

.action-group { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.action-group form { display: inline-flex; margin: 0; }

/* ---------- Pastilles ---------- */
.badge { border-radius: 999px; padding: .42em .7em; font-size: .7rem; font-weight: 750; }
.badge.bg-success { background: #dcfce7 !important; color: #10794f !important; }
.badge.bg-secondary { background: #eceefa !important; color: #616988 !important; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .25rem .62rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.pill-violet { background: #e8f1f0; color: #043836; }
.pill-cyan   { background: #e0f7fb; color: #0e7490; }
.pill-amber  { background: #fff3d6; color: #b45309; }
.pill-green  { background: #f0f7d9; color: #6f8a14; }
.pill-pink   { background: #f0f7d9; color: #6f8a14; }
.pill-grey   { background: #eef3f2; color: #5f7573; }

/* Grille des indisponibilités */
.week-table td { text-align: center; }
.week-table td:has(input:checked) { background: #fff1f2; }
.week-table input.form-check-input { width: 1.15rem; height: 1.15rem; }

/* ---------- Connexion ---------- */
.login-wrap { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 28px 0; }
.login-card {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  width: 100%;
  max-width: 900px;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 26px 65px rgba(4, 56, 54, .18);
}
.login-aside {
  position: relative;
  overflow: hidden;
  padding: 34px;
  color: #fff;
  background: linear-gradient(160deg, #022625 0%, #043836 62%, #075a56 100%);
}
.login-aside::after {
  content: "";
  position: absolute;
  right: -90px; bottom: -110px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.login-aside .brand { position: relative; z-index: 1; }
.login-aside-copy { position: relative; z-index: 1; margin-top: 52px; }
.login-kicker { color: #99BA22; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.login-aside-copy h2 { margin: 10px 0 12px; font-size: 1.85rem; font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
.login-aside-copy p { color: #dceceb; font-size: .88rem; line-height: 1.6; }
.login-features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 11px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 600; }
.login-features i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .14); color: #99BA22; }
.login-aside-footer { position: relative; z-index: 1; margin-top: 44px; color: #b9d0ce; font-size: .74rem; }
.login-form { padding: 38px; }
.login-form h2 { margin: 0 0 8px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.login-form > p { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--violet); font-size: .95rem; }
.input-with-icon .form-control { padding-left: 2.5rem; }
.login-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; color: var(--muted); font-size: .83rem; font-weight: 600; text-decoration: none; }
.login-back:hover { color: var(--violet); }

/* ---------- Adaptatif ---------- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 18px 0 45px rgba(18, 10, 55, .28);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed; inset: 0;
    z-index: 55;
    background: rgba(20, 14, 55, .48);
    opacity: 0; visibility: hidden;
    transition: opacity .2s, visibility .2s;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .topbar-toggle { display: grid; }
  .topbar { padding: 10px 18px; }
  .page { padding: 22px 18px 42px; }
  .app-footer { padding: 12px 18px; }
}
@media (min-width: 992px) {
  .sidebar-close { display: none; }
}
@media (max-width: 767.98px) {
  .login-card { grid-template-columns: 1fr; max-width: 520px; }
  .login-aside { padding: 24px; }
  .login-aside-copy { margin-top: 22px; }
  .login-aside-copy h2 { font-size: 1.4rem; }
  .login-features, .login-aside-footer { display: none; }
  .login-form { padding: 26px; }
  .page-heading h1 { font-size: 1.45rem; }
}
@media (max-width: 575.98px) {
  .date-chip span { display: none; }
  .topbar-left { gap: 8px; }
  .topbar-logo { height: 30px; max-width: 82px; }
  .breadcrumbs span:first-child, .breadcrumbs i { display: none; }
  .metric strong { font-size: 1.65rem; }
  .card-body { padding: 17px; }
  .app-footer-qr { flex-basis: 56px; width: 56px; height: 56px; padding: 4px; }
  .app-footer-brand { display: none; }
}
