/* ==========================================================================
   Copains — Styles principaux nettoyés
   ========================================================================== */

/* ==========================================================================
   1. Variables
   ========================================================================== */

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f8fafb;
  --border: #dde3e8;

  --text: #1f2933;
  --text-soft: #66727f;
  --text-faint: #8b96a3;

  --primary: #27364a;
  --primary-hover: #1d2939;

  --accent: #a76d3d;
  --accent-soft: #f5ebe2;

  --success: #39735a;
  --success-soft: #eaf5ef;

  --warning: #9a5c13;
  --warning-soft: #fff3df;

  --danger: #b44747;
  --danger-soft: #fff0f0;

  --radius: 14px;
  --radius-small: 9px;

  --shadow: 0 5px 18px rgba(31, 41, 51, 0.06);

  --sidebar-width: 240px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
  letter-spacing: -0.015em;
}

/* ==========================================================================
   3. Layout général
   ========================================================================== */

.app-shell {
  min-height: 100vh;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 34px 38px 50px;
  max-width: 1600px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.page-actions {
  padding-top: 8px;
}

.page-intro,
.panel-header p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   4. Sidebar
   ========================================================================== */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  background: var(--primary);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  width: 22px;
  text-align: center;
  font-size: 17px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.user-name {
  font-weight: 700;
}

.user-role {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.logout-link {
  display: inline-block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.logout-link:hover {
  color: #fff;
}

/* ==========================================================================
   5. Boutons, liens, alertes, badges
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-secondary {
  background: var(--accent);
  color: #fff;
}

.button-secondary:hover {
  filter: brightness(0.94);
}

.button-light {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-light:hover {
  background: var(--surface-muted);
}

.text-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.text-link:hover {
  text-decoration: underline;
}

.alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
}

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

.alert-success {
  border-color: #c8e3d4;
  background: var(--success-soft);
  color: #2f614b;
}

.alert-error {
  border-color: #ebc6c6;
  background: var(--danger-soft);
  color: #7f3030;
}

.alert-warning {
  border-color: #efd5af;
  background: var(--warning-soft);
  color: var(--warning);
}

.badge,
.slot-status,
.compatibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.slot-status {
  min-height: 27px;
  background: var(--surface-muted);
  color: var(--text-soft);
}

.slot-status.reserved {
  background: var(--success-soft);
  color: var(--success);
}

.compatibility-badge {
  background: var(--success-soft);
  color: var(--success);
}

.compatibility-badge.muted {
  background: var(--surface-muted);
  color: var(--text-faint);
}

/* ==========================================================================
   6. Panneaux et états vides
   ========================================================================== */

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

.panel-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.panel-header-inline,
.form-section .panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.form-section {
  margin-bottom: 20px;
}

.form-section .panel-header h2 {
  margin: 0 0 4px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 30px;
  color: var(--text-soft);
  text-align: center;
}

.empty-state.compact {
  min-height: 120px;
}

.empty-state strong {
  color: var(--text);
}

.empty-state span {
  margin-top: 4px;
  font-size: 13px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 800;
}

/* ==========================================================================
   7. Formulaires et filtres
   ========================================================================== */

.filters-bar {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.8fr)
    minmax(170px, 0.7fr)
    minmax(220px, 1fr)
    auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.filter-field,
.form-field {
  min-width: 0;
}

.filter-field label,
.form-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.filter-field input,
.filter-field select,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-field input,
.filter-field select,
.form-field input,
.form-field select {
  min-height: 42px;
  padding: 9px 11px;
}

.form-field textarea {
  min-height: 120px;
  padding: 11px 12px;
  resize: vertical;
}

.filter-field input:focus,
.filter-field select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #9ba9b8;
  box-shadow: 0 0 0 3px rgba(39, 54, 74, 0.08);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
}

.form-stack {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding: 5px 0 30px;
}

.form-footer.embedded {
  margin-top: 0;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}

.required {
  color: var(--danger);
}

/* ==========================================================================
   8. Dashboard
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: #c8d0d7;
}

.stat-card-warning {
  background: var(--warning-soft);
  border-color: #efd5af;
}

.stat-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.stat-number {
  margin: 5px 0 2px;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-note {
  color: var(--text-faint);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 20px;
  margin-bottom: 20px;
}

.action-list,
.meeting-list {
  display: flex;
  flex-direction: column;
}

.action-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 69px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.action-row:last-child,
.meeting-item:last-child {
  border-bottom: 0;
}

.action-row:hover,
.meeting-item:hover {
  background: var(--surface-muted);
}

.action-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.action-row.is-overdue .action-status {
  background: var(--danger);
}

.action-title {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-meta,
.action-date {
  color: var(--text-soft);
  font-size: 12px;
}

.action-meta {
  margin-top: 3px;
}

.action-date {
  white-space: nowrap;
}

.meeting-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.meeting-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
}

.meeting-day {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.meeting-month {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
}

.meeting-info {
  min-width: 0;
}

.meeting-info strong,
.meeting-info span {
  display: block;
}

.meeting-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meeting-info span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
}

/* ==========================================================================
   9. Tableaux
   ========================================================================== */

.table-wrap,
.availability-table-wrap {
  overflow-x: auto;
}

.data-table,
.availability-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover,
.availability-table tbody tr:hover {
  background: var(--surface-muted);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.availability-table {
  min-width: 700px;
}

.availability-table th,
.availability-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.availability-table thead th {
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.availability-table tbody th {
  min-width: 180px;
  background: var(--surface);
  text-align: left;
  font-weight: 700;
}

.availability-table input[type="checkbox"] {
  width: 21px;
  height: 21px;
  accent-color: var(--accent);
  cursor: pointer;
}

.candidate-cell strong,
.candidate-cell span {
  display: block;
}

.candidate-cell span {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
}

/* ==========================================================================
   10. Fiche candidat et workflow
   ========================================================================== */

.candidate-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  color: var(--text-soft);
}

.workflow-card {
  margin-bottom: 20px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workflow-current {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.workflow-current > div {
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--surface-muted);
}

.workflow-current strong,
.workflow-label {
  display: block;
}

.workflow-label {
  margin-bottom: 3px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workflow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.workflow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.workflow-step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.workflow-step:first-child::before {
  left: 50%;
  width: 50%;
}

.workflow-step:last-child::before {
  width: 50%;
}

.workflow-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--border);
  box-shadow: 0 0 0 1px var(--border);
}

.workflow-step.is-done,
.workflow-step.is-current {
  color: var(--text);
}

.workflow-step.is-done .workflow-dot {
  background: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.workflow-step.is-current .workflow-dot {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.candidate-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 20px;
}

.candidate-main-column,
.candidate-side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-panel {
  overflow: visible;
  padding: 10px;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
}

.prose-block {
  padding: 20px 22px;
  white-space: normal;
}

.quick-actions {
  display: flex;
  flex-direction: column;
}

.quick-actions form,
.quick-action-form {
  margin: 0;
}

.quick-action,
.quick-action-form .quick-action {
  width: 100%;
}

.quick-action {
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.quick-action:last-child {
  border-bottom: 0;
}

.quick-action:hover {
  background: var(--surface-muted);
}

.quick-action-danger {
  color: var(--danger);
}

.quick-action-danger:hover {
  background: var(--danger-soft);
}

.timeline {
  padding: 18px 18px 18px 22px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 11px;
  bottom: -4px;
  width: 1px;
  background: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-content strong,
.timeline-content span {
  display: block;
}

.timeline-content strong {
  font-size: 13px;
}

.timeline-content span {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11px;
}

/* ==========================================================================
   11. Markdown
   ========================================================================== */

.markdown-content {
  line-height: 1.65;
}

.markdown-content h2 {
  margin: 1.4em 0 0.6em;
  font-size: 1.35rem;
}

.markdown-content h3 {
  margin: 1.3em 0 0.5em;
  font-size: 1.15rem;
}

.markdown-content h4 {
  margin: 1.2em 0 0.4em;
  font-size: 1rem;
}

.markdown-content p {
  margin: 0 0 0.9em;
}

.markdown-content ul {
  margin: 0.5em 0 1em;
  padding-left: 1.5em;
}

.markdown-content li {
  margin-bottom: 0.3em;
}

.markdown-content code {
  padding: 0.15em 0.4em;
  border-radius: 4px;
  background: var(--surface-muted);
  font-family: monospace;
  font-size: 0.92em;
}

.markdown-content strong {
  font-weight: 700;
}

/* ==========================================================================
   12. Messagerie
   ========================================================================== */

.message-toolbar {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.toolbar-link {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.toolbar-link:hover,
.toolbar-link.active {
  background: var(--surface);
  color: var(--text);
}

.message-list {
  display: flex;
  flex-direction: column;
}

.message-row {
  display: grid;
  grid-template-columns: 28px 145px minmax(250px, 1fr) 115px 125px;
  gap: 14px;
  align-items: center;
  min-height: 73px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}

.message-row:last-child {
  border-bottom: 0;
}

.message-row:hover {
  background: var(--surface-muted);
}

.message-row.is-unread {
  background: #fbf7f3;
}

.message-direction {
  color: var(--accent);
  font-size: 19px;
  font-weight: 800;
}

.message-person strong,
.message-person span,
.message-summary strong,
.message-summary span {
  display: block;
}

.message-person span,
.message-summary span {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 11px;
}

.message-summary {
  min-width: 0;
}

.message-summary strong,
.message-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-status-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.message-date {
  color: var(--text-soft);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.message-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.6fr);
  gap: 20px;
}

.message-reader {
  overflow: visible;
}

.message-reader-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.message-reader-header dl {
  margin: 0;
}

.message-reader-header dl > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}

.message-reader-header dt {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-reader-header dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.message-reader-content {
  min-height: 320px;
  padding: 28px 30px;
  line-height: 1.68;
}

.message-header-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   13. Conversation
   ========================================================================== */

.conversation-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.conversation-timeline {
  padding: 24px;
}

.conversation-date-separator {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 26px 0 18px;
}

.conversation-date-separator:first-child {
  margin-top: 0;
}

.conversation-date-separator::before,
.conversation-date-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.conversation-date-separator span {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.conversation-message {
  width: min(82%, 1000px);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.message-incoming {
  margin-right: auto;
  background: var(--surface);
}

.message-outgoing {
  margin-left: auto;
  background: #f8f4ef;
  border-color: #e4d3c2;
}

.conversation-message-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px 9px;
}

.conversation-message-author {
  display: flex;
  flex-direction: column;
}

.conversation-message-author strong {
  font-size: 14px;
}

.message-direction-label {
  margin-top: 2px;
  color: black;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.conversation-message-header time {
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}

.conversation-message-subject {
  padding: 0 16px 10px;
  font-weight: 800;
}

.conversation-message-addresses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 10px;
}

.conversation-message-body {
  padding: 18px 18px 20px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.conversation-message-body p:first-child {
  margin-top: 0;
}

.conversation-message-body p:last-child {
  margin-bottom: 0;
}

.conversation-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 10px;
}

.message-tracking {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
}

.conversation-reply {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.conversation-reply:hover {
  text-decoration: underline;
}

.conversation-bottom-action {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

/* ==========================================================================
   14. Réservation candidat
   ========================================================================== */

.reservation-link {
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.reservation-link-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.reservation-link-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reservation-link-content input {
  flex: 1;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--text);
}

.reservation-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  font-size: 17px;
  cursor: pointer;
}

.reservation-copy:hover {
  background: var(--surface-muted);
}

/* ==========================================================================
   15. Créneaux / planning
   ========================================================================== */

.global-slot-form {
  display: grid;
  grid-template-columns:
    minmax(220px, 0.8fr)
    minmax(220px, 0.7fr)
    auto;
  gap: 16px;
  align-items: end;
  padding: 20px 22px;
}

.global-slot-submit {
  display: flex;
  align-items: end;
}

.global-slots-list {
  display: flex;
  flex-direction: column;
}

.global-slot-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 0.8fr)
    130px
    minmax(180px, 1fr)
    minmax(300px, 1.2fr);
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}

.global-slot-row:last-child {
  border-bottom: 0;
}

.global-slot-row:hover {
  background: var(--surface-muted);
}

.global-slot-row.is-reserved {
  background: var(--success-soft);
}

.global-slot-row.is-reserved:hover {
  background: var(--success-soft);
}

.global-slot-date,
.global-slot-candidate {
  display: flex;
  flex-direction: column;
}

.global-slot-date span,
.global-slot-candidate span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.global-slot-actions {
  display: flex;
  justify-content: flex-end;
}

.candidate-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 700;
}

.candidate-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   16. Google Meet manuel
   ========================================================================== */

.slot-meet-display,
.slot-meet-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-meet-label {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.meet-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.meet-link:hover {
  text-decoration: underline;
}

.slot-meet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-meet-form {
  display: none;
  grid-column: 1 / -1;
  padding: 12px 0 4px;
}

.slot-meet-form.is-visible {
  display: block;
}

.slot-meet-form form {
  width: 100%;
}

.meet-input-group {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 10px;
}

.meet-input-group input {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.slot-meet-error {
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   17. Page publique de réservation
   ========================================================================== */

body.public-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #eef1f4 0%, var(--bg) 100%);
}

.public-container {
  width: min(760px, calc(100% - 32px));
  margin: 48px auto;
}

.public-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 35px rgba(31, 41, 51, 0.08);
}

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

.public-brand .brand-mark {
  width: 44px;
  height: 44px;
  color: #fff;
}

.public-brand > div:last-child {
  display: flex;
  flex-direction: column;
}

.public-brand strong {
  font-size: 16px;
}

.public-brand span {
  margin-top: 1px;
  color: var(--text-soft);
  font-size: 12px;
}

.public-card h1 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.public-card p {
  color: var(--text-soft);
  line-height: 1.65;
}

.public-slot-list {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}

.public-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.public-slot:hover {
  transform: translateY(-1px);
  border-color: #c5cdd5;
  background: var(--surface-muted);
}

.public-slot input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.public-slot-check {
  position: relative;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border: 2px solid #b9c1c9;
  border-radius: 6px;
  background: #fff;
}

.public-slot-check.radio {
  border-radius: 50%;
}

.public-slot input:checked + .public-slot-check {
  border-color: var(--accent);
  background: var(--accent);
}

.public-slot input:checked + .public-slot-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.public-slot input:checked + .public-slot-check.radio::after {
  inset: 5px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 50%;
  background: #fff;
  transform: none;
}

.public-slot:has(input:checked) {
  border-color: #d6b899;
  background: var(--accent-soft);
}

.public-slot-date {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.public-slot-date strong {
  font-size: 15px;
}

.public-slot-date span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 13px;
}

.public-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.availability-empty {
  padding: 30px 22px;
  color: var(--text-soft);
  text-align: center;
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1050px) {
  .filters-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .candidate-detail-grid,
  .message-detail-grid {
    grid-template-columns: 1fr;
  }

  .message-row {
    grid-template-columns: 28px 120px minmax(200px, 1fr) 110px;
  }

  .message-date {
    display: none;
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 78px;
  }

  .sidebar {
    padding-inline: 12px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > div:last-child,
  .nav-link > :not(.nav-icon),
  .sidebar-footer .user-block > div:last-child,
  .logout-link {
    display: none;
  }

  .nav-link {
    justify-content: center;
    padding-inline: 0;
  }

  .nav-icon {
    width: auto;
  }

  .user-block {
    justify-content: center;
  }

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

@media (max-width: 850px) {
  .global-slot-form {
    grid-template-columns: 1fr 1fr;
  }

  .global-slot-submit {
    grid-column: 1 / -1;
  }

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

  .global-slot-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .conversation-timeline {
    padding: 15px;
  }

  .conversation-message {
    width: 100%;
  }

  .conversation-message-addresses {
    flex-direction: column;
  }

  .conversation-message-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: 24px 18px 40px;
  }

  .page-header,
  .panel-header-inline,
  .form-section .panel-header {
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-bar,
  .form-grid,
  .workflow-current {
    grid-template-columns: 1fr;
  }

  .filter-actions,
  .message-header-actions {
    flex-wrap: wrap;
  }

  .workflow-steps {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    padding-bottom: 5px;
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .form-footer {
    flex-direction: column-reverse;
  }

  .form-footer .button {
    width: 100%;
  }

  .message-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .message-person,
  .message-summary,
  .message-state {
    grid-column: 2;
  }

  .reservation-link-content {
    align-items: stretch;
  }

  .meet-input-group {
    grid-template-columns: 1fr;
  }

  .slot-meet-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .global-slot-form,
  .global-slot-row {
    grid-template-columns: 1fr;
  }

  .global-slot-submit {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .public-container {
    width: min(100% - 20px, 760px);
    margin: 18px auto;
  }

  .public-card {
    padding: 20px;
    border-radius: 14px;
  }

  .public-card h1 {
    font-size: 25px;
  }

  .public-slot {
    min-height: 64px;
  }
}

/* ==========================================================================
   19. Login
   ========================================================================== */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 30px 20px;
  background: linear-gradient(135deg, #eef1f4 0%, var(--bg) 55%, var(--accent-soft) 100%);
}

.login-container {
  width: min(440px, 100%);
}

.login-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(31, 41, 51, 0.1);
}

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

.login-brand .brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #fff;
}

.login-brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.login-brand-subtitle {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.login-header {
  padding: 28px 26px 8px;
}

.login-header h1 {
  margin-bottom: 8px;
  font-size: 28px;
}

.login-header p {
  margin: 0;
  color: var(--text-soft);
}

.login-card .alert {
  margin: 16px 26px 0;
}

.login-form {
  display: grid;
  gap: 18px;
  padding: 22px 26px 28px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.login-footer {
  padding: 14px 26px;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
}

/* ==========================================================================
   20. Visios — compléments d'interface
   ========================================================================== */

.visio-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 18px 0 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.visio-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.visio-summary strong {
  color: var(--text);
}

.global-slot-row.is-completed {
  background: var(--surface-muted);
}

.global-slot-status {
  display: flex;
  align-items: center;
}

.slot-status.completed {
  background: #e8edf5;
  color: var(--text);
}

.inline-form {
  margin: 0;
}

.visio-confirmation-status {
  display: flex;
  flex-direction: column;
  padding: 7px 12px;
  border-radius: 7px;
  background: var(--success-soft);
  color: var(--success);
  white-space: nowrap;
}

.visio-confirmation-status strong {
  font-size: 12px;
}

.visio-confirmation-status span {
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.8;
}

.global-slot-actions .button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.global-slot-actions .button-danger {
  border: 1px solid #e4c5c5;
  background: transparent;
  color: #9b3434;
}

.global-slot-actions .button-danger:hover {
  background: var(--danger-soft);
}

/* ==========================================================================
   21. Fiche candidat — visios et comptes rendus
   ========================================================================== */

.candidate-visios {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.candidate-visio-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.candidate-visio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.candidate-visio-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.candidate-visio-number {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.candidate-visio-status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.candidate-visio-status.is-reserved {
  background: #e8f1fa;
  color: #315f86;
}

.candidate-visio-status.is-completed {
  background: var(--success-soft);
  color: var(--success);
}

.candidate-visio-report {
  padding: 18px;
}

.candidate-visio-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.candidate-visio-report-header > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.candidate-visio-report-header small {
  color: var(--text-soft);
}

.candidate-visio-report-content {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  line-height: 1.6;
}

.candidate-visio-report-empty {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: var(--warning-soft);
}

.candidate-visio-report-empty strong {
  color: var(--warning);
}

.candidate-visio-report-empty p {
  margin: 3px 0 0;
  color: var(--text-soft);
}

.candidate-visio-report-form textarea {
  width: 100%;
  min-height: 180px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.candidate-visio-report-form textarea:focus {
  outline: none;
  border-color: #9ba9b8;
  box-shadow: 0 0 0 3px rgba(39, 54, 74, 0.08);
}

.candidate-visio-report-actions,
.candidate-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.candidate-visio-report-actions {
  justify-content: flex-end;
}

.candidate-decision-actions {
  gap: 12px;
  margin-top: 16px;
}

.candidate-decision-result {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.candidate-decision-result strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.candidate-decision-result p {
  margin: 0 0 12px;
}

.candidate-decision-result small {
  display: block;
  margin-top: 14px;
  color: var(--text-soft);
}

.candidate-decision-comment {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid #94a3b8;
  background: var(--surface);
  line-height: 1.55;
}

/* ==========================================================================
   22. Message compose
   ========================================================================== */

.message-compose-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1050px;
}

.message-compose-form .form-section {
  margin: 0;
}

.message-compose-form .form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.message-compose-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.message-compose-form .form-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.message-compose-form input[type="text"],
.message-compose-form select,
.message-compose-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.message-compose-form input[type="text"],
.message-compose-form select {
  min-height: 44px;
  padding: 9px 12px;
}

.message-compose-form textarea {
  min-height: 340px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.6;
}

.message-compose-form input[type="text"]:focus,
.message-compose-form select:focus,
.message-compose-form textarea:focus {
  outline: none;
  border-color: #9ba9b8;
  box-shadow: 0 0 0 3px rgba(39, 54, 74, 0.08);
}

.message-reservation-panel {
  max-width: 1050px;
  border: 1px solid var(--border);
  background: #fbfdff;
}

.message-reservation-panel .panel-header {
  border-bottom: 1px solid var(--border);
  background: #f6f9fc;
}

.message-reservation-panel .panel-header h2 {
  margin-bottom: 4px;
}

.reservation-compose-existing,
.reservation-compose-empty {
  padding: 18px;
}

.reservation-compose-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.reservation-compose-empty p {
  margin: 0;
  color: var(--text-soft);
}

.reservation-compose-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.reservation-compose-link input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.reservation-compose-link input:focus {
  outline: none;
  border-color: #9ba9b8;
}

.reservation-compose-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.reservation-compose-actions .inline-form {
  display: inline-flex;
}

.reservation-compose-actions .button,
.reservation-compose-link .button {
  white-space: nowrap;
}

.message-compose-form .form-help,
.message-reservation-panel .form-help {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.message-compose-form .form-help code {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef2f6;
  color: var(--text);
  font-size: 12px;
}

.message-compose-form .form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.message-compose-form .form-footer .button-primary {
  min-width: 150px;
}

.page-header .page-intro {
  margin-top: 5px;
}

/* ==========================================================================
   23. Responsive — compléments
   ========================================================================== */

@media (max-width: 760px) {
  .reservation-compose-empty {
    flex-direction: column;
    align-items: stretch;
  }

  .reservation-compose-link {
    grid-template-columns: 1fr;
  }

  .reservation-compose-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .reservation-compose-actions .button,
  .reservation-compose-actions .inline-form,
  .reservation-compose-actions .inline-form .button,
  .reservation-compose-link .button {
    width: 100%;
  }

  .message-compose-form textarea {
    min-height: 260px;
  }

  .message-compose-form .form-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .message-compose-form .form-footer .button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .login-page {
    padding: 16px;
  }

  .login-card {
    border-radius: 14px;
  }

  .login-brand,
  .login-header,
  .login-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-card .alert {
    margin-left: 20px;
    margin-right: 20px;
  }
}
/* ============================================================
   RÉSERVATION PUBLIQUE - ESPACE CANDIDAT
   À ajouter à la fin de /public/assets/css/app.css
   ============================================================ */

.reservation-public-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.reservation-public-container {
  width: min(860px, calc(100% - 32px));
  margin: 40px auto 70px;
}

.reservation-public-header {
  margin-bottom: 28px;
}

.reservation-public-brand {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.reservation-public-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
}

.reservation-public-intro {
  max-width: 680px;
  margin: 0;
  line-height: 1.6;
  color: var(--text-soft);
}

.reservation-public-section,
.reservation-contact {
  padding: 24px;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.reservation-public-section-header {
  margin-bottom: 20px;
}

.reservation-public-section-header h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.reservation-public-section-header p {
  margin: 0;
  line-height: 1.5;
  color: var(--text-soft);
}

.reservation-public-alert {
  padding: 13px 16px;
  margin-bottom: 20px;
  border-radius: 10px;
  line-height: 1.5;
}

.reservation-public-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.reservation-public-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.reservation-month + .reservation-month {
  margin-top: 26px;
}

.reservation-month-title {
  margin: 0 0 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reservation-days {
  display: grid;
  gap: 4px;
}

.reservation-day {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 52px;
  padding: 7px 8px;
  border-radius: 9px;
}

.reservation-day:nth-child(even) {
  background: var(--bg);
}

.reservation-day-label {
  font-size: 0.95rem;
  font-weight: 650;
}

.reservation-times {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.reservation-time {
  cursor: pointer;
}

.reservation-time input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reservation-time-label {
  display: flex;
  min-width: 70px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-weight: 700;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.reservation-time:hover .reservation-time-label {
  border-color: var(--primary);
}

.reservation-time.is-selected .reservation-time-label {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.reservation-time input:focus-visible + .reservation-time-label {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.reservation-selection {
  margin-top: 22px;
  padding: 13px 16px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.reservation-selection-label {
  margin-bottom: 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
}

.reservation-public-actions {
  display: flex;
  justify-content: center;
  margin-top: 17px;
}

.reservation-confirm-button {
  min-width: 230px;
}

.reservation-confirm-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.reservation-current-status {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.reservation-status-icon {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0fdf4;
  color: #166534;
  font-size: 1.15rem;
  font-weight: 800;
}

.reservation-status-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.reservation-status-subtitle {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.reservation-current-date {
  padding: 24px 0;
  text-align: center;
}

.reservation-current-day {
  margin-bottom: 5px;
  font-size: 1.05rem;
  font-weight: 700;
}

.reservation-current-time {
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.reservation-meet-box {
  padding: 16px;
  text-align: center;
  background: var(--bg);
  border-radius: 11px;
}

.reservation-meet-label {
  margin-bottom: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.reservation-meet-box p {
  margin: 0;
  color: var(--text-soft);
}

.reservation-public-empty {
  padding: 20px;
  text-align: center;
  background: var(--bg);
  border-radius: 11px;
}

.reservation-public-empty p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.reservation-contact-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.reservation-contact-form textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  resize: vertical;
}

.reservation-contact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
}

.reservation-contact-help {
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-soft);
}

@media (max-width: 680px) {
  .reservation-public-container {
    width: min(100% - 20px, 860px);
    margin-top: 20px;
  }

  .reservation-public-section,
  .reservation-contact {
    padding: 17px;
    border-radius: 13px;
  }

  .reservation-day {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 8px;
  }

  .reservation-times {
    justify-content: flex-start;
  }

  .reservation-time {
    flex: 1;
    min-width: 74px;
  }

  .reservation-time-label {
    min-width: 0;
  }

  .reservation-contact-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .reservation-contact-footer .button,
  .reservation-confirm-button {
    width: 100%;
  }
}
/* ==========================================================================
   PAGE VISIOS — REFONTE COMPLÈTE
   Ajouter à la fin de app.css.
   Ces règles sont volontairement scopées sous .visios-page.
   ========================================================================== */

.visios-page {
  --visio-green: #39735a;
  --visio-green-soft: #edf7f2;
  --visio-blue: #27364a;
  --visio-blue-soft: #eef2f6;
  --visio-gold: #a76d3d;
  --visio-gold-soft: #f7eee7;
  --visio-red: #a84444;
  --visio-red-soft: #fff2f2;
  --visio-row-border: #e4e9ee;
}

.visios-page .visios-page-header {
  margin-bottom: 20px;
}

/* ==========================================================================
   SYNTHÈSE
   ========================================================================== */

.visios-page .visio-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.visios-page .visio-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.visios-page .visio-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--text-faint);
}

.visios-page .visio-stat-card.is-available::before {
  background: #7b8794;
}

.visios-page .visio-stat-card.is-reserved::before {
  background: var(--visio-green);
}

.visios-page .visio-stat-card.is-completed::before {
  background: var(--visio-gold);
}

.visios-page .visio-stat-label,
.visios-page .visio-stat-note {
  display: block;
}

.visios-page .visio-stat-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.visios-page .visio-stat-number {
  display: block;
  margin: 5px 0 3px;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.visios-page .visio-stat-note {
  color: var(--text-faint);
  font-size: 11px;
}

/* ==========================================================================
   AJOUT RAPIDE
   ========================================================================== */

.visios-page .visio-create-panel {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  align-items: stretch;
  margin-bottom: 20px;
}

.visios-page .visio-create-header {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
  background: var(--surface-muted);
}

.visios-page .visio-create-header h2 {
  margin: 0 0 3px;
}

.visios-page .visio-create-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

.visios-page .visio-create-form {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr)
    minmax(220px, 0.8fr)
    auto;
  gap: 14px;
  align-items: end;
  padding: 17px 20px;
}

.visios-page .visio-create-submit {
  display: flex;
  align-items: end;
}

.visios-page .visio-create-submit .button {
  min-height: 42px;
  white-space: nowrap;
}

/* ==========================================================================
   PLANNING
   ========================================================================== */

.visios-page .visio-planning-panel {
  overflow: hidden;
}

.visios-page .visio-planning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.visios-page .visio-table-wrap {
  overflow-x: auto;
}

.visios-page .visio-table {
  min-width: 1050px;
}

.visios-page .visio-table-head,
.visios-page .visio-table-row {
  display: grid;
  grid-template-columns:
    145px
    105px
    minmax(145px, 0.7fr)
    minmax(280px, 1.25fr)
    minmax(340px, 1.4fr);
}

.visios-page .visio-table-head {
  min-height: 40px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.visios-page .visio-table-row {
  position: relative;
  align-items: center;
  min-height: 68px;
  padding: 0 18px;
  border-bottom: 1px solid var(--visio-row-border);
  background: var(--surface);
  transition: background 0.15s ease;
}

.visios-page .visio-table-row:last-child {
  border-bottom: 0;
}

.visios-page .visio-table-row:hover {
  background: #fbfcfd;
}

.visios-page .visio-table-row.is-reserved {
  background: var(--visio-green-soft);
}

.visios-page .visio-table-row.is-reserved:hover {
  background: #e8f4ee;
}

.visios-page .visio-table-row.is-completed {
  background: #faf8f6;
}

.visios-page .visio-cell {
  min-width: 0;
  padding: 13px 10px;
}

.visios-page .visio-cell:first-child {
  padding-left: 0;
}

.visios-page .visio-cell:last-of-type {
  padding-right: 0;
}

/* ==========================================================================
   DATE
   ========================================================================== */

.visios-page .visio-cell-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visios-page .visio-cell-date strong {
  font-size: 13px;
  font-weight: 800;
}

.visios-page .visio-cell-date span {
  color: var(--text-soft);
  font-size: 11px;
}

/* ==========================================================================
   STATUT
   ========================================================================== */

.visios-page .visio-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.visios-page .visio-status-badge.is-available {
  background: #f0f3f6;
  color: #5d6976;
}

.visios-page .visio-status-badge.is-reserved {
  background: #dcefe5;
  color: #286449;
}

.visios-page .visio-status-badge.is-completed {
  background: #f0e6dc;
  color: #86572f;
}

/* ==========================================================================
   CANDIDAT
   ========================================================================== */

.visios-page .visio-cell-candidate {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.visios-page .visio-candidate-link {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visios-page .visio-candidate-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.visios-page .visio-candidate-meta,
.visios-page .visio-muted {
  color: var(--text-faint);
  font-size: 11px;
}

/* ==========================================================================
   GOOGLE MEET
   ========================================================================== */

.visios-page .visio-cell-meet {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.visios-page .visio-meet-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.visios-page .visio-meet-link {
  display: block;
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  color: var(--primary);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visios-page .visio-meet-link:hover {
  text-decoration: underline;
}

.visios-page .visio-meet-actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}

.visios-page .visio-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.visios-page .visio-mini-button:hover {
  border-color: #c5ced6;
  background: var(--surface-muted);
  color: var(--text);
}

.visios-page .visio-add-meet-button {
  width: fit-content;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px dashed #bdc8d1;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.visios-page .visio-add-meet-button:hover {
  background: #fff;
}

.visios-page .visio-confirmation-chip {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(57, 115, 90, 0.09);
  color: var(--visio-green);
  font-size: 10px;
}

.visios-page .visio-confirmation-chip strong {
  font-weight: 800;
}

.visios-page .visio-confirmation-chip span {
  opacity: 0.8;
}

/* ==========================================================================
   ACTIONS
   ========================================================================== */

.visios-page .visio-cell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.visios-page .inline-form {
  margin: 0;
}

.visios-page .visio-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.visios-page .visio-action-button.is-primary {
  background: var(--visio-blue);
  color: #fff;
}

.visios-page .visio-action-button.is-primary:hover {
  background: var(--primary-hover);
}

.visios-page .visio-action-button.is-complete {
  background: var(--visio-gold);
  color: #fff;
}

.visios-page .visio-action-button.is-complete:hover {
  filter: brightness(0.94);
}

.visios-page .visio-action-button.is-light {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.visios-page .visio-action-button.is-light:hover {
  background: var(--surface-muted);
}

.visios-page .visio-action-button.is-danger-light {
  border-color: #ebd0d0;
  background: transparent;
  color: var(--visio-red);
}

.visios-page .visio-action-button.is-danger-light:hover {
  background: var(--visio-red-soft);
}

/* ==========================================================================
   ÉDITION GOOGLE MEET
   ========================================================================== */

.visios-page .visio-meet-edit {
  display: none;
  grid-column: 1 / -1;
  margin: 0 -18px;
  padding: 14px 18px;
  border-top: 1px solid #d6e6de;
  background: rgba(255, 255, 255, 0.72);
}

.visios-page .visio-meet-edit.is-visible {
  display: block;
}

.visios-page .visio-meet-edit-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.visios-page .visio-meet-edit-field label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.visios-page .visio-meet-edit-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.visios-page .visio-meet-edit-field input:focus {
  border-color: #9ba9b8;
  box-shadow: 0 0 0 3px rgba(39, 54, 74, 0.08);
}

.visios-page .visio-meet-edit-actions {
  display: flex;
  gap: 7px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .visios-page .visio-create-panel {
    grid-template-columns: 1fr;
  }

  .visios-page .visio-create-header {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  .visios-page .visio-dashboard {
    grid-template-columns: 1fr;
  }

  .visios-page .visio-stat-card {
    min-height: 88px;
  }

  .visios-page .visio-create-form {
    grid-template-columns: 1fr;
  }

  .visios-page .visio-table {
    min-width: 0;
  }

  .visios-page .visio-table-head {
    display: none;
  }

  .visios-page .visio-table-row {
    display: block;
    min-height: 0;
    padding: 13px 16px;
  }

  .visios-page .visio-cell {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 7px 0;
  }

  .visios-page .visio-cell::before {
    content: attr(data-label);
    color: var(--text-faint);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .visios-page .visio-cell-date,
  .visios-page .visio-cell-candidate,
  .visios-page .visio-cell-meet {
    display: grid;
  }

  .visios-page .visio-cell-date > *,
  .visios-page .visio-cell-candidate > *,
  .visios-page .visio-cell-meet > * {
    grid-column: 2;
  }

  .visios-page .visio-cell-date::before,
  .visios-page .visio-cell-candidate::before,
  .visios-page .visio-cell-meet::before {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .visios-page .visio-cell-actions {
    justify-content: flex-start;
  }

  .visios-page .visio-cell-actions::before {
    align-self: center;
  }

  .visios-page .visio-meet-main {
    flex-wrap: wrap;
  }

  .visios-page .visio-meet-link {
    max-width: 100%;
  }

  .visios-page .visio-meet-edit {
    margin: 8px 0 0;
    padding: 12px 0 0;
  }

  .visios-page .visio-meet-edit-inner {
    grid-template-columns: 1fr;
  }

  .visios-page .visio-meet-edit-actions {
    flex-wrap: wrap;
  }
}
/* ==========================================================================
   TABLEAU DE BORD — REFONTE
   Ajouter à la fin de app.css
   ========================================================================== */

.dashboard-page {
  --dash-red: #a84444;
  --dash-red-soft: #fff2f2;
  --dash-green: #39735a;
  --dash-green-soft: #edf7f2;
  --dash-blue: #27364a;
  --dash-blue-soft: #eef2f6;
  --dash-gold: #a76d3d;
  --dash-gold-soft: #f7eee7;
}

.dashboard-page .dashboard-page-header {
  margin-bottom: 20px;
}

/* ==========================================================================
   KPI PRINCIPAUX
   ========================================================================== */

.dashboard-page .dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dashboard-page .dashboard-kpi {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.dashboard-page .dashboard-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(22, 30, 38, 0.08);
}

.dashboard-page .dashboard-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #77828d;
}

.dashboard-page .dashboard-kpi.is-alert::before {
  background: var(--dash-red);
}

.dashboard-page .dashboard-kpi.is-message::before {
  background: var(--dash-blue);
}

.dashboard-page .dashboard-kpi.is-visio::before {
  background: var(--dash-green);
}

.dashboard-page .dashboard-kpi-label,
.dashboard-page .dashboard-kpi-note {
  display: block;
}

.dashboard-page .dashboard-kpi-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-page .dashboard-kpi strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-page .dashboard-kpi-note {
  color: var(--text-faint);
  font-size: 11px;
}

/* ==========================================================================
   ZONE PRINCIPALE
   ========================================================================== */

.dashboard-page .dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

/* ==========================================================================
   ACTIONS
   ========================================================================== */

.dashboard-page .dashboard-task-list {
  border-top: 1px solid var(--border);
}

.dashboard-page .dashboard-task {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.dashboard-page .dashboard-task:last-child {
  border-bottom: 0;
}

.dashboard-page .dashboard-task:hover {
  background: var(--surface-muted);
}

.dashboard-page .dashboard-task-marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa3ad;
}

.dashboard-page .dashboard-task.is-today .dashboard-task-marker {
  background: var(--dash-gold);
}

.dashboard-page .dashboard-task.is-overdue {
  background: var(--dash-red-soft);
}

.dashboard-page .dashboard-task.is-overdue .dashboard-task-marker {
  background: var(--dash-red);
}

.dashboard-page .dashboard-task-main {
  min-width: 0;
}

.dashboard-page .dashboard-task-main strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .dashboard-task-main span {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 10px;
}

.dashboard-page .dashboard-task-date {
  text-align: right;
}

.dashboard-page .dashboard-task-date strong {
  display: block;
  margin-top: 2px;
  color: var(--dash-red);
  font-size: 11px;
}

.dashboard-page .dashboard-date-label {
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-page .dashboard-date-label.is-overdue {
  color: var(--dash-red);
}

.dashboard-page .dashboard-date-label.is-today {
  color: var(--dash-gold);
}

/* ==========================================================================
   PROCHAINES VISIOS
   ========================================================================== */

.dashboard-page .dashboard-meeting-list {
  border-top: 1px solid var(--border);
}

.dashboard-page .dashboard-meeting {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.dashboard-page .dashboard-meeting:last-child {
  border-bottom: 0;
}

.dashboard-page .dashboard-meeting:hover {
  background: var(--surface-muted);
}

.dashboard-page .dashboard-meeting-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.dashboard-page .dashboard-meeting-date strong {
  font-size: 17px;
  line-height: 1;
}

.dashboard-page .dashboard-meeting-date span {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 8px;
  font-weight: 800;
}

.dashboard-page .dashboard-meeting-main {
  min-width: 0;
}

.dashboard-page .dashboard-meeting-main strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-page .dashboard-meeting-main span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
}

.dashboard-page .dashboard-meeting-status span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-page .dashboard-meeting-status .is-ready {
  background: var(--dash-green-soft);
  color: var(--dash-green);
}

.dashboard-page .dashboard-meeting-status .is-missing {
  background: var(--dash-gold-soft);
  color: var(--dash-gold);
}

/* ==========================================================================
   WORKFLOW
   ========================================================================== */

.dashboard-page .dashboard-workflow-panel {
  margin-bottom: 20px;
}

.dashboard-page .dashboard-workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.dashboard-page .dashboard-workflow-item {
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  text-decoration: none;
}

.dashboard-page .dashboard-workflow-item:last-child {
  border-right: 0;
}

.dashboard-page .dashboard-workflow-item:hover {
  background: var(--surface-muted);
}

.dashboard-page .dashboard-workflow-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1;
}

.dashboard-page .dashboard-workflow-item span {
  display: block;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 750;
}

.dashboard-page .dashboard-workflow-item.is-warning strong {
  color: var(--dash-gold);
}

/* ==========================================================================
   CANDIDATURES
   ========================================================================== */

.dashboard-page .dashboard-candidates-panel {
  margin-bottom: 28px;
}

.dashboard-page .dashboard-candidates-table tbody tr {
  cursor: pointer;
}

.dashboard-page .dashboard-candidates-table tbody tr:hover {
  background: var(--surface-muted);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .dashboard-page .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-page .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .dashboard-workflow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-page .dashboard-workflow-item:nth-child(3) {
    border-right: 0;
  }

  .dashboard-page .dashboard-workflow-item:nth-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 680px) {
  .dashboard-page .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-page .dashboard-kpi {
    min-height: 100px;
  }

  .dashboard-page .dashboard-workflow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-page .dashboard-workflow-item:nth-child(3) {
    border-right: 1px solid var(--border);
  }

  .dashboard-page .dashboard-workflow-item:nth-child(even) {
    border-right: 0;
  }

  .dashboard-page .dashboard-workflow-item:nth-child(-n + 4) {
    border-bottom: 1px solid var(--border);
  }

  .dashboard-page .dashboard-task {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .dashboard-page .dashboard-task-date {
    grid-column: 2;
    text-align: left;
  }

  .dashboard-page .dashboard-meeting {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dashboard-page .dashboard-meeting-status {
    grid-column: 2;
  }
}
/* ============================================================
   LISTE DES CANDIDATS
   ============================================================ */

.candidates-page .candidates-list-panel {
  overflow: hidden;
}

/* compteur */

.candidates-page .candidates-list-meta {
  display: flex;
  align-items: baseline;
  gap: 5px;

  padding: 11px 16px;

  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  background: var(--surface-muted);

  color: var(--text-soft);

  font-size: 11px;
}

.candidates-page .candidates-list-meta strong {
  color: var(--text);
  font-size: 14px;
}

/* ------------------------------------------------------------
   TABLEAU
   ------------------------------------------------------------ */

.candidates-page .candidates-table {
  width: 100%;
}

.candidates-page .candidates-table th {
  white-space: nowrap;
}

.candidates-page .candidates-table tbody tr {
  cursor: pointer;
}

.candidates-page .candidates-table tbody tr:hover {
  background: var(--surface-muted);
}

/* ------------------------------------------------------------
   COLONNES TRIABLES
   ------------------------------------------------------------ */

.candidates-page .sortable-column {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  color: inherit;
  text-decoration: none;
}

.candidates-page .sortable-column:hover {
  color: var(--primary);
}

.candidates-page .sortable-column.is-active {
  color: var(--text);
  font-weight: 800;
}

.candidates-page .sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 12px;

  color: var(--text-faint);

  font-size: 10px;
  font-weight: 700;
}

.candidates-page .sort-indicator.is-active {
  color: var(--primary);
}

/* ------------------------------------------------------------
   NUMÉRO
   ------------------------------------------------------------ */

.candidates-page .candidate-number-column {
  width: 55px;
}

.candidates-page .candidate-number {
  color: var(--text-soft);

  font-size: 11px;
  font-weight: 750;
}

/* ------------------------------------------------------------
   CANDIDAT / CONTACT
   ------------------------------------------------------------ */

.candidates-page .candidate-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;

  min-width: 0;
}

.candidates-page .candidate-cell strong {
  overflow: hidden;

  font-size: 12px;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidates-page .candidate-cell span {
  color: var(--text-faint);

  font-size: 10px;
}

.candidates-page .candidate-contact strong {
  max-width: 240px;

  font-weight: 600;
}

/* ------------------------------------------------------------
   DATES
   ------------------------------------------------------------ */

.candidates-page .candidate-date {
  display: flex;
  flex-direction: column;
  gap: 1px;

  white-space: nowrap;
}

.candidates-page .candidate-date strong {
  font-size: 11px;
  font-weight: 700;
}

.candidates-page .candidate-date span {
  color: var(--text-faint);

  font-size: 9px;
}

/* ------------------------------------------------------------
   ÉTAT
   ------------------------------------------------------------ */

.candidates-page .candidate-state {
  font-size: 11px;
  color: var(--text-soft);
}

.candidates-page .table-muted {
  color: var(--text-faint);
}

/* ------------------------------------------------------------
   FILTRES
   ------------------------------------------------------------ */

.candidates-page .filters-bar {
  margin-bottom: 0;
}
.candidate-comments-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.candidate-comments-empty {
  padding: 18px;
  border: 1px dashed #ccc;
  border-radius: 8px;
  color: #666;
}

.candidate-comment {
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

.candidate-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.candidate-comment-date {
  margin-left: 8px;
  font-size: 0.85rem;
  color: #777;
}

.candidate-comment-content {
  line-height: 1.5;
  white-space: normal;
}

.candidate-comment-form {
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.candidate-comment-form textarea {
  width: 100%;
  resize: vertical;
  margin-top: 8px;
}

.candidate-comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.candidate-comment-delete-form {
  margin: 0;
}
.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(70px, 10vw, 150px);
  max-width: 100%;
  object-fit: contain;
}
/* ==========================================================================
   Header mobile / menu hamburger
   ========================================================================== */

.mobile-header {
  display: none;
}

/* ==========================================================================
   Desktop
   ========================================================================== */

.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 14px;
}

.brand a {
  display: block;
  max-width: 100%;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  /*
    |--------------------------------------------------------------------------
    | Structure
    |--------------------------------------------------------------------------
    */

  .app-shell {
    display: block;
    min-height: 100vh;
  }

  /*
    |--------------------------------------------------------------------------
    | Header
    |--------------------------------------------------------------------------
    */

  .mobile-header {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1100;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 90px;

    padding: 8px 64px 8px 16px;

    background: #27364a;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    max-width: 100%;
  }

  .mobile-brand-logo {
    display: block;

    width: auto;
    max-width: min(70vw, 250px);
    height: 74px;

    object-fit: contain;
  }

  /*
    |--------------------------------------------------------------------------
    | Hamburger
    |--------------------------------------------------------------------------
    */

  .mobile-menu-toggle {
    position: absolute;

    top: 50%;
    right: 16px;

    width: 44px;
    height: 44px;

    padding: 9px;

    border: 0;
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.08);

    cursor: pointer;

    transform: translateY(-50%);
  }

  .mobile-menu-toggle span {
    display: block;

    width: 100%;
    height: 3px;

    margin: 5px 0;

    border-radius: 10px;

    background: #ffffff;

    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  /*
     * Transformation du hamburger en croix
     */

  .mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /*
    |--------------------------------------------------------------------------
    | Sidebar mobile
    |--------------------------------------------------------------------------
    */

  .sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    z-index: 1200;

    width: min(82vw, 320px);
    height: 100vh;

    overflow-y: auto;

    transform: translateX(-105%);

    transition: transform 0.25s ease;

    box-shadow: 8px 0 25px rgba(0, 0, 0, 0.18);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  /*
    |--------------------------------------------------------------------------
    | Logo dans le menu
    |--------------------------------------------------------------------------
    */

  .sidebar .brand {
    padding: 20px 18px;
  }

  .sidebar .brand-logo {
    width: 100%;
    max-width: 210px;
    height: auto;
    margin: 0 auto;
  }

  /*
    |--------------------------------------------------------------------------
    | Navigation
    |--------------------------------------------------------------------------
    */

  .main-nav {
    display: flex;
    flex-direction: column;

    width: 100%;
  }

  .nav-link {
    width: 100%;
  }

  /*
    |--------------------------------------------------------------------------
    | Overlay
    |--------------------------------------------------------------------------
    */

  .mobile-menu-overlay {
    display: none;

    position: fixed;

    inset: 0;

    z-index: 1150;

    background: rgba(0, 0, 0, 0.45);
  }

  .mobile-menu-overlay.is-open {
    display: block;
  }

  /*
    |--------------------------------------------------------------------------
    | Contenu
    |--------------------------------------------------------------------------
    */

  .main-content {
    width: 100%;
    max-width: 100%;

    margin-left: 0;

    overflow-x: hidden;
  }
}
/* ==========================================================================
   États des candidats
   ========================================================================== */

.candidate-state {
  display: inline-flex;
  align-items: center;

  padding: 5px 10px;

  border-radius: 999px;

  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;

  white-space: nowrap;
}

/* À examiner */

.candidate-state.state-blue {
  color: #1e40af;
  background: #dbeafe;
}

/* À planifier */

.candidate-state.state-cyan {
  color: #075985;
  background: #e0f2fe;
}

/* Attente réservation */

.candidate-state.state-yellow {
  color: #854d0e;
  background: #fef3c7;
}

/* Attente réponse */

.candidate-state.state-orange {
  color: #9a3412;
  background: #ffedd5;
}

/* Relance nécessaire */

.candidate-state.state-orange-dark {
  color: #7c2d12;
  background: #fed7aa;
}

/* Action interne */

.candidate-state.state-purple {
  color: #6b21a8;
  background: #f3e8ff;
}

/* Visio réservée */

.candidate-state.state-teal {
  color: #115e59;
  background: #ccfbf1;
}

/* Décision à prendre */

.candidate-state.state-red {
  color: #991b1b;
  background: #fee2e2;
}

/* Accepté / intégré */

.candidate-state.state-green {
  color: #166534;
  background: #dcfce7;
}

/* Parcours terminé */

.candidate-state.state-gray {
  color: #475569;
  background: #e2e8f0;
}
@media (max-width: 768px) {
  .sidebar .main-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 48px;

    padding: 12px 18px;

    font-size: 16px;
    line-height: 1.3;

    white-space: nowrap;
    overflow: visible;

    color: #ffffff;
    text-decoration: none;
  }

  .sidebar .nav-link span:not(.nav-icon) {
    display: inline;
    visibility: visible;
    opacity: 1;

    width: auto;
    height: auto;

    font-size: 16px;
    color: inherit;
  }

  .sidebar .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 26px;

    width: 26px;

    font-size: 20px;
  }

  .sidebar .main-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .sidebar .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    box-sizing: border-box;

    padding: 14px 20px;

    text-align: left;
  }

  .sidebar .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 28px;
    width: 28px;

    margin-right: 12px;
  }
}
.relative-date {
  color: #64748b;
  font-size: 0.85rem;
  white-space: nowrap;
}
/* ==========================================================================
   Suivi des messages / Brevo
   ========================================================================== */

.message-tracking {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;

  margin-top: 8px;
}

.mail-status {
  display: inline-flex;
  align-items: center;

  padding: 4px 8px;

  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;

  white-space: nowrap;
}

.mail-status-sent {
  color: #475569;
  background: #e2e8f0;
}

.mail-status-delivered {
  color: #1e40af;
  background: #dbeafe;
}

.mail-status-opened {
  color: #166534;
  background: #dcfce7;
}

.mail-status-clicked {
  color: #6b21a8;
  background: #f3e8ff;
}

.mail-status-received {
  color: #075985;
  background: #e0f2fe;
}

.mail-status-error {
  color: #991b1b;
  background: #fee2e2;
}
.message-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 5px 9px;

  border-radius: 999px;

  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;

  white-space: nowrap;
}

.message-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.message-status-detail {
  font-size: 0.72rem;
  color: #64748b;
  white-space: nowrap;
}

/* Reçu */

.message-status-badge.status-received {
  color: #075985;
  background: #e0f2fe;
}

/* Envoyé */

.message-status-badge.status-sent {
  color: #475569;
  background: #e2e8f0;
}

/* Délivré */

.message-status-badge.status-delivered {
  color: #1e40af;
  background: #dbeafe;
}

/* Ouvert */

.message-status-badge.status-opened {
  color: #166534;
  background: #dcfce7;
}

/* Cliqué */

.message-status-badge.status-clicked {
  color: #6b21a8;
  background: #f3e8ff;
}

/* Différé / soft bounce */

.message-status-badge.status-warning {
  color: #9a3412;
  background: #ffedd5;
}

/* Erreur */

.message-status-badge.status-error {
  color: #991b1b;
  background: #fee2e2;
}

/* Désinscrit */

.message-status-badge.status-disabled {
  color: #475569;
  background: #f1f5f9;
}

/* Statut inconnu */

.message-status-badge.status-default {
  color: #475569;
  background: #e2e8f0;
}
.attachments-selected {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.attachment-selected {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
}
.conversation-attachments {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.conversation-attachments-title {
  margin-bottom: 7px;

  color: #64748b;

  font-size: 0.75rem;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.conversation-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.conversation-attachment {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 9px 11px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  background: #f8fafc;

  color: inherit;
  text-decoration: none;
}

.conversation-attachment:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.conversation-attachment-icon {
  flex: 0 0 auto;
  font-size: 1.15rem;
}

.conversation-attachment-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.conversation-attachment-info strong {
  overflow: hidden;

  font-size: 0.85rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-attachment-info span {
  margin-top: 2px;

  color: #64748b;
  font-size: 0.72rem;
}
.message-list-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.message-list-attachment {
  display: inline-flex;
  align-items: center;
  max-width: 260px;
  padding: 3px 7px;

  border-radius: 6px;

  background: #f1f5f9;

  color: #475569;

  font-size: 0.72rem;
  font-weight: 600;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-task {
  display: flex;
  align-items: stretch;
}

.dashboard-task-link {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dashboard-task-delete-form {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 10px;
}

.dashboard-task-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: #94a3b8;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.dashboard-task-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-task-delete svg {
  display: block;
}
/* =========================================================
   DASHBOARD - SUPPRESSION DES ACTIONS
   ========================================================= */

.dashboard-task-wrapper {
  position: relative;
}

.dashboard-task-wrapper .dashboard-task {
  padding-right: 64px;
}

.dashboard-task-delete-form {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);

  margin: 0;
  padding: 0;

  z-index: 5;
}

.dashboard-task-delete {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: #94a3b8;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.dashboard-task-delete:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.dashboard-task-delete:focus-visible {
  outline: 2px solid #b91c1c;
  outline-offset: 2px;
}

.dashboard-task-delete svg {
  display: block;
}
/* =========================================================
   RÈGLES DU MOT DE PASSE
   ========================================================= */

.password-rules {
  margin-bottom: 22px;
  padding: 14px 16px;

  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;

  font-size: 14px;
  line-height: 1.5;
}

.password-rules > strong {
  display: block;
  margin-bottom: 6px;
}

.password-rules ul {
  margin: 0;
  padding-left: 20px;
}

.password-rules li {
  margin: 3px 0;
}

.password-rules li strong {
  display: inline;
}

/* Afficher les mots de passe */

.password-show {
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 4px 0 20px;

  font-size: 14px;
  cursor: pointer;
}

.password-show input {
  width: auto;
  margin: 0;
}
/* ==========================================================
   LISTE DES MESSAGES
   ========================================================== */

.message-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ==========================================================
   LIGNE
   ========================================================== */

.message-row {
  display: grid;

  grid-template-columns:
    105px
    150px
    minmax(300px, 1fr)
    120px
    145px;

  align-items: center;

  min-height: 78px;

  padding: 12px 16px;

  text-decoration: none;
  color: inherit;

  border-bottom: 1px solid #e6e9ed;
  border-left: 4px solid transparent;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* ==========================================================
   REÇUS
   ========================================================== */

.message-row-in {
  background: #fbfdfc;
  border-left-color: #38a169;
}

.message-row-in:hover {
  background: #f1f8f4;
}

/* ==========================================================
   ENVOYÉS
   ========================================================== */

.message-row-out {
  background: #ffffff;
  border-left-color: #6b8fb3;
}

.message-row-out:hover {
  background: #f5f8fb;
}

/* ==========================================================
   MESSAGE NON LU
   ========================================================== */

.message-row-in.is-unread {
  background: #edf7f1;
  border-left-color: #238653;
}

.message-row-in.is-unread .message-person strong,
.message-row-in.is-unread .message-summary > strong {
  font-weight: 700;
}

/* ==========================================================
   DIRECTION
   ========================================================== */

.message-direction {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.message-direction-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.message-direction-badge {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;

  width: auto;
  min-width: 0;

  padding: 4px 7px;
  border-radius: 6px;

  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.message-direction-main {
  display: flex;
  align-items: center;
  gap: 5px;
}

.message-channel-inline {
  display: block;
  margin-top: 2px;
  padding: 5px;
  border: 1px solid silver;
  color: black;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;

  opacity: 0.7;
}

/* Reçu */

.message-direction-badge.direction-in {
  background: rgb(74, 235, 53);
  color: white;
}

/* Envoyé */

.message-direction-badge.direction-out {
  background: #fee685;
  color: #526f8b;
}

.message-direction-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.message-direction-label {
  line-height: 1;
}

/* ==========================================================
   CANDIDAT
   ========================================================== */

.message-person {
  min-width: 0;
  padding-right: 16px;
}

.message-person strong {
  display: block;

  font-size: 0.95rem;
  font-weight: 650;

  color: #20262d;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-person span {
  display: block;

  margin-top: 3px;

  font-size: 0.75rem;
  color: #8a929a;
}

/* ==========================================================
   RÉSUMÉ DU MESSAGE
   ========================================================== */

.message-summary {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;

  padding-right: 20px;
}

.message-summary > strong {
  display: block;

  font-size: 0.94rem;
  font-weight: 650;

  line-height: 1.3;

  color: #20262d;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-summary > span {
  display: block;

  font-size: 0.79rem;
  line-height: 1.35;

  color: #858d95;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================
   PIÈCES JOINTES
   ========================================================== */

.message-list-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  margin-top: 5px;
}

.message-list-attachment {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  max-width: 220px;

  padding: 3px 7px;

  border: 1px solid #dfe3e7;
  border-radius: 5px;

  background: #f7f8f9;

  color: #6d757d;

  font-size: 0.72rem;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-attachment-icon {
  flex: 0 0 auto;
}

/* ==========================================================
   STATUT
   ========================================================== */

.message-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  gap: 4px;
}

.message-status-badge {
  display: inline-flex;
  align-items: center;

  padding: 4px 9px;

  border-radius: 999px;

  font-size: 0.7rem;
  font-weight: 700;

  letter-spacing: 0.025em;

  white-space: nowrap;
}

/* Reçu */

.message-status-badge.status-received {
  background: #e4f4eb;
  color: #24704a;
}

/* Non lu */

.message-status-badge.status-unread {
  background: #24704a;
  color: #ffffff;
}

/* Envoyé */

.message-status-badge.status-sent {
  background: #edf1f5;
  color: #55616c;
}

/* Délivré */

.message-status-badge.status-delivered {
  background: #e9eef9;
  color: #526a9a;
}

/* Ouvert */

.message-status-badge.status-opened {
  background: #edf6df;
  color: #58772f;
}

/* Cliqué */

.message-status-badge.status-clicked {
  background: #e5f0fb;
  color: #356a9a;
}

/* Warning */

.message-status-badge.status-warning {
  background: #fff3d7;
  color: #86631c;
}

/* Erreur */

.message-status-badge.status-error {
  background: #fde8e8;
  color: #a43b3b;
}

/* Désinscrit */

.message-status-badge.status-disabled {
  background: #eeeeee;
  color: #777777;
}

.message-status-detail {
  font-size: 0.7rem;
  color: #8a9299;
}

/* ==========================================================
   DATE
   ========================================================== */

.message-date {
  text-align: right;

  font-size: 0.73rem;
  color: #8a9299;

  white-space: nowrap;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1000px) {
  .message-row {
    grid-template-columns:
      95px
      125px
      minmax(220px, 1fr)
      100px
      120px;

    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 760px) {
  .message-row {
    grid-template-columns:
      auto
      1fr
      auto;

    gap: 8px 12px;

    padding: 12px;

    min-height: auto;
  }

  .message-direction {
    grid-column: 1;
    grid-row: 1;
  }

  .message-person {
    grid-column: 2;
    grid-row: 1;
  }

  .message-state {
    grid-column: 3;
    grid-row: 1;

    align-items: flex-end;
  }

  .message-summary {
    grid-column: 1 / 4;
    grid-row: 2;

    padding-right: 0;
  }

  .message-date {
    grid-column: 1 / 4;
    grid-row: 3;

    text-align: right;
  }
}
.candidate-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-size: 0.88rem;
  color: #4b5563;
}

.candidate-location-icon {
  font-size: 0.85rem;
  color: #8b949e;
}
/* ==========================================================
   LISTE CANDIDATS — MOBILE
   Transformation du tableau en cartes
   ========================================================== */

@media (max-width: 760px) {
  /*
    |--------------------------------------------------------------------------
    | Conteneurs
    |--------------------------------------------------------------------------
    */

  .candidates-list-panel {
    padding: 14px;
  }

  .candidates-list-panel .table-wrap {
    width: 100%;
    overflow: visible;
  }

  .candidates-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .candidates-table thead {
    display: none;
  }

  .candidates-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
  }

  /*
    |--------------------------------------------------------------------------
    | Une ligne = une carte
    |--------------------------------------------------------------------------
    */

  .candidates-table tr {
    display: grid;

    grid-template-columns:
      48px
      minmax(0, 1fr);

    width: 100%;

    padding: 14px;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #e4e7ea;
    border-radius: 10px;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);

    cursor: pointer;
  }

  /*
    |--------------------------------------------------------------------------
    | Cellules
    |--------------------------------------------------------------------------
    */

  .candidates-table td {
    display: block;

    width: auto;
    min-width: 0;

    padding: 0;

    border: 0;

    white-space: normal;
  }

  /*
    |--------------------------------------------------------------------------
    | N°
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    padding-top: 2px;

    font-size: 0.78rem;
    font-weight: 700;

    color: #8a9299;
  }

  .candidates-table td:nth-child(1)::before {
    content: "#";
  }

  /*
    |--------------------------------------------------------------------------
    | Candidat
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(2) {
    grid-column: 2;

    margin-bottom: 4px;
  }

  .candidates-table td:nth-child(2) .candidate-cell strong {
    font-size: 1rem;
    font-weight: 700;

    color: #252b31;
  }

  .candidates-table td:nth-child(2) .candidate-cell span {
    margin-top: 2px;

    font-size: 0.8rem;
    color: #7d858d;
  }

  /*
    |--------------------------------------------------------------------------
    | Contact
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(3) {
    grid-column: 2;

    margin-top: 3px;
  }

  .candidates-table td:nth-child(3) strong {
    font-size: 0.78rem;
    font-weight: 400;

    color: #68727b;

    overflow-wrap: anywhere;
  }

  /*
    |--------------------------------------------------------------------------
    | Localisation
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(4) {
    grid-column: 2;

    margin-top: 6px;
  }

  .candidate-location {
    font-size: 0.8rem;

    white-space: normal;
  }

  /*
    |--------------------------------------------------------------------------
    | Séparation avant le workflow
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(5) {
    grid-column: 1 / -1;

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid #edf0f2;
  }

  /*
    |--------------------------------------------------------------------------
    | Questionnaire
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(5)::before {
    content: "Questionnaire";

    display: block;

    margin-bottom: 3px;

    font-size: 0.68rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #9aa1a8;
  }

  .candidate-date {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .candidate-date strong {
    font-size: 0.8rem;
  }

  .candidate-date span {
    font-size: 0.72rem;
    color: #90979d;
  }

  /*
    |--------------------------------------------------------------------------
    | Phase
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(6) {
    grid-column: 1 / -1;

    margin-top: 10px;
  }

  .candidates-table td:nth-child(6)::before {
    content: "Phase";

    display: block;

    margin-bottom: 5px;

    font-size: 0.68rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #9aa1a8;
  }

  /*
    |--------------------------------------------------------------------------
    | État
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(7) {
    grid-column: 1 / -1;

    margin-top: 9px;
  }

  .candidates-table td:nth-child(7)::before {
    content: "État";

    display: block;

    margin-bottom: 5px;

    font-size: 0.68rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #9aa1a8;
  }

  /*
    |--------------------------------------------------------------------------
    | Responsable
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(8) {
    grid-column: 1;

    margin-top: 13px;

    font-size: 0.8rem;
    color: #555f67;
  }

  .candidates-table td:nth-child(8)::before {
    content: "Responsable";

    display: block;

    margin-bottom: 3px;

    font-size: 0.66rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #9aa1a8;
  }

  /*
    |--------------------------------------------------------------------------
    | Mise à jour
    |--------------------------------------------------------------------------
    */

  .candidates-table td:nth-child(9) {
    grid-column: 2;

    margin-top: 13px;

    text-align: right;
  }

  .candidates-table td:nth-child(9)::before {
    content: "Mise à jour";

    display: block;

    margin-bottom: 3px;

    font-size: 0.66rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    color: #9aa1a8;
  }

  .candidates-table td:nth-child(9) .candidate-date {
    justify-content: flex-end;
  }

  /*
    |--------------------------------------------------------------------------
    | Badges
    |--------------------------------------------------------------------------
    */

  .candidates-table .badge,
  .candidates-table .candidate-state {
    display: inline-block;

    max-width: 100%;

    white-space: normal;

    line-height: 1.25;
  }

  /*
    |--------------------------------------------------------------------------
    | Compteur
    |--------------------------------------------------------------------------
    */

  .candidates-list-meta {
    margin-bottom: 12px;
  }

  /*
    |--------------------------------------------------------------------------
    | Barre de filtres
    |--------------------------------------------------------------------------
    */

  .candidates-page .filters-bar {
    display: flex;
    flex-direction: column;

    gap: 12px;
  }

  .candidates-page .filter-field,
  .candidates-page .filter-search {
    width: 100%;
  }

  .candidates-page .filter-field input,
  .candidates-page .filter-field select {
    width: 100%;
    box-sizing: border-box;
  }

  .candidates-page .filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;

    width: 100%;
  }

  .candidates-page .filter-actions .button {
    width: 100%;
    box-sizing: border-box;

    text-align: center;
  }
}
.prospect-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.prospect-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
}

.prospect-card h2 {
  margin: 0 0 20px;
  font-size: 1.15rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.question {
  margin-bottom: 20px;
}

.question:last-child {
  margin-bottom: 0;
}

.question-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
}

.question-answer {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #111827;
  white-space: normal;
}

@media (max-width: 800px) {
  .prospect-sections {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   APPRÉCIATION DES CANDIDATS
   ========================================================= */

.candidate-appreciation {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;

  padding: 0.32rem 0.55rem;

  border-radius: 999px;

  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;

  white-space: nowrap;
}

/* Très favorable */

.candidate-appreciation.is-very-favorable {
  background: #e7f7ed;
  color: #18733a;
}

/* Favorable */

.candidate-appreciation.is-favorable {
  background: #eef8f0;
  color: #2e6f3e;
}

/* Réserve */

.candidate-appreciation.is-reserve {
  background: #fff4df;
  color: #9a5b00;
}

/* Sans suite */

.candidate-appreciation.is-maybe {
  background: #fdeaea;
  color: #a22727;
}

/* =========================================================
   COLONNE APPRÉCIATION
   ========================================================= */

.candidates-table th:nth-child(6),
.candidates-table td:nth-child(6) {
  white-space: nowrap;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
  .candidate-appreciation {
    font-size: 0.78rem;
    padding: 0.28rem 0.48rem;
  }
}
/* ==========================================================================
   APPRÉCIATION CANDIDAT
   ========================================================================== */

.candidate-appreciation-panel {
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Formulaire
   -------------------------------------------------------------------------- */

.candidate-appreciation-form {
  padding-top: 4px;
}

.candidate-appreciation-options {
  display: grid;
  grid-template-columns:
    minmax(78px, 0.9fr)
    minmax(70px, 0.8fr)
    minmax(70px, 0.8fr)
    minmax(90px, 1fr)
    minmax(115px, 1.25fr);
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Choix
   -------------------------------------------------------------------------- */

.appreciation-choice {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  min-height: 68px;
  padding: 9px 6px;

  background: #fff;
  border: 1px solid #dfe4e9;
  border-radius: 9px;

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.appreciation-choice:hover {
  background: #f7f9fb;
  border-color: #b8c4cf;
  transform: translateY(-1px);
}

/* Radio masqué */

.appreciation-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Boules */

.appreciation-choice > span {
  display: block;

  min-height: 25px;

  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 1px;

  white-space: nowrap;
}

/* Libellé */

.appreciation-choice small {
  display: block;

  margin-top: 5px;

  color: #687482;

  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;

  text-align: center;
}

/* --------------------------------------------------------------------------
   Choix sélectionné
   -------------------------------------------------------------------------- */

.appreciation-choice:has(input:checked) {
  background: #f3f7fa;
  border-color: #526f8b;

  box-shadow:
    0 0 0 1px #526f8b,
    0 2px 5px rgba(0, 0, 0, 0.05);
}

.appreciation-choice:has(input:checked) small {
  color: #293d52;
  font-weight: 700;
}

/* Non évalué */

.appreciation-none > span {
  color: #8a949e;
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   Bouton
   -------------------------------------------------------------------------- */

.candidate-appreciation-actions {
  display: flex;
  justify-content: flex-end;

  margin-top: 12px;
}

.candidate-appreciation-actions .button {
  min-width: 120px;
}

/* --------------------------------------------------------------------------
   Lecture seule
   -------------------------------------------------------------------------- */

.candidate-appreciation-readonly {
  padding-top: 4px;

  font-size: 1.35rem;
  letter-spacing: 3px;
}

/* --------------------------------------------------------------------------
   Appréciation dans le bandeau workflow
   -------------------------------------------------------------------------- */

.candidate-appreciation-summary {
  min-width: 120px;
}

.candidate-appreciation-summary .candidate-appreciation-value {
  font-size: 1.05rem;
  letter-spacing: 2px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .candidate-appreciation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appreciation-choice:last-child {
    grid-column: 1 / -1;
  }

  .candidate-appreciation-actions .button {
    width: 100%;
  }
}
/* ==========================================================================
   AJOUT MANUEL D'UN ÉCHANGE
   ========================================================================== */

.manual-exchange-panel {
  max-width: 920px;
  margin: 0 0 24px;
  padding: 0;
  overflow: hidden;
}

.manual-exchange-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;

  padding: 22px 24px 18px;

  border-bottom: 1px solid #e7eaee;
  background: #fafbfc;
}

.manual-exchange-header h2 {
  margin: 2px 0 5px;
  font-size: 1.25rem;
}

.manual-exchange-header p {
  margin: 0;
  color: #6b7580;
  font-size: 0.88rem;
}

.manual-exchange-header .eyebrow {
  margin-bottom: 2px;
  font-size: 0.68rem;
}

.manual-exchange-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  border-radius: 50%;

  color: #69737e;
  background: #fff;
  border: 1px solid #dfe4e9;

  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.manual-exchange-close:hover {
  background: #f0f3f5;
  border-color: #cbd2d9;
}

.manual-exchange-form {
  padding: 22px 24px 24px;
}

.manual-exchange-section {
  margin-bottom: 22px;
}

.manual-exchange-label {
  display: block;
  margin-bottom: 9px;

  color: #344252;

  font-size: 0.78rem;
  font-weight: 700;
}

/* ==========================================================================
   CANAL
   ========================================================================== */

.manual-channel-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.manual-channel-choice {
  position: relative;

  display: flex;
  align-items: center;
  gap: 8px;

  min-height: 48px;
  padding: 9px 12px;

  border: 1px solid #dce2e7;
  border-radius: 9px;

  background: #fff;

  cursor: pointer;

  color: #4c5865;

  font-size: 0.78rem;
  font-weight: 600;

  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.manual-channel-choice:hover {
  background: #f8fafb;
  border-color: #bcc7d0;
}

.manual-channel-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.manual-channel-choice:has(input:checked) {
  border-color: #526f8b;
  background: #f2f6f9;

  box-shadow: 0 0 0 1px #526f8b;
}

.manual-channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 26px;
  height: 26px;

  border-radius: 7px;

  background: #edf1f4;

  color: #445767;

  font-size: 0.72rem;
  font-weight: 800;
}

/* ==========================================================================
   DIRECTION
   ========================================================================== */

.manual-exchange-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.manual-direction-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.manual-direction-choice {
  position: relative;

  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 58px;

  padding: 10px 13px;

  border: 1px solid #dce2e7;
  border-radius: 9px;

  background: #fff;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.manual-direction-choice:hover {
  background: #f8fafb;
  border-color: #bcc7d0;
}

.manual-direction-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.manual-direction-choice:has(input:checked) {
  border-color: #526f8b;
  background: #f2f6f9;

  box-shadow: 0 0 0 1px #526f8b;
}

.manual-direction-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 31px;
  height: 31px;

  flex: 0 0 31px;

  border-radius: 50%;

  background: #edf1f4;

  color: #43586b;

  font-size: 1rem;
  font-weight: 800;
}

.manual-direction-choice strong,
.manual-direction-choice small {
  display: block;
}

.manual-direction-choice strong {
  color: #314151;
  font-size: 0.82rem;
}

.manual-direction-choice small {
  margin-top: 2px;

  color: #7b858f;

  font-size: 0.68rem;
  font-weight: 500;
}

/* ==========================================================================
   DATE
   ========================================================================== */

.manual-date-section input {
  width: 100%;
  height: 48px;

  padding: 0 11px;

  border: 1px solid #dce2e7;
  border-radius: 9px;

  background: #fff;

  font: inherit;
  font-size: 0.8rem;
}

/* ==========================================================================
   MESSAGE
   ========================================================================== */

.manual-message-section {
  margin-top: 2px;
}

.manual-message-label-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 8px;
}

.manual-message-label-row .manual-exchange-label {
  margin-bottom: 0;
}

.manual-message-label-row > span {
  color: #8a939c;
  font-size: 0.68rem;
}

.manual-message-section textarea {
  box-sizing: border-box;

  width: 100%;
  min-height: 175px;

  padding: 14px 15px;

  border: 1px solid #d6dde3;
  border-radius: 10px;

  background: #fff;

  color: #283441;

  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.55;

  resize: vertical;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.manual-message-section textarea:focus,
.manual-date-section input:focus {
  outline: none;

  border-color: #607d98;

  box-shadow: 0 0 0 3px rgba(82, 111, 139, 0.1);
}

/* ==========================================================================
   ACTIONS
   ========================================================================== */

.manual-exchange-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;

  padding-top: 17px;

  border-top: 1px solid #edf0f2;
}

.manual-exchange-actions .button {
  min-width: 115px;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  .manual-exchange-header {
    padding: 18px;
  }

  .manual-exchange-form {
    padding: 18px;
  }

  .manual-channel-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-exchange-meta {
    grid-template-columns: 1fr;
  }

  .manual-direction-options {
    grid-template-columns: 1fr 1fr;
  }

  .manual-message-label-row > span {
    display: none;
  }

  .manual-exchange-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .manual-exchange-actions .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .manual-channel-options,
  .manual-direction-options {
    grid-template-columns: 1fr;
  }
}
.message-channel-badge {
  padding: 5px;
  background-color: crimson;
  color: white;
  border-radius: 5px;
  margin: 10px;
}
/* ==========================================================================
   CONVERSATION — PIED DU MESSAGE
   ========================================================================== */

.conversation-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: 14px;
  padding-top: 10px;

  border-top: 1px solid #edf0f2;

  color: #7b8490;
  font-size: 0.72rem;
  line-height: 1.35;
}

/* Informations de suivi */

.conversation-message-footer .message-tracking {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;

  min-width: 0;
}

.conversation-message-footer .message-tracking span {
  display: inline-flex;
  align-items: center;

  white-space: nowrap;
}

/* Séparateur discret entre les informations */

.conversation-message-footer .message-tracking span + span::before {
  content: "·";

  margin-right: 14px;

  color: #c1c7cd;
}

/* Réponse */

.conversation-reply {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  padding: 5px 10px;

  border: 1px solid #d8dee4;
  border-radius: 6px;

  background: #fff;
  color: #536577;

  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;

  text-decoration: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.conversation-reply:hover {
  background: #f4f7f9;
  border-color: #bcc7d0;
  color: #30485e;

  text-decoration: none;
}

/* Message manuel : "Saisi manuellement · via Instagram" */

.message-manual .conversation-message-footer {
  margin-top: 12px;
}

.message-manual .message-tracking {
  color: #7d8791;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  .conversation-message-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .conversation-message-footer .message-tracking {
    gap: 4px 10px;
  }

  .conversation-message-footer .message-tracking span + span::before {
    margin-right: 10px;
  }

  .conversation-reply {
    align-self: flex-end;
  }
}
/* ==========================================================================
   CONVERSATION - FOOTER DES MESSAGES
   ========================================================================== */

.conversation-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 16px;
  padding-top: 10px;

  border-top: 1px solid #edf0f3;

  font-size: 0.72rem;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Suivi du message
   -------------------------------------------------------------------------- */

.conversation-message-footer .message-tracking {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;

  color: #89929c;
}

.conversation-message-footer .message-tracking span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Petit séparateur entre les informations */

.conversation-message-footer .message-tracking span + span::before {
  content: "•";

  margin: 0 9px;

  color: #c4cbd1;
  font-size: 0.65rem;
}

/* Première information légèrement plus visible */

/* --------------------------------------------------------------------------
   Bouton répondre
   -------------------------------------------------------------------------- */

.conversation-message-footer .conversation-reply {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 5px 10px;

  border: 1px solid #d8dfe5;
  border-radius: 6px;

  background: #fff;
  color: #52687b;

  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;

  text-decoration: none;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.conversation-message-footer .conversation-reply:hover {
  background: #f4f7f9;
  border-color: #bfcbd4;
  color: #304c64;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Message manuel
   -------------------------------------------------------------------------- */

.message-manual .conversation-message-footer .message-tracking {
  color: #7d8790;
}

.message-manual .conversation-message-footer .message-tracking span:first-child {
  color: #65717d;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {
  .conversation-message-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;

    margin-top: 13px;
    padding-top: 9px;
  }

  .conversation-message-footer .message-tracking {
    row-gap: 5px;
  }

  .conversation-message-footer .conversation-reply {
    align-self: flex-end;
  }
}
/* ==========================================================================
   COULEURS DES STATUTS
   ========================================================================== */

.message-status {
  display: inline-flex;
  align-items: center;

  padding: 4px 8px;

  border-radius: 999px;

  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;

  text-transform: uppercase;
  white-space: nowrap;
}

/* Envoyé */

.message-status-envoye {
  background: #f3f1e7;
  color: #786c3c;
}

/* Délivré */

.message-status-delivre {
  background: #e8eef7;
  color: #536b8d;
}

/* Ouvert */

.message-status-ouvert {
  background: #edf3df;
  color: #62783d;
}

/* Cliqué */

.message-status-clique {
  background: #e3f1e7;
  color: #39704c;
}

/* Erreur / échec éventuel */

.message-status-erreur,
.message-status-echec {
  background: #f7e6e6;
  color: #9a4c4c;
}
/* ==========================================================================
   Fréquentation
   ========================================================================== */

.frequentation-page {
  display: grid;
  gap: 24px;
  max-width: 1500px;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* --------------------------------------------------------------------------
   En-tête + filtres
   -------------------------------------------------------------------------- */

.frequentation-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.frequentation-page .page-header h1 {
  margin-bottom: 8px;
}

.frequentation-page .page-intro {
  max-width: 720px;
}

.frequentation-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(20, 34, 56, 0.05);
}

.frequentation-filter-field {
  min-width: 165px;
}

.frequentation-filter-field label {
  display: block;
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.frequentation-filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 34px 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.frequentation-filter-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(238, 107, 98, 0.12);
}

/* --------------------------------------------------------------------------
   Résumé du jour
   -------------------------------------------------------------------------- */

.frequentation-today {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: -4px;
}

.frequentation-today-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
}

.frequentation-today-item strong {
  color: var(--text);
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   KPI
   -------------------------------------------------------------------------- */

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

.frequentation-kpi {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  padding: 22px 22px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 34, 56, 0.05);
}

.frequentation-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.frequentation-kpi:nth-child(2)::before {
  background: #6ea8c6;
}

.frequentation-kpi:nth-child(3)::before {
  background: #d5a44a;
}

.frequentation-kpi span {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.frequentation-kpi strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* --------------------------------------------------------------------------
   Grilles et panneaux
   -------------------------------------------------------------------------- */

.frequentation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
}

.frequentation-grid-equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.frequentation-page .panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
}

.frequentation-page .panel-header {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.frequentation-page .panel-header h2 {
  margin-bottom: 4px;
}

.frequentation-page .panel-header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   Graphique quotidien
   -------------------------------------------------------------------------- */

.frequentation-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 250px;
  padding: 20px 4px 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to top, rgba(127, 137, 153, 0.08) 1px, transparent 1px);
  background-size: 100% 25%;
}

.frequentation-chart-day {
  display: flex;
  align-items: flex-end;
  min-width: 11px;
  height: 100%;
  flex: 1 0 11px;
}

.frequentation-chart-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(238, 107, 98, 0.72));
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.frequentation-chart-day:hover .frequentation-chart-bar {
  opacity: 0.82;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Barres horizontales
   -------------------------------------------------------------------------- */

.frequentation-bars {
  display: grid;
  gap: 15px;
}

.frequentation-bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 2fr) 44px;
  gap: 12px;
  align-items: center;
}

.frequentation-bar-label {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.frequentation-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.frequentation-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(238, 107, 98, 0.72));
}

.frequentation-bar-value {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */

.frequentation-table-wrap,
.frequentation-page .table-wrap {
  overflow-x: auto;
}

.frequentation-table {
  width: 100%;
  table-layout: auto;
}

.frequentation-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  white-space: nowrap;
}

.frequentation-table tbody tr {
  transition: background-color 0.12s ease;
}

.frequentation-table tbody tr:hover {
  background: var(--surface-muted);
}

.frequentation-table td {
  vertical-align: middle;
}

.frequentation-table .page-cell,
.frequentation-table .source-cell {
  max-width: 430px;
  overflow-wrap: anywhere;
}

.frequentation-table .number-cell {
  width: 90px;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */

.frequentation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.frequentation-badge-human {
  color: #166534;
  background: #dcfce7;
}

.frequentation-badge-known {
  color: #075985;
  background: #e0f2fe;
}

.frequentation-badge-suspect {
  color: #991b1b;
  background: #fee2e2;
}

.frequentation-empty {
  padding: 28px 12px;
  color: var(--text-soft);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .frequentation-page .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .frequentation-filters {
    width: 100%;
  }

  .frequentation-grid,
  .frequentation-grid-equal {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .frequentation-page {
    gap: 18px;
  }

  .frequentation-kpis {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .frequentation-kpi {
    min-height: 100px;
    padding: 18px;
  }

  .frequentation-kpi strong {
    font-size: 30px;
  }

  .frequentation-filters {
    padding: 12px;
  }

  .frequentation-filter-field {
    width: 100%;
    min-width: 0;
  }

  .frequentation-filters .button {
    width: 100%;
  }

  .frequentation-chart {
    height: 220px;
  }

  .frequentation-bar-row {
    grid-template-columns: 95px minmax(90px, 1fr) 36px;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .frequentation-page .page-header {
    gap: 18px;
  }

  .frequentation-today {
    display: grid;
    grid-template-columns: 1fr;
  }

  .frequentation-today-item {
    justify-content: space-between;
    width: 100%;
    border-radius: 10px;
  }

  .frequentation-page .panel {
    border-radius: 12px;
  }
}
/* ==========================================================================
   Copains · Fréquentation
   ========================================================================== */

.analytics-page {
  --analytics-navy: #17304f;
  --analytics-navy-soft: #274c70;
  --analytics-coral: #ed6a5f;
  --analytics-coral-soft: #fff2f0;
  --analytics-blue: #6fa9c6;
  --analytics-blue-soft: #eef7fb;
  --analytics-green: #3f8c67;
  --analytics-green-soft: #edf8f2;
  --analytics-amber: #b27a22;
  --analytics-amber-soft: #fff7e7;
  --analytics-red: #b84a43;
  --analytics-red-soft: #fff0ef;
  --analytics-line: #e7ebf0;
  --analytics-bg: #f6f8fb;
  --analytics-card: #ffffff;
  --analytics-text: #1d2d44;
  --analytics-muted: #778294;

  display: grid;
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
  padding-bottom: 42px;
}

/* Hero */

.analytics-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 28px 30px;
  border: 1px solid #dfe6ee;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(111, 169, 198, 0.18), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(237, 106, 95, 0.1), transparent 28%), #fff;
  box-shadow: 0 12px 34px rgba(20, 43, 70, 0.06);
}

.analytics-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -85px;
  width: 240px;
  height: 240px;
  border: 40px solid rgba(23, 48, 79, 0.035);
  border-radius: 50%;
  pointer-events: none;
}

.analytics-hero .eyebrow {
  margin-bottom: 8px;
  color: var(--analytics-coral);
}

.analytics-title-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.analytics-title-row h1 {
  margin: 0 0 8px;
  color: var(--analytics-navy);
  font-size: clamp(29px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.analytics-title-row .page-intro {
  max-width: 720px;
  margin: 0;
  color: var(--analytics-muted);
  line-height: 1.55;
}

.analytics-live {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #dce8e2;
  border-radius: 999px;
  background: var(--analytics-green-soft);
  color: #397759;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--analytics-green);
  box-shadow: 0 0 0 4px rgba(63, 140, 103, 0.12);
}

/* Filtres */

.analytics-filters {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px;
  border: 1px solid var(--analytics-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 20px rgba(20, 43, 70, 0.04);
  backdrop-filter: blur(10px);
}

.analytics-filter-group,
.analytics-filter-select {
  display: grid;
  gap: 6px;
}

.analytics-filter-label,
.analytics-filter-select label {
  color: var(--analytics-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.analytics-segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f4f7;
}

.analytics-segment {
  cursor: pointer;
}

.analytics-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.analytics-segment span {
  display: block;
  min-width: 47px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #6e7988;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transition: 0.16s ease;
}

.analytics-segment:hover span {
  color: var(--analytics-navy);
}

.analytics-segment.is-active span {
  background: #fff;
  color: var(--analytics-navy);
  box-shadow: 0 2px 8px rgba(20, 43, 70, 0.09);
}

.analytics-filter-select select {
  min-width: 180px;
  min-height: 42px;
  padding: 9px 34px 9px 11px;
  border: 1px solid var(--analytics-line);
  border-radius: 9px;
  background: #fff;
  color: var(--analytics-text);
  font: inherit;
  font-size: 13px;
}

/* Aujourd'hui */

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

.analytics-today-card {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--analytics-line);
  border-radius: 14px;
  background: #fff;
}

.analytics-today-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--analytics-blue-soft);
  color: var(--analytics-navy-soft);
}

.analytics-today-card.is-bot .analytics-today-icon {
  background: var(--analytics-coral-soft);
  color: var(--analytics-coral);
}

.analytics-today-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-today-card > div:last-child {
  min-width: 0;
}

.analytics-today-card span,
.analytics-today-card small {
  display: block;
  color: var(--analytics-muted);
  font-size: 11px;
}

.analytics-today-card strong {
  display: inline-block;
  margin: 1px 4px 0 0;
  color: var(--analytics-navy);
  font-size: 23px;
  line-height: 1;
}

/* KPI */

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

.analytics-kpi {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--analytics-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(20, 43, 70, 0.045);
}

.analytics-kpi::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -38px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(111, 169, 198, 0.07);
}

.analytics-kpi:nth-child(2)::after {
  background: rgba(237, 106, 95, 0.07);
}

.analytics-kpi:nth-child(3)::after {
  background: rgba(178, 122, 34, 0.08);
}

.analytics-kpi-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.analytics-kpi-label {
  color: var(--analytics-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.analytics-kpi-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--analytics-blue-soft);
  color: var(--analytics-navy-soft);
}

.analytics-kpi:nth-child(2) .analytics-kpi-icon {
  background: var(--analytics-coral-soft);
  color: var(--analytics-coral);
}

.analytics-kpi:nth-child(3) .analytics-kpi-icon {
  background: var(--analytics-amber-soft);
  color: var(--analytics-amber);
}

.analytics-kpi-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-kpi > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: var(--analytics-navy);
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.analytics-kpi p {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: var(--analytics-muted);
  font-size: 12px;
}

/* Panneaux */

.analytics-main-grid,
.analytics-two-columns {
  display: grid;
  gap: 20px;
}

.analytics-main-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.75fr);
}

.analytics-two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--analytics-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 43, 70, 0.035);
}

.analytics-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin: 0;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--analytics-line);
}

.analytics-panel-header h2 {
  margin: 2px 0 4px;
  color: var(--analytics-navy);
  font-size: 18px;
}

.analytics-panel-header p {
  margin: 0;
  color: var(--analytics-muted);
  font-size: 12px;
  line-height: 1.45;
}

.analytics-panel-kicker {
  color: var(--analytics-coral);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Graphique */

.analytics-trend-panel {
  min-height: 385px;
}

.analytics-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 5px;
}

.analytics-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--analytics-muted);
  font-size: 11px;
  white-space: nowrap;
}

.analytics-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--analytics-coral);
}

.analytics-chart {
  display: flex;
  gap: 5px;
  align-items: stretch;
  height: 300px;
  padding: 20px 18px 14px;
  overflow-x: auto;
  background: linear-gradient(to bottom, rgba(222, 228, 235, 0.45) 1px, transparent 1px);
  background-size: 100% 25%;
}

.analytics-chart-column {
  display: grid;
  grid-template-rows: 18px minmax(0, 1fr) 19px;
  gap: 5px;
  min-width: 16px;
  flex: 1 0 16px;
}

.analytics-chart-value {
  color: #98a1ad;
  font-size: 9px;
  text-align: center;
}

.analytics-chart-track {
  display: flex;
  align-items: flex-end;
  min-height: 0;
}

.analytics-chart-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #f07a70 0%, var(--analytics-coral) 100%);
  box-shadow: 0 4px 10px rgba(237, 106, 95, 0.12);
  transition:
    transform 0.14s ease,
    filter 0.14s ease;
}

.analytics-chart-column:hover .analytics-chart-bar {
  transform: translateY(-2px);
  filter: saturate(1.15);
}

.analytics-chart-date {
  color: #9aa3af;
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

/* Distribution appareils */

.analytics-distribution {
  display: grid;
  gap: 5px;
  padding: 12px 18px 18px;
}

.analytics-distribution-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid #f0f2f5;
}

.analytics-distribution-row:last-child {
  border-bottom: 0;
}

.analytics-distribution-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--analytics-blue-soft);
  color: var(--analytics-navy-soft);
}

.analytics-distribution-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-distribution-main {
  min-width: 0;
}

.analytics-distribution-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 7px;
}

.analytics-distribution-head strong {
  overflow: hidden;
  color: var(--analytics-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-distribution-head span {
  color: var(--analytics-muted);
  font-size: 11px;
  font-weight: 800;
}

.analytics-progress {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #edf1f4;
}

.analytics-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--analytics-blue), #8bc0d8);
}

.analytics-distribution-count {
  color: var(--analytics-navy);
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

/* Tableaux */

.analytics-panel .table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
}

.analytics-table thead th {
  padding-top: 11px;
  padding-bottom: 11px;
  color: #8a94a2;
  background: #fbfcfd;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.analytics-table td {
  vertical-align: middle;
}

.analytics-table tbody tr {
  transition: background-color 0.12s ease;
}

.analytics-table tbody tr:hover {
  background: #fbfcfd;
}

.analytics-table .is-number {
  width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analytics-ranked-item {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.analytics-rank {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f1f5f8;
  color: #718091;
  font-size: 11px;
  font-weight: 900;
}

.analytics-page-path,
.analytics-source-text {
  display: inline-block;
  max-width: 430px;
  overflow: hidden;
  color: var(--analytics-text);
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.analytics-source {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.analytics-source-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--analytics-blue);
  box-shadow: 0 0 0 4px rgba(111, 169, 198, 0.12);
}

/* Navigateurs */

.analytics-browser-list {
  display: grid;
  gap: 3px;
  padding: 12px 18px 18px;
}

.analytics-browser-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(110px, 1.35fr) 48px 36px;
  gap: 11px;
  align-items: center;
  padding: 10px 4px;
  border-bottom: 1px solid #f1f3f5;
}

.analytics-browser-row:last-child {
  border-bottom: 0;
}

.analytics-browser-name {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.analytics-browser-name strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-browser-mark {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--analytics-coral);
}

.analytics-browser-percent {
  color: var(--analytics-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.analytics-browser-count {
  color: var(--analytics-navy);
  font-size: 12px;
  text-align: right;
}

/* Badges */

.analytics-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 150px;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-badge.is-human {
  color: #2d7553;
  background: var(--analytics-green-soft);
}

.analytics-badge.is-known {
  color: #376e8a;
  background: var(--analytics-blue-soft);
}

.analytics-badge.is-suspect {
  color: var(--analytics-red);
  background: var(--analytics-red-soft);
}

/* Log */

.analytics-log-panel {
  overflow: visible;
}

.analytics-log-header {
  align-items: center;
}

.analytics-log-count {
  padding: 6px 9px;
  border: 1px solid var(--analytics-line);
  border-radius: 999px;
  color: var(--analytics-muted);
  background: #fafbfc;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-log-wrap {
  max-height: 620px;
  overflow: auto !important;
}

.analytics-log-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  box-shadow: inset 0 -1px 0 var(--analytics-line);
}

.analytics-date-cell {
  width: 92px;
  white-space: nowrap;
}

.analytics-date-cell strong,
.analytics-date-cell span {
  display: block;
}

.analytics-date-cell strong {
  color: var(--analytics-text);
  font-size: 11px;
}

.analytics-date-cell span {
  margin-top: 2px;
  color: var(--analytics-muted);
  font-size: 10px;
}

/* Responsive */

@media (max-width: 1180px) {
  .analytics-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .analytics-filters {
    width: 100%;
  }

  .analytics-main-grid,
  .analytics-two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .analytics-page {
    gap: 16px;
  }

  .analytics-hero {
    padding: 22px 20px;
    border-radius: 16px;
  }

  .analytics-title-row {
    display: block;
  }

  .analytics-live {
    margin-top: 14px;
  }

  .analytics-today,
  .analytics-kpis {
    grid-template-columns: 1fr;
  }

  .analytics-today-card {
    padding: 12px 14px;
  }

  .analytics-kpi {
    padding: 18px;
  }

  .analytics-kpi > strong {
    font-size: 34px;
  }

  .analytics-panel-header {
    padding: 17px 16px 14px;
  }

  .analytics-chart {
    height: 260px;
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 600px) {
  .analytics-filters {
    display: grid;
    grid-template-columns: 1fr;
    padding: 11px;
  }

  .analytics-segmented {
    width: 100%;
  }

  .analytics-segment {
    flex: 1;
  }

  .analytics-segment span {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
  }

  .analytics-filter-select select {
    width: 100%;
  }

  .analytics-browser-row {
    grid-template-columns: minmax(90px, 1fr) 1.3fr 42px;
  }

  .analytics-browser-count {
    display: none;
  }

  .analytics-page-path,
  .analytics-source-text {
    max-width: 220px;
  }

  .analytics-log-header {
    align-items: flex-start;
  }
}

/* ==========================================================================
   Sources et référents
   ========================================================================== */

.analytics-referer-host {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  color: var(--analytics-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.analytics-origin-cell {
  display: grid;
  gap: 2px;
  min-width: 150px;
  max-width: 330px;
}

.analytics-origin-cell > strong {
  color: var(--analytics-text);
  font-size: 12px;
}

.analytics-referer-domain {
  color: var(--analytics-muted);
  font-size: 10px;
  font-weight: 700;
}

.analytics-referer-url {
  display: block;
  max-width: 320px;
  overflow: hidden;
  color: #9aa3af;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.analytics-referer-url:hover {
  color: var(--analytics-navy-soft);
}

@media (max-width: 600px) {
  .analytics-referer-host {
    max-width: 180px;
  }

  .analytics-origin-cell {
    max-width: 220px;
  }

  .analytics-referer-url {
    max-width: 210px;
  }
}
