@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap');

:root {
  --red: #b71c1c;
  --red-d: #7f0000;
  --red-l: #e57373;
  --red-bg: #ffebee;
  --gray-900: #1a1a1a;
  --gray-700: #4a4a4a;
  --gray-500: #757575;
  --gray-300: #e0e0e0;
  --gray-100: #f4f4f5;
  --green: #2e7d32;
  --green-bg: #e8f5e9;
  --orange: #e65100;
  --orange-bg: #fff3e0;
  --blue: #1565c0;
  --blue-bg: #e3f2fd;
  --purple: #6a1b9a;
  --purple-bg: #f3e5f5;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --r: 14px;
  --r-sm: 10px;
  --r-lg: 18px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 260px;
  --topbar-h: 58px;
  --portal-bar-h: 46px;
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ring: 0 0 0 3px rgba(183, 28, 28, 0.22);
  --admin-bg: #eef1f4;
  --sidebar-bg: #f8f9fb;
  --sidebar-border: #e2e6ea;
  --tile-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

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

body {
  font-family: var(--font);
  background: linear-gradient(165deg, var(--gray-100) 0%, #eceff1 45%, var(--gray-100) 100%);
  color: var(--gray-900);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

button:focus-visible,
.btn:focus-visible,
.nav-item:focus-visible,
.bn-item:focus-visible,
#topbar .btn-icon:focus-visible,
.modal-close:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

img {
  max-width: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: linear-gradient(90deg, var(--red-d) 0%, var(--red) 50%, #c62828 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 18px;
  z-index: 100;
  box-shadow: var(--shadow);
}

#topbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

#topbar .logo-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

#topbar .spacer {
  flex: 1;
}

#topbar .topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#topbar .btn-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
  font-size: 18px;
}

#topbar .btn-icon:hover {
  background: rgba(255, 255, 255, 0.18);
}

#topbar .badge {
  background: var(--white);
  color: var(--red);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

#admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--admin-bg);
}

#sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: calc(var(--topbar-h) + var(--portal-bar-h));
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.04);
}

#sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-d) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--tile-shadow);
}

.sidebar-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand__title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.sidebar-brand__sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.sidebar-label--muted {
  padding-top: 8px;
  color: #9e9e9e;
}

#sidebar-nav {
  flex: 1;
  padding: 4px 10px 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 2px 0;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 12px;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 600;
  min-height: 46px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(183, 28, 28, 0.08);
  color: var(--red);
  border-color: rgba(183, 28, 28, 0.12);
}

.nav-item.active {
  background: var(--white);
  color: var(--red);
  border-color: rgba(183, 28, 28, 0.2);
  box-shadow: var(--tile-shadow);
}

.nav-item .nav-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
}

#sidebar-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--sidebar-border);
  background: rgba(255, 255, 255, 0.5);
}

#admin-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: clamp(20px, 2.5vw, 40px) clamp(18px, 3vw, 40px) 48px;
  min-height: calc(100vh - var(--topbar-h) - var(--portal-bar-h));
  max-width: min(1280px, 100%);
  width: calc(100% - var(--sidebar-w));
}

#public-layout {
  padding-bottom: 76px;
  min-height: 100vh;
}

#public-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 18px;
}

#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--gray-300);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 12px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  min-height: 56px;
}

.bn-item .bn-icon {
  font-size: 22px;
}

.bn-item.active {
  color: var(--red);
}

.bn-item.active .bn-icon {
  filter: drop-shadow(0 0 4px rgba(183, 28, 28, 0.35));
}

.card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.card-header .spacer {
  flex: 1;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--surface-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-left: 4px solid transparent;
}

.stat-card.red {
  border-left-color: var(--red);
}

.stat-card.green {
  border-left-color: var(--green);
}

.stat-card.orange {
  border-left-color: var(--orange);
}

.stat-card.blue {
  border-left-color: var(--blue);
}

.stat-card .stat-val {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
  font-weight: 600;
}

.stat-card .stat-icon {
  font-size: 28px;
  float: right;
  margin-top: -4px;
  opacity: 0.85;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  min-height: 44px;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--red-d);
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--surface);
  color: var(--gray-900);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-100);
}

