:root {
  --bg: #eef1f5;
  --panel: #ffffff;
  --panel-soft: #f7f7f8;
  --text: #2f3237;
  --muted: #6e737c;
  --line: #d7d9de;
  --primary: #e5261f;
  --primary-dark: #c61d18;
  --primary-soft: rgba(229, 38, 31, 0.10);
  --success: #198754;
  --warning: #b7791f;
  --danger: #c53030;
  --shadow: 0 18px 40px rgba(47, 50, 55, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(229, 38, 31, 0.12), transparent 22%),
    linear-gradient(180deg, #fafafb 0%, var(--bg) 100%);
}

a { color: inherit; }

body.recup-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

body.recup-login-page .login-card {
  margin: auto;
}

.login-card {
  width: min(100%, 1020px);
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
  background: var(--panel);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(47, 50, 55, 0.08);
}

.hero {
  padding: 48px;
  background:
    linear-gradient(155deg, #3a3d44 0%, #2f3237 52%, #e5261f 160%),
    #2f3237;
  color: #fff;
}

.hero .eyebrow,
.hero small {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.02;
}

.hero p {
  margin: 0;
  max-width: 62rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.hero ul {
  margin: 28px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.panel {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
}

.panel h2 {
  margin: 0;
  font-size: 28px;
  color: var(--text);
}

.panel p,
.panel-note,
.brand p,
.sidebar p,
.stat-label,
.infos,
.notif,
.alert-box,
.empty_result,
td,
th {
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 20px rgba(229, 38, 31, 0.18);
}

.cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.panel-note {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafafb;
  font-size: 14px;
  line-height: 1.6;
}

.shell {
  width: min(1400px, calc(100% - 32px));
  margin: 24px auto 40px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
}

.sidebar,
.content-card,
.stats article,
.notif,
.alert-box,
.encart a,
.empty_result {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  border-radius: 24px;
  padding: 24px;
  position: sticky;
  top: 24px;
  align-self: start;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f8 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #2f3237;
}

.brand-mark img,
.hero-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand-mark img {
  width: 34px;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.10);
}

.hero-logo img {
  width: 40px;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
}

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

.menu_inside_page h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.menu_inside_page li + li {
  margin-top: 8px;
}

.menu_inside_page li a,
.sidebar-actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
}

.menu_inside_page li.active a,
.menu_inside_page li a:hover,
.sidebar-actions a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.sidebar-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.main {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.hero-dashboard {
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.hero-dashboard::after {
  content: '';
  position: absolute;
  inset: auto -40px -50px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.stats article {
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f9 100%);
}

.stat-value {
  display: block;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.content-card {
  border-radius: 24px;
  padding: 28px;
  overflow: hidden;
}

.content-card h3,
.content-card h4 {
  margin: 0 0 18px;
  font-size: 24px;
  color: var(--text);
}

.content-card h4 {
  font-size: 18px;
  margin-top: 10px;
}

.notif,
.alert-box,
.empty_result {
  border-radius: 16px;
  padding: 16px 18px;
  line-height: 1.6;
}

.notif.success {
  border-color: rgba(25, 135, 84, 0.28);
  background: rgba(25, 135, 84, 0.10);
  color: #155d3b;
}

.notif.error {
  border-color: rgba(197, 48, 48, 0.28);
  background: rgba(197, 48, 48, 0.08);
  color: #8a2323;
}

.alert-box {
  background: #fff7f6;
  border-color: rgba(229, 38, 31, 0.25);
  color: #8d2d26;
}

.alert-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.infos {
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  line-height: 1.7;
}

.infos strong,
.alert-box strong,
th,
.empty_result,
.etat-demande {
  color: var(--text);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.5;
}

thead th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f3f3f5;
}

tbody tr:hover {
  background: #fcf4f4;
}

.center { text-align: center; }
.validation-actions {
  white-space: nowrap;
}

.validation-actions .encart {
  display: inline-block;
  vertical-align: middle;
}

.validation-actions .encart + .encart {
  margin-left: 8px;
}

.encart { display: inline-block; }

.encart a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.encart a:hover {
  background: var(--primary-soft);
}

.etat-demande {
  display: inline-block;
  font-weight: 700;
}

.etat-demande.attente { color: var(--warning); }
.etat-demande.valide { color: var(--success); }
.etat-demande.refuse,
.etat-demande.deleted { color: var(--danger); }

.content-card .empty_result {
  box-shadow: none;
  background: var(--panel-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
}

.pagination-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
}

.pagination-link:hover {
  border-color: rgba(229, 38, 31, 0.25);
  background: var(--primary-soft);
  color: var(--primary);
}

@media (max-width: 1120px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: 1fr; }
  .content-card,
  .hero,
  .panel { padding: 24px; }
  table { display: block; overflow-x: auto; }
}

@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .hero,
  .panel { padding: 32px 24px; }
}



.encart-inline {
  display: block;
  margin-top: 10px;
}

.encart-inline a {
  min-width: 0;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.motif-refus-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
}

.motif-refus-link:hover {
  color: var(--primary-dark);
}

.dataTables_wrapper {
  color: var(--text);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  margin: 12px 0;
  color: var(--muted);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.recup-datatable-filter {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

.recup-datatable tfoot th {
  background: #fafafb;
}

.recup-datatable tbody tr.historique-validee {
  background: rgba(25, 135, 84, 0.06);
}

.recup-datatable tbody tr.historique-refusee,
.recup-datatable tbody tr.historique-supprimee {
  background: rgba(197, 48, 48, 0.05);
}

.recup-datatable tbody tr.historique-validee td:first-child,
.recup-datatable tbody tr.historique-refusee td:first-child,
.recup-datatable tbody tr.historique-supprimee td:first-child {
  border-left: 4px solid transparent;
}

.recup-datatable tbody tr.historique-validee td:first-child {
  border-left-color: var(--success);
}

.recup-datatable tbody tr.historique-refusee td:first-child,
.recup-datatable tbody tr.historique-supprimee td:first-child {
  border-left-color: var(--danger);
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

.status-dot-validee {
  background: var(--success);
}

.status-dot-refusee,
.status-dot-supprimee {
  background: var(--danger);
}

.status-dot-attente {
  background: var(--warning);
}

.recup-datatable-filter {
  width: 100%;
  font-size: 13px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 10px !important;
  border: 1px solid transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: var(--primary-soft) !important;
  border-color: rgba(229, 38, 31, 0.25) !important;
  color: var(--primary) !important;
}

@media (max-width: 900px) {
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_length {
    text-align: left;
  }
}





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

.popup-shell {
  width: min(100%, 760px);
}

.popup-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.popup-card-header {
  padding: 32px 32px 20px;
  background: linear-gradient(155deg, #3a3d44 0%, #2f3237 52%, #e5261f 160%), #2f3237;
  color: #fff;
}

.popup-card-header h1 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.popup-card-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.popup-form,
.popup-content {
  padding: 28px 32px 32px;
}

.popup-field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--text);
}

.popup-field textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafafb;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.popup-field textarea:focus {
  border-color: rgba(229, 38, 31, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(229, 38, 31, 0.12);
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.popup-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.popup-secondary:hover {
  background: #fafafb;
}

.popup-content .infos {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}

@media (max-width: 640px) {
  .popup-card-header,
  .popup-form,
  .popup-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .popup-actions {
    flex-direction: column-reverse;
  }

  .popup-actions .cta,
  .popup-actions .popup-secondary {
    width: 100%;
  }
}

body.recup-modal-open {
  overflow: hidden;
}

.recup-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.recup-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 50, 55, 0.55);
  backdrop-filter: blur(4px);
}

.recup-modal-dialog {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(18, 20, 24, 0.28);
  background: var(--panel);
  z-index: 1;
}

.recup-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(47, 50, 55, 0.78);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.recup-modal-close:hover {
  background: rgba(47, 50, 55, 0.92);
}

.recup-modal-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

@media (max-width: 640px) {
  .recup-modal {
    padding: 12px;
  }

  .recup-modal-dialog {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    border-radius: 20px;
  }
}
.recup-modal-close::before,
.recup-modal-close::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.recup-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.recup-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
