@import url("fonts/fonts.css");

:root {
  --blue: #1c1c21;
  --blue-dark: #b80d22;
  --blue-soft: #f1eeee;
  --bg: #f4f3f3;
  --surface: #ffffff;
  --text: #111827;
  --muted: #71819a;
  --line: #e3dfe0;
  --danger: #dc3545;
  --success: #168a4a;
  --shadow: 0 16px 36px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  color: var(--text);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; text-decoration: none; }
.sidebar-logo { width: 44px; height: 44px; overflow: hidden; border-radius: 12px; background: white; box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 17px; }
.sidebar-brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.sidebar-nav { display: grid; gap: 5px; overflow-y: auto; }
.sidebar-nav a {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 10px;
  color: #4d5d72;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}
.sidebar-nav a:hover { transform: translateX(2px); background: #f6eff0; }
.sidebar-nav a.is-active { color: white; background: var(--blue); box-shadow: 0 10px 20px rgba(208, 16, 42,.2); }
.nav-label { min-width: 0; flex: 1; }
.nav-unread-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #ef233c;
  box-shadow: 0 0 0 3px #fff, 0 4px 12px rgba(239, 35, 60, .35);
}
.sidebar-nav a.is-active .nav-unread-dot { box-shadow: 0 0 0 3px var(--blue), 0 4px 12px rgba(239, 35, 60, .45); }
.nav-icon { display: grid; width: 25px; place-items: center; font-size: 17px; }
.nav-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.nav-icon .fa-file-import {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
}
.nav-icon .fa-file-import::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V352H240c-26.5 0-48-21.5-48-48V192H352V160L192 0H64zM352 192H240V304H352V192zm125.7 41.4-72-72c-9.2-9.2-24.6-2.7-24.6 10.3V216H288c-17.7 0-32 14.3-32 32s14.3 32 32 32h93.1v44.3c0 13 15.4 19.5 24.6 10.3l72-72c8.1-8.1 8.1-21.1 0-29.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V352H240c-26.5 0-48-21.5-48-48V192H352V160L192 0H64zM352 192H240V304H352V192zm125.7 41.4-72-72c-9.2-9.2-24.6-2.7-24.6 10.3V216H288c-17.7 0-32 14.3-32 32s14.3 32 32 32h93.1v44.3c0 13 15.4 19.5 24.6 10.3l72-72c8.1-8.1 8.1-21.1 0-29.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sidebar-footer { display: grid; margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid var(--line); }
.sidebar-footer a { margin-bottom: 10px; color: var(--blue); font-size: 12px; font-weight: 750; text-decoration: none; }
.sidebar-account { display: flex; align-items: center; gap: 9px; }
.sidebar-account > span { display: grid; min-width: 0; flex: 1; }
.sidebar-account strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .account-settings-link {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #526178;
  background: white;
  transition: transform .14s ease, color .14s ease, background .14s ease;
}
.sidebar-footer .account-settings-link:hover,
.sidebar-footer .account-settings-link.is-active {
  transform: translateY(-1px);
  color: white;
  background: var(--blue);
}
.account-settings-link svg { width: 16px; height: 16px; fill: currentColor; }

.app-main { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(248,250,252,.92);
  backdrop-filter: blur(14px);
}
.topbar-menu, .icon-link {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #475569;
  background: white;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
  text-decoration: none;
}
.topbar-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #475569;
  background: white;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease;
}
.topbar-logout-form {
  display: inline-flex;
  margin: 0;
}
button.topbar-action {
  font-family: inherit;
  cursor: pointer;
}
.topbar-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(15,23,42,.1);
}
.topbar-action span,
.topbar-action i {
  margin: 0;
  color: inherit;
  font-size: 16px;
}
.topbar-svg {
  display: block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: #475569;
}
.topbar-menu { display: none; cursor: pointer; }
.app-topbar > div:nth-child(2) { display: grid; }
.app-topbar strong { font-size: 15px; }
.app-topbar span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
.app-content { width: min(1280px, calc(100% - 36px)); flex: 1; margin: 0 auto; padding: 32px 0 64px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; color: #0f172a; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; }
.page-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.page-actions { flex: 0 0 auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { min-height: 132px; padding: 24px; border: 1px solid rgba(228, 222, 223,.9); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.stat-card span { color: #71819a; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 14px; color: var(--blue); font-size: 36px; line-height: 1; }

.content-card { margin-top: 20px; padding: 24px; border: 1px solid rgba(228, 222, 223,.9); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.card-heading h2, .card-heading p { margin: 0; }
.card-heading h2 { font-size: 20px; }
.card-heading p { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.empty-state { padding: 26px; border-radius: 12px; color: var(--muted); background: #f4f7fb; text-align: center; }

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: white; background: var(--blue); box-shadow: 0 9px 20px rgba(208, 16, 42,.2); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: #475569; background: #f1f5f9; }
.btn-success { color: white; background: #168a4a; box-shadow: 0 9px 20px rgba(22,138,74,.18); }
.btn-success:hover { background: #11733d; }
.btn-danger-soft { color: #b42336; background: #fff0f2; }
.btn-danger-soft:hover { color: #8f1d2c; background: #ffe2e7; }
.btn-success-soft { color: #126c3c; background: #e9f7ef; }
.btn-full { width: 100%; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: #71819a; background: #f8fafc; font-size: 10px; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: #176541; background: #e9f7ef; font-size: 11px; font-weight: 800; }
.status-pill.muted { color: #64748b; background: #eef2f6; }
.status-pill.danger { color: #b42336; background: #ffe8eb; }
.action-cell { vertical-align: middle; white-space: nowrap; }
.action-cell-content { display: flex; align-items: center; gap: 5px; }
.action-cell-content form { display: inline-flex; margin: 0; }
.table-action { padding: 6px 8px; border: 0; border-radius: 7px; color: var(--blue-dark); background: var(--blue-soft); cursor: pointer; font-size: 11px; font-weight: 800; text-decoration: none; }
.table-action.danger { color: #b42336; background: #fff0f2; }

.form-card { max-width: 1000px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.form-field { display: grid; gap: 7px; }
.form-field > span, .contest-picker label > span { color: #46546a; font-size: 13px; font-weight: 780; }
.form-field input, .form-field select, .form-field textarea, .contest-picker select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: white;
  outline: 0;
}
.form-field textarea { resize: vertical; line-height: 1.5; }
.form-field input[readonly] {
  border-color: #ddd6d7;
  color: #6b7687;
  background: #e9edf2;
  cursor: not-allowed;
  box-shadow: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .contest-picker select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(208, 16, 42,.12); }
.form-field input[readonly]:focus { border-color: #ddd6d7; box-shadow: none; }
.check-field { display: flex; align-items: center; gap: 9px; color: #46546a; font-size: 13px; font-weight: 700; }
.check-field input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.important-message-box,
.event-contact-box {
  display: grid;
  gap: 13px;
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  background: #f8fafc;
}
.form-section-heading { display: grid; gap: 3px; }
.form-section-heading strong { font-size: 14px; }
.form-section-heading span { color: var(--muted); font-size: 12px; }
.password-field { display: grid; grid-template-columns: 1fr auto; }
.password-field input { border-radius: 10px 0 0 10px; }
.password-field button { padding: 0 14px; border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0; color: #4d5d72; background: #f8fafc; cursor: pointer; font-size: 12px; font-weight: 750; }
.access-fieldset { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.access-fieldset legend { padding: 0 7px; color: #46546a; font-size: 13px; font-weight: 800; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.access-option { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.access-option input { width: 18px; height: 18px; accent-color: var(--blue); }
.access-option strong, .access-option small { display: block; }
.access-option strong { font-size: 13px; }
.access-option small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.muted-text { color: var(--muted); font-size: 13px; }
.form-field small { color: var(--muted); font-size: 11px; }
.event-logo-preview {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}
.event-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-library {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.logo-library legend { padding: 0 7px; color: #46546a; font-size: 13px; font-weight: 850; }
.logo-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.logo-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.logo-option input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--blue); }
.logo-option-preview {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f8fafc;
}
.logo-option-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-option strong,
.logo-option small,
.logo-option-empty { display: block; min-width: 0; overflow-wrap: anywhere; }
.logo-option strong { font-size: 12px; }
.logo-option small,
.logo-option-empty { color: var(--muted); font-size: 11px; }
.program-admin-days { display: grid; gap: 18px; }
.program-admin-day { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.program-admin-day h3 { margin: 0; padding: 12px 15px; color: #31435a; background: #f8f6f6; font-size: 14px; }
.program-admin-arena h4 {
  margin: 0;
  padding: 10px 15px;
  border-top: 1px solid var(--line);
  color: var(--blue-dark);
  background: #fdfbfb;
  font-size: 12px;
  font-weight: 850;
}
.program-admin-row { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 14px; padding: 13px 15px; border-top: 1px solid var(--line); }
.program-admin-row time { color: var(--blue); font-weight: 850; }
.program-admin-row strong,
.program-admin-row span,
.program-admin-row small { display: block; }
.program-admin-row span { margin-top: 3px; color: #4d6077; font-size: 12px; font-weight: 700; }
.program-admin-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.program-admin-actions { display: flex; align-items: center; gap: 6px; }
.program-admin-actions form { display: flex; }
.program-status-pill {
  display: inline-flex !important;
  width: fit-content;
  min-height: 22px;
  align-items: center;
  margin-top: 6px !important;
  padding: 3px 8px;
  border-radius: 999px;
  color: #334155 !important;
  background: #edf2f7;
  font-size: 10px !important;
  font-weight: 900 !important;
}
.program-status-pill.is-live { color: #126c3c !important; background: #e6f8ee; }
.program-status-pill.is-finished { color: #334155 !important; background: #eee9ea; }
.activity-log-list { display: grid; gap: 10px; }
.activity-log-entry {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-log-entry:last-child { border-bottom: 0; }
.activity-log-entry strong { color: #111827; }
.activity-log-entry span { color: var(--muted); font-size: 12px; font-weight: 750; }
.vola-connect-card .status-pill { align-self: flex-start; }
.vola-test-summary {
  display: grid;
  gap: 5px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 10px;
  background: #f8fafc;
}
.vola-test-summary strong,
.vola-test-summary span,
.vola-test-summary small { display: block; }
.vola-test-summary span,
.vola-test-summary small { color: var(--muted); font-size: 12px; }
.vola-heat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.vola-heat-preview span {
  padding: 7px 9px;
  border-radius: 7px;
  color: #334155;
  background: #f1eeee;
  font-size: 12px;
  font-weight: 800;
}
.vola-sync-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.vola-sync-stats div {
  padding: 15px;
  border-radius: 10px;
  background: #f8fafc;
}
.vola-sync-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.vola-sync-stats strong {
  display: block;
  margin-top: 7px;
  color: #111827;
  font-size: 22px;
}
.social-form-card { max-width: 820px; }
.account-form-card { max-width: 860px; }
.request-form-card { max-width: 900px; }
.request-deadline-notice {
  display: grid;
  gap: 3px;
  padding: 13px 15px;
  border-left: 4px solid #e6a315;
  border-radius: 7px;
  color: #6f4b05;
  background: #fff8e6;
  font-size: 12px;
}
.request-deadline-notice span { color: #886725; }
.request-list { display: grid; gap: 12px; }
.request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.request-card.is-admin { grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr) auto; }
.request-card-main { min-width: 0; }
.request-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.request-card h3,
.request-card p { margin: 0; }
.request-card h3 { font-size: 16px; }
.request-card p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.request-card-main > strong { display: block; margin-top: 9px; font-size: 13px; }
.request-card-main > small { display: block; margin-top: 10px; color: #536176; font-size: 12px; line-height: 1.5; }
.request-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.request-status.pending { color: #865d09; background: #fff3ce; }
.request-status.approved { color: #126c3c; background: #e9f7ef; }
.request-status.rejected { color: #a22739; background: #ffe8eb; }
.request-status.expired { color: #64748b; background: #eef2f6; }
.request-card-meta,
.request-client { display: grid; gap: 5px; min-width: 170px; }
.request-card-meta { justify-items: end; text-align: right; }
.request-card-meta span,
.request-client span { color: var(--muted); font-size: 11px; }
.request-card-meta strong { color: #9a6810; font-size: 12px; }
.request-client strong { font-size: 13px; }
.request-client small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.request-actions { display: flex; gap: 7px; margin-top: 5px; }
.request-actions form { display: flex; }
.request-admin-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 17px 19px;
  border: 1px solid #c6d8f6;
  border-radius: 10px;
  background: #edf4ff;
}
.request-admin-alert strong,
.request-admin-alert span { display: block; }
.request-admin-alert strong { color: #174dac; font-size: 14px; }
.request-admin-alert span { margin-top: 4px; color: #587091; font-size: 12px; }

.support-layout { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.support-layout-admin { grid-template-columns: minmax(300px, 460px) minmax(0, 1fr); }
.support-column { display: grid; gap: 18px; }
.support-form-card { align-self: start; }
.support-ticket-list { display: grid; gap: 10px; }
.support-ticket {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border-radius: 9px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 12, 14, .08);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.support-ticket:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20, 12, 14, .13); }
.support-ticket.is-active { box-shadow: inset 4px 0 0 var(--blue), 0 14px 30px rgba(20, 12, 14, .12); }
.support-ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.support-ticket strong { font-size: 13px; }
.support-ticket small,
.support-ticket span:last-child { color: var(--muted); font-size: 11px; line-height: 1.45; }
.support-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}
.support-status.open { color: #126c3c; background: #e9f7ef; }
.support-status.closed { color: #64748b; background: #eef2f6; }
.support-ticket-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.support-ticket-actions form { display: flex; }
.support-chat-card { min-height: 520px; }
.support-chat {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding: 6px 4px 18px;
}
.support-message {
  display: grid;
  gap: 7px;
  max-width: min(78%, 620px);
  padding: 13px 15px;
  border-radius: 10px;
  background: #f6f8fb;
}
.support-message.is-client { justify-self: start; }
.support-message.is-admin { justify-self: end; color: #fff; background: var(--blue); }
.support-message div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.support-message strong { font-size: 12px; }
.support-message time { opacity: .72; font-size: 10px; font-weight: 750; }
.support-message p { margin: 0; font-size: 13px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.support-reply-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }

.client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.client-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.client-card-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.client-card h3, .client-card p { margin: 0; }
.client-card h3 { font-size: 15px; }
.client-card p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; color: white; background: linear-gradient(135deg,#4381f4,#22c4b8); font-weight: 850; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.status-dot.online { background: #22a760; box-shadow: 0 0 0 4px #e4f7ed; }
.client-access { display: flex; flex-wrap: wrap; gap: 6px; margin: 15px 0; }
.client-access span { width: 100%; color: var(--muted); font-size: 11px; }
.client-access small { padding: 5px 8px; border-radius: 7px; color: var(--blue-dark); background: var(--blue-soft); }
.client-actions { display: flex; gap: 8px; }
.client-actions form { display: flex; }

.contest-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.event-card { position: relative; overflow: hidden; padding: 22px 22px 20px 28px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.event-card-bar { position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--blue); }
.event-card.is-cancelled .event-card-bar { background: var(--danger); }
.event-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.event-card h2 { margin: 18px 0 4px; font-size: 22px; }
.event-card > p { margin: 0; color: var(--muted); }
.event-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; padding: 13px; border-radius: 10px; background: #f8f6f6; }
.event-card-stats span { color: var(--muted); font-size: 11px; }
.event-card-stats strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 16px; }
.event-card-actions { display: flex; gap: 8px; }
.inline-action-form { display: flex; }

.contest-picker { display: flex; justify-content: flex-start; margin-bottom: 18px; }
.contest-picker label { display: grid; width: min(420px, 100%); gap: 7px; }
.upload-card { max-width: 820px; }
.file-icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 13px; color: #176541; background: #e9f7ef; font-size: 12px; font-weight: 900; }
.upload-zone { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 8px; margin-bottom: 14px; padding: 24px; border: 2px dashed #b8c9e3; border-radius: 14px; background: #f8fbff; cursor: pointer; text-align: center; }
.upload-zone:hover { border-color: var(--blue); background: #fbf6f6; }
.upload-zone input { width: min(360px, 100%); margin-top: 8px; }
.upload-zone small { color: var(--muted); }
.upload-symbol { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 12px; color: white; background: var(--blue); font-size: 24px; }
.publication-choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}
.publication-choice input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
  accent-color: var(--blue);
}
.publication-choice strong,
.publication-choice small { display: block; }
.publication-choice strong { color: #334155; font-size: 13px; }
.publication-choice small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.publication-settings-card { max-width: 820px; }
.publication-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.publication-status.is-public { color: #176541; background: #e9f7ef; }
.publication-status.is-hidden { color: #8b3441; background: #fff0f2; }
.data-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.data-card-actions form { display: flex; }
.import-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.import-summary div { padding: 14px; border-radius: 10px; background: #f8f6f6; }
.import-summary span, .import-summary strong { display: block; }
.import-summary span { color: var(--muted); font-size: 11px; }
.import-summary strong { margin-top: 6px; overflow-wrap: anywhere; font-size: 13px; }

.flash { margin-bottom: 16px; padding: 13px 15px; border-radius: 10px; font-size: 13px; }
.flash-success { color: #176541; background: #e9f7ef; }
.flash-error { color: #9d2637; background: #ffe8eb; }
.first-login-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15,23,42,.58);
  backdrop-filter: blur(6px);
}
.first-login-modal {
  width: min(430px, 100%);
  padding: 30px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 30px 80px rgba(15,23,42,.3);
  text-align: center;
  animation: first-login-enter .28s ease-out both;
}
.first-login-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 17px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(208, 16, 42,.25);
}
.first-login-icon svg { width: 22px; height: 22px; fill: currentColor; }
.first-login-modal h2 { margin: 0; font-size: 24px; }
.first-login-modal > p:not(.eyebrow) { margin: 11px 0 22px; color: var(--muted); line-height: 1.55; }
.password-change-notice {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: #17366f;
  background: #eef4ff;
}
.password-change-notice span { font-size: 12px; line-height: 1.5; }
@keyframes first-login-enter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-page { display: flex; min-height: 100vh; flex-direction: column; padding: 24px 24px 0; background: linear-gradient(145deg,#dfe9ff 0%,#f8f6f6 55%,#e4faf7 100%); }
.login-shell { width: min(440px, 100%); margin: auto; padding: 24px 0; }
.login-brand { display: flex; width: max-content; align-items: center; gap: 12px; margin: 0 auto 24px; text-decoration: none; }
.login-brand > span:first-child { width: 48px; height: 48px; overflow: hidden; border-radius: 13px; background: white; }
.login-brand img { width: 100%; height: 100%; object-fit: contain; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 18px; }
.login-brand small { color: var(--muted); }
.login-card { padding: 32px; border: 1px solid rgba(228, 222, 223,.9); border-radius: 18px; background: white; box-shadow: 0 20px 50px rgba(15,23,42,.12); }
.login-card h1, .login-card > p { text-align: center; }
.login-card h1 { margin: 0; font-size: 28px; }
.login-card > p { margin: 8px 0 24px; color: var(--muted); font-size: 13px; }
.login-card .form-field { margin-top: 15px; }
.login-card .btn {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  margin-top: 20px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-card .btn::after {
  position: absolute;
  top: 0;
  left: -65%;
  width: 42%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  content: "";
  transform: skewX(-18deg);
  transition: left .42s ease;
}
.login-card .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(208, 16, 42,.28);
}
.login-card .btn:hover::after { left: 125%; }
.login-card .btn:active {
  transform: translateY(0) scale(.985);
  box-shadow: 0 6px 14px rgba(208, 16, 42,.2);
}
.login-back { display: block; margin-top: 22px; color: #5e718b; font-size: 13px; font-weight: 750; text-align: center; text-decoration: none; }
.setup-card { width: min(520px, 100%); }

.site-footer {
  width: 100%;
  margin-top: auto;
  padding: 30px 24px;
  background: white;
}
.app-main > .site-footer { margin-top: 20px; }
.login-page > .site-footer { width: calc(100% + 48px); margin-right: -24px; margin-left: -24px; }
.site-footer-inner {
  display: grid;
  width: min(1180px, 100%);
  margin: 0 auto;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}
.site-footer-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-footer-logo {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 12px 26px rgba(30, 12, 15,.16);
}
.site-footer-logo img { width: 40px; height: 40px; object-fit: contain; }
.site-footer-brand strong,
.site-footer-brand small { display: block; }
.site-footer-brand strong { color: #111827; font-size: 14px; }
.site-footer-brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.site-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.site-footer-links a {
  margin: 0;
  color: #526178;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: color .15s ease, transform .15s ease;
}
.site-footer-links a:hover { transform: translateY(-2px); color: #111827; }
.site-footer-end { display: grid; justify-items: end; gap: 8px; }
.site-footer p { margin: 0; color: var(--muted); font-size: 11px; text-align: right; }
.language-switcher {
  position: relative;
  display: inline-block;
}
.language-current {
  display: inline-flex;
  height: 40px;
  align-items: center;
  padding: 4px 5px;
  border: 0;
  border-radius: 9px;
  color: #526178;
  background: #f1eeee;
  cursor: pointer;
}
.language-current img { width: 32px; height: 26px; border-radius: 5px; object-fit: cover; }
.language-menu {
  position: absolute;
  z-index: 50;
  right: 0;
  bottom: calc(100% + 7px);
  display: grid;
  width: 150px;
  padding: 6px;
  border-radius: 9px;
  background: white;
  box-shadow: 0 14px 34px rgba(15,23,42,.18);
}
.language-menu[hidden] { display: none; }
.language-menu a {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}
.language-menu a:hover,
.language-menu a.is-active { background: #f6eff0; }
.language-menu img { width: 32px; height: 26px; flex: 0 0 32px; border-radius: 5px; object-fit: cover; }

.software-download-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow);
}
.software-download-logo {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.software-download-logo img { width: 100%; height: 100%; object-fit: contain; }
.software-download-copy { min-width: 0; }
.software-download-copy h2 { margin: 8px 0 6px; font-size: 30px; }
.software-download-copy p { max-width: 680px; margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.software-download-copy > small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; }
.software-platform {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.software-download-button {
  position: relative;
  overflow: hidden;
  gap: 9px;
}
.software-download-button svg { width: 16px; height: 16px; fill: currentColor; }
.software-download-button::after {
  position: absolute;
  top: 0;
  left: -65%;
  width: 42%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent);
  content: "";
  transform: skewX(-18deg);
  transition: left .65s ease;
}
.software-download-button:hover::after { left: 130%; }
.software-download-button:active { transform: translateY(0) scale(.985); }
.software-unavailable {
  display: inline-flex;
  padding: 11px 14px;
  border-radius: 8px;
  color: #64748b;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 800;
}
.software-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.software-guide-card { height: 100%; }
.software-guide-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.software-guide-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 9px;
  color: white;
  background: var(--blue);
  font-size: 14px;
  font-weight: 850;
}
.software-guide-heading .eyebrow,
.software-guide-heading h2 { margin: 0; }
.software-guide-heading h2 { margin-top: 3px; font-size: 19px; }
.software-guide-card > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.software-steps { display: grid; gap: 10px; margin: 18px 0 0; padding-left: 22px; }
.software-steps li { padding-left: 4px; color: #334155; font-size: 13px; line-height: 1.5; }
.software-steps li::marker { color: var(--blue); font-weight: 850; }
.software-security-note,
.software-account-note {
  margin-top: 20px;
  padding: 13px 15px;
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  color: #29486e;
  background: #eef3f8;
  font-size: 12px;
  font-weight: 750;
}
.software-account-note { display: grid; gap: 4px; }
.software-account-note span { color: var(--muted); font-weight: 650; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .client-grid, .contest-card-grid { grid-template-columns: 1fr; }
  .support-layout,
  .support-layout-admin { grid-template-columns: 1fr; }
  .software-guide-grid { grid-template-columns: 1fr; }
  .request-card.is-admin { grid-template-columns: minmax(0, 1fr) auto; }
  .request-card.is-admin .request-client { grid-column: 1; }
  .request-card.is-admin .request-card-meta { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 820px) {
  .app-layout { display: block; }
  .app-sidebar { position: fixed; z-index: 30; width: 270px; transform: translateX(-102%); transition: transform .18s ease; box-shadow: 20px 0 50px rgba(15,23,42,.18); }
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .topbar-menu { display: inline-grid; }
  .app-content { width: min(100% - 24px, 1280px); padding-top: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .access-grid { grid-template-columns: 1fr; }
  .logo-library-grid { grid-template-columns: 1fr; }
  .import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-card,
  .request-card.is-admin { grid-template-columns: 1fr; }
  .request-card-meta,
  .request-card.is-admin .request-card-meta {
    grid-column: auto;
    grid-row: auto;
    justify-items: start;
    text-align: left;
  }
  .request-card.is-admin .request-client { grid-column: auto; }
  .request-admin-alert { align-items: stretch; flex-direction: column; }
  .support-message { max-width: 92%; }
  .software-download-hero { grid-template-columns: 110px minmax(0, 1fr); gap: 22px; }
  .software-download-logo { width: 110px; height: 110px; }
  .site-footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 18px; text-align: center; }
  .site-footer-brand strong,
  .site-footer-brand small { text-align: left; }
  .site-footer-end { justify-items: center; }
  .site-footer p { text-align: center; }
}

@media (max-width: 560px) {
  .topbar-action {
    width: 42px;
    padding: 0;
    font-size: 0;
  }
  .topbar-action span,
  .topbar-action i { font-size: 16px; }
  .topbar-action .topbar-svg {
    width: 17px;
    height: 17px;
    fill: #334155;
  }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 112px; }
  .content-card { padding: 18px; }
  .card-heading { align-items: flex-start; flex-direction: column; }
  .action-cell { white-space: normal; }
  .action-cell-content { flex-wrap: wrap; }
  .event-card-stats, .import-summary { grid-template-columns: 1fr; }
  .event-card-actions, .form-actions, .client-actions { align-items: stretch; flex-direction: column; }
  .data-card-actions { width: 100%; justify-content: stretch; }
  .data-card-actions form,
  .data-card-actions .btn { width: 100%; }
  .login-card { padding: 24px 20px; }
  .program-admin-row { grid-template-columns: 52px 1fr; }
  .program-admin-actions { grid-column: 2; flex-wrap: wrap; }
  .software-download-hero { grid-template-columns: 1fr; padding: 22px; }
  .software-download-logo { width: 96px; height: 96px; }
  .software-download-copy h2 { font-size: 25px; }
}

/* ==========================================================================
   Nouvelle administration (refonte) : barre latérale bleu nuit, polices
   Barlow Condensed / Outfit / Inter, espaces de concours avec onglets.
   ========================================================================== */
:root {
  --oxer-navy: #0b0b0e;
  --oxer-navy-2: #1c1c21;
  --oxer-blue: #1c1c21;
  --oxer-sky: #ff8d99;
  --oxer-tint: #fbeef0;
  --oxer-page: #f4f3f3;
  --oxer-line: #e6e1e2;
  --oxer-red: #d63b4b;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-name: Outfit, Inter, sans-serif;
  --font-text: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.app-page { font-family: var(--font-text); background: var(--oxer-page); }
.app-layout { grid-template-columns: 248px minmax(0, 1fr); }

/* Barre latérale */
.app-sidebar {
  color: #e3d9da;
  background: var(--oxer-navy);
  border-right: 0;
  box-shadow: none;
}
.sidebar-brand strong { color: #fff; font-family: var(--font-name); font-weight: 700; }
.sidebar-brand small { color: var(--oxer-sky); }
.sidebar-logo { background: #fff; }
.sidebar-nav { gap: 2px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #e6dcdd;
  background: transparent;
  box-shadow: none;
  font-weight: 500;
  font-size: 14px;
}
.sidebar-nav a .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav a:hover { transform: none; color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav a.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 3px 0 0 var(--oxer-sky);
  font-weight: 600;
}
.sidebar-group {
  margin: 16px 10px 6px;
  color: #9a8f93;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sidebar-empty { margin: 2px 10px 6px; color: #9a8f93; font-size: 12px; }
.nav-badge {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.nav-badge.is-alert { background: var(--oxer-red); }
.nav-badge.is-live { background: var(--oxer-red); letter-spacing: .04em; }
.sidebar-footer { border-top-color: rgba(255, 255, 255, .1); }
.sidebar-account strong { color: #fff; font-family: var(--font-name); }
.sidebar-account small { color: var(--oxer-sky); }
.sidebar-footer .account-settings-link { color: #fff; background: rgba(255, 255, 255, .1); }
.sidebar-logout { margin: 10px 0 0; }
.sidebar-logout button {
  padding: 0;
  border: 0;
  color: var(--oxer-sky);
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-logout button:hover { color: #fff; }

/* Barre du haut */
.app-topbar {
  gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--oxer-line);
  background: #fff;
  box-shadow: none;
}
.topbar-title strong { font-family: var(--font-name); font-size: 15px; font-weight: 600; color: var(--oxer-navy); }
.topbar-search { flex: 1; max-width: 380px; margin: 0; }
.topbar-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--oxer-page);
  font: inherit;
  font-size: 14px;
}
.topbar-search input:focus { outline: 0; border-color: var(--oxer-blue); background: #fff; }
.topbar-actions { gap: 8px; margin-left: auto; }
.topbar-action { min-height: 38px; border-radius: 10px; font-weight: 600; box-shadow: none; }

/* Titres et cartes */
.app-content { padding-top: 26px; }
.page-heading { align-items: flex-end; }
.page-heading .eyebrow,
.eyebrow { color: var(--oxer-blue); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 {
  color: var(--oxer-navy);
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.content-card { border-color: var(--oxer-line); border-radius: 12px; box-shadow: none; }
.card-heading h2 {
  color: var(--oxer-navy);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-card {
  display: block;
  min-height: 0;
  padding: 16px 18px;
  border-color: var(--oxer-line);
  border-radius: 12px;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease;
}
a.stat-card:hover { border-color: var(--oxer-blue); }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; }
.stat-card strong { margin-top: 6px; color: var(--oxer-navy); font-family: var(--font-display); font-size: 38px; font-weight: 700; }
.stat-card strong.stat-text { font-size: 26px; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.stat-card.is-alert { border-color: #f3c5cb; }
.stat-card.is-alert strong { color: var(--oxer-red); }

/* Boutons et pastilles */
.btn { border-radius: 9px; font-weight: 600; }
.btn-primary { background: var(--oxer-blue); box-shadow: none; }
.btn-primary:hover { background: var(--oxer-navy-2); }
.btn-secondary { color: var(--oxer-navy); background: #fff; border: 1px solid var(--oxer-line); }
.btn-light { color: var(--oxer-navy); background: #fff; border: 0; }
.btn-light:hover { background: var(--oxer-tint); }
.btn-small { min-height: 32px; padding: 6px 12px; font-size: 13px; }
.status-pill { align-items: center; gap: 6px; font-weight: 700; }
.status-pill.is-live { color: #127a3a; background: #e3f7ea; }
.status-pill.is-live::before { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; content: ""; }
.status-pill.warning { color: #8a5d00; background: #fff3d6; }
.muted-text { color: var(--muted); }

/* Tableau de bord */
.live-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--oxer-navy-2), var(--oxer-blue));
}
.live-panel h2 { margin: 8px 0 4px; font-family: var(--font-name); font-size: 24px; font-weight: 700; }
.live-panel p { margin: 0; color: var(--oxer-sky); }
.live-panel-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 14px; }
.live-panel-stats small { display: block; color: var(--oxer-sky); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.live-panel-stats b { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.live-panel-actions { display: grid; gap: 8px; align-content: start; }
.live-panel-actions form { margin: 0; }
.live-panel-actions .btn { width: 100%; justify-content: center; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.dashboard-columns .content-card { margin-top: 0; }
.todo-list { margin: 0; padding: 0; list-style: none; }
.todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--oxer-line);
}
.todo-list li:last-child { border-bottom: 0; }
.todo-list strong { display: block; color: var(--oxer-navy); font-size: 14px; }
.todo-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

/* Liste des concours */
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pills a {
  padding: 7px 12px;
  border: 1px solid var(--oxer-line);
  border-radius: 999px;
  color: #4b5b72;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.filter-pills a.is-active { color: #fff; background: var(--oxer-navy); border-color: var(--oxer-navy); }
.list-card { padding: 0; overflow: visible; }
.list-card .table-wrap { overflow: visible; border: 0; border-radius: 12px; }
.list-table th { background: #f8fafd; }
.list-table td { vertical-align: middle; }
.cell-name strong { display: block; font-family: var(--font-name); font-size: 15px; font-weight: 600; color: var(--oxer-navy); }
.cell-name small { color: var(--muted); }
.cell-nowrap { white-space: nowrap; }
.cell-actions { white-space: nowrap; text-align: right; }
.row-menu { position: relative; display: inline-block; margin-left: 6px; vertical-align: middle; }
.row-menu summary {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--oxer-line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu[open] summary { border-color: var(--oxer-blue); color: var(--oxer-blue); }
.row-menu-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 230px;
  padding: 6px;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 12, 14, .18);
  text-align: left;
}
.row-menu-list form { margin: 0; }
.row-menu-list a,
.row-menu-list button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink, #121214);
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}
.row-menu-list a:hover,
.row-menu-list button:hover { background: var(--oxer-tint); }
.row-menu-list .danger { color: var(--oxer-red); }

/* Panneaux latéraux (formulaires) */
dialog.side-panel {
  width: min(460px, 100vw);
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  box-shadow: -20px 0 50px rgba(15, 23, 42, .2);
}
dialog.side-panel::backdrop { background: rgba(15, 23, 42, .4); }
.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--oxer-line);
}
.side-panel-head h2 {
  margin: 0;
  color: var(--oxer-navy);
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
}
.side-panel-close { color: var(--muted); font-size: 26px; line-height: 1; text-decoration: none; }
.side-panel-form,
dialog.side-panel > form { display: grid; gap: 14px; padding: 18px 22px 24px; }
dialog.side-panel .side-panel-form .side-panel-head { margin: -18px -22px 4px; }
.side-panel-form .span-2 { grid-column: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { margin: 0; color: var(--muted); font-size: 13px; }
.side-panel-actions { display: flex; gap: 8px; padding-top: 6px; }

/* Espace d'un concours : bandeau + onglets */
.workspace-band {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: -26px calc(-1 * (100vw - 100%) / 2) 0;
  padding: 18px 24px;
  border-radius: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--oxer-navy), var(--oxer-navy-2));
}
.app-content > .workspace-band { margin: -26px 0 0; border-radius: 12px 12px 0 0; }
.workspace-logo {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.workspace-logo img { width: 80%; height: 80%; object-fit: contain; }
.workspace-identity { min-width: 0; }
.workspace-identity h1 {
  margin: 6px 0 2px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.workspace-identity p { margin: 0; color: var(--oxer-sky); font-size: 13px; }
.workspace-actions { margin-left: auto; }
/* Onglets regroupés : liens simples et menus déroulants (<details>), sans défilement horizontal
   pour que les menus ne soient pas coupés. */
.workspace-tabs {
  position: relative;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-bottom: 20px;
  padding: 0 14px;
  border: 1px solid var(--oxer-line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
}
.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 12px 11px;
  border-bottom: 3px solid transparent;
  color: #4b5b72;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  list-style: none;
  user-select: none;
}
.workspace-tab::-webkit-details-marker { display: none; }
.workspace-tab:hover { color: var(--oxer-navy); }
.workspace-tab:focus-visible { outline: 2px solid var(--oxer-blue); outline-offset: -2px; border-radius: 6px; }
.workspace-tab.is-active,
.workspace-tab-menu.is-active > .workspace-tab { color: var(--oxer-blue); border-color: var(--oxer-blue); }
.workspace-tab-current {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--oxer-blue);
  background: var(--oxer-tint);
  font-size: 12px;
  font-weight: 700;
}
.workspace-tab-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 0 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.workspace-tab-menu { position: relative; }
.workspace-tab-menu[open] > .workspace-tab { color: var(--oxer-navy); }
.workspace-tab-menu[open] .workspace-tab-chevron { margin-top: 3px; transform: rotate(-135deg); }
.workspace-tab-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 12, 14, .18);
}
.workspace-tab-menu:last-child .workspace-tab-list { right: 0; left: auto; }
.workspace-tab-list a {
  padding: 9px 12px;
  border-radius: 7px;
  color: #33435a;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.workspace-tab-list a:hover { color: var(--oxer-navy); background: var(--oxer-tint); }
.workspace-tab-list a.is-active { color: var(--oxer-blue); background: var(--oxer-tint); box-shadow: inset 3px 0 0 var(--oxer-blue); }
@media (max-width: 560px) {
  .workspace-tabs { padding: 0 6px; gap: 0; }
  .workspace-tab { padding: 11px 9px 9px; font-size: 13px; }
  .workspace-tab-current { display: none; }
  .workspace-tab-menu { position: static; }
  .workspace-tab-list,
  .workspace-tab-menu:last-child .workspace-tab-list { right: 6px; left: 6px; min-width: 0; }
}
.workspace-tabs + .content-card,
.workspace-tabs + section { margin-top: 0; }

.overview-live {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f3faf6;
  border: 1px solid #cdebd8;
}
.overview-live strong { font-family: var(--font-name); color: var(--oxer-navy); }
.overview-live .btn { margin-left: auto; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.quick-links a {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  color: var(--oxer-navy);
  text-decoration: none;
}
.quick-links a:hover { border-color: var(--oxer-blue); background: var(--oxer-tint); }
.quick-links strong { font-family: var(--font-name); font-weight: 600; }
.quick-links small { color: var(--muted); }

/* Programme : liste à gauche, formulaire à droite */
.workspace-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.workspace-split .content-card { margin-top: 0; }
.workspace-split .workspace-primary { grid-column: 1; grid-row: 1; }
.workspace-split .workspace-aside { grid-column: 2; grid-row: 1; position: sticky; top: 16px; }
.workspace-split .workspace-aside .form-grid { grid-template-columns: 1fr 1fr; }
.workspace-split .workspace-aside .span-2 { grid-column: 1 / -1; }
.workspace-aside.is-editing { border-color: var(--oxer-blue); box-shadow: 0 0 0 3px rgba(208, 16, 42, .12); }

@media (max-width: 1100px) {
  .workspace-split { grid-template-columns: 1fr; }
  .workspace-split .workspace-aside,
  .workspace-split .workspace-primary { grid-column: 1; grid-row: auto; position: static; }
  .dashboard-columns { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app-sidebar { width: 260px; }
  .app-topbar { padding: 10px 14px; }
  .topbar-search { display: none; }
  .live-panel { grid-template-columns: 1fr; }
  .workspace-band { flex-wrap: wrap; }
  .workspace-actions { margin-left: 0; }
  .list-card .table-wrap { overflow-x: auto; }
  .row-menu-list { right: 0; }
}
@media (max-width: 560px) {
  .topbar-actions .topbar-action { display: none; }
  .workspace-identity h1 { font-size: 26px; }
  .form-row { grid-template-columns: 1fr; }
}
/* Liste des concours (admin) adaptable : les colonnes secondaires se masquent quand la place manque.
   Limité à .contests-table : sur les autres tableaux (boxes, liens cavaliers, historique…),
   ces colonnes contiennent les boutons d'action et doivent rester visibles. */
.list-table { min-width: 0; }
.list-table .status-pill { white-space: nowrap; }
.app-main { min-width: 0; overflow-x: clip; }
@media (max-width: 1350px) {
  .contests-table th:nth-child(6), .contests-table td:nth-child(6) { display: none; }
}
@media (max-width: 1220px) {
  .contests-table th:nth-child(5), .contests-table td:nth-child(5) { display: none; }
}
@media (max-width: 1080px) {
  .contests-table th:nth-child(4), .contests-table td:nth-child(4) { display: none; }
}
@media (max-width: 680px) {
  .contests-table th:nth-child(2), .contests-table td:nth-child(2) { display: none; }
  .list-table td, .list-table th { padding-left: 10px; padding-right: 10px; }
}
.topbar-search { min-width: 140px; }
.topbar-actions .btn,
.topbar-action { white-space: nowrap; }
.topbar-title strong { white-space: nowrap; }

/* Tableau de bord organisateur : concours en liste compacte, groupés par état. */
.contest-rows { padding: 6px 0; }
.contest-rows-title {
  margin: 14px 20px 6px;
  color: var(--oxer-navy);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.contest-rows-title small { color: var(--muted); font-family: var(--font-text); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.contest-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.3fr) auto auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--oxer-line);
}
.contest-rows-title + .contest-row { border-top: 0; }
.contest-row.is-cancelled { opacity: .7; }
.contest-row-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  background: #fff;
}
.contest-row-logo img { width: 80%; height: 80%; object-fit: contain; }
.contest-row-name { min-width: 0; }
.contest-row-name a { color: var(--oxer-navy); text-decoration: none; }
.contest-row-name a:hover { color: var(--oxer-blue); }
.contest-row-name strong { display: block; overflow: hidden; font-family: var(--font-name); font-size: 16px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.contest-row-name small { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.contest-row-dates { color: #334155; font-size: 13px; white-space: nowrap; }
.contest-row .status-pill { white-space: nowrap; }
.contest-row-heat { overflow: hidden; color: var(--oxer-blue); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .contest-row { grid-template-columns: 44px minmax(0, 1fr) auto auto; }
  .contest-row-dates, .contest-row-heat { display: none; }
}
@media (max-width: 560px) {
  .contest-row { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .contest-row .status-pill { display: none; }
}
/* Plus de barre du haut sur ordinateur : tout est dans la barre latérale et les en-têtes de page. */
@media (min-width: 821px) {
  .app-topbar-mobile { display: none; }
}
.app-content > .workspace-band { margin-top: 0; }
.sidebar-public-link {
  display: block;
  margin: 10px 0 0;
  color: var(--oxer-sky) !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.sidebar-public-link:hover { color: #fff !important; }
.sidebar-logout { margin-top: 6px; }
.page-actions { display: flex; gap: 8px; }
.page-actions .btn { white-space: nowrap; }
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.list-search { flex: 0 1 320px; margin: 0; }
.list-search input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.list-search input:focus { outline: 0; border-color: var(--oxer-blue); }
.list-toolbar + .list-card { margin-top: 0; }
@media (max-width: 680px) {
  .list-search { flex-basis: 100%; }
  .page-heading { flex-wrap: wrap; }
}
/* Mot de passe oublié */
.login-forgot {
  display: block;
  width: fit-content;
  margin: 8px 0 0 auto;
  color: var(--oxer-blue, #1c1c21);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.login-forgot:hover { text-decoration: underline; }
.login-card .flash { margin-bottom: 4px; line-height: 1.5; }
.login-card .login-secondary-action { margin-top: 18px; text-align: center; text-decoration: none; }

/* Accessibilité : texte réservé aux lecteurs d'écran */
.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;
}

/* Plan 2D des boxes : éditeur */
.plan-editor {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: max(600px, calc(100vh - 230px));
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--oxer-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}
.plan-tools { display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; overflow-y: auto; border-right: 1px solid var(--oxer-line); }
.plan-tools-title { margin: 0; color: #71819a; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-tool-list { display: grid; gap: 2px; }
.plan-tool,
.plan-row-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  color: #3a4a62;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  text-align: left;
}
.plan-tool:hover { background: var(--oxer-tint); }
.plan-tool.is-active { color: var(--oxer-blue); background: #fbeef0; font-weight: 600; }
.plan-tool svg,
.plan-row-button svg,
.plan-history svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.plan-row-button { padding: 10px 12px; border: 1px solid var(--oxer-line); font-size: 14px; }
.plan-row-button:hover { border-color: var(--oxer-blue); color: var(--oxer-blue); }
.plan-history { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--oxer-line); }
.plan-history button { display: grid; height: 40px; place-items: center; border: 1px solid var(--oxer-line); border-radius: 9px; color: #3a4a62; background: #fff; cursor: pointer; }
.plan-history button:hover:not(:disabled) { border-color: var(--oxer-blue); color: var(--oxer-blue); }
.plan-history button:disabled { opacity: .4; cursor: default; }
.plan-props { display: grid; gap: 10px; }
.plan-props .form-field { gap: 4px; }
.plan-props .form-field span { font-size: 12px; }
.plan-props input,
.plan-props select { min-height: 34px; padding: 6px 9px; font-size: 13px; }
.plan-props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-props-hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.plan-props-warning { margin: 0; padding: 7px 9px; border-radius: 8px; color: #8a5d00; background: #fff3d6; font-size: 12px; }
.plan-props-occupancy { padding: 10px 12px; border-radius: 10px; background: #f4f1f1; font-size: 13px; }
.plan-props-occupancy strong { display: block; color: var(--oxer-navy); }
.plan-props-occupancy small { display: block; margin-top: 3px; color: var(--muted); }
.plan-props-occupancy.is-free { background: #eaf8ef; }
.plan-props-occupancy.is-group { background: #eeebfd; }
.plan-align { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.plan-align button { padding: 7px 6px; border: 1px solid var(--oxer-line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; font-size: 12px; }
.plan-align button:hover { border-color: var(--oxer-blue); color: var(--oxer-blue); }
.plan-assign { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #f4f1f1; }
.plan-assign.is-free { background: #eef9f2; }
.plan-assign.is-group { background: #eeebfd; }
.plan-assign.is-occupied { background: #eaf1fb; }
.plan-assign-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-assign-status { padding: 3px 8px; border-radius: 999px; color: #fff; background: #1c1c21; font-size: 11px; font-weight: 700; }
.plan-assign.is-free .plan-assign-status { color: #127a3a; background: #d3f2de; }
.plan-assign.is-group .plan-assign-status { color: #3c3f9a; background: #d9d6fa; }
.plan-assign textarea { min-height: 70px; padding: 7px 9px; font: inherit; font-size: 13px; resize: vertical; }
.plan-assign-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-assign.is-multi { background: #eef3fb; }
.plan-assign-labels { margin: 0; max-height: 64px; overflow-y: auto; color: var(--oxer-navy); font-size: 12px; font-weight: 700; line-height: 1.5; }
.plan-assign-message { margin: 0; color: var(--muted); font-size: 12px; }
.plan-assign-message:empty { display: none; }
.plan-assign-message.is-success { color: #127a3a; font-weight: 600; }
.plan-assign-message.is-error { color: #b42336; font-weight: 600; }
.plan-renumber { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--oxer-line); }
.plan-stage { position: relative; display: flex; min-width: 0; flex-direction: column; }
.plan-toast {
  position: absolute;
  z-index: 5;
  bottom: 52px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: #b42336;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .25);
  font-size: 13px;
  font-weight: 600;
  transform: translateX(-50%);
  pointer-events: none;
}
.plan-toast[hidden] { display: none; }
[data-row-form] [hidden] { display: none; }
.plan-stats .is-error { color: #b42336; font-weight: 700; }
.plan-stats .is-error::before { display: none; }
.plan-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; border-bottom: 1px solid var(--oxer-line); }
.plan-stats { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 6px 14px; color: #4b5b72; font-size: 13px; }
.plan-stats strong { color: var(--oxer-navy); }
.plan-stats span::before { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; content: ""; vertical-align: 0; }
.plan-stats span:first-child::before { display: none; }
.plan-stats .is-occupied::before { background: #1c1c21; }
.plan-stats .is-group::before { background: #a9b3ef; }
.plan-stats .is-free::before { border: 1.5px solid #22c55e; background: #fff; }
.plan-stats .is-build-hard::before { background: #64748b; }
.plan-stats .is-build-removable::before { background: #f59e0b; }
.plan-stats .is-build-barn::before { background: #92400e; }
.pe-build { pointer-events: none; }
.pe-build.is-hard { fill: #64748b; }
.pe-build.is-removable { fill: #f59e0b; }
.pe-build.is-barn { fill: #92400e; }
.plan-stats .is-tack::before { border: 1px solid #4b5d78; background: repeating-linear-gradient(45deg, #4b5d78 0 1px, #fff 1px 3px); }
.plan-stats .is-warning { color: #8a5d00; font-weight: 600; }
.plan-stats .is-warning::before { display: none; }
.plan-toggle { display: inline-flex; align-items: center; gap: 6px; color: #4b5b72; font-size: 13px; cursor: pointer; }
.plan-zoom { display: inline-flex; overflow: hidden; border: 1px solid var(--oxer-line); border-radius: 9px; }
.plan-zoom button { min-width: 36px; height: 32px; border: 0; background: #fff; cursor: pointer; font: inherit; font-size: 16px; }
.plan-zoom .plan-zoom-value { min-width: 64px; border-inline: 1px solid var(--oxer-line); font-size: 13px; }
.plan-zoom button:hover { background: var(--oxer-tint); }
.plan-fullscreen { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--oxer-line); border-radius: 9px; background: #fff; color: var(--oxer-navy); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.plan-fullscreen:hover { background: var(--oxer-tint); }
.plan-fullscreen span { display: inline-flex; align-items: center; gap: 6px; }
.plan-fullscreen svg { width: 16px; height: 16px; }
.plan-fullscreen .plan-fullscreen-exit,
.plan-editor.is-fullscreen .plan-fullscreen-enter { display: none; }
.plan-editor.is-fullscreen .plan-fullscreen-exit { display: inline-flex; }
.plan-editor.is-fullscreen { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
.plan-editor:fullscreen { width: 100%; height: 100%; }
html.plan-fullscreen-lock, html.plan-fullscreen-lock body { overflow: hidden; }
.plan-save-state { color: var(--muted); font-size: 12px; }
.plan-save-state.is-dirty { color: #8a5d00; }
.plan-save-state.is-error { color: #b42336; font-weight: 600; }
.plan-canvas { display: block; flex: 1 1 0; width: 100%; height: 0; min-height: 0; background: #faf9f9; cursor: default; outline: none; touch-action: none; user-select: none; }
.plan-canvas[data-tool="pan"],
.plan-canvas[data-tool="pan"] .pe-el { cursor: grab; }
.plan-canvas.is-panning,
.plan-canvas.is-panning .pe-el { cursor: grabbing; }
.plan-canvas:not([data-tool="select"]):not([data-tool="pan"]) { cursor: crosshair; }
.plan-hint { margin: 0; padding: 8px 14px; border-top: 1px solid var(--oxer-line); color: var(--muted); font-size: 12px; }
.plan-missing .rider-chips li { background: #fff3d6; color: #8a5d00; }

.pe-grid-minor { fill: none; stroke: #ece8e9; }
.pe-grid-major { fill: none; stroke: #d9d2d3; }
.pe-grid { pointer-events: none; }
.pe-el { cursor: move; }
.plan-canvas:not([data-tool="select"]) .pe-el { cursor: inherit; }
.pe-shape { fill: #fff; stroke: #4b5d78; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.pe-hit { fill: transparent; }
.pe-text { fill: #33435c; font-family: var(--font-text, Inter, sans-serif); font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
/* Box et sellerie : mêmes couleurs d'occupation ; la sellerie a des hachures par-dessus. */
.pe-box.is-occupied .pe-shape,
.pe-tack.is-occupied .pe-shape { fill: #1c1c21; stroke: #121214; }
.pe-box.is-occupied .pe-text,
.pe-tack.is-occupied .pe-text { fill: #fff; }
.pe-box.is-group .pe-shape,
.pe-tack.is-group .pe-shape { fill: #c5cbf6; stroke: #7d87d6; }
.pe-box.is-free .pe-shape,
.pe-tack.is-free .pe-shape,
.pe-tack.is-neutral .pe-shape { fill: #fff; }
.pe-box.is-duplicate .pe-shape,
.pe-tack.is-duplicate .pe-shape { stroke: #d97706; stroke-width: 2.5; stroke-dasharray: 4 2; }
/* Box d'entier : rouge (libre = contour rouge). */
.pe-stallion.is-free .pe-shape,
.pe-stallion.is-neutral .pe-shape { fill: #fff1f2; stroke: #c62f3f; stroke-width: 2; }
.pe-stallion.is-occupied .pe-shape,
.pe-stallion.is-group .pe-shape { fill: #c62f3f; stroke: #8f1d2c; }
.pe-stallion.is-occupied .pe-text,
.pe-stallion.is-group .pe-text { fill: #fff; }
.pe-stallion.is-free .pe-text { fill: #8f1d2c; }
.plan-check { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; color: #8f1d2c; font-size: 13px; font-weight: 650; cursor: pointer; }
.plan-check input { width: 16px; height: 16px; accent-color: #c62f3f; }
/* Box ordinaire occupé par un entier : rouge comme un box entier. */
.pe-box.has-stallion .pe-shape { fill: #c62f3f; stroke: #8f1d2c; }
.pe-box.has-stallion .pe-text { fill: #fff; }
.plan-stats .is-stallion::before { background: #c62f3f; }
.pe-stallion.is-duplicate .pe-shape { stroke: #d97706; stroke-width: 2.5; stroke-dasharray: 4 2; }
.pe-hatch { stroke: none; opacity: .55; pointer-events: none; }
.pe-tack.is-occupied .pe-hatch { opacity: .35; }
.pe-tack .pe-text { paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: .12; }
.pe-tack.is-occupied .pe-text { stroke: rgba(42, 74, 115, .9); }
.pe-free-dot { fill: #22c55e; pointer-events: none; }
/* Placement auto affiché sur le plan (non publié) */
.pe-flag-dot { fill: #dc3545; stroke: #fff; stroke-width: .08; pointer-events: none; }
.plan-source { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; color: #33415a; background: #fff; font-size: 13px; font-weight: 600; }
.plan-proposal-note { margin: 0; padding: 8px 12px; border: 1px solid #f3d38a; border-radius: 10px; color: #6b4e00; background: #fff8e6; font-size: 13px; line-height: 1.45; }
.plan-proposal-note a { color: var(--blue); font-weight: 700; }
.plan-flag-text { color: #b42318; font-style: normal; font-weight: 700; }
.plan-assign.is-proposal { background: #fff8e6; }
.plan-proposal-list { display: grid; gap: 4px; margin: 6px 0 8px; padding: 0; list-style: none; font-size: 13px; max-height: 220px; overflow: auto; }
/* Regroupement mis en avant (liste sous le plan) : les autres boxes s'estompent. */
.has-highlight .pe-el:is(.pe-box, .pe-stallion, .pe-tack):not(.is-highlight) { opacity: .2; }
.pe-el.is-highlight .pe-shape { stroke: #f59e0b; stroke-width: 3.5; vector-effect: non-scaling-stroke; }
.plan-group-list { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-group-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: #26354d; background: #fff; font: inherit; font-size: 13px; cursor: pointer; transition: border-color .14s ease, box-shadow .14s ease; }
.plan-group-chip:hover { border-color: #f59e0b; }
.plan-group-chip.is-active { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .25); background: #fffbeb; }
.plan-group-chip small { color: var(--muted); }
.plan-group-chip.is-clear { color: var(--blue); font-weight: 700; }
.plan-group-state { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.plan-group-state.is-ok { color: #127a3a; background: #d3f2de; }
.plan-group-state.is-split { color: #9a3412; background: #ffedd5; }
/* Zone : grand cadre sous les boxes ; seul son onglet (nom) se clique, pour pouvoir sélectionner les boxes dessus. */
.pe-zone .pe-shape { fill: rgba(124, 58, 237, .05); stroke: #8b5cf6; stroke-width: 1.5; stroke-dasharray: 8 5; vector-effect: non-scaling-stroke; pointer-events: none; }
.pe-zone .pe-zone-tab { fill: #8b5cf6; cursor: move; }
.pe-zone .pe-zone-text { fill: #fff; font-weight: 800; pointer-events: none; }
.pe-aisle .pe-shape { fill: #ece8e9; stroke: #b5abae; }
.pe-aisle .pe-text { fill: #5b6b82; letter-spacing: .08em; }
.pe-hatch-bg { fill: transparent; }
.pe-hatch-line { stroke: #4b5d78; stroke-width: .1; }
.pe-selection { fill: rgba(59, 130, 246, .08); stroke: #2563eb; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.pe-handle { fill: #fff; stroke: #2563eb; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: nwse-resize; }
.pe-draft { fill: rgba(37, 99, 235, .12); stroke: #2563eb; stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.pe-draft.is-invalid { fill: rgba(220, 38, 38, .14); stroke: #dc2626; }
.pe-overlap { fill: rgba(220, 38, 38, .12); stroke: #dc2626; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.pe-marquee { fill: rgba(37, 99, 235, .06); stroke: #2563eb; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
@media (max-width: 900px) {
  .plan-editor { grid-template-columns: 1fr; height: auto; }
  .plan-tools { max-height: none; border-right: 0; border-bottom: 1px solid var(--oxer-line); }
  .plan-tool-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .plan-canvas { height: 70vh; flex: none; }
}

/* Gestion des boxes */
.inline-form { display: inline; margin: 0; }
/* Carte repliable */
.collapse-title { margin: 0; }
.collapse-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}
.collapse-toggle:hover { color: var(--oxer-blue); }
.collapse-toggle:focus-visible { border-radius: 6px; outline: 2px solid var(--oxer-blue); outline-offset: 4px; }
.collapse-chevron {
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .15s ease;
}
.is-collapsed .collapse-chevron { transform: rotate(-45deg); }
.collapse-count { padding: 2px 9px; border-radius: 999px; color: var(--muted); background: var(--oxer-tint); font-family: var(--font-text, inherit); font-size: 12px; font-weight: 600; text-transform: none; }
.is-collapsible.is-collapsed .card-heading { margin-bottom: 0; }
.is-collapsible.is-collapsed .card-heading p { display: none; }
.free-box-picker { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #eef9f2; }
.free-box-picker-title { display: flex; align-items: center; gap: 8px; color: var(--oxer-navy); font-size: 13px; font-weight: 700; }
.free-box-picker-title em { padding: 1px 8px; border-radius: 999px; color: #127a3a; background: #d3f2de; font-size: 12px; font-style: normal; }
.free-box-picker small { color: var(--muted); font-size: 12px; }
.free-box-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; }
.free-box-chip {
  min-width: 46px;
  padding: 6px 10px;
  border: 1px solid #9fdcb4;
  border-radius: 8px;
  color: #14532d;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.free-box-chip:hover { border-color: #16a34a; }
.free-box-chip.is-tack { background: repeating-linear-gradient(45deg, #f1f5f3 0 2px, #fff 2px 6px); }
.box-number.is-tack { background: repeating-linear-gradient(45deg, #0b0b0e 0 3px, #2b2b33 3px 6px); }
.box-number.is-stallion { background: #c62f3f; }
.free-box-chip.is-stallion { color: #8f1d2c; border-color: #f3a6ae; }
.free-box-chip.is-stallion.is-selected { color: #fff; background: #c62f3f; border-color: #c62f3f; }
.box-kind.is-stallion { color: #c62f3f; }
.box-kind { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.free-box-chip.is-selected { color: #fff; background: #16a34a; border-color: #16a34a; }
.box-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.box-toolbar .box-search { flex: 1 1 260px; }
.box-toolbar input,
.box-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--oxer-line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.box-toolbar select { width: auto; max-width: 260px; }
.box-table td { vertical-align: top; }
.box-number {
  display: inline-block;
  min-width: 46px;
  padding: 5px 10px;
  border-radius: 8px;
  color: #fff;
  background: var(--oxer-navy);
  font-weight: 700;
  text-align: center;
}
.rider-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rider-chips li {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--oxer-navy);
  background: var(--oxer-tint);
  font-size: 13px;
  font-weight: 600;
}
.box-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.box-table tr[hidden] { display: none; }
@media (max-width: 720px) {
  .box-table thead { display: none; }
  .box-table tr:not([hidden]) { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--oxer-line); }
  .box-table td { padding: 0; border: 0; }
  .box-table td:nth-child(2), .box-table td:nth-child(3) { grid-column: 2; }
  .box-table .cell-actions { grid-column: 1 / -1; }
  .box-actions { justify-content: flex-start; }
  .box-toolbar select { max-width: none; flex: 1 1 100%; }
}
/* Placement automatique */
.autoplace-checklist { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; background: #fffaf0; }
.autoplace-checklist h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.autoplace-checklist > ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.autoplace-checklist > ul > li { padding-bottom: 10px; border-bottom: 1px solid #f1e6cc; }
.autoplace-checklist > ul > li:last-child { padding-bottom: 0; border-bottom: 0; }
.autoplace-checklist q { display: block; margin: 3px 0; font-size: 12px; font-style: italic; }
.autoplace-checklist ul ul { margin: 4px 0 0; padding-left: 18px; }
.form-stack { display: grid; gap: 14px; }
.autoplace-checklist > ul > li.is-focused { padding: 8px; border-radius: 8px; background: #fff3d6; }
.ap-row-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ap-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-undismiss { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; }
.ap-focus { margin-bottom: 14px; padding: 14px; border: 1px solid #e7d3a3; border-radius: 12px; background: #fff; scroll-margin-top: 16px; }
.ap-focus h4 { margin: 0 0 4px; font-size: 15px; }
.ap-focus q { display: block; margin: 4px 0 8px; font-size: 12px; font-style: italic; }
.ap-focus-flags { margin: 0 0 10px; padding-left: 18px; color: #8a5d00; font-size: 13px; }
.ap-mini-wrap { max-height: 70vh; overflow: auto; border-radius: 10px; background: #f8f6f6; }
.ap-mini { display: block; width: 100%; min-width: 520px; height: auto; }
.ap-mini text { font-family: inherit; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.apm-zone rect { fill: rgba(124, 58, 237, .05); stroke: #a78bfa; stroke-width: .12; stroke-dasharray: .6 .4; }
.apm-zone text { fill: #7c3aed; font-weight: 800; }
.apm-aisle rect { fill: #eee9ea; }
.apm-aisle text { fill: #94a3b8; font-weight: 800; letter-spacing: .1em; }
.apm-tack rect { fill: #d6dbe3; }
.apm-tack text { fill: #64748b; font-weight: 700; }
/* Pas de contour de focus du navigateur : dans le SVG agrandi il devient un gros anneau. Le focus est montré par la bordure verte. */
.apm-box { cursor: pointer; outline: none; }
.apm-box:focus, .apm-box:focus-visible { outline: none; }
.apm-box rect { stroke-width: .08; }
.apm-box.is-free rect { fill: #fff; stroke: #94a3b8; stroke-dasharray: .3 .2; }
.apm-box.is-taken rect { fill: #cbd5e1; stroke: #94a3b8; }
.apm-box.is-group rect { fill: #bfdbfe; stroke: #3b82f6; }
.apm-box.is-mine rect { fill: #f59e0b; stroke: #b45309; stroke-width: .16; }
/* Halo autour des boxes de la réservation : repérables d'un coup d'œil sur le plan complet. */
.apm-box.is-mine rect.apm-halo { fill: rgba(245, 158, 11, .22); stroke: #f59e0b; stroke-width: .14; animation: apm-pulse 1.6s ease-in-out infinite; }
@keyframes apm-pulse { 50% { fill: rgba(245, 158, 11, .05); stroke-opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .apm-box.is-mine rect.apm-halo { animation: none; } }
.apm-box.is-stallion-box rect { stroke: #c62f3f; stroke-width: .16; }
/* Box qui reçoit un entier : rouge (contour + fond clair si ce n'est pas la réservation affichée). */
.apm-box.has-stallion rect:not(.apm-halo) { stroke: #c62f3f; stroke-width: .22; }
.apm-box.has-stallion:not(.is-mine) rect:not(.apm-halo) { fill: #fde0e3; }
.apm-box.has-stallion .apm-sex { fill: #c62f3f; font-weight: 800; }
.apm-box.is-pinned rect { stroke-dasharray: none; stroke-width: .2; }
.apm-box.is-picked rect:not(.apm-halo) { stroke: #15803d; stroke-width: .3; }
.apm-box:hover rect:not(.apm-halo), .apm-box:focus-visible rect:not(.apm-halo) { stroke: #15803d; stroke-width: .22; }
.apm-label { fill: #1e293b; font-weight: 800; }
.apm-who { fill: #334155; }
.apm-sex { fill: #0f172a; font-weight: 800; }
.apm-box.is-mine .apm-label, .apm-box.is-mine .apm-who, .apm-box.is-mine .apm-sex { fill: #1c1206; }
.ap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 12px; font-size: 12px; }
.ap-legend span[class^="is-"]::before { display: inline-block; width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; vertical-align: -2px; content: ""; }
.ap-legend .is-mine::before { background: #f59e0b; }
.ap-legend .is-group::before { background: #bfdbfe; }
.ap-legend .is-taken::before { background: #cbd5e1; }
.ap-legend .is-free::before { border: 1px dashed #94a3b8; background: #fff; }
.ap-focus-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.ap-focus-form { display: grid; align-content: start; gap: 8px; padding: 12px; border-radius: 10px; background: #f8fafc; }
.ap-search { display: block; margin: 0 0 12px; }
.ap-search input { width: 100%; }
.list-table tr.is-cancelled td { opacity: .6; }

/* Historique des attributions et liens personnels des cavaliers */
.box-history .history-table td { vertical-align: middle; }
.history-restore-form { display: inline-flex; align-items: center; gap: 8px; }
.history-plan-check { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.rider-links .form-hint.is-warning { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; color: #8a5a00; background: #fff6e0; }
.rider-links-table td { vertical-align: middle; }
.rider-links-rotate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, #e2e8f0); }

/* Bénévoles */
.stat-card .vol-stat-of { display: inline; margin: 0; color: var(--muted); font-family: inherit; font-size: 18px; font-weight: 600; }
.vol-signup-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-top: 20px; padding: 16px 20px; border: 1px solid #bfe5cd; border-radius: 12px; background: #effaf3; }
.vol-signup-banner.is-off { border-color: var(--oxer-line); background: var(--oxer-tint); }
.vol-signup-banner strong { display: block; color: var(--oxer-navy); }
.vol-signup-banner small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.vol-empty p { margin: 4px 0; }
.link-button { padding: 0; border: 0; color: var(--oxer-blue); background: none; cursor: pointer; font: inherit; text-decoration: underline; }
.vol-print-menu summary.btn { display: inline-flex; width: auto; height: auto; min-height: 40px; padding: 9px 16px; place-items: initial; align-items: center; }
.vol-print-menu { margin-left: 0; }
.vol-table td { vertical-align: top; }
.vol-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.vol-note { display: block; margin-top: 4px; color: #6b5a2c; font-size: 12px; font-style: italic; }
.vol-contact { color: var(--oxer-navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.vol-hours { font-size: 13px; }
.vol-mini-shifts { margin: 4px 0 0; padding: 0; color: var(--muted); font-size: 12px; list-style: none; }
.vol-zones { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.vol-zones abbr { display: inline-grid; min-width: 26px; height: 26px; padding: 0 6px; place-items: center; border-radius: 6px; color: #fff; background: #168a4a; font-size: 12px; font-weight: 800; text-decoration: none; }
.vol-zones-preview { margin: 0 0 14px; }
.table-action.vol-confirm { color: #fff; background: #168a4a; }
.vol-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vol-check { display: flex; align-items: center; gap: 8px; color: #46546a; font-size: 13px; font-weight: 650; cursor: pointer; }
.vol-check input { width: 16px; height: 16px; accent-color: var(--oxer-blue); }
.vol-zone-picker { margin: 0; padding: 0; border: 0; }
.vol-zone-picker > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.vol-zone-picker label { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 42px; padding: 8px 10px; border: 1px solid var(--oxer-line); border-radius: 10px; background: #fff; color: #334155; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
.vol-zone-picker label:hover { border-color: #b9c8dc; }
.vol-zone-picker label:has(input:checked) { border-color: var(--oxer-blue); background: var(--oxer-tint); color: var(--oxer-navy); }
.vol-zone-picker input[type="checkbox"] { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; accent-color: var(--oxer-blue); }
.vol-zone-picker b { display: inline-grid; flex: none; min-width: 26px; height: 24px; padding: 0 5px; place-items: center; border-radius: 6px; color: #64748b; background: #eee9ea; font-size: 12px; font-weight: 800; }
.vol-zone-picker label:has(input:checked) b { color: #fff; background: #168a4a; }
.vol-zone-picker span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vol-panel-block { display: grid; gap: 10px; padding: 14px; border-radius: 10px; background: #f8fafc; }
.vol-panel-block h3 { margin: 0; color: var(--oxer-navy); font-size: 15px; }
.vol-panel-shifts { padding: 12px; border-radius: 10px; background: #f8fafc; font-size: 13px; }
.vol-panel-shifts > span { color: #46546a; font-weight: 780; }
.vol-panel-shifts ul { margin: 6px 0; padding-left: 18px; }
.vol-panel-shifts a { color: var(--oxer-blue); }
.vol-days { display: flex; gap: 8px; margin-top: 20px; padding-bottom: 4px; overflow-x: auto; }
.vol-days a { display: grid; flex: none; gap: 2px; min-width: 130px; padding: 10px 14px; border: 1px solid var(--oxer-line); border-radius: 10px; color: var(--oxer-navy); background: #fff; text-decoration: none; }
.vol-days a.is-extra { border-style: dashed; }
.vol-days a.is-active { border-color: var(--oxer-navy); color: #fff; background: var(--oxer-navy); }
.vol-days small { color: var(--muted); font-size: 12px; }
.vol-days a.is-active small { color: #c9d6ea; }
.vol-days em { color: var(--oxer-red); font-style: normal; font-weight: 700; }
.vol-days a.is-active em { color: #ffb4bd; }
.vol-day-stats { margin-top: 14px; }
.vol-post + .vol-post { margin-top: 22px; }
.vol-post h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--oxer-navy); font-size: 17px; }
.vol-coverage { display: inline-flex; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.vol-coverage.is-full { color: #126c3c; background: #e3f7ea; }
.vol-coverage.is-over { color: #1d4f91; background: #e4eefb; }
.vol-coverage.is-partial { color: #8a5d00; background: #fff3d6; }
.vol-coverage.is-empty { color: #b42336; background: #ffe8eb; }
.vol-shift { padding: 12px 14px; border: 1px solid var(--oxer-line); border-radius: 10px; }
.vol-shift + .vol-shift { margin-top: 8px; }
.vol-shift:target { border-color: var(--oxer-blue); box-shadow: 0 0 0 3px var(--oxer-tint); }
.vol-shift-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vol-shift-head time { color: var(--oxer-navy); font-size: 15px; font-weight: 800; }
.vol-missing { color: var(--oxer-red); font-size: 12px; font-weight: 700; }
.vol-shift-tools { display: inline-flex; gap: 6px; margin-left: auto; }
.vol-shift-notes { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.vol-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.vol-people > li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid var(--oxer-line); border-radius: 999px; background: #f8fafc; font-size: 13px; }
.vol-people > li > a { color: var(--oxer-navy); font-weight: 600; text-decoration: none; }
.vol-people > li small { color: #8a5d00; font-size: 11px; }
.vol-people > li.is-pending { border-style: dashed; border-color: #e5c27a; background: #fffaf0; }
.vol-people > li.is-present { border-color: #9ad7b0; background: #effaf3; }
.vol-check-btn { display: inline-grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 1.5px solid #b8c4d6; border-radius: 50%; color: #fff; background: #fff; cursor: pointer; font-size: 13px; font-weight: 900; }
.vol-people > li.is-present .vol-check-btn { border-color: #168a4a; background: #168a4a; }
.vol-tel { color: var(--oxer-blue); text-decoration: none; }
.vol-remove { padding: 0 4px; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 16px; line-height: 1; }
.vol-remove:hover { color: var(--oxer-red); }
.vol-people > li.vol-add { padding: 0; border: 0; background: none; }
.vol-add select { max-width: 280px; padding: 6px 10px; border: 1px dashed var(--oxer-blue); border-radius: 999px; color: var(--oxer-blue); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.vol-switch { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 14px; border: 1px solid var(--oxer-line); border-radius: 10px; cursor: pointer; }
.vol-switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: #168a4a; }
.vol-switch strong { display: block; color: var(--oxer-navy); }
.vol-switch small { color: var(--muted); font-size: 13px; }
.vol-link-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.vol-link-box code { flex: 1 1 260px; padding: 9px 12px; overflow: hidden; border-radius: 8px; background: #f1f5f9; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vol-section { margin-top: 26px; }
form.vol-settings { margin-top: 20px; }
@media (max-width: 720px) {
  .vol-two { grid-template-columns: 1fr; }
  .vol-shift-tools { margin-left: 0; }
  .vol-table thead { display: none; }
  .vol-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--oxer-line); }
  .vol-table td { display: block; padding: 3px 0; border: 0; }
  .vol-table td.cell-actions { text-align: left; }
  .vol-table .box-actions { justify-content: flex-start; }
}
/* Liste des bénévoles : le statut et les actions restent visibles sur les écrans moyens
   (la règle générale des .list-table masque les colonnes 4 à 6 sous 1350 px). */
@media (max-width: 1350px) {
  .list-table.vol-table th:nth-child(n+4), .list-table.vol-table td:nth-child(n+4) { display: table-cell; }
}
@media (max-width: 1220px) {
  .list-table.vol-table th:nth-child(4), .list-table.vol-table td:nth-child(4) { display: none; }
}
@media (max-width: 720px) {
  .list-table.vol-table td:nth-child(n) { display: block; }
  .list-table.vol-table thead { display: none; }
}
/* Postes proposés à l'inscription */
.vol-signup-posts { margin: 18px 0 4px; }
.vol-signup-posts > div { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.vol-signup-posts em { flex: none; margin-left: auto; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.vol-signup-posts label:not(:has(input[type="checkbox"]:checked)) { border-style: dashed; color: var(--muted); background: #f8fafc; }
.vol-signup-posts label:not(:has(input[type="checkbox"]:checked)) span { text-decoration: line-through; }
.vol-hidden-tag { padding: 3px 9px; border-radius: 999px; color: #5b4a8a; background: #f0ecfb; font-family: var(--font-text, inherit); font-size: 11px; font-weight: 700; text-decoration: none; text-transform: none; }
/* Inscription en ligne des organisateurs */
.signup-shell { width: min(560px, 100%); }
.signup-card > p { margin-bottom: 18px; }
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.signup-section { margin: 0 0 18px; padding: 0; border: 0; }
.signup-section legend { padding: 0; color: var(--oxer-navy, #0b0b0e); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.signup-section .check-field { margin-top: 12px; }
.signup-request { margin-top: 2px; padding: 2px 14px 14px; border-left: 3px solid var(--blue-soft, #f1eeee); }
.signup-terms { align-items: flex-start; margin: 4px 0 18px; font-weight: 600; line-height: 1.45; }
.signup-terms input { flex: 0 0 auto; margin-top: 1px; }
.signup-terms a { color: var(--blue); }
.login-signup { display: grid; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.client-signup-pending { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; color: #8a5a00; background: #fff6e0; font-size: 12px; font-weight: 600; }
@media (max-width: 560px) {
  .signup-card .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Concours warmup ---------- */
.contest-type-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; color: #8a4b00; background: #ffe9cc; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.contest-type-badge.is-official { color: var(--oxer-navy); background: #f1eeee; }
.contest-type-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.contest-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contest-type-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--oxer-line); border-radius: 10px; background: #fff; cursor: pointer; }
.contest-type-option:has(input:checked) { border-color: var(--oxer-blue); box-shadow: 0 0 0 1px var(--oxer-blue); background: #f8f6f6; }
.contest-type-option input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: var(--oxer-blue); }
.contest-type-option strong { display: block; color: var(--oxer-navy); }
.contest-type-option small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.4; }
.table-actions { white-space: nowrap; }
.table-actions > * + * { margin-left: 6px; }
tr.is-selected td { background: #f8f6f6; }
.warmup-class-form { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--oxer-line); }
.warmup-class-form h3 { margin: 0; color: var(--oxer-navy); font-size: 16px; }
.warmup-class-picker { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.warmup-class-picker em { font-style: normal; font-weight: 500; }
.warmup-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.warmup-filters input, .warmup-filters select { min-height: 36px; padding: 6px 10px; border: 1px solid #dbd5d6; border-radius: 8px; font: inherit; font-size: 14px; }
.warmup-filters input { flex: 1 1 220px; }
.warmup-class-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.warmup-class-tabs a { padding: 7px 12px; border: 1px solid var(--oxer-line); border-radius: 999px; color: var(--oxer-navy); font-size: 13px; font-weight: 600; text-decoration: none; }
.warmup-class-tabs a small { color: var(--muted); font-weight: 500; }
.warmup-class-tabs a.is-active { border-color: var(--oxer-blue); color: #fff; background: var(--oxer-blue); }
.warmup-class-tabs a.is-active small { color: #dce6f5; }
.warmup-results-table input, .warmup-results-table select { min-height: 36px; padding: 6px 8px; border: 1px solid #dbd5d6; border-radius: 8px; font: inherit; font-size: 15px; }
.warmup-results-table input { width: 84px; }
.warmup-results-table tr.has-result td { background: #f3faf6; }
.warmup-results-table tr:target td { background: #fbeef0; }
@media (max-width: 640px) {
  .contest-type-options { grid-template-columns: 1fr; }
}
.warmup-day-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.warmup-day-limits small.is-full { color: var(--oxer-red); font-weight: 700; }
.warmup-program-fields { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--oxer-line); border-radius: 10px; min-width: 0; }
.warmup-program-fields legend { padding: 0 6px; color: var(--oxer-navy); font-size: 13px; font-weight: 800; }
.warmup-program-meta { display: block; margin-top: 4px; color: #126c3c !important; font-weight: 700; }
.warmup-program-meta.is-closed { color: var(--muted) !important; font-weight: 600; }
.content-card > .form-hint.is-warning { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; color: #8a5a00; background: #fff6e0; }

/* ==========================================================================
   Responsive téléphone / tablette : rien ne doit dépasser en largeur.
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Un <fieldset> a par défaut une largeur minimale égale à son contenu : il élargissait toute la carte. */
fieldset { min-width: 0; }
img, video, canvas { max-width: 100%; }
/* Les enfants de grilles et de flex peuvent rétrécir sous la largeur de leur contenu. */
.app-content > *,
.workspace-split > *,
.dashboard-columns > *,
.support-layout > *,
.support-column > *,
.form-grid > *,
.form-row > *,
.contest-card-grid > *,
.client-grid > *,
.software-guide-grid > *,
.request-card > *,
.side-panel-form > * { min-width: 0; }
.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.page-actions, .side-panel-actions { flex-wrap: wrap; }
.vol-add select { max-width: 100%; }
/* Hauteur réelle de l'écran sur mobile (barre d'adresse comprise) : le bas du menu reste accessible. */
@supports (height: 100dvh) {
  .app-sidebar { height: 100dvh; }
  dialog.side-panel { height: 100dvh; max-height: 100dvh; }
}

/* Tableaux : sans largeur minimale fixe, et en fiches empilées sur téléphone (classe et libellés posés par app.js). */
.table-stack { min-width: 0; }
.table-stack td { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .table-stack,
  .table-stack tbody,
  .table-stack tr { display: block; width: 100%; }
  .table-stack thead { display: none; }
  .table-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack tr[hidden] { display: none; }
  .table-stack td {
    display: block;
    padding: 5px 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }
  .table-stack td[data-label] { position: relative; min-height: 26px; padding-left: max(96px, 36%); }
  .table-stack td[data-label]::before {
    position: absolute;
    top: 7px;
    left: 0;
    width: calc(max(96px, 36%) - 10px);
    content: attr(data-label);
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }
  .table-stack td:empty,
  .table-stack td > br { display: none; }
  .table-stack .cell-actions .box-actions,
  .table-stack .action-cell-content { justify-content: flex-start; }
  .table-stack tr.is-selected td,
  .table-stack tr.has-result td { background: none; }
  .table-stack tr.is-selected,
  .table-stack tr.has-result { background: #f3faf6; }
}

@media (max-width: 820px) {
  /* iPhone zoome automatiquement sur un champ dont le texte fait moins de 16 px,
     ce qui oblige ensuite à se déplacer de côté : on garde 16 px sur mobile. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea { font-size: 16px !important; }
  .workspace-band { padding: 16px; }
  .card-heading { flex-wrap: wrap; }
  .workspace-actions .btn { white-space: normal; }
  .overview-live { flex-wrap: wrap; }
  .overview-live .btn { margin-left: 0; }
  .todo-list li { flex-wrap: wrap; }
  .vol-signup-banner .btn { white-space: normal; }
  .support-chat-card { min-height: 0; }
}
/* Jours du planning bénévoles : retour à la ligne plutôt qu'un bandeau à faire défiler. */
.vol-days { flex-wrap: wrap; overflow-x: visible; }
.vol-days a { flex: 0 1 auto; }
@media (max-width: 720px) {
  .vol-days a { flex: 1 1 120px; min-width: 0; }
  .vol-shift-tools { flex-wrap: wrap; }
  .card-heading > * { max-width: 100%; }
  .event-card-top { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 560px) {
  .app-content { width: calc(100% - 20px); padding-top: 18px; }
  .content-card { padding: 16px 14px; }
  .list-card { padding: 0; }
  .workspace-identity h1 { overflow-wrap: anywhere; }
  .page-heading h1 { overflow-wrap: anywhere; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .side-panel-form,
  dialog.side-panel > form { padding: 16px; }
  dialog.side-panel .side-panel-form .side-panel-head { margin: -16px -16px 4px; padding: 16px; }
  .plan-zoom .plan-zoom-value { min-width: 52px; }
  .first-login-modal { padding: 24px 18px; }
}.warmup-results-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.warmup-results-search input { flex: 1 1 280px; min-height: 40px; padding: 8px 12px; border: 1px solid #dbd5d6; border-radius: 8px; font: inherit; font-size: 15px; }
/* Statistiques de fréquentation (admin.php?page=stats) */
.stat-card small.muted-text { display: block; margin-top: 8px; font-size: 12px; }
.stats-chart { margin-top: 8px; }
.stats-chart-plot { position: relative; padding-left: 36px; }
.stats-chart-max { position: absolute; top: 0; left: 0; color: var(--muted); font-size: 12px; line-height: 1; }
.stats-chart-bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; border-top: 1px dashed var(--line); border-bottom: 1px solid var(--line); }
.stats-bar { position: relative; display: flex; flex: 1 1 0; align-items: flex-end; min-width: 2px; height: 100%; outline: none; cursor: default; }
.stats-bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--oxer-blue, #1c1c21); }
.stats-bar:hover i, .stats-bar:focus-visible i { background: var(--oxer-navy, #0b0b0e); }
.stats-bar:hover::after, .stats-bar:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; z-index: 5; transform: translateX(-50%);
  padding: 6px 10px; border-radius: 8px; background: var(--oxer-navy, #0b0b0e); color: #fff; font-size: 12px; white-space: nowrap; pointer-events: none;
}
.stats-bar:first-child:hover::after, .stats-bar:first-child:focus-visible::after { left: 0; transform: none; }
.stats-bar:last-child:hover::after, .stats-bar:last-child:focus-visible::after { right: 0; left: auto; transform: none; }
.stats-chart-axis { display: flex; justify-content: space-between; padding: 6px 0 0 36px; color: var(--muted); font-size: 12px; }
.stats-table-toggle { margin-top: 14px; }
.stats-table-toggle summary { color: var(--oxer-blue, #1c1c21); font-size: 13px; font-weight: 600; cursor: pointer; }
.stats-table-toggle .table-wrap { max-height: 320px; margin-top: 10px; }
@media (max-width: 640px) { .stats-chart-bars { height: 140px; gap: 1px; } }

/* ==========================================================================
   Thème « rouge et noir » – espace organisateur :
   barre latérale noire, contenu clair, boutons principaux noirs.
   Le rouge sert de repère (onglet actif, titres d'appoint) ; il n'est pas
   utilisé pour les boutons afin de rester distinct des actions de suppression.
   ========================================================================== */
:root {
  --rn-ink: #121214;
  --rn-red: #e3122b;
  --rn-red-soft: #ff8d99;
}
.app-sidebar { background: #07070a; }
.sidebar-nav a.is-active { box-shadow: inset 3px 0 0 var(--rn-red); }
.sidebar-logo img { filter: none; }
.eyebrow,
.page-heading .eyebrow { color: #c40f25; }
.btn-primary { color: #fff; background: var(--rn-ink); }
.btn-primary:hover { background: #2b2b33; }
.workspace-tab-menu.is-active > .workspace-tab { color: var(--rn-ink); border-color: var(--rn-red); }
.workspace-tab-list a.is-active { color: var(--rn-ink); box-shadow: inset 3px 0 0 var(--rn-red); }
.live-panel {
  background:
    radial-gradient(45% 90% at 95% -20%, rgba(227, 18, 43, .7) 0%, transparent 70%),
    radial-gradient(35% 80% at 0% 100%, rgba(150, 8, 24, .5) 0%, transparent 70%),
    #07070a;
}
.live-panel p,
.live-panel-stats small,
.sidebar-brand small,
.sidebar-account small,
.sidebar-logout button { color: var(--rn-red-soft); }
.sidebar-logout button:hover { color: #fff; }
/* Plan des boxes : une sellerie occupée en graphite (le rouge reste réservé aux entiers). */
.pe-tack.is-occupied .pe-shape { fill: #2b2b33; stroke: var(--rn-ink); }
/* Pages de connexion, inscription et mot de passe : fond noir aux lueurs rouges,
   logo en verre, carte blanche (le contenu reste sur fond clair). */
.login-page {
  background:
    radial-gradient(50% 55% at 88% -5%, rgba(227, 18, 43, .72) 0%, transparent 70%),
    radial-gradient(45% 50% at 0% 85%, rgba(150, 8, 24, .55) 0%, transparent 70%),
    #07070a;
  background-attachment: fixed;
}
.login-brand { color: #fff; }
.login-brand strong { color: #fff; }
.login-brand small { color: var(--rn-red-soft); }
.login-brand > span:first-child {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}
.login-brand > span:first-child img { padding: 3px; filter: brightness(0) invert(1); }
.login-card { border: 0; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.login-card .btn-primary { color: #fff; background: var(--rn-red); box-shadow: 0 0 24px rgba(227, 18, 43, .45); }
.login-card .btn-primary:hover { background: #b80d22; box-shadow: 0 0 30px rgba(227, 18, 43, .6); }
.login-back { color: rgba(255, 255, 255, .72); }
.login-back:hover { color: #fff; }
/* ---------- Placement auto : assistant (questions d'abord, puis chat avec l'IA) ---------- */
.ap-assistant-count { align-self: flex-start; padding: 6px 12px; border-radius: 999px; color: #127a3a; background: #d3f2de; font-size: 13px; font-weight: 800; white-space: nowrap; }
.ap-assistant-count.has-open { color: #9a3412; background: #ffedd5; }
.ap-assistant-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .ap-assistant-grid { grid-template-columns: 1fr; } }
.ap-questions { display: grid; gap: 10px; max-height: 640px; overflow: auto; padding-right: 4px; }
.ap-questions-empty { margin: 0; padding: 14px; border-radius: 12px; color: #127a3a; background: #eef9f2; font-weight: 700; }
.ap-question { padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid #94a3b8; border-radius: 12px; background: #fff; }
.ap-question.is-level-1 { border-left-color: #dc2626; background: #fff5f5; }
.ap-question.is-level-2 { border-left-color: #ea580c; }
.ap-question.is-level-3 { border-left-color: #f59e0b; }
.ap-question.is-level-4 { border-left-color: #3b6090; }
.ap-question header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ap-question-level { padding: 2px 8px; border-radius: 999px; color: #475569; background: #eef2f7; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ap-question.is-level-1 .ap-question-level { color: #fff; background: #dc2626; }
.ap-question.is-level-2 .ap-question-level { color: #9a3412; background: #ffedd5; }
.ap-question p { margin: 0 0 10px; color: #33415a; font-size: 14px; line-height: 1.45; }
.ap-question-options { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-question-group { display: inline-flex; gap: 6px; align-items: center; }
.ap-question-group select { max-width: 230px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.ap-questions-done { padding: 10px 12px; border-radius: 12px; background: #f8fafc; font-size: 13px; }
.ap-questions-done summary { cursor: pointer; font-weight: 700; color: #127a3a; }
.ap-questions-done ul { margin: 8px 0; padding-left: 18px; }
.ap-chat { display: flex; flex-direction: column; gap: 8px; min-height: 380px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.ap-chat-log { display: flex; flex: 1; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; padding: 4px; }
.ap-chat-hello { margin: 0; color: #5b6b82; font-size: 13px; line-height: 1.5; }
.ap-chat-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.ap-chat-msg p { margin: 0; }
.ap-chat-msg.is-user { align-self: flex-end; color: #fff; background: var(--blue); border-bottom-right-radius: 4px; }
.ap-chat-msg.is-ai { align-self: flex-start; color: #1f2a3d; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ap-chat-msg.is-waiting { color: #5b6b82; font-style: italic; animation: ap-pulse 1.2s ease-in-out infinite; }
@keyframes ap-pulse { 50% { opacity: .45; } }
.ap-chat-time { display: block; margin-top: 3px; font-size: 11px; opacity: .6; }
.ap-chat-actions { margin: 8px 0 6px; padding: 8px 10px 8px 26px; border-radius: 10px; background: #fff8e6; font-size: 13px; }
.ap-chat-actions.is-applied { background: #eef9f2; }
.ap-chat-actions.is-cancelled { background: #f1f5f9; text-decoration: line-through; opacity: .7; }
.ap-chat-buttons { display: flex; gap: 6px; }
.ap-chat-status { font-size: 12px; font-weight: 700; color: #127a3a; }
.ap-chat-form { display: flex; gap: 8px; align-items: flex-end; }
.ap-chat-form textarea { flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 14px; resize: vertical; }
.ap-chat-clear { align-self: flex-end; }
.ap-chat-clear .btn-link { border: 0; color: var(--muted); background: none; font-size: 12px; text-decoration: underline; cursor: pointer; }
/* Assistant en mode conversation : questions posées dans le chat. */
.ap-assistant .ap-chat { min-height: 300px; }
.ap-assistant .ap-chat-log { max-height: 620px; }
.ap-chat-msg.is-question { max-width: 92%; }
.ap-chat-qtitle { display: block; margin-bottom: 2px; }
.ap-chat-msg.is-current { border: 2px solid #f59e0b; box-shadow: 0 6px 18px rgba(245, 158, 11, .15); }
.ap-chat-msg.is-current.is-level-1 { border-color: #dc2626; box-shadow: 0 6px 18px rgba(220, 38, 38, .15); }
.ap-chat-msg.is-current .ap-question-level { display: inline-block; margin-bottom: 6px; }
.ap-chat-msg.is-current p { margin: 4px 0 10px; }
.ap-chat-msg.is-done { color: #127a3a; background: #eef9f2; border-color: #bfe8cf; font-weight: 600; }
.ap-chat-msg .btn-link, .ap-chat-footer .btn-link { border: 0; color: var(--muted); background: none; font-size: 12px; text-decoration: underline; cursor: pointer; }
.ap-chat-footer { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.ap-chat-msg.is-waiting-box { border-color: #c7d2fe; background: #eef2ff; }
.ap-chat-msg.is-waiting-box p::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border: 2px solid #6366f1; border-right-color: transparent; border-radius: 50%; animation: ap-spin .8s linear infinite; vertical-align: -1px; }
@keyframes ap-spin { to { transform: rotate(360deg); } }
.ap-chat-msg.is-waiting-box form { margin-top: 6px; }
.ap-chat-msg.is-error { border-color: #fecaca; background: #fff5f5; }
.ap-chat-msg.is-error form { margin-top: 8px; }
.ap-chat-ai-state { margin-right: auto; font-size: 12px; }

/* ---------- Assistant : chat en « verre fumé » rouge (thème du site) ---------- */
.ap-assistant.is-smoked .ap-chat { padding: 16px; border-radius: 22px; border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(110% 80% at 0% 0%, rgba(184,13,34,.55) 0%, transparent 55%), radial-gradient(90% 80% at 100% 100%, rgba(244,63,94,.25) 0%, transparent 60%), linear-gradient(160deg, #1c1c21 0%, #24161a 60%, #121216 100%);
  box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.ap-assistant.is-smoked .ap-chat-msg { border-radius: 18px; }
.ap-assistant.is-smoked .ap-chat-msg.is-ai { color: #f3f4f6; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.ap-assistant.is-smoked .ap-chat-msg.is-user { color: #fff; background: rgba(184,13,34,.78); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 22px rgba(184,13,34,.35); }
.ap-assistant.is-smoked .ap-chat-msg.is-current { background: rgba(255,255,255,.12); border: 1.5px solid rgba(244,63,94,.85); box-shadow: 0 0 0 4px rgba(244,63,94,.15), 0 12px 30px rgba(0,0,0,.35); }
.ap-assistant.is-smoked .ap-chat-msg.is-current.is-level-1 { border-color: #fb7185; box-shadow: 0 0 0 4px rgba(251,113,133,.25), 0 12px 30px rgba(0,0,0,.35); }
.ap-assistant.is-smoked .ap-chat-msg.is-waiting-box { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.ap-assistant.is-smoked .ap-chat-msg.is-waiting-box p::after { border-color: #fb7185; border-right-color: transparent; }
.ap-assistant.is-smoked .ap-chat-msg.is-error { background: rgba(244,63,94,.16); border-color: rgba(251,113,133,.55); }
.ap-assistant.is-smoked .ap-chat-msg.is-done { color: #bbf7d0; background: rgba(34,197,94,.14); border-color: rgba(134,239,172,.35); }
.ap-assistant.is-smoked .ap-chat-qtitle { color: #fff; }
.ap-assistant.is-smoked .ap-chat-time { color: rgba(255,255,255,.55); opacity: 1; }
.ap-assistant.is-smoked .ap-question-level { background: rgba(244,63,94,.2); color: #fecdd3; }
.ap-assistant.is-smoked .ap-chat .btn-primary { background: #e11d48; color: #fff; border: 0; }
.ap-assistant.is-smoked .ap-chat .btn-primary:hover { background: #be123c; }
.ap-assistant.is-smoked .ap-chat .btn-secondary { background: rgba(255,255,255,.1); color: #f3f4f6; border: 1px solid rgba(255,255,255,.2); }
.ap-assistant.is-smoked .ap-chat .btn-secondary:hover { background: rgba(255,255,255,.18); }
.ap-assistant.is-smoked .ap-chat .btn-link, .ap-assistant.is-smoked .ap-chat-ai-state { color: rgba(255,255,255,.65); }
.ap-assistant.is-smoked .ap-chat-actions { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); color: #f3f4f6; }
.ap-assistant.is-smoked .ap-chat-actions.is-applied { background: rgba(34,197,94,.14); }
.ap-assistant.is-smoked .ap-chat-status { color: #86efac; }
.ap-assistant.is-smoked .ap-chat-form textarea { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff; }
.ap-assistant.is-smoked .ap-chat-form textarea::placeholder { color: rgba(255,255,255,.5); }
.ap-assistant.is-smoked .ap-chat-form textarea:focus { outline: none; border-color: rgba(251,113,133,.7); box-shadow: 0 0 0 3px rgba(244,63,94,.2); }
.ap-assistant.is-smoked .ap-question-group select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.ap-assistant.is-smoked .ap-question-group select option { color: #111827; background: #fff; }
.ap-assistant.is-smoked .ap-chat-log::-webkit-scrollbar { width: 8px; }
.ap-assistant.is-smoked .ap-chat-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 8px; }

/* Parcours Boxes en 4 étapes (includes/boxes_steps.php) */
.boxes-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 18px; }
.boxes-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.boxes-step:hover { border-color: var(--oxer-red); }
.boxes-step-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--muted); font-weight: 700; font-size: .9rem; }
.boxes-step-text { display: flex; flex-direction: column; min-width: 0; }
.boxes-step-text strong { font-size: .95rem; }
.boxes-step-text small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boxes-step.is-done .boxes-step-num { background: #e3f4ea; color: var(--success); }
.boxes-step.is-current { border-color: var(--oxer-red); box-shadow: 0 0 0 3px rgba(214, 59, 75, .12); }
.boxes-step.is-current .boxes-step-num { background: var(--oxer-red); color: #fff; }
.boxes-next-step { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 8px; flex-wrap: wrap; }
.boxes-advanced-intro { margin: 0 0 14px; }
@media (max-width: 720px) {
  .boxes-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Placement guidé groupe par groupe (render_autoplace_guide) */
.ap-guide-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ap-guide-groups ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.ap-guide-groups li a { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.ap-guide-groups li a:hover { border-color: var(--oxer-red); }
.ap-guide-groups li.is-selected a { border-color: var(--oxer-red); box-shadow: 0 0 0 3px rgba(214, 59, 75, .12); }
.ap-guide-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-guide-meta { grid-column: 1; color: var(--muted); font-size: .8rem; }
.ap-guide-state { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--muted); }
.ap-guide-groups li.is-hand .ap-guide-state { background: #e3f4ea; color: var(--success); }
.ap-guide-groups li.is-partial .ap-guide-state { background: #fff4d6; color: #8a5a00; }
.ap-guide-groups li.is-todo .ap-guide-state { background: var(--oxer-tint); color: var(--oxer-red); }
.ap-guide-rest { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ap-guide-rest p { margin: 0; }
.ap-guide-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--oxer-tint); }
.ap-guide-banner p { margin: 4px 0 0; }
.ap-guide-banner.is-done { background: #e3f4ea; color: var(--success); font-weight: 600; }
.ap-guide-error { color: var(--danger); font-weight: 600; }
.ap-guide-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ap-guide-plan { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 12px; background: #fbfafa; padding: 6px; }
.ap-guide-plan svg { display: block; width: 100%; height: auto; }
.ap-guide-plan text { text-anchor: middle; dominant-baseline: central; font-family: var(--font-text); pointer-events: none; }
.gp-zone rect { fill: rgba(214, 59, 75, .04); stroke: rgba(214, 59, 75, .35); stroke-width: .08; stroke-dasharray: .4 .25; }
.gp-zone text { text-anchor: start; fill: var(--oxer-red); font-weight: 700; }
.gp-aisle rect { fill: #eeeae9; }
.gp-aisle text { fill: #9a9092; font-weight: 700; }
.gp-tack rect { fill: #f3efe6; stroke: #d6cdb8; stroke-width: .05; }
.gp-tack text { fill: #8a7d5c; }
.gp-box rect { stroke-width: .07; transition: fill .12s; }
.gp-box text { font-weight: 600; }
.gp-free rect { fill: #fff; stroke: #cfc8c9; }
.gp-free text { fill: #6b6164; }
.gp-auto rect { fill: #dfe7f5; stroke: #9db0d4; }
.gp-auto text { fill: #2c4370; }
.gp-hand rect { fill: #d9d4d5; stroke: #a69c9e; }
.gp-hand text { fill: #4b4345; }
.gp-self rect { fill: #e3f4ea; stroke: var(--success); }
.gp-self text { fill: var(--success); }
.gp-preview rect { fill: var(--oxer-red); stroke: #9d1c29; }
.gp-preview text { fill: #fff; }
.gp-start rect { stroke: #111; stroke-width: .16; }
.gp-reserved rect { fill: #f4f3f3; stroke: #cfc8c9; stroke-dasharray: .25 .15; }
.gp-reserved text { fill: #b3abad; }
.gp-stallion rect { stroke: var(--danger); stroke-width: .14; }
a.gp-box.is-clickable { cursor: pointer; }
a.gp-box.is-clickable:hover rect { fill: #ffd9de; stroke: var(--oxer-red); }
a.gp-preview.is-clickable:hover rect { fill: #b81f30; }
.ap-guide-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; font-size: .8rem; color: var(--muted); }
.ap-guide-legend li { display: flex; align-items: center; gap: 6px; }
.gp-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid #cfc8c9; }
.gp-sw.gp-free { background: #fff; }
.gp-sw.gp-preview { background: var(--oxer-red); border-color: #9d1c29; }
.gp-sw.gp-self { background: #e3f4ea; border-color: var(--success); }
.gp-sw.gp-hand { background: #d9d4d5; }
.gp-sw.gp-auto { background: #dfe7f5; border-color: #9db0d4; }
.gp-sw.gp-reserved { background: #f4f3f3; border-style: dashed; }
@media (max-width: 860px) {
  .ap-guide-layout { grid-template-columns: 1fr; }
  .ap-guide-groups ul { max-height: 260px; }
}.ap-guide-warning { color: #8a5a00; font-weight: 600; }

/* « Pourquoi ici ? » (page Placer et plan 2D) */
.ap-guide-modes { display: inline-flex; gap: 4px; padding: 3px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ap-guide-modes a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; }
.ap-guide-modes a.is-active { background: var(--oxer-red); color: #fff; }
.ap-why { padding: 12px 14px; margin-bottom: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--oxer-red); box-shadow: 0 0 0 3px rgba(214, 59, 75, .1); }
.ap-why-title { margin: 0 0 6px; }
.ap-why ul, .plan-why ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ap-why li.is-warning, .plan-why li.is-warning { color: var(--danger); font-weight: 600; }
.plan-why { margin: 8px 0; font-size: .85rem; }
.plan-why summary { cursor: pointer; font-weight: 700; color: var(--oxer-red); margin-bottom: 4px; }
/* Placement guidé : rappel des demandes, aperçu au survol, box par box */
.ap-guide-requests { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.ap-guide-requests summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ap-guide-requests ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; }
.ap-guide-requests li { padding: 7px 9px; border-radius: 8px; background: #faf8f8; border: 1px solid #eee8e9; font-size: .85rem; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ap-req-head { display: flex; flex-direction: column; }
.ap-req-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ap-req-chip { font-size: .74rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--blue-soft); color: #4b4345; }
.ap-req-chip.is-build { background: #e7ecf7; color: #2c4370; }
.ap-req-chip.is-priority { background: #e3f4ea; color: var(--success); }
.ap-req-chip.is-stallion { background: #fde4e7; color: var(--danger); }
.ap-req-chip.is-place { background: #fff4d6; color: #8a5a00; }
.ap-req-info { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; }
.ap-guide-way { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .88rem; }
.ap-guide-way button { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 11px; font-weight: 600; cursor: pointer; color: var(--muted); }
.ap-guide-way button.is-active { background: #1c1c21; border-color: #1c1c21; color: #fff; }
.ap-guide-hover { flex: 1 1 260px; min-height: 1.2em; }
.ap-guide-manual { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--oxer-red); background: #fff; }
.ap-guide-manual p { margin: 0 0 6px; }
.link-button { border: 0; background: none; padding: 0; color: var(--oxer-red); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.ap-guide-plan .gp-box.gp-hover rect { fill: #e8505f; stroke: #9d1c29; }
.ap-guide-plan .gp-box.gp-hover text { fill: #fff; }
.ap-guide-plan .gp-box.gp-hover.is-split rect { fill: #f2b544; stroke: #a36f00; }
.ap-guide-plan .gp-box.gp-hover-start rect { stroke: #111; stroke-width: .18; }
.ap-guide.is-manual .gp-preview rect { fill: #fff; stroke: #cfc8c9; }
.ap-guide.is-manual .gp-preview text { fill: #6b6164; }
.ap-guide.is-manual .gp-box.gp-pick rect { fill: var(--oxer-red); stroke: #9d1c29; }
.ap-guide.is-manual .gp-box.gp-pick text { fill: #fff; }.ap-guide-plan a.gp-box.gp-hover:hover rect { fill: #c4283a; }

/* « Ce qu'ils ont demandé » : repliable (fermé par défaut), avec une flèche visible. */
.ap-guide-requests summary { list-style: none; user-select: none; }
.ap-guide-requests summary::-webkit-details-marker { display: none; }
.ap-guide-requests summary::before { content: ""; flex: none; align-self: center; width: 7px; height: 7px; margin-right: 2px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.ap-guide-requests[open] summary::before { transform: rotate(45deg); }
.ap-guide-requests summary:hover strong { color: var(--oxer-red); }
/* Carte optionnelle « Placer une personne » */
.ap-person-details > summary { list-style: none; cursor: pointer; margin: 0; }
.ap-person-details > summary::-webkit-details-marker { display: none; }
.ap-person-details > summary h2::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
.ap-person-details[open] > summary h2::after { transform: translateY(1px) rotate(-135deg); }
.ap-person-details > summary .status-pill { vertical-align: middle; font-size: .7rem; }
.ap-person-details[open] > summary { margin-bottom: 12px; }
.ap-guide-layout.is-list-only { grid-template-columns: minmax(0, 1fr); }
.ap-guide-layout.is-list-only .ap-person-list ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); max-height: 420px; }
.ap-person-search { display: block; margin-bottom: 8px; }
.ap-person-search input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.ap-person-list li a .ap-req-chips { grid-column: 1 / -1; margin-top: 2px; }
.ap-person-list li[hidden] { display: none; }.ap-guide-way[hidden], .ap-guide-manual[hidden], [data-guide-adjust][hidden] { display: none; }

/* Logo Oxer Events (logo-oxer-mark.svg) : la tuile rouge fait partie du SVG. */
.sidebar-logo,
.login-brand > span:first-child {
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}
img[src$="logo-oxer-mark.svg"] { padding: 0 !important; filter: none !important; }
/* Barre d'étapes : lien « Avancé » au bout (l'onglet Boxes n'a plus de menu déroulant). */
.boxes-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
.boxes-step-advanced { display: flex; align-items: center; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.boxes-step-advanced:hover { border-color: var(--oxer-red); color: var(--oxer-red); }
.boxes-step-advanced.is-current { border-style: solid; border-color: var(--oxer-red); color: var(--oxer-red); box-shadow: 0 0 0 3px rgba(214, 59, 75, .12); }
@media (max-width: 720px) {
  .boxes-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boxes-step-advanced { grid-column: 1 / -1; justify-content: center; }
}
/* Historique de l'administration (admin.php?page=history) */
.history-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.history-filters .form-field { flex: 1 1 200px; margin: 0; }
.history-filters .history-search { flex: 2 1 260px; }
.history-filter-actions { display: flex; gap: 8px; }
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item { border-top: 1px solid var(--oxer-line); }
.history-item:first-child { border-top: 0; }
.history-item summary {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
}
.history-item summary::-webkit-details-marker { display: none; }
.history-item summary:hover { background: #f7f9fc; }
.history-item time strong { display: block; font-variant-numeric: tabular-nums; }
.history-item time small, .history-main small { display: block; color: #64748b; font-size: 12px; }
.history-main { min-width: 0; }
.history-main strong { display: block; overflow-wrap: anywhere; }
.history-main small { overflow-wrap: anywhere; }
.history-item.is-error .history-message { color: #b42336; }
.history-repeat { margin-left: 6px; color: #64748b; font-size: 12px; font-style: normal; font-weight: 600; }
.history-details { padding: 4px 4px 16px 102px; }
.history-details h3 { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.history-changes { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-changes th, .history-changes td { padding: 6px 8px; border-bottom: 1px solid var(--oxer-line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.history-old { color: #b42336; text-decoration: line-through; }
.history-new { color: #157347; font-weight: 600; }
.history-notes { margin: 0; padding-left: 18px; font-size: 13px; }
.history-fields { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; }
.history-fields dt { color: #64748b; overflow-wrap: anywhere; }
.history-fields dd { margin: 0; overflow-wrap: anywhere; }
.history-error { margin: 0 0 6px; padding: 10px; border-radius: 8px; background: #fff1f2; color: #7f1d1d; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.history-meta { margin: 14px 0 0; color: #64748b; font-size: 12px; overflow-wrap: anywhere; }
.history-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0 4px; }
@media (max-width: 680px) {
  .history-item summary { grid-template-columns: minmax(0, 1fr) auto; }
  .history-item time { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .history-details { padding-left: 4px; }
}