.btn-success {
  background: var(--green);
  color: var(--white);
}

.btn-danger {
  background: #c62828;
  color: var(--white);
}

.btn-warning {
  background: var(--orange);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-outline:hover {
  background: var(--red-bg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 38px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--r);
  min-height: 52px;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label span {
  color: var(--red);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--gray-900);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--red);
  box-shadow: var(--ring);
}

.form-control.error {
  border-color: #c62828;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23616161'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

textarea.form-control {
  resize: vertical;
  min-height: 88px;
}

.form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  color: #c62828;
  font-size: 12px;
  margin-top: 4px;
}

.form-section {
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gray-300);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.chip-red {
  background: var(--red-bg);
  color: var(--red);
}

.chip-green {
  background: var(--green-bg);
  color: var(--green);
}

.chip-orange {
  background: var(--orange-bg);
  color: var(--orange);
}

.chip-blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.chip-gray {
  background: var(--gray-100);
  color: var(--gray-700);
}

.chip-purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.table-wrapper {
  overflow-x: auto;
}

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

table th {
  background: var(--surface-muted);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  vertical-align: middle;
}

table tr:hover td {
  background: var(--red-bg);
}

table .actions {
  display: flex;
  gap: 6px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96);
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-300);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  flex: 1;
}

.modal-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
  color: var(--gray-700);
}

.modal-close:hover {
  background: var(--gray-100);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-300);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#toast-container {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--gray-900);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: toastIn 0.25s ease;
  max-width: 360px;
  font-weight: 600;
}

.toast.success {
  background: var(--green);
}

.toast.error {
  background: #c62828;
}

.toast.warning {
  background: var(--orange);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero {
  background: linear-gradient(145deg, var(--red-d) 0%, var(--red) 45%, #c62828 100%);
  color: var(--white);
  padding: 36px 22px;
  border-radius: var(--r-lg);
  margin-bottom: 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero p {
  font-size: 15px;
  opacity: 0.92;
  max-width: 420px;
  margin: 0 auto;
  font-weight: 500;
}

.hero .hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.action-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.action-card:hover {
  border-color: rgba(183, 28, 28, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.action-card .ac-icon {
  font-size: 30px;
  min-width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-bg);
  border-radius: var(--r-sm);
}

.action-card h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.action-card p {
  font-size: 13px;
  color: var(--gray-700);
}

.steps {
  display: flex;
  gap: 0;
  margin-bottom: 26px;
  padding: 0 4px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  right: -50%;
  height: 3px;
  background: var(--gray-300);
  border-radius: 2px;
}

.step:last-child::after {
  display: none;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-300);
  color: var(--gray-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  border: 3px solid var(--surface);
}

.step.active .step-dot,
.step.done .step-dot {
  background: var(--red);
  color: var(--white);
}

.step-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 6px;
  display: block;
  font-weight: 600;
}

.step.active .step-label {
  color: var(--red);
  font-weight: 800;
}

.status-en_attente {
  background: #fff8e1;
  color: #f57f17;
}

.status-validee {
  background: #e3f2fd;
  color: #1565c0;
}

.status-assignee {
  background: #f3e5f5;
  color: #6a1b9a;
}

.status-terminee {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-refusee {
  background: #ffebee;
  color: #b71c1c;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm);
  transition: var(--transition);
  background: var(--surface);
}

.search-input:focus {
  border-color: var(--red);
  box-shadow: var(--ring);
}

.divider {
  height: 1px;
  background: var(--gray-300);
  margin: 20px 0;
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.section-title .icon {
  font-size: 22px;
}

.benevole-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.bv-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bv-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bv-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-d) 100%);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

.bv-name {
  font-weight: 800;
  font-size: 15px;
}

.bv-meta {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.bv-card-footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.bv-card-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--gray-300);
}

.alert-item:hover {
  box-shadow: var(--shadow-lg);
}

.alert-item.en_attente {
  border-left-color: #f57f17;
}

.alert-item.validee {
  border-left-color: #1565c0;
}

.alert-item.assignee {
  border-left-color: #6a1b9a;
}

.alert-item.terminee {
  border-left-color: #2e7d32;
}

.alert-item.refusee {
  border-left-color: #b71c1c;
}

.alert-info {
  flex: 1;
}

.alert-ref {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 700;
}

.alert-type {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}

.alert-demandeur {
  font-size: 13px;
  color: var(--gray-700);
}

.alert-date {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

.param-section {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
}

.param-section-title {
  padding: 14px 20px;
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 800;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--gray-300);
}

.param-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}

.param-row:last-child {
  border-bottom: none;
}

.param-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.param-desc {
  font-size: 12px;
  color: var(--gray-500);
}

.install-banner {
  background: var(--red-bg);
  border: 1.5px solid var(--red-l);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-banner .ib-icon {
  font-size: 28px;
}

.install-banner .ib-text {
  flex: 1;
  font-size: 13px;
}

.install-banner .ib-title {
  font-weight: 800;
  color: var(--red);
}

.tracking-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-top: 16px;
}

.track-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.track-status-icon {
  font-size: 28px;
}

.track-status-label {
  font-size: 16px;
  font-weight: 800;
}

.track-status-desc {
  font-size: 13px;
  color: var(--gray-500);
}

.track-timeline {
  border-left: 2px solid var(--gray-300);
  padding-left: 16px;
  margin: 16px 0;
}

.track-event {
  position: relative;
  margin-bottom: 12px;
}

.track-event::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gray-300);
  border-radius: 50%;
  left: -21px;
  top: 5px;
}

.track-event.done::before {
  background: var(--green);
}

.track-event.active::before {
  background: var(--red);
}

.track-event-label {
  font-size: 13px;
  font-weight: 700;
}

.track-event-date {
  font-size: 12px;
  color: var(--gray-500);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 14px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--green);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.mobile-open {
    transform: none;
  }

  #admin-content {
    margin-left: 0;
    padding: 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    max-height: 95vh;
  }

  #overlay-sidebar {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 89;
  }

  #overlay-sidebar.show {
    display: block;
  }
}

@media (min-width: 769px) {
  #topbar .hamburger {
    display: none;
  }

  #public-layout {
    padding-bottom: 0;
  }

  #benevole-layout {
    padding-bottom: 0;
  }

  #bottom-nav,
  #benevole-bottom-nav {
    display: none;
  }

  #public-content {
    padding: 32px 20px;
  }
}

.hamburger {
  font-size: 22px;
  color: var(--white);
  margin-right: 8px;
}

.mt-1 {
  margin-top: 4px;
}
.mt-2 {
  margin-top: 8px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-4 {
  margin-top: 16px;
}
.mt-5 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 4px;
}
.mb-2 {
  margin-bottom: 8px;
}
.mb-3 {
  margin-bottom: 12px;
}
.mb-4 {
  margin-bottom: 16px;
}
.mb-5 {
  margin-bottom: 24px;
}

.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}

.spacer {
  flex: 1;
}

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

.text-sm {
  font-size: 13px;
}
.text-xs {
  font-size: 11px;
}
.text-muted {
  color: var(--gray-500);
}
.text-red {
  color: var(--red);
}

.font-bold {
  font-weight: 700;
}
.font-semibold {
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}

.scroll-x {
  overflow-x: auto;
}

.ml-2 {
  margin-left: 8px;
}

.import-json {
  width: 100%;
  min-height: 120px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

/* ═══ Admin : en-têtes, tuiles KPI, panneaux, listes ═══ */

.admin-page-head {
  margin-bottom: 28px;
}

.admin-page-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.admin-page-head__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.admin-page-head__title {
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 6px;
}

.admin-page-head__desc {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 500;
  max-width: 52ch;
  line-height: 1.45;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form-control--toolbar {
  min-width: 200px;
  max-width: 240px;
}

.search-input--grow {
  min-width: min(280px, 100%);
  flex: 1;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-tiles--narrow {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  max-width: 720px;
}

.stat-tile {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--tile-shadow);
  overflow: hidden;
}

.stat-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-bar, var(--gray-300));
}

.stat-tile--wait {
  --stat-bar: #f57f17;
  --stat-icon-bg: #fff8e1;
}
.stat-tile--ok {
  --stat-bar: #1565c0;
  --stat-icon-bg: #e3f2fd;
}
.stat-tile--assign {
  --stat-bar: #6a1b9a;
  --stat-icon-bg: #f3e5f5;
}
.stat-tile--done {
  --stat-bar: #2e7d32;
  --stat-icon-bg: #e8f5e9;
}
.stat-tile--people {
  --stat-bar: #2e7d32;
  --stat-icon-bg: #e8f5e9;
}
.stat-tile--total {
  --stat-bar: #1565c0;
  --stat-icon-bg: #e3f2fd;
}
.stat-tile--busy {
  --stat-bar: #c62828;
  --stat-icon-bg: #ffebee;
}

.stat-tile__top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.stat-tile__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--stat-icon-bg, var(--gray-100));
}

.stat-tile__value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--gray-900);
}

.stat-tile__label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.admin-callout {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  border: 1px solid transparent;
}

.admin-callout--warn {
  background: linear-gradient(135deg, #fffbf0 0%, #fff3e0 100%);
  border-color: rgba(245, 127, 23, 0.35);
}

.admin-callout--ok {
  background: linear-gradient(135deg, #f1f8f4 0%, #e8f5e9 100%);
  border-color: rgba(46, 125, 50, 0.25);
}

.admin-callout__icon {
  font-size: 28px;
  flex-shrink: 0;
}

.admin-callout__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  color: var(--gray-700);
}

.admin-callout__body strong {
  color: var(--gray-900);
  font-weight: 800;
}

.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.panel--lift {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(180deg, #fafbfc 0%, var(--surface) 100%);
}

.panel__head-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel__emoji {
  font-size: 26px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: 14px;
}

.panel__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

.panel__subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 2px;
}

.panel__body--flush {
  padding: 0;
}

.panel__body--pad {
  padding: 8px;
}

.intervention-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intervention-row {
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
  border-left: 4px solid var(--row-accent, var(--gray-300));
  font: inherit;
  color: inherit;
}

.intervention-row:hover {
  border-color: rgba(183, 28, 28, 0.25);
  box-shadow: var(--tile-shadow);
  transform: translateY(-1px);
}

.intervention-row--en_attente {
  --row-accent: #f57f17;
}
.intervention-row--validee {
  --row-accent: #1565c0;
}
.intervention-row--assignee {
  --row-accent: #6a1b9a;
}
.intervention-row--terminee {
  --row-accent: #2e7d32;
}
.intervention-row--refusee {
  --row-accent: #b71c1c;
}

.intervention-row__badge {
  font-size: 26px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: 14px;
}

.intervention-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.intervention-row__ref {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.intervention-row__type {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.25;
}

.intervention-row__who,
.intervention-row__extra {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
}

.intervention-row__when {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 600;
}

.intervention-row__status {
  flex-shrink: 0;
}

.empty-state--soft {
  padding: 48px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fafbfc 0%, var(--surface) 100%);
}

.empty-state__visual {
  font-size: 52px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.empty-state__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.empty-state__text {
  font-size: 14px;
  color: var(--gray-500);
  max-width: 36ch;
  margin: 0 auto;
  line-height: 1.5;
}

.benevole-grid--spaced {
  margin-top: 8px;
}

.bv-card-headtext {
  min-width: 0;
}

.bv-card-note {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.45;
  padding: 0 2px;
}

.param-section--modern {
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--tile-shadow);
  margin-bottom: 20px;
}

.param-section--danger .param-section-title {
  color: #c62828;
}

.param-section-body {
  padding: 22px 24px 24px;
}

.param-section-body--tight {
  padding: 14px 16px 16px;
}

.param-section--compact {
  margin-bottom: 0;
}

.type-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: stretch;
}

.type-row .form-control {
  flex: 1;
}

.form-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.modal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

@media (max-width: 600px) {
  .modal-detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-name {
  font-weight: 800;
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.detail-list {
  list-style: none;
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.65;
}

.detail-desc {
  line-height: 1.5;
}

#modal-int-footer.modal-footer,
.modal-footer:has(.modal-footer-actions) {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.modal-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .admin-page-head--row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar {
    width: 100%;
  }

  .form-control--toolbar {
    max-width: none;
    width: 100%;
  }

  .search-input--grow {
    width: 100%;
    min-width: 0;
  }

  .intervention-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .intervention-row__status {
    justify-self: start;
  }

  .intervention-row__badge {
    display: none;
  }
}

/* ── Material Symbols & portails ─────────────────────────── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

.row-inline-ico,
.btn-ico,
.chip__sym {
  font-size: 1.1em;
  margin-right: 2px;
}

.btn .btn-ico {
  margin-right: 6px;
}

.stat-tile__sym {
  font-size: 26px;
  color: var(--gray-700);
}

.stat-tile--wait .stat-tile__sym {
  color: #f57f17;
}
.stat-tile--ok .stat-tile__sym {
  color: #1565c0;
}
.stat-tile--assign .stat-tile__sym {
  color: #6a1b9a;
}
.stat-tile--done .stat-tile__sym {
  color: #2e7d32;
}
.stat-tile--people .stat-tile__sym {
  color: #1565c0;
}
.stat-tile--total .stat-tile__sym,
.stat-tile--busy .stat-tile__sym {
  color: var(--gray-700);
}

.panel__ico,
.admin-callout__ico {
  font-size: 24px;
}

.intervention-row__ico {
  font-size: 22px;
  color: var(--red);
}

.empty-ico {
  font-size: 48px;
  color: var(--gray-500);
}

.section-title__sym .section-ico {
  font-size: 22px;
  vertical-align: -4px;
}

.hero-badge-ico {
  font-size: 18px;
  vertical-align: -3px;
  margin-right: 4px;
}

.ib-material,
.ac-material {
  font-size: 22px;
}

.card-h-ico {
  font-size: 22px;
}

.step-dot-ico {
  font-size: 18px;
}

.big-success-ico {
  margin-bottom: 12px;
}

.success-ico {
  font-size: 56px;
  color: var(--green);
}

.contact-sq {
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-sq--red {
  background: var(--red-bg);
}
.contact-sq--blue {
  background: var(--blue-bg);
}
.contact-sq--green {
  background: var(--green-bg);
}

.contact-ico {
  font-size: 22px;
}

.detail-li {
  list-style: none;
  margin-bottom: 6px;
}

#portal-bar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: var(--portal-bar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--gray-300);
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  z-index: 95;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#portal-bar .portal-tab {
  flex: 1;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

#portal-bar .portal-tab:hover {
  background: var(--gray-100);
  color: var(--red);
}

#portal-bar .portal-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
  background: rgba(183, 28, 28, 0.06);
}

#portal-bar .portal-tab .material-symbols-outlined {
  font-size: 20px;
}

#public-layout,
#benevole-layout {
  padding-top: calc(var(--topbar-h) + var(--portal-bar-h));
}

#admin-layout {
  padding-top: calc(var(--topbar-h) + var(--portal-bar-h));
}

#benevole-layout {
  padding-bottom: 76px;
  min-height: 100vh;
}

#benevole-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 18px;
}

.benevole-mission-card {
  cursor: default;
  align-items: flex-start;
}

.benevole-mission-list .intervention-row__status {
  align-self: flex-start;
}

.bv-token {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-300);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bv-token__hint {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
}

.bv-token__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bv-token__code {
  font-size: 11px;
  background: var(--gray-100);
  padding: 6px 8px;
  border-radius: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast .toast-ico {
  font-size: 18px;
  flex-shrink: 0;
}

#topbar .logo-icon .material-symbols-outlined {
  font-size: 22px;
  color: var(--red);
}

#topbar .btn-icon .material-symbols-outlined {
  font-size: 22px;
}

.modal-title-ico {
  font-size: 20px;
  vertical-align: -5px;
  margin-right: 4px;
}

.sidebar-brand__mark .material-symbols-outlined {
  color: var(--white);
  font-size: 26px;
}

.map-tiles {
  width: 100%;
  min-height: 200px;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}

.map-tiles--sm {
  min-height: 180px;
}

.map-tiles--md {
  min-height: 240px;
}

.map-tiles--lg {
  min-height: 320px;
}

.map-tiles--tall {
  min-height: 280px;
}

.map-placeholder {
  padding: 16px;
  margin: 0;
}
