:root {
  --background: #f5f4f2;
  --foreground: #14233c;
  --brand: #c23b4a;
  --brand-dark: #9f2f3c;
  --brand-soft: #f8e9eb;
  --ink: #14233c;
  --sidebar: #f3f4f6;
  --sidebar-elevated: #ffffff;
  --muted: #4a5568;
  --border: #e8e4de;
  --border-strong: #cfc7bc;
  --card: #ffffff;
  --surface: #f0eeea;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius: 0.65rem;
  --radius-sm: 0.45rem;
  --radius-pill: 999px;
  --shadow-sm: none;
  --shadow-md: 0 8px 24px rgba(20, 35, 60, 0.06);
  --focus-ring: 0 0 0 3px rgba(194, 59, 74, 0.4);
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-display: Figtree, "Atkinson Hyperlegible", system-ui, sans-serif;
  --sidebar-width: 15.25rem;
  --sidebar-collapsed-width: 4.5rem;
  --space-1: 0.35rem;
  --space-2: 0.65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transform: translateY(-140%);
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: none;
  box-shadow: var(--focus-ring);
}
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.igca-btn:focus-visible,
.nav-link:focus-visible,
.mobile-tab:focus-visible,
.input:focus-visible,
.igca-input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: var(--focus-ring);
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  background: var(--background);
  color: var(--foreground);
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 650;
}
a { color: inherit; text-decoration: none; }
.wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--ink);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: width 0.2s ease;
  border-right: 1px solid var(--border);
}
.sidebar-top {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0.85rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 3.5rem;
  background: #fff;
}
.sidebar-collapse-btn {
  display: none;
  position: static;
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}
.sidebar-collapse-btn svg { width: 1rem; height: 1rem; }
.sidebar-collapse-btn .icon-expand { display: none; }
.wrap.sidebar-collapsed .sidebar-collapse-btn .icon-collapse { display: none; }
.wrap.sidebar-collapsed .sidebar-collapse-btn .icon-expand { display: block; }
.desktop-toolbar {
  display: none;
  margin: 0 0 1rem;
}
.desktop-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.desktop-menu-toggle svg { width: 1.2rem; height: 1.2rem; }
.sidebar-brand {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  padding: 0.15rem 0.2rem !important;
  border-radius: var(--radius-sm) !important;
  background: transparent !important;
  color: inherit !important;
  text-decoration: none !important;
}
.sidebar-brand:hover { background: color-mix(in srgb, var(--ink) 4%, #fff) !important; color: inherit !important; }
.sidebar-mark { display: none; }
.sidebar-logo {
  width: 1.85rem;
  height: 1.85rem;
  max-width: 1.85rem;
  max-height: 1.85rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.sidebar-brand-text {
  margin: 0;
  text-align: left;
  min-width: 0;
}
.brand {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.sidebar-title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.88rem;
  margin-top: 0.05rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-nav {
  flex: 1;
  overflow: auto;
  padding: 0.65rem 0.55rem 0.85rem;
}
.nav-group {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0.85rem 0.65rem 0.35rem;
}
.nav-group:first-child { margin-top: 0.15rem; }
.nav-link {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.65rem !important;
  border-radius: 0.45rem !important;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted)) !important;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 0.05rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-link svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: 0.75;
  color: var(--ink);
}
.nav-link:hover {
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: 0 0 0 1px var(--border);
}
.nav-link:hover svg { opacity: 1; }
.nav-link.active {
  background: var(--brand-soft) !important;
  color: var(--brand-dark) !important;
  font-weight: 650;
  box-shadow: inset 2px 0 0 var(--brand);
}
.nav-link.active svg { color: var(--brand); opacity: 1; }
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 0.75rem 0.7rem 0.85rem;
  display: grid;
  gap: 0.65rem;
  background: #fff;
}
.user-box {
  background: var(--surface);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  display: grid;
  gap: 0.1rem;
  box-shadow: inset 0 0 0 1px var(--border);
}
.user-box strong { font-size: 0.82rem; color: var(--ink); font-weight: 650; }
.user-box span { color: var(--muted); font-size: 0.7rem; }
.user-box form { margin-top: 0.45rem; }
.sidebar-logout {
  width: 100%;
  color: var(--ink) !important;
  border-color: var(--border) !important;
  background: #fff !important;
  font-size: 0.72rem !important;
  padding: 0.35rem 0.55rem !important;
  min-height: 2rem;
}
.sidebar-logout:hover { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--border-strong) !important; }
.sidebar-credit {
  margin: 0;
  padding: 0.15rem 0.15rem 0;
  font-size: 0.65rem;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.sidebar-credit .credit-label {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
}
.sidebar-credit .credit-logo-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none !important;
  opacity: 0.92;
  transition: opacity 0.15s ease;
}
.sidebar-credit .credit-logo-link:hover { opacity: 1; }
.sidebar-credit .credit-logo {
  height: 22px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}
.sidebar-credit a {
  color: var(--ink) !important;
  text-decoration: none !important;
  font-weight: 650;
}
.sidebar-credit a:hover {
  color: var(--brand) !important;
  text-decoration: underline !important;
}
.sidebar-credit-url {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.58rem;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  letter-spacing: 0.01em;
}
.sidebar a:not(.nav-link):not(.sidebar-brand):not(.sidebar-credit a) { color: inherit; }
.mobile-topbar,
.mobile-bottom-nav,
.mobile-nav-backdrop,
.mobile-nav-close { display: none; }
.main { flex: 1; padding: var(--space-4); min-width: 0; }
.wrap-scan .main { padding: var(--space-3); }
.page-eyebrow {
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  color: var(--ink);
}
.page-head > div > .muted { margin: 0.35rem 0 0; max-width: 42rem; line-height: 1.45; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card, .igca-card, .panel {
  background: var(--card);
  border: 0;
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: none;
}
.panel-quiet {
  background: transparent;
  padding: 0;
}
.igca-kpi {
  border: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
  box-shadow: none;
}
.igca-kpi-value {
  margin-top: 0.35rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}
.btn,
.igca-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.05rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:disabled,
.igca-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary,
.igca-btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover,
.igca-btn-primary:hover { background: var(--brand-dark); }
.btn-dark,
.igca-btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover,
.igca-btn-dark:hover { background: #1c314f; }
.btn-ghost,
.igca-btn-ghost {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
}
.btn-ghost:hover,
.igca-btn-ghost:hover { background: var(--surface); border-color: var(--border-strong); }
.btn-danger,
.igca-btn-danger {
  background: #fff;
  border: 1px solid #f3c4c8;
  color: var(--danger);
}
.btn-danger:hover,
.igca-btn-danger:hover { background: var(--brand-soft); }
.btn-sm,
.igca-btn-xs { padding: 0.32rem 0.7rem; font-size: 0.75rem; }
.igca-btn-xs { padding: 0.28rem 0.6rem !important; font-size: 0.72rem !important; }
.input, select, textarea,
.igca-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font: inherit;
  background: #fff;
  color: var(--foreground);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:hover, select:hover, textarea:hover,
.igca-input:hover { border-color: var(--border-strong); }
label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--muted); }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { font-size: 1.75rem; font-weight: 800; font-family: var(--font-display); }
.muted { color: var(--muted); }
.ok { background: #ecfdf5; color: #065f46; padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.err { background: #fef2f2; color: #991b1b; padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.photo-thumb {
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--brand-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand);
  overflow: hidden;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.actions-inline { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chart-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.chart-card { min-height: 280px; }
.chart-wrap { position: relative; height: 210px; }
.mode-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  gap: 0.15rem;
}
.mode-toggle button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}
.mode-toggle button.active { background: var(--brand); color: #fff; }
.scan-waiting {
  display: inline-block;
  background: #3f2a1e;
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  margin: 0.75rem 0;
}
#qr-reader {
  border-radius: 1rem;
  overflow: hidden;
  background: #09090b;
  min-height: 280px;
  position: relative;
}
#qr-reader video,
#qr-reader canvas {
  border-radius: 1rem;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 280px;
  object-fit: cover !important;
}
#qr-reader__scan_region,
#qr-reader__dashboard {
  width: 100% !important;
}
#qr-reader__scan_region {
  min-height: 280px !important;
}
#qr-reader__scan_region > img,
#qr-reader__scan_region video {
  object-fit: cover !important;
}
.live-stat-green { background: #ecfdf5; color: #065f46; border-radius: var(--radius-sm); padding: 0.75rem; }
.live-stat-purple { background: #f5f3ff; color: #5b21b6; border-radius: var(--radius-sm); padding: 0.75rem; }
.live-stat-red { background: #fef2f2; color: #991b1b; border-radius: var(--radius-sm); padding: 0.75rem; }
.live-stat-green .stat,
.live-stat-purple .stat,
.live-stat-red .stat { font-size: 1.4rem; font-weight: 700; }

/* ——— Scan entrée (ambiance IGCA) ——— */
.wrap-scan .main {
  padding: 0.75rem 0.85rem 1rem;
  background:
    radial-gradient(90% 55% at 10% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 55%),
    radial-gradient(70% 50% at 100% 0%, color-mix(in srgb, var(--ink) 10%, transparent), transparent 50%),
    var(--background);
}
.wrap-scan-volunteer .main {
  background:
    radial-gradient(100% 70% at 50% -20%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
    linear-gradient(180deg, #0f1a2c 0%, #14233c 42%, #1a2d48 100%);
  color: #f5f4f2;
  min-height: calc(100dvh - 4.75rem);
}
.wrap-scan-volunteer .muted { color: color-mix(in srgb, #f5f4f2 68%, transparent) !important; }
.wrap-scan-volunteer .scan-manual summary { color: #f5f4f2; }
.wrap-scan-volunteer .scan-manual-form {
  background: color-mix(in srgb, #fff 8%, transparent);
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
}
.wrap-scan-volunteer .scan-manual-form label { color: #f5f4f2; }
.wrap-scan-volunteer .scan-live-mini {
  color: color-mix(in srgb, #f5f4f2 88%, transparent);
}

.scan-brand-mark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.wrap-scan-volunteer .scan-brand-mark { color: #f0a3ab; }

.scan-empty {
  max-width: 28rem;
  margin: 4rem auto;
  text-align: center;
}
.scan-empty h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
}

.scan-event-picker {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.scan-event-picker .igca-input {
  max-width: 520px;
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 12rem;
}

.scan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1rem;
  align-items: start;
}
.scan-layout--volunteer {
  grid-template-columns: 1fr;
}

.scan-hero-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.scan-hero-bar h1 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.wrap-scan-volunteer .scan-hero-bar h1 { color: #fff; }
.scan-capacity {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.wrap-scan-volunteer .scan-capacity { color: color-mix(in srgb, #fff 65%, transparent); }
.scan-hero-bar .mode-toggle {
  margin: 0;
  background: color-mix(in srgb, var(--ink) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.wrap-scan-volunteer .mode-toggle {
  background: color-mix(in srgb, #fff 10%, transparent);
  border-color: color-mix(in srgb, #fff 18%, transparent);
}
.wrap-scan-volunteer .mode-toggle button { color: #fff; }
.wrap-scan-volunteer .mode-toggle button.active {
  background: var(--brand);
  color: #fff;
}

.scan-stage {
  position: relative;
  border-radius: 1.15rem;
  overflow: hidden;
  background: #05080f;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent),
    0 18px 40px -18px rgba(20, 35, 60, 0.55);
  animation: scan-stage-in 0.45s ease both;
}
@keyframes scan-stage-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.scan-stage-frame {
  pointer-events: none;
  position: absolute;
  inset: 0.85rem;
  z-index: 2;
}
.scan-corner {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border: 2.5px solid #fff;
  opacity: 0.92;
  animation: scan-corner-pulse 2.2s ease-in-out infinite;
}
.scan-corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 0.35rem 0 0 0; }
.scan-corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 0.35rem 0 0; }
.scan-corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 0.35rem; }
.scan-corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 0.35rem 0; }
@keyframes scan-corner-pulse {
  0%, 100% { opacity: 0.55; border-color: #fff; }
  50% { opacity: 1; border-color: color-mix(in srgb, var(--brand) 70%, #fff); }
}
.scan-stage-reader {
  min-height: min(58vh, 520px);
  height: min(58vh, 520px);
}
.scan-stage-hint {
  position: absolute;
  left: 50%;
  bottom: 0.85rem;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.wrap-scan.scan-showing-outcome .scan-stage-hint { opacity: 0.35; }
.scan-stage-error {
  margin: 0;
  padding: 2rem 1.25rem;
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.scan-hid {
  border-radius: 1rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.wrap-scan-volunteer .scan-hid {
  background: color-mix(in srgb, #fff 8%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 14%, transparent);
  color: #fff;
}
.scan-hid .input {
  font-size: 1.1rem;
  padding: 1rem;
  margin-top: 0.35rem;
}

.scan-result {
  margin: 0.85rem 0 0;
  border-radius: 1.05rem;
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: #fff;
  border: 2px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
}
.scan-result[data-tone="idle"] {
  background: linear-gradient(145deg, #1a2d48, #14233c);
}
.scan-result[data-tone="ok"] {
  background: #047857;
  border-color: #065f46;
}
.scan-result[data-tone="already"] {
  background: #eab308;
  border-color: #ca8a04;
  color: #422006;
}
.scan-result[data-tone="already"] .scan-result-photo {
  border-color: rgba(66, 32, 6, 0.35);
  background: rgba(255, 255, 255, 0.55);
}
.scan-result[data-tone="already"] .scan-volunteer-btn {
  background: #fff;
  color: #854d0e;
  border: 1px solid rgba(66, 32, 6, 0.2);
}
.scan-result[data-tone="already"] .scan-volunteer-btn-sub {
  color: #a16207;
}
.scan-result[data-tone="already"] .scan-volunteer-btn:hover {
  background: #fefce8;
}
.scan-result[data-tone="deny"] {
  background: #b91c1c;
  border-color: #991b1b;
}
.scan-result.has-outcome { padding: 0.75rem 0.9rem; }
.scan-result--pop { animation: scan-result-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes scan-result-pop {
  from { opacity: 0.4; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.scan-result-content { display: grid; gap: 0.4rem; }
.scan-result-member {
  display: none;
  align-items: center;
  gap: 0.7rem;
}
.scan-result-photo {
  width: 56px;
  height: 56px;
  border-radius: 0.7rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  overflow: hidden;
}
.scan-result-photo img { width: 100%; height: 100%; object-fit: cover; }
.scan-result-member-text { min-width: 0; flex: 1; }
.scan-result-status {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
}
.scan-result-name {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.2;
}
.scan-result-meta {
  margin: 0.12rem 0 0;
  font-size: 0.84rem;
  opacity: 0.92;
}
.scan-result-instruction {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 650;
}
.scan-prev-scan {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  font-weight: 700;
}
.scan-status {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.scan-status-pulse {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent);
  animation: scan-pulse 1.6s ease-out infinite;
}
@keyframes scan-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 55%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.scan-tariff-badge { margin: 0.2rem 0 0; font-size: 0.72rem; }
.scan-tariff-badge--single {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #5b21b6 !important;
  border: 2px solid #fff;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
}

.scan-manual-box { margin-top: 0.25rem; }
.scan-volunteer-actions { margin-top: 0.15rem; }
.scan-volunteer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 0.85rem;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(0,0,0,0.45);
}
.scan-volunteer-btn:hover { background: #fff8f8; }
.scan-volunteer-btn:disabled { opacity: 0.65; cursor: wait; }
.scan-volunteer-btn-sub {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}
.scan-volunteer-call {
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.75rem;
  text-align: center;
  font-weight: 800;
  font-family: var(--font-display);
  background: rgba(255,255,255,0.14);
  border-radius: 0.75rem;
  color: #fff;
}

.scan-manual-panel {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.75rem;
  padding: 0.7rem;
  color: #0f172a !important;
  box-shadow: none !important;
}
.scan-manual-panel-title {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a !important;
}
.scan-manual-panel-hint {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #334155 !important;
}
.scan-result .scan-manual-panel .input,
.scan-result .scan-manual-panel select.input,
.scan-result .scan-manual-panel textarea.input {
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  margin-top: 0.35rem;
}
.scan-result .scan-manual-panel .btn-dark {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #fff !important;
  margin-top: 0.5rem;
  width: 100%;
}
.scan-btn-allow { background: #047857 !important; border-color: #047857 !important; }
.scan-payment-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.35rem 0;
  padding: 0.45rem 0.5rem;
  font-size: 0.84rem;
  cursor: pointer;
  color: #0f172a !important;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}
.scan-payment-option strong { color: #0f172a !important; }
.scan-payment-option input { margin-top: 0.2rem; flex-shrink: 0; }
.scan-manual-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.scan-manual-actions .btn { flex: 1; min-width: 120px; }

.scan-manual { margin-top: 0.85rem; }
.scan-manual summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
}
.scan-manual summary::-webkit-details-marker { display: none; }
.scan-manual-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.55rem;
  padding: 0.85rem;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}

.scan-live {
  overflow: hidden;
  padding: 0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.scan-live-head {
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
    var(--surface);
  padding: 1rem;
}
.scan-live-head h2 {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}
.scan-live-head .muted { margin: 0; font-size: 0.8rem; }
.scan-live-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 1rem;
}
.live-stat { border-radius: var(--radius-sm); padding: 0.75rem; }
.live-stat-green { background: #ecfdf5; color: #065f46; }
.live-stat-ink { background: color-mix(in srgb, var(--ink) 8%, #fff); color: var(--ink); }
.live-stat-red { background: #fef2f2; color: #991b1b; }
.live-stat .stat { font-size: 1.35rem; font-weight: 800; font-family: var(--font-display); }
.scan-live-feed {
  font-size: 0.85rem;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--border);
  padding: 0.5rem 1rem 1rem;
}
.scan-live-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.scan-live-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  justify-content: center;
  padding: 0.55rem 0.35rem 0.15rem;
  font-size: 0.82rem;
  font-weight: 650;
}
.scan-live-mini b {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
}

@media (max-width: 1024px) {
  /* Mobile : caméra uniquement — onglet Scanette masqué (rester utile sur desktop) */
  .mode-toggle .scan-mode-hid { display: none !important; }
  .mode-toggle { display: none; }
  .scan-layout {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .scan-console {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  .scan-hero-bar { order: 0; margin-bottom: 0; }
  .scan-stage,
  .scan-hid { order: 1; }
  .scan-result { order: 2; margin-top: 0; }
  .scan-manual { order: 3; }
  .scan-live,
  .scan-live-mini { order: 4; }
  .scan-hero-bar h1 { font-size: 1.2rem; }
  .scan-capacity { display: none; }
  .scan-stage-reader {
    min-height: min(54vh, 480px) !important;
    height: min(54vh, 480px);
  }
  #qr-reader,
  #qr-reader__scan_region {
    min-height: min(54vh, 480px) !important;
    height: min(54vh, 480px) !important;
  }
  #qr-reader video,
  #qr-reader canvas,
  #qr-reader__scan_region video {
    min-height: min(54vh, 480px) !important;
    height: min(54vh, 480px) !important;
    max-height: none !important;
    object-fit: cover !important;
  }
  .wrap-scan.scan-showing-outcome .scan-stage-reader,
  .wrap-scan.scan-showing-outcome #qr-reader,
  .wrap-scan.scan-showing-outcome #qr-reader__scan_region {
    min-height: min(42vh, 380px) !important;
    height: min(42vh, 380px) !important;
  }
  .wrap-scan.scan-showing-outcome #qr-reader video,
  .wrap-scan.scan-showing-outcome #qr-reader canvas,
  .wrap-scan.scan-showing-outcome #qr-reader__scan_region video {
    min-height: min(42vh, 380px) !important;
    height: min(42vh, 380px) !important;
  }
  .scan-result {
    position: sticky;
    bottom: calc(4.55rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    max-height: none;
    overflow: visible;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.28);
  }
  .wrap-scan-volunteer .scan-result {
    max-height: none;
    overflow: visible;
  }
  .scan-result-photo { width: 48px; height: 48px; }
  .scan-result-name { font-size: 1.02rem; }
  .scan-result-instruction { font-size: 0.84rem; }
  .scan-manual-actions { flex-direction: column; }
  .scan-manual-actions .btn { width: 100%; min-width: 0; }
  .scan-live-head { padding: 0.7rem 0.85rem; }
  .scan-live-head h2 { font-size: 1rem; margin: 0.1rem 0; }
  .scan-live-stats { padding: 0.65rem; gap: 0.35rem; }
  .live-stat { padding: 0.45rem 0.4rem; }
  .live-stat .stat { font-size: 1.05rem; }
  .scan-live-feed { max-height: 140px; padding: 0.35rem 0.8rem 0.7rem; }
  .wrap-scan .main { padding: 0.55rem 0.65rem 0.85rem; }
  .wrap-scan .mobile-topbar { display: none !important; }
}

@media (max-width: 900px) {
  .wrap { flex-direction: column; padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); }
  .wrap-scan { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px)); }
  .main { padding: 1rem; padding-top: 0.85rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 3.25rem;
    padding: 0.45rem 0.75rem;
    padding-top: max(0.45rem, env(safe-area-inset-top, 0px));
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-btn,
  .mobile-topbar-help,
  .mobile-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-menu-btn svg,
  .mobile-topbar-help svg,
  .mobile-nav-close svg { width: 1.2rem; height: 1.2rem; }
  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
  }
  .mobile-topbar-logo {
    width: 2.35rem;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
  }
  .mobile-topbar-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(20, 35, 60, 0.55);
    backdrop-filter: blur(2px);
  }
  .mobile-nav-backdrop[hidden] { display: none !important; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    width: min(20rem, 88vw);
    height: 100dvh;
    min-height: 100%;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }
  .wrap.nav-open .sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 28px rgba(20, 35, 60, 0.12);
  }
  .sidebar-logo {
    width: 1.85rem;
    height: 1.85rem;
    max-width: 1.85rem;
  }
  .mobile-nav-close {
    position: static;
    margin-left: 0.15rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink);
    flex-shrink: 0;
  }
  body.nav-lock { overflow: hidden; }

  .mobile-bottom-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    min-height: 3.85rem;
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(9,9,11,0.06);
  }
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.25rem 0.2rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-tab svg {
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
  }
  .mobile-tab span:not(.mobile-tab-scan-icon) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-tab.active { color: var(--brand); }
  .mobile-tab-scan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.55rem;
    margin-top: -1.15rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 18px rgba(225, 29, 72, 0.35);
  }
  .mobile-tab-scan-icon svg { width: 1.25rem; height: 1.25rem; color: #fff; }
  .mobile-tab-scan.active { color: var(--brand-dark); }
  .mobile-tab-scan.active .mobile-tab-scan-icon { background: var(--brand-dark); }
}

@media (min-width: 901px) {
  .mobile-topbar,
  .mobile-bottom-nav,
  .mobile-nav-backdrop,
  .mobile-nav-close { display: none !important; }

  .sidebar-collapse-btn { display: inline-flex; }

  .wrap.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
  }
  .wrap.sidebar-collapsed .sidebar-brand-text,
  .wrap.sidebar-collapsed .nav-group,
  .wrap.sidebar-collapsed .nav-link span,
  .wrap.sidebar-collapsed .user-box strong,
  .wrap.sidebar-collapsed .user-box span,
  .wrap.sidebar-collapsed .sidebar-logout,
  .wrap.sidebar-collapsed .sidebar-credit {
    display: none !important;
  }
  .wrap.sidebar-collapsed .sidebar-logo {
    width: 1.75rem;
    height: 1.75rem;
    max-width: 1.75rem;
  }
  .wrap.sidebar-collapsed .sidebar-top {
    padding: 0.65rem 0.45rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
  }
  .wrap.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    flex: 0;
  }
  .wrap.sidebar-collapsed .sidebar-collapse-btn {
    position: static;
    margin-left: 0;
  }
  .wrap.sidebar-collapsed .sidebar-nav {
    padding: 0.55rem 0.4rem;
  }
  .wrap.sidebar-collapsed .nav-link {
    justify-content: center !important;
    padding: 0.65rem !important;
  }
  .wrap.sidebar-collapsed .user-box {
    padding: 0.45rem;
    background: transparent;
    box-shadow: none;
  }
  .wrap.sidebar-collapsed .sidebar-foot {
    padding: 0.55rem 0.4rem;
  }
  .wrap.sidebar-collapsed .desktop-toolbar { display: block; }
  .wrap:not(.sidebar-collapsed) .desktop-toolbar { display: none; }
}

@media (max-width: 900px) {
  .sidebar-collapse-btn,
  .desktop-toolbar { display: none !important; }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(9,9,11,0.55);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-close {
  border: 0;
  background: var(--surface);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.photo-thumb.broken { font-size: 0.7rem; }
.badge-neutral { background: #f4f4f5; color: #3f3f46; }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.family-list { display: grid; gap: 0.65rem; }
.family-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.family-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.family-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
}
.family-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.family-title-row h2 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--font-display);
}
.family-payer { color: var(--brand); font-size: 0.75rem; }
.family-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.family-chevron {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}
.family-card.collapsed .family-body { display: none; }
.family-body { padding: 0.5rem; }
.member-tiles {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.member-tile {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  padding: 0.5rem 0.6rem;
  background: #fff;
}
.member-tile.is-payer {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.member-tile-name {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.member-tile-badges { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
.member-tile .photo-thumb { width: 44px; height: 44px; border-radius: 0.55rem; flex-shrink: 0; }

/* ——— IGCA chips / badges / inputs (port globals.css) ——— */
.mb-4 { margin-bottom: 1rem; }

.igca-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.igca-badge-xs { padding: 0.1rem 0.4rem !important; font-size: 0.62rem !important; }
.igca-badge-success { background: #d1fae5; color: #065f46; }
.igca-badge-warning { background: #ffedd5; color: #9a3412; }
.igca-badge-danger { background: #fee2e2; color: #991b1b; }
.igca-badge-neutral { background: #eef1f5; color: #3d4a5c; }
.igca-badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.igca-badge-child { background: #e0f2fe; color: #075985; }
.igca-badge-single { background: #ede9fe; color: #5b21b6; }

.igca-table {
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
  border-collapse: collapse;
}
.igca-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.8rem 1rem;
}
.igca-table td {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.igca-table tbody tr { transition: background 0.12s ease; }
.igca-table tbody tr:hover { background: var(--surface); }

.igca-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.igca-chip:hover { border-color: var(--border-strong); color: var(--ink); }
.igca-chip-active {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.igca-chip-scroll {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: thin;
}

.igca-alert {
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-decoration: none;
}
.igca-alert-success { background: #ecfdf5; color: #065f46; }
.igca-alert-info { background: #eff6ff; color: #1e40af; }

.igca-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  background: #fff;
}

/* ——— Members directory (Node MembersDirectory) ——— */
.members-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.members-search-form .igca-input { min-width: 180px; flex: 1; padding-top: 0.45rem; padding-bottom: 0.45rem; }
.members-renewal-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.members-directory { display: grid; gap: 0.75rem; }
.members-event-hint { font-size: 0.75rem; color: #047857; margin: 0; }
.members-renewal-hint { font-size: 0.75rem; color: var(--muted); margin: 0; }
.members-filter-bar {
  position: static;
  z-index: auto;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.4rem 0.5rem;
}

.members-toolbar {
  position: static;
  z-index: auto;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.45rem;
}
.members-toolbar-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.members-search-wrap {
  position: relative;
  flex: 1 1 12rem;
  min-width: 0;
  display: block;
}
.members-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.9rem;
  height: 0.9rem;
  color: var(--muted);
  pointer-events: none;
}
.members-search-icon svg { width: 100%; height: 100%; display: block; }
.members-search-input {
  width: 100%;
  padding: 0.35rem 0.65rem 0.35rem 2rem !important;
  min-height: 2.1rem;
  font-size: 0.85rem;
}
.members-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.members-toolbar-sep {
  width: 1px;
  align-self: stretch;
  min-height: 1.2rem;
  background: var(--border);
  margin: 0 0.15rem;
}
.members-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.members-pill:hover { border-color: var(--border-strong); }
.members-pill-count {
  min-width: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.members-pill.is-active {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.members-pill.is-active .members-pill-count {
  background: #fff;
  color: var(--brand-dark);
}
.members-count-line { font-size: 0.75rem; color: var(--muted); margin: 0; }
.members-family-list { display: grid; gap: 0.65rem; }
.members-family-card { overflow: hidden !important; padding: 0 !important; border-radius: 0.65rem !important; }
.members-family-card.collapsed .members-family-body { display: none; }
.members-family-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.members-family-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
}
.members-family-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.members-family-title h2 {
  margin: 0;
  font-size: 0.9rem;
  font-family: var(--font-display);
}
.members-payer-name { color: var(--brand); font-size: 0.72rem; }
.members-ordered-at { color: var(--muted); font-size: 0.72rem; }
.members-family-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.members-chevron {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}
.members-family-body { padding: 0.5rem; }
.members-tile-grid {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .members-tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .members-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1536px) { .members-tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.members-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.45rem 0.5rem;
  background: #fff;
}
.members-tile-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.members-tile-actions {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
}
.members-tile.is-payer {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.members-payer-badge {
  position: absolute;
  top: -0.45rem;
  left: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0.25rem;
  padding: 0.05rem 0.35rem;
}
.members-photo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
}
.members-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f5;
  color: #71717a;
  font-size: 0.72rem;
  font-weight: 600;
}
.members-photo.is-payer-ring,
.members-photo-fallback.is-payer-ring {
  box-shadow: 0 0 0 1px var(--brand);
}
.members-tile-main { min-width: 0; flex: 1; }
.members-tile-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.members-tile-name:hover { color: var(--brand); }
.members-tile-meta {
  margin-top: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-size: 0.62rem;
  line-height: 1.2;
  color: var(--muted);
}
.members-tile-actions {
  display: flex;
  shrink: 0;
  align-items: center;
  gap: 0.15rem;
}
.members-action-link,
.members-action-muted,
.members-action-mail {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.45rem;
  padding: 0.4rem 0.35rem;
  min-height: 2.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
}
.members-action-link { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.members-action-link:hover { background: #ffe4e6; }
.members-action-muted { color: var(--muted); }
.members-action-muted:hover { background: #f4f4f5; color: var(--ink); }
.members-action-mail { color: var(--brand); font-weight: 700; }
.members-action-mail:hover { background: var(--brand-soft); }
.members-action-muted.is-disabled,
.members-action-mail.is-disabled,
.members-action-mail:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.members-pager {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ——— Member show (fiche détaillée) ——— */
.member-show { display: grid; gap: 1.25rem; }
.member-back-link { font-size: 0.875rem; font-weight: 600; color: var(--brand); }
.member-back-link:hover { text-decoration: underline; }
.text-warn { color: #b45309; }
.text-brand { color: var(--brand); }
.text-danger { color: var(--danger); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.block-xs { display: block; font-size: 0.75rem; margin-top: 0.15rem; }
.break-all { word-break: break-all; }

.member-recap { overflow: hidden; padding: 0 !important; }
.member-recap-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.member-recap-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0;
}
.member-recap-title { margin: 0.15rem 0 0; font-size: 1.25rem; font-family: var(--font-display); }
.member-year-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.member-recap-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.member-recap-grid {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .member-recap-grid { grid-template-columns: 200px 1fr 180px; }
}
.member-recap-photo {
  border-bottom: 1px solid var(--border);
  background: #f4f4f5;
  aspect-ratio: 1;
}
@media (min-width: 1024px) {
  .member-recap-photo { border-bottom: 0; border-right: 1px solid var(--border); }
}
.member-recap-photo-img,
.member-recap-photo-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.member-recap-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #71717a;
  background: #f4f4f5;
}

.member-recap-info {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 1024px) {
  .member-recap-info { border-bottom: 0; border-right: 1px solid var(--border); }
}
.member-recap-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.member-field-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .member-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.member-field-full { grid-column: 1 / -1; }
.member-field-label {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.member-field p { margin: 0.25rem 0 0; font-size: 0.875rem; }
.member-notes {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--muted);
}
.member-recap-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.member-recap-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
}
.member-qr-box {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 0 0 1px var(--border);
}
.member-qr-box svg { display: block; width: 140px; height: 140px; }
.member-qr-link { font-size: 0.75rem; font-weight: 600; color: var(--brand); }

.member-edit-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .member-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.member-photo-panel {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fafafa;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}
.member-photo-panel h3 { margin: 0; font-size: 0.875rem; }
.member-photo-upload { display: grid; gap: 0.5rem; }
.member-photo-picker summary { cursor: pointer; list-style: none; display: inline-flex; }
.member-photo-options { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.member-photo-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: #fff;
}
.member-photo-option-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f4f4f5;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #a1a1aa;
}
.member-photo-option-preview img { width: 100%; height: 100%; object-fit: cover; }
.member-photo-option-meta { flex: 1; min-width: 0; display: grid; gap: 0.15rem; }

.member-actions-panel { padding: 1.25rem !important; display: grid; gap: 0.75rem; }
.member-actions-panel h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.member-actions-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.member-block-form { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.igca-alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.member-edit-panel { padding: 0 !important; overflow: hidden; }
.member-edit-summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  list-style: none;
}
.member-edit-form { padding: 0 1.25rem 1.25rem; display: grid; gap: 1rem; }

.member-family-panel { padding: 1.25rem !important; display: grid; gap: 0.75rem; }
.member-family-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; }
.member-family-head h2 { margin: 0; font-size: 1.1rem; font-family: var(--font-display); }
.member-family-list-links { margin: 0.35rem 0 0; padding-left: 1rem; font-size: 0.875rem; }
.member-family-list-links a { color: var(--brand); text-decoration: underline; }
.member-family-rename { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-bottom: 0.5rem; }
.member-family-search-label { display: block; font-size: 0.875rem; font-weight: 500; }
.member-family-search-label input { margin-top: 0.35rem; }
.member-family-hits {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.member-family-hits li label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
}
.member-family-hits li label:hover { background: var(--surface); }
.member-family-selected { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0; }
.member-family-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 0.4rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.member-merge-confirm {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
}
.member-merge-confirm p { margin: 0 0 0.65rem; font-size: 0.88rem; line-height: 1.4; }
.member-merge-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.55rem 0.75rem;
  font: inherit;
  cursor: pointer;
}
.member-merge-hit:hover,
.member-merge-hit.is-active { background: var(--surface); }

.member-history-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .member-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.member-history-card { padding: 1.25rem !important; }
.member-history-card h2 { margin: 0; font-size: 1.1rem; font-family: var(--font-display); }
.member-history-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  font-size: 0.875rem;
}
.member-history-list > li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.member-history-list > li:last-child { border-bottom: 0; }
.member-history-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.member-history-details {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}
.member-history-sends li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ——— Members mobile ——— */
@media (max-width: 900px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .wrap,
  .main {
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }
  .main {
    padding: 0.75rem 0.7rem calc(1rem + 4.5rem);
  }

  .page-head {
    gap: 0.55rem;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 100%;
  }
  .page-head > div {
    min-width: 0;
    width: 100%;
  }
  .page-head h1 {
    font-size: 1.3rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .page-head > div > .muted {
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-word;
  }
  .page-actions {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .page-actions .igca-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    min-height: 2.5rem;
    font-size: 0.8rem;
    padding: 0.5rem 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .page-actions .igca-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .igca-card,
  .members-directory,
  .members-family-list,
  .members-family-card,
  .members-tile {
    max-width: 100%;
    box-sizing: border-box;
  }
  .members-directory {
    width: 100%;
    gap: 0.6rem;
  }

  .members-search-form {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .members-search-form .igca-input {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .members-renewal-chips {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
  .members-renewal-chips .igca-chip {
    flex-shrink: 0;
  }
  .members-search-form > .igca-btn {
    min-height: 2.5rem;
    width: 100%;
  }
  .members-toolbar {
    position: static;
    padding: 0.5rem 0.6rem;
    gap: 0.4rem;
    border-radius: 0.7rem;
  }
  .members-toolbar-search {
    flex-wrap: nowrap;
  }
  .members-toolbar-search .igca-btn {
    width: auto;
    min-height: 2.1rem;
    flex-shrink: 0;
  }
  .members-toolbar-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
  }
  .members-pill { flex-shrink: 0; }
  .members-toolbar-sep { display: none; }
  .members-filter-bar {
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
  }
  .igca-chip-scroll {
    max-width: 100%;
  }
  .members-count-line {
    word-break: break-word;
  }

  .members-family-head {
    flex-direction: column;
    align-items: stretch;
    padding: 0.55rem 0.6rem;
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
  }
  .members-family-toggle {
    width: 100%;
    max-width: 100%;
  }
  .members-family-title {
    max-width: 100%;
  }
  .members-family-title h2 {
    font-size: 0.92rem;
    overflow-wrap: anywhere;
  }
  .members-family-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.3rem;
  }
  .members-family-actions .members-chevron {
    margin-left: auto;
  }
  .members-ordered-at { display: none; }
  .members-family-body {
    padding: 0.4rem;
    width: 100%;
    box-sizing: border-box;
  }
  .members-tile-grid {
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .members-tile {
    width: 100%;
    padding: 0.5rem;
    gap: 0.4rem;
    overflow: hidden;
  }
  .members-tile::after { display: none; }
  .members-tile-top {
    width: 100%;
    min-width: 0;
  }
  .members-photo,
  .members-photo-fallback {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.45rem;
  }
  .members-tile-main {
    min-width: 0;
    overflow: hidden;
  }
  .members-tile-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.88rem;
    max-width: 100%;
  }
  .members-tile-meta {
    font-size: 0.62rem;
    gap: 0.2rem;
    max-width: 100%;
  }

  .members-tile-actions {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 0.3rem;
    border-top: 1px solid var(--border);
    padding-top: 0.4rem;
    box-sizing: border-box;
  }
  .members-action-link,
  .members-action-muted,
  .members-action-mail {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    min-height: 2.45rem;
    font-size: clamp(0.7rem, 3.2vw, 0.82rem);
    padding: 0.4rem 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .member-show {
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .member-show > .page-head {
    display: none;
  }
  .member-back-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
  }
  .member-recap-head {
    padding: 0.85rem 0.9rem;
    gap: 0.55rem;
  }
  .member-recap-title {
    font-size: 1.15rem;
    overflow-wrap: anywhere;
  }
  .member-recap-photo {
    width: min(42vw, 9.5rem);
    aspect-ratio: 1;
    margin: 0.85rem auto 0;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .member-recap-info {
    padding: 0.9rem;
    gap: 1rem;
  }
  .member-field-grid {
    gap: 0.75rem;
  }
  .member-recap-stats {
    gap: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }
  .member-recap-qr {
    padding: 0.85rem;
  }
  .member-qr-box svg {
    width: 118px;
    height: 118px;
  }
  .member-edit-grid {
    gap: 0.75rem;
  }
  .member-photo-panel,
  .member-actions-panel,
  .member-family-panel,
  .member-history-card {
    padding: 0.9rem !important;
  }
  .member-actions-row {
    flex-direction: column;
    align-items: stretch;
  }
  .member-actions-row > form,
  .member-actions-row > a,
  .member-actions-row .igca-btn {
    width: 100%;
  }
  .member-actions-row .igca-btn,
  .member-actions-row a.igca-btn {
    justify-content: center;
    min-height: 2.65rem;
  }
  .member-block-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .member-block-form .igca-input {
    width: 100%;
  }
  .member-history-grid {
    gap: 0.75rem;
  }
}

@media (max-width: 380px) {
  .members-action-link,
  .members-action-muted,
  .members-action-mail {
    font-size: 0.68rem;
    min-height: 2.3rem;
    letter-spacing: -0.01em;
  }
  .page-actions {
    grid-template-columns: 1fr;
  }
}

/* ——— Page Envois ——— */
.send-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.send-kpi .igca-kpi-value {
  font-size: 1.65rem;
}
.send-kpi-sent { border-left: 3px solid #64748b; }
.send-kpi-pending { border-left: 3px solid var(--brand); }
.send-kpi-ready { border-left: 3px solid #16a34a; }
.send-kpi-quota { border-left: 3px solid #0ea5e9; }
.send-kpi-quota-warn { border-left-color: #f59e0b; background: #fffbeb; }
.send-quota-bar {
  margin-top: 0.55rem;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.send-quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
  transition: width 0.25s ease;
}
.send-kpi-quota-warn .send-quota-bar span {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.send-toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.75rem;
}
.send-toolbar .igca-input {
  flex: 1;
  min-width: 200px;
}
.send-hint {
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}
.send-table-wrap {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}
.send-table-scroll {
  max-height: min(70vh, 720px);
  overflow: auto;
}
.send-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.send-table thead {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  z-index: 1;
}
.send-table th,
.send-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.send-table tbody tr {
  border-top: 1px solid var(--border);
}
.send-col-check { width: 40px; }
.send-member-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.send-member-link:hover { text-decoration: underline; }
.send-member-meta,
.send-phone,
.send-status-meta {
  font-size: 0.75rem;
  margin-top: 0.15rem;
}
.send-no-contact { color: #b45309; }
.send-status-meta { line-height: 1.35; }
.send-empty {
  padding: 2rem;
  text-align: center;
  display: none;
}
.send-filter-count::before { content: '('; }
.send-filter-count::after { content: ')'; }
.send-recent-list {
  margin: 0.75rem 0 0;
  max-height: 260px;
  overflow: auto;
  padding-left: 0;
  list-style: none;
}
.send-recent-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.igca-alert-warning {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 0.65rem;
  padding: 0.65rem 0.85rem;
}

@media (max-width: 1024px) {
  .send-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .send-kpi-grid {
    grid-template-columns: 1fr;
  }
  .send-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .send-toolbar .igca-btn {
    width: 100%;
  }
  .send-table {
    min-width: 0;
  }
  .send-table thead {
    display: none;
  }
  .send-table,
  .send-table tbody,
  .send-table tr,
  .send-table td {
    display: block;
    width: 100%;
  }
  .send-row {
    padding: 0.75rem 0.9rem;
    border-top: 1px solid var(--border);
  }
  .send-row td {
    padding: 0.2rem 0;
    border: 0;
  }
  .send-col-check {
    float: left;
    width: auto;
    margin-right: 0.5rem;
  }
  .send-col-member {
    overflow: hidden;
    margin-bottom: 0.35rem;
  }
  .send-col-delivery {
    margin-top: 0.35rem;
    padding-top: 0.35rem !important;
    border-top: 1px dashed var(--border) !important;
  }
  .send-col-status {
    margin-top: 0.35rem;
  }
  .send-filters .igca-chip {
    font-size: 0.72rem;
  }
}

/* ——— UI polish v24: dashboard / events / send / login ——— */
.section-gap { margin-bottom: 1rem; }
.section-gap-lg { margin-bottom: 1.5rem; }
.section-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}
.section-title-sm {
  margin: 0 0 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.dash-journey .dash-step strong { display: block; margin-bottom: 0.2rem; }
.dash-journey .dash-step .muted { margin: 0.35rem 0 0.75rem; font-size: 0.9rem; }
.kpi-note { font-size: 0.8rem; margin-top: 0.35rem; color: var(--muted); }
.chart-card h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.chart-card .muted { margin: 0 0 0.75rem; font-size: 0.75rem; }
.chart-card-wide { grid-column: 1 / -1; }
.chart-card-wide .chart-wrap { height: 240px; }

.events-checklist { padding: 1rem; }
.events-checklist-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin: 0;
}
.events-checklist h3 { margin: 0.4rem 0 0.75rem; }
.events-checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.events-checklist-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
}
.events-checklist-list a {
  color: var(--brand);
  font-weight: 600;
  flex-shrink: 0;
}
.events-stack { display: grid; gap: 0.75rem; margin-top: 1rem; }
.events-row {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.events-row-main { min-width: min(100%, 260px); }
.events-row-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.events-row-title h3 { margin: 0; }
.events-row-meta { margin: 0.3rem 0 0; font-size: 0.9rem; }
.events-row-stats {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
.events-stat-ok { color: var(--success); }
.events-stat-warn { color: var(--warning); }
.events-stat-bad { color: var(--danger); }
.events-row-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.send-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}
.send-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.send-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}

/* ——— Login Dropbox-like (clair, 2 colonnes) ——— */
body:has(.login-page) { background: #fff; }
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
}
.login-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid #eceff3;
}
.login-top-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.login-top-brand img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.login-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2.5rem 3rem;
  gap: 2rem;
}
.login-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.login-illu {
  width: min(100%, 280px);
  height: auto;
  display: block;
}
.login-visual-caption {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}
.login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-panel-inner {
  width: 100%;
  max-width: 360px;
}
.login-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.login-subtitle {
  margin: 0.35rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.login-err {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.7rem 0.9rem;
  border-radius: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.login-form {
  display: grid;
  gap: 0.85rem;
}
.login-field { display: block; margin: 0; }
.login-input {
  width: 100%;
  appearance: none;
  border: 1px solid #d0d7de;
  border-radius: 0.35rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-input::placeholder { color: #8b95a5; }
.login-input:hover { border-color: #b8c0cc; }
.login-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(194, 59, 74, 0.22);
}
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
}
.login-help {
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.login-help:hover { text-decoration: underline; }
.login-submit {
  appearance: none;
  border: 0;
  border-radius: 0.35rem;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.login-submit:hover { background: var(--brand-dark); }
.login-submit:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.login-credit {
  margin-top: auto;
  padding: 1rem 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.login-credit .credit-label {
  font-size: 0.7rem;
}
.login-credit .credit-logo-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  opacity: 0.95;
  transition: opacity 0.15s ease;
}
.login-credit .credit-logo-link:hover { opacity: 1; }
.login-credit .credit-logo {
  height: 26px;
  width: auto;
  max-width: min(180px, 55vw);
  display: block;
  object-fit: contain;
}
.login-credit a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.login-credit a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 860px) {
  .login-split {
    grid-template-columns: 1fr;
    padding: 1.25rem 1.25rem 2rem;
    gap: 1.75rem;
    align-content: start;
  }
  .login-panel { order: 0; }
  .login-visual {
    order: 1;
    padding: 0.25rem 0 0;
    opacity: 0.92;
  }
  .login-illu { width: min(100%, 160px); }
  .login-visual-caption { display: none; }
  .login-title { font-size: 1.75rem; }
  .login-panel-inner { max-width: 400px; }
}
@media (max-width: 480px) {
  .login-visual { display: none; }
}

@media (max-width: 900px) {
  .events-checklist-list li { flex-direction: column; gap: 0.25rem; }
  .send-toolbar .igca-input { min-width: 0; flex: 1 1 100%; }
}

.events-create-summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.events-create-summary::-webkit-details-marker { display: none; }
.events-create-body {
  border-top: 1px solid var(--border);
  padding: 1rem;
}
/* ——— UI polish v25: collapse, typo, flatten, dashboard simple ——— */
.chart-wrap { height: 220px; position: relative; }
.chart-card {
  background: var(--surface);
  padding: 1rem 1.1rem;
}
.chart-card h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.chart-card .muted { margin: 0 0 0.75rem; font-size: 0.85rem; }
.chart-card-wide { grid-column: 1 / -1; }
.chart-card-wide .chart-wrap { height: 240px; }

.dash-actions {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.dash-actions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.dash-actions li:last-child { border-bottom: 0; }
.dash-actions strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.dash-actions .muted { margin: 0.2rem 0 0; font-size: 0.95rem; }
.dash-actions .btn { min-height: 2.75rem; min-width: 7.5rem; }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}
.kpi-row-compact { margin-top: 0.25rem; }
.kpi-soft {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  min-height: 4.5rem;
  transition: background 0.15s ease;
}
.kpi-soft:hover { background: #e7e4df; }
.kpi-soft-static { cursor: default; }
.kpi-soft-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.kpi-soft-label {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.dash-more {
  border-top: 1px solid var(--border);
  padding-top: 0.25rem;
}
.dash-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.15rem;
  min-height: 3rem;
}
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more > summary strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.dash-more > summary .muted {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
}
.dash-more-chevron {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.15s ease;
}
.dash-more[open] > summary .dash-more-chevron { transform: rotate(180deg); }
.dash-more-body { padding: 0.25rem 0 0.5rem; }

/* Moins d’encadrés : surfaces plates, bordures seulement si interaction */
.igca-card,
.card,
.member-photo-panel,
.member-actions-panel,
.member-family-panel,
.member-history-card,
.member-edit-panel,
.send-kpi .igca-kpi,
.events-checklist {
  border: 0 !important;
  box-shadow: none !important;
}
.member-photo-panel,
.member-actions-panel,
.member-family-panel,
.member-history-card {
  background: var(--surface) !important;
}
.btn-ghost,
.igca-btn-ghost {
  background: var(--surface);
  border-color: transparent;
}
.input,
.igca-input,
select.igca-input,
textarea.igca-input {
  min-height: 2.75rem;
  font-size: 1rem;
}
.btn,
.igca-btn {
  min-height: 2.65rem;
}
.btn-sm,
.igca-btn-xs {
  min-height: 2.25rem;
}
table.igca-table th,
.igca-table th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: transparent;
  border-bottom: 1px solid var(--border);
}
table.igca-table td,
.igca-table td {
  border-bottom: 1px solid var(--border);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.ok, .err {
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.ok { background: #ecfdf5; color: #065f46; }
.err { background: #fef2f2; color: #991b1b; }

@media (max-width: 640px) {
  .dash-actions li { align-items: flex-start; }
  .dash-actions .btn { width: 100%; }
  body { font-size: 1.05rem; }
}

/* ——— Membres v26 ——— */
.members-shell {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.members-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.members-search-bar .members-search-wrap {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
}
.members-search-bar .members-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}
.members-search-bar .members-search-icon svg { width: 100%; height: 100%; display: block; }
.members-search-bar .members-search-input {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem !important;
  min-height: 2.85rem !important;
  font-size: 1.05rem !important;
  background: #fff;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
.members-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--surface);
  border-radius: var(--radius);
}
.members-seg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
}
.members-seg-btn span {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.members-seg-btn.is-active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 1px 2px rgba(20, 35, 60, 0.06);
}
.members-seg-btn.is-active span { color: var(--brand); }
.members-more-filters {
  border-top: 1px solid var(--border);
  padding-top: 0.1rem;
}
.members-more-filters > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.1rem;
}
.members-more-filters > summary::-webkit-details-marker { display: none; }
.members-more-filters > summary strong {
  font-family: var(--font-display);
  font-size: 1rem;
}
.members-filter-active { color: var(--brand-dark); font-weight: 650; }
.members-more-chevron {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.15s ease;
}
.members-more-filters[open] > summary .members-more-chevron { transform: rotate(180deg); }
.members-filter-groups {
  display: grid;
  gap: 0.85rem;
  padding: 0.2rem 0 0.5rem;
}
.members-filter-group-label {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.members-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.members-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.members-chip span {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.85rem;
}
.members-chip.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.members-chip.is-active span { color: var(--brand); }
.members-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
}
.members-result-bar p { margin: 0; font-size: 0.95rem; }
.members-event-hint {
  font-size: 0.95rem !important;
  color: #065f46 !important;
  margin: 0 0 0.85rem !important;
  padding: 0.65rem 0.85rem;
  background: #ecfdf5;
  border-radius: var(--radius);
}
.members-family-list { gap: 0.4rem !important; }
.members-family-card {
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: var(--radius) !important;
}
.members-family-head {
  padding: 0.65rem 0.85rem !important;
  background: transparent !important;
  border-bottom: 1px solid transparent !important;
}
.members-family-card:not(.collapsed) .members-family-head {
  background: var(--surface) !important;
  border-bottom-color: var(--border) !important;
}
.members-family-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 2.75rem;
}
.members-family-title {
  display: grid !important;
  gap: 0.15rem;
}
.members-family-title h2 {
  font-size: 1.05rem !important;
}
.members-family-meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.members-family-body { padding: 0.1rem 0.35rem 0.4rem !important; }
.members-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.members-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.55rem;
  border-bottom: 1px solid var(--border);
}
.members-row:last-child { border-bottom: 0; }
.members-row.is-payer {
  background: color-mix(in srgb, var(--brand-soft) 45%, transparent);
  border-radius: var(--radius-sm);
}
.members-row-main { min-width: 0; }
.members-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.members-row-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.members-row-sub .is-ok { color: #047857; font-weight: 650; }
.members-row-sub .is-warn { color: #b45309; font-weight: 650; }
.members-row-sub .is-danger { color: #b91c1c; font-weight: 650; }
.members-payer-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--brand-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
}
.members-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.members-row .members-photo,
.members-row .members-photo-fallback {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
}
.members-tile-name {
  font-size: 1.02rem !important;
}

@media (max-width: 720px) {
  .members-seg-btn { font-size: 0.82rem; flex-direction: column; gap: 0.1rem; }
  .members-row {
    grid-template-columns: auto 1fr;
    gap: 0.55rem;
  }
  .members-row-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }
  .members-row-actions .igca-btn {
    flex: 1 1 0;
  }
  .members-search-bar .igca-btn { min-height: 2.85rem; }
}

/* ——— Membres liste plate (plus d’accordéons) ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.members-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--radius);
}
.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.members-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: var(--surface);
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.members-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.members-table tbody tr:last-child td { border-bottom: 0; }
.members-table tbody tr:hover td { background: color-mix(in srgb, var(--surface) 70%, #fff); }
.members-table tbody tr.is-payer td {
  background: color-mix(in srgb, var(--brand-soft) 35%, transparent);
}
.members-person {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 12rem;
}
.members-person .members-photo,
.members-person .members-photo-fallback {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.members-person-text { min-width: 0; }
.members-person-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}
.members-col-num code {
  font-size: 0.85rem;
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.members-status {
  font-weight: 650;
  font-size: 0.88rem;
  white-space: nowrap;
}
.members-status.is-ok { color: #047857; }
.members-status.is-warn { color: #b45309; }
.members-status.is-danger { color: #b91c1c; }
.members-status.is-muted { color: var(--muted); font-weight: 500; }

.ms-photo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.35rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}
.ms-photo-badge svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}
.ms-photo-badge.is-ok {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}
.ms-photo-badge.is-missing {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fdba74;
}
.members-photo-fallback.is-missing {
  box-shadow: inset 0 0 0 2px #fb923c;
  color: #c2410c;
  font-weight: 700;
}
.ms-send-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.35rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}
.ms-send-badge svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}
.ms-send-badge.is-sent-email,
.ms-send-badge.is-sent-sms,
.ms-send-badge.is-sent-ok {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.ms-send-badge.is-ready {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fdba74;
}
.ms-send-badge.is-missing {
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px #fecaca;
}
.members-list-item.is-send-sent-email,
.members-list-item.is-send-sent-sms,
.members-list-item.is-send-sent-ok {
  box-shadow: inset 3px 0 0 #10b981;
}
.members-list-item.is-send-ready {
  box-shadow: inset 3px 0 0 #f97316;
}
.members-list-item.is-send-missing {
  box-shadow: inset 3px 0 0 #ef4444;
}
.members-action-send.is-resent {
  opacity: 0.88;
}
.members-col-actions {
  white-space: nowrap;
  text-align: right;
}
.members-col-actions .igca-btn {
  margin-left: 0.2rem;
}
.members-empty-cell {
  text-align: center;
  padding: 2.5rem 1rem !important;
}

.members-groups {
  display: grid;
  gap: 1rem;
}
.members-group {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.members-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem 0.55rem;
  background: var(--surface);
}
.members-group-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.55rem;
  margin-left: auto;
}
.members-family-contact,
.members-family-contact-label {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  min-width: min(100%, 260px);
}
.members-family-contact-label span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.members-family-contact-select {
  font-size: 0.84rem;
  padding: 0.4rem 0.55rem;
  min-height: 2.1rem;
}
.members-group-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.members-group-meta {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
.members-send-group {
  flex-shrink: 0;
  min-height: 2.65rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.members-list {
  list-style: none;
  margin: 0;
  padding: 0.45rem 0.65rem 0.65rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.85rem;
}
.members-list-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.members-list-item.is-payer {
  background: color-mix(in srgb, var(--brand-soft) 40%, transparent);
  border-radius: var(--radius-sm);
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}
.members-list-item .members-photo,
.members-list-item .members-photo-fallback {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.members-list-main {
  min-width: 0;
  flex: 1;
}
.members-list-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.members-list-title .members-tile-name {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.members-list-meta {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.members-list-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.3rem;
}
.members-list-actions .igca-btn,
.members-action-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.15rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #fff !important;
  background: var(--ink) !important;
  border: 0 !important;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
}
.members-action-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  color: #fff !important;
  stroke: #fff !important;
}
.members-action-btn:hover,
.members-list-actions .igca-btn:hover,
.members-action-btn:focus-visible,
.members-list-actions .igca-btn:focus-visible {
  background: #243447 !important;
  color: #fff !important;
}
.members-action-btn:hover svg,
.members-list-actions .igca-btn:hover svg,
.members-action-btn:focus-visible svg,
.members-list-actions .igca-btn:focus-visible svg {
  color: #fff !important;
  stroke: #fff !important;
}
.members-action-btn:active,
.members-list-actions .igca-btn:active {
  background: #1a2838 !important;
  color: #fff !important;
}
.members-action-send {
  background: #1c314f !important;
}
.members-action-send:hover,
.members-action-send:focus-visible {
  background: #2a4668 !important;
  color: #fff !important;
}
.members-action-send:disabled {
  opacity: 0.65;
  cursor: wait;
}

@media (max-width: 1100px) {
  .members-list {
    grid-template-columns: 1fr;
  }
  .members-list-meta {
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .members-list-item {
    flex-wrap: wrap;
  }
  .members-list-actions {
    width: 100%;
    padding-left: 2.8rem;
  }
  .members-list-actions .igca-btn,
  .members-action-btn {
    flex: 1 1 auto;
  }
}

/* ——— Fiche membre moderne (plein largeur) ——— */
.member-show {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
}
.member-back-link {
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
}
.member-back-link:hover { color: var(--brand); }

.ms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 1.35rem;
  background: #fff;
  border-radius: var(--radius);
}
.ms-hero-identity {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  min-width: 0;
}
.ms-hero-photo img,
.ms-hero-fallback {
  width: 6rem;
  height: 6rem;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}
.ms-hero-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
}
.ms-hero-text { min-width: 0; }
.ms-hero-text h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
}
.ms-hero-sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}
.ms-hero-sub code {
  font-size: 0.88rem;
  background: var(--surface);
  padding: 0.12rem 0.45rem;
  border-radius: 0.3rem;
}
.ms-hero-years { margin: 0.4rem 0 0; font-size: 0.92rem; }
.ms-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}
.ms-hero-actions .members-action-btn {
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}

.ms-send-panel {
  display: grid;
  grid-template-columns: minmax(14rem, 0.9fr) minmax(0, 1.6fr);
  gap: 1rem 1.5rem;
  align-items: end;
  padding: 1.15rem 1.35rem;
  background: #fff;
  border-radius: var(--radius);
  border-left: 4px solid var(--ink);
}
.ms-send-panel h2 {
  margin: 0;
  font-size: 1.2rem;
}
.ms-send-copy p { margin: 0.3rem 0 0; }
.ms-send-form { min-width: 0; }
.ms-send-label {
  display: block;
  font-weight: 650;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.ms-send-label .muted { font-weight: 500; }
.ms-send-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}
.ms-send-row .igca-input {
  flex: 1 1 18rem;
  min-height: 2.95rem;
  font-size: 1.05rem;
}
.ms-send-row .members-action-btn {
  min-height: 2.95rem;
  padding: 0.55rem 1.25rem;
  font-size: 1rem;
}
.ms-send-hint { margin: 0.5rem 0 0; grid-column: 1 / -1; }
.ms-send-panel-warn {
  grid-template-columns: 1fr;
  border-left-color: var(--warning);
}

.ms-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
}
.ms-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.12rem;
}
.ms-info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
}
.ms-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem 1.35rem;
}
.ms-facts > div { min-width: 0; }
.ms-facts-full { grid-column: 1 / -1; }
.ms-facts dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.ms-facts dd {
  margin: 0.25rem 0 0;
  font-size: 1.02rem;
  line-height: 1.4;
  color: var(--ink);
}
.ms-facts a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ms-qr-side { text-align: center; }
.ms-qr-side .member-qr-box {
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.45rem;
  display: inline-block;
  box-shadow: 0 0 0 1px var(--border);
}
.ms-qr-side .member-qr-box svg { width: 128px; height: 128px; display: block; }
.ms-stats { margin: 1.1rem 0 0; font-size: 0.95rem; }
.ms-notes {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}
.ms-notes h3 { margin: 0 0 0.35rem; font-size: 0.95rem; }
.ms-notes p { margin: 0; color: var(--muted); line-height: 1.45; }
.ms-sub {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}
.ms-sub > summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}
.ms-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
  margin-top: 0.5rem;
}
.ms-inline-form label {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
.ms-grow { flex: 1 1 12rem; min-width: 0; }

.ms-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.ms-tools,
.ms-manage {
  display: grid;
  gap: 1rem;
}
.ms-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.ms-details > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
}
.ms-details > summary::-webkit-details-marker { display: none; }
.ms-details[open] > summary { margin-bottom: 0.75rem; }
.ms-history {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.member-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.member-history-list > li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.member-history-list > li:last-child { border-bottom: 0; }
.member-history-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.member-history-details {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.member-history-details p { margin: 0.15rem 0; }
.member-history-sends li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.member-field-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.member-field-full { grid-column: 1 / -1; }

@media (max-width: 1200px) {
  .ms-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ms-history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .ms-hero,
  .ms-send-panel,
  .ms-info-layout,
  .ms-workspace {
    grid-template-columns: 1fr;
  }
  .ms-hero-actions { justify-content: flex-start; }
  .ms-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ms-facts,
  .ms-history,
  .member-field-grid {
    grid-template-columns: 1fr;
  }
  .ms-hero-photo img,
  .ms-hero-fallback {
    width: 4.75rem;
    height: 4.75rem;
  }
  .ms-send-row .members-action-btn { width: 100%; }
}

/* ——— Icônes / chevrons toujours visibles ——— */
.ms-acc-chevron,
.members-more-chevron,
.dash-more-chevron,
.family-chevron,
.members-chevron {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--ink) !important;
  opacity: 1 !important;
  font-size: 0.75rem;
  line-height: 1;
}
.ms-acc-chevron::before,
.members-more-chevron:empty::before,
details > summary .ms-acc-chevron::before {
  content: "▸";
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
details[open] > summary .ms-acc-chevron::before {
  content: "▾";
}
.members-more-chevron,
.dash-more-chevron {
  color: var(--ink) !important;
  font-size: 0.85rem !important;
  font-weight: 700;
}
.sidebar-collapse-btn svg,
.desktop-menu-toggle svg,
.mobile-menu-btn svg,
.mobile-nav-close svg,
.members-action-btn svg,
.igca-btn svg {
  display: block;
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  color: inherit;
  flex-shrink: 0;
  opacity: 1;
}
.members-action-btn {
  color: #fff !important;
}
.members-action-btn svg {
  color: #fff !important;
  stroke: #fff !important;
}

/* ——— Profil type dashboard (exemples) ——— */
.ms-profile {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
  padding: 1.25rem 1.4rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(20, 35, 60, 0.04);
}
.ms-profile-main {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  min-width: 0;
}
.ms-profile-photo img,
.ms-profile-fallback {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 1rem;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.ms-profile-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--ink);
}
.ms-profile-meta h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
}
.ms-profile-id {
  margin: 0.3rem 0 0;
  color: var(--muted);
}
.ms-profile-id code {
  background: var(--surface);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.88rem;
}
.ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}
.ms-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}
.ms-chip.is-ok { background: #ecfdf5; color: #047857; }
.ms-chip.is-warn { background: #fff7ed; color: #b45309; }
.ms-chip.is-danger { background: #fef2f2; color: #b91c1c; }
.ms-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.95rem;
}
.ms-contact-line a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ms-profile-stats {
  display: flex;
  gap: 0.55rem;
}
.ms-stat {
  min-width: 5.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  background: #fff;
}
.ms-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}
.ms-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 650;
}
.ms-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}
.ms-profile-actions .members-action-btn {
  min-height: 2.75rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
}

.ms-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
}
.ms-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  min-height: 2.65rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ms-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 35, 60, 0.08);
}
.ms-panels > .ms-panel { display: none; }
.ms-panels > .ms-panel.is-active { display: block; }
.ms-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
}
.ms-qr-card { text-align: center; }
.ms-qr-card .member-qr-box {
  display: inline-block;
  padding: 0.45rem;
  border-radius: 0.65rem;
  box-shadow: 0 0 0 1px var(--border);
  background: #fff;
}
.ms-qr-card .member-qr-box svg { width: 132px; height: 132px; display: block; }
.ms-lead { margin: 0 0 0.85rem; }
.ms-years { margin: 0.75rem 0 0; }
.ms-sub > summary,
.ms-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  font-weight: 700;
  color: var(--ink);
}
.ms-sub > summary::-webkit-details-marker,
.ms-details > summary::-webkit-details-marker { display: none; }
.member-photo-picker > summary {
  list-style: none;
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
}
.member-photo-picker > summary::-webkit-details-marker { display: none; }

.member-show {
  width: 100%;
  max-width: none;
  display: grid;
  gap: 1rem;
}

@media (max-width: 1100px) {
  .ms-profile {
    grid-template-columns: 1fr;
  }
  .ms-profile-actions,
  .ms-profile-stats { justify-content: flex-start; }
  .ms-split { grid-template-columns: 1fr; }
}

/* ——— QR à gauche des stats / actions ——— */
.ms-profile {
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: center;
}
.ms-profile-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}
.ms-qr-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  flex-shrink: 0;
}
.ms-qr-card-top .member-qr-box {
  padding: 0.4rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.ms-qr-card-top .member-qr-box svg {
  width: 112px;
  height: 112px;
  display: block;
}
.ms-qr-card-top .member-qr-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  text-align: center;
}
.ms-qr-card-top .member-qr-link:hover { text-decoration: underline; }
.ms-profile-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}
.ms-profile-side .ms-profile-stats {
  display: flex;
  gap: 0.55rem;
  justify-content: flex-end;
}
.ms-profile-side .ms-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .ms-profile { grid-template-columns: 1fr; }
  .ms-profile-side {
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
  }
  .ms-profile-tools {
    align-items: flex-start;
  }
  .ms-profile-side .ms-profile-stats,
  .ms-profile-side .ms-profile-actions {
    justify-content: flex-start;
  }
}

/* ——— Infos : stylet + famille ——— */
.ms-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ms-section-head h2 { margin: 0; }
.ms-icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.ms-icon-btn svg { width: 1.15rem; height: 1.15rem; display: block; stroke: currentColor; }
.ms-icon-btn:hover,
.ms-icon-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.ms-info-edit .member-edit-form { padding: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ——— Famille (Infos) — affichage plus accueillant ——— */
.ms-family-block {
  margin-top: 1.5rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background: linear-gradient(180deg, #f7f8fb 0%, #fff 55%);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.ms-family-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.ms-family-title {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}
.ms-family-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  background: var(--ink);
  color: #fff;
}
.ms-family-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}
.ms-family-title h3 {
  margin: 0;
  font-size: 1.1rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.ms-family-title p { margin: 0.2rem 0 0; }
.ms-family-head .members-action-btn {
  gap: 0.35rem;
}
.ms-family-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.75rem;
}
.ms-family-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ms-family-badge.is-ha {
  background: color-mix(in srgb, var(--brand) 14%, #fff);
  color: var(--brand-dark, #9a2f3b);
}
.ms-family-badge.is-manual {
  background: color-mix(in srgb, var(--ink) 10%, #fff);
  color: var(--ink);
}
.ms-family-label { color: var(--ink); font-size: 0.95rem; }
.ms-family-count {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
}
.ms-family-mates {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.ms-family-mate {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ms-family-mate:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 28%, var(--border));
  transform: translateY(-1px);
}
.ms-family-avatar {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.ms-family-mate-text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  flex: 1;
}
.ms-family-mate-text strong {
  font-size: 0.92rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-family-mate-text span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.ms-family-mate-go {
  color: var(--muted);
  font-weight: 700;
  opacity: 0.7;
}
.ms-family-mate:hover .ms-family-mate-go { color: var(--brand); opacity: 1; }
.ms-family-empty,
.ms-family-empty-box {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
  color: var(--ink);
  font-size: 0.9rem;
}
.ms-family-empty-box p { margin: 0; }
.ms-family-empty-box p + p { margin-top: 0.25rem; }
.ms-family-manage {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.ms-family-avatar-img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
  display: block;
}

/* ——— Recherche famille : résultats présentables ——— */
.member-family-hits {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0.35rem;
  max-height: 22rem;
  overflow: auto;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f7f8fb 0%, #fff 40%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  display: grid;
  gap: 0.35rem;
}
.member-family-hits li label,
.ms-family-hit {
  display: flex !important;
  align-items: center;
  gap: 0.7rem !important;
  min-height: 3.25rem;
  padding: 0.45rem 0.65rem !important;
  margin: 0;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
  font-size: 0.9rem !important;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.ms-family-hit:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 28%, var(--border));
}
.ms-family-hit:has(input:checked) {
  background: color-mix(in srgb, var(--ink) 6%, #fff);
  box-shadow: 0 0 0 1.5px var(--ink);
}
.ms-family-hit-check {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  accent-color: var(--ink);
}
.ms-family-hit .ms-family-avatar,
.ms-family-hit .ms-family-avatar-img {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.7rem;
}
.ms-family-hit-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.ms-family-hit-text strong {
  color: var(--ink);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-family-hit-meta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.ms-family-hit-years { color: var(--brand-dark, #9a2f3b); }
.ms-family-hit-empty {
  padding: 0.85rem 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: transparent !important;
  box-shadow: none !important;
}
.member-family-chip.has-avatar {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.2rem 0.55rem 0.2rem 0.25rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.member-family-chip.has-avatar .ms-family-avatar,
.member-family-chip.has-avatar .ms-family-avatar-img {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.62rem;
}
.member-family-chip-x {
  color: var(--muted);
  font-weight: 700;
  margin-left: 0.15rem;
}
.member-family-search-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
  margin-top: 0.35rem;
}
.member-family-search-label input {
  margin-top: 0.4rem;
  min-height: 2.75rem;
}

/* ——— Faits Infos avec icônes ——— */
.ms-fact {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.ms-facts dt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.ms-fact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 0.35rem;
  background: var(--surface);
  color: var(--ink);
}
.ms-fact-icon svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
  stroke: currentColor;
}
.ms-facts dd {
  margin: 0;
  padding-left: 1.75rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

/* ——— Réorg onglets fiche ——— */
.ms-block-label {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.ms-carte-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.ms-carte-preview {
  display: grid;
  gap: 0.85rem;
}
.ms-carte-face {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, #f7f8fb, #fff 55%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.ms-carte-photo img,
.ms-carte-photo-fallback {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0.85rem;
  object-fit: cover;
  background: var(--surface);
}
.ms-carte-photo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
}
.ms-carte-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand);
}
.ms-carte-identity h3 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}
.ms-carte-number { margin: 0.25rem 0 0.5rem; color: var(--muted); }
.ms-carte-qr { text-align: center; }
.ms-carte-qr .member-qr-box svg { width: 100px; height: 100px; display: block; }
.ms-carte-meta {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.85rem;
}
.ms-carte-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.ms-carte-meta dd { margin: 0.15rem 0 0; color: var(--ink); }
.ms-carte-actions { display: grid; gap: 0.85rem; }
.ms-tool-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.ms-tool-card h3 { margin: 0 0 0.45rem; font-size: 1.05rem; font-family: var(--font-display); }
.ms-year-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}
.ms-year-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.ms-adh-current { margin-bottom: 1.25rem; }
.ms-adh-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.ms-adh-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.ms-adh-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.ms-adh-item-body p { margin: 0.15rem 0; }
.ms-chip.is-muted { background: var(--surface); color: var(--muted); }
.ms-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.ms-timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.ms-timeline li span { grid-column: 1; color: var(--muted); font-size: 0.88rem; }
.ms-timeline li time { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); font-size: 0.8rem; align-self: center; }
.ms-timeline li.muted { display: block; box-shadow: none; background: transparent; padding-left: 0; }
.ms-evt-current {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.15rem;
  margin-bottom: 1.1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
}
.ms-evt-current.is-ok { box-shadow: 0 0 0 1px color-mix(in srgb, #047857 35%, var(--border)); background: #f0fdf6; }
.ms-evt-current.is-pending { box-shadow: 0 0 0 1px color-mix(in srgb, #b45309 35%, var(--border)); background: #fff8f1; }
.ms-evt-current-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: #fff;
  color: var(--ink);
  flex-shrink: 0;
}
.ms-evt-current-icon svg { width: 1.35rem; height: 1.35rem; }
.ms-evt-current h3 { margin: 0.15rem 0; font-size: 1.2rem; }
.text-ok { color: #047857; }
@media (max-width: 1100px) {
  .ms-carte-layout { grid-template-columns: 1fr; }
  .ms-carte-face { grid-template-columns: auto minmax(0, 1fr); }
  .ms-carte-qr { grid-column: 1 / -1; justify-self: start; }
}

/* ——— Photo carte : une seule + stylet / aperçu ——— */
.ms-carte-photo-wrap {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  flex-shrink: 0;
}
.ms-carte-photo {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  display: block;
}
.ms-carte-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ms-carte-photo-fallback {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  cursor: default;
}
.ms-photo-edit-btn {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  width: 2.15rem;
  height: 2.15rem;
  box-shadow: 0 2px 8px rgba(20, 35, 60, 0.18);
  z-index: 1;
}
.ms-photo-edit { margin-top: 0.85rem; }
.ms-photo-view-modal { max-width: 520px; }
.ms-photo-view-modal img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.modal-backdrop[hidden] { display: none !important; }

/* ——— Adhésions compact + statut ——— */
.ms-adh-current-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.ms-adh-current-head .ms-block-label { margin: 0; margin-right: auto; }
.ms-adh-list-compact { gap: 0.35rem; }
.ms-adh-item.is-compact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
}
.ms-adh-item-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  min-width: 0;
  flex: 1;
}
.ms-adh-item-main > strong {
  min-width: 3rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.ms-adh-item-name {
  font-weight: 650;
  color: var(--ink);
}
.ms-adh-item-meta {
  width: 100%;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.ms-tariff-edit {
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(165deg, color-mix(in srgb, var(--brand) 10%, #fff), #fff 55%);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, var(--border)),
              0 8px 22px rgba(194, 59, 74, 0.08);
}
.ms-tariff-edit.is-spotlight {
  animation: ms-tariff-pulse 1.1s ease 2;
}
@keyframes ms-tariff-pulse {
  0%, 100% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, var(--border)), 0 8px 22px rgba(194, 59, 74, 0.08); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 70%, transparent), 0 10px 28px rgba(194, 59, 74, 0.16); }
}
.ms-tariff-edit-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ms-tariff-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.55rem;
  height: 2.55rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  background: var(--brand);
  color: #fff;
}
.ms-tariff-edit-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}
.ms-tariff-edit h3 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.ms-tariff-edit-head p { margin: 0.2rem 0 0; }
.ms-tariff-current {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 0 0 1px var(--border);
  color: var(--ink);
  font-size: 0.95rem;
}
.ms-tariff-current strong { color: var(--brand-dark, #9a2f3b); }
.ms-tariff-edit .ms-inline-form label {
  color: var(--ink);
  font-weight: 650;
}

/* ——— Envois réorganisés v47 ——— */
.send-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.send-kpi {
  appearance: none;
  border: 0;
  text-align: left;
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
button.send-kpi:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
}
.send-kpi.is-active-kpi {
  box-shadow: 0 0 0 1.5px var(--ink);
}
div.send-kpi { cursor: default; }
.send-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--surface);
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.send-kpi-icon svg { width: 1.05rem; height: 1.05rem; display: block; }
.send-kpi-sent .send-kpi-icon { background: #eef2ff; color: #4338ca; }
.send-kpi-pending .send-kpi-icon { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); }
.send-kpi-ready .send-kpi-icon { background: #ecfdf5; color: #047857; }
.send-kpi-quota .send-kpi-icon { background: #ecfeff; color: #0e7490; }
.send-kpi-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.send-kpi-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.send-kpi-of {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.15rem;
}
.send-kpi-hint {
  font-size: 0.8rem;
  color: var(--muted);
}
.send-kpi-quota-warn {
  background: #fffbeb;
  box-shadow: 0 0 0 1px #fcd34d;
}

.send-workspace {
  padding: 1rem 1.1rem 1.15rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.send-tabs { margin-bottom: 0.85rem; }
.send-tab-count {
  display: inline-flex;
  min-width: 1.4rem;
  justify-content: center;
  margin-left: 0.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
}
.ms-tab.is-active .send-tab-count { background: color-mix(in srgb, var(--ink) 10%, #fff); }

.send-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.send-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0;
}
.send-search {
  position: relative;
  flex: 1;
  min-width: 220px;
  margin: 0;
}
.send-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}
.send-search-icon svg { width: 100%; height: 100%; display: block; }
.send-search .igca-input {
  width: 100%;
  padding-left: 2.35rem;
  min-height: 2.75rem;
}
.send-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.send-table-wrap {
  margin-top: 0.75rem;
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}
.send-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.send-chip {
  gap: 0.3rem;
  min-height: 1.65rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}
.send-chip svg {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
}
.send-col-open { width: 3rem; text-align: right; }
.send-contact-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.send-member-link { color: var(--ink); }
.send-recent {
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.send-recent .ms-section-head { margin-bottom: 0.25rem; }
.send-recent-timeline { max-height: 280px; overflow: auto; }

/* —— Envois : hero + listes —— */
.send-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.7fr);
  gap: 1.25rem 1.75rem;
  align-items: stretch;
  margin-bottom: 1.15rem;
  padding: 1.35rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
    linear-gradient(165deg, #f8fafc 0%, #fff 55%, color-mix(in srgb, var(--navy, #1e293b) 4%, #fff) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.send-hero-copy h1 {
  margin: 0.15rem 0 0.55rem;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  letter-spacing: -0.02em;
  color: var(--navy, #0f172a);
}
.send-hero-lead {
  margin: 0 0 1rem;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}
.send-hero-lead strong {
  color: var(--brand);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.send-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.send-hero-side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-content: center;
  padding: 0.85rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.send-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.send-hero-stat > span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.send-hero-stat strong {
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.send-hero-stat strong small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.send-hero-stat.is-warn strong { color: #b45309; }
.send-hero-side .send-quota-bar { margin-top: 0.35rem; }
.send-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
  padding-top: 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 0.85rem;
}
.send-hero-links a {
  color: var(--navy, #1e293b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.send-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.send-mode {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface, #f8fafc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.send-mode:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}
.send-mode.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--brand);
  transform: translateY(-1px);
}
.send-mode-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
.send-mode-count {
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--navy, #0f172a);
  line-height: 1;
}
.send-mode.is-active .send-mode-count { color: var(--brand); }

.send-more-filters {
  margin-bottom: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in srgb, var(--surface, #f8fafc) 80%, #fff);
}
.send-more-filters > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.send-more-filters > summary::-webkit-details-marker { display: none; }
.send-more-filters[open] > summary { color: var(--ink); }
.send-more-filters .send-filters {
  padding: 0 0.75rem 0.75rem;
  margin-bottom: 0;
}

.send-hint {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.send-list-wrap { margin-top: 0.35rem; }
.send-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.send-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.send-card:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 28%, transparent);
}
.send-card-check {
  display: flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.send-card-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--brand);
}
.send-card-main { min-width: 0; }
.send-card-meta,
.send-card-contact {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.send-card-contact a { color: inherit; }
.send-member-link {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.send-member-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.send-card-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.send-card-open { flex-shrink: 0; }
.send-empty {
  margin: 1.25rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.send-recent > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}
.send-recent > summary::-webkit-details-marker { display: none; }
.send-recent > summary strong { display: block; }
.send-recent > summary .muted { font-size: 0.85rem; }
.send-recent[open] .send-recent-timeline { margin-top: 0.75rem; }

@media (max-width: 1024px) {
  .send-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .send-hero { grid-template-columns: 1fr; }
  .send-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .send-kpi-grid { grid-template-columns: 1fr; }
  .send-toolbar { flex-direction: column; align-items: stretch; }
  .send-toolbar-actions { width: 100%; }
  .send-toolbar-actions .igca-btn,
  .send-toolbar-actions .members-action-btn { flex: 1; }
  .send-modes { grid-template-columns: 1fr 1fr; }
  .send-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "check main open"
      "check status open";
  }
  .send-card-check { grid-area: check; align-self: start; padding-top: 0.15rem; }
  .send-card-main { grid-area: main; }
  .send-card-status { grid-area: status; align-items: flex-start; }
  .send-card-open { grid-area: open; align-self: start; }
  .send-hero-actions { flex-direction: column; align-items: stretch; }
  .send-hero-actions .igca-btn { width: 100%; justify-content: center; }
}

/* —— Import HelloAsso —— */
@keyframes import-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.55; }
}
@keyframes import-spin {
  to { transform: rotate(360deg); }
}
@keyframes import-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.import-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.75fr);
  gap: 1.25rem 1.75rem;
  margin-bottom: 1.15rem;
  padding: 1.45rem 1.45rem 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 55%),
    radial-gradient(70% 60% at 100% 10%, color-mix(in srgb, #0ea5e9 10%, transparent), transparent 50%),
    linear-gradient(165deg, #f8fafc 0%, #fff 58%, color-mix(in srgb, var(--navy, #1e293b) 4%, #fff) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  animation: import-in 0.45s ease both;
}
.import-hero.is-warn {
  background:
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, #f59e0b 18%, transparent), transparent 55%),
    linear-gradient(165deg, #fffbeb 0%, #fff 60%);
}
.import-hero.is-off {
  background:
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 55%),
    linear-gradient(165deg, #f8fafc 0%, #fff 60%);
}
.import-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.import-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #94a3b8;
}
.import-hero.is-live .import-live-dot {
  background: #16a34a;
  animation: import-pulse 1.6s ease infinite;
}
.import-hero.is-warn .import-live-dot { background: #f59e0b; animation: import-pulse 1.6s ease infinite; }
.import-hero-copy h1 {
  margin: 0.1rem 0 0.55rem;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  letter-spacing: -0.03em;
  color: var(--navy, #0f172a);
}
.import-hero-lead {
  margin: 0 0 1.05rem;
  max-width: 36rem;
  font-size: 1.06rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 78%, transparent);
}
.import-hero-lead strong { color: var(--brand); font-weight: 800; }
.import-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.import-hero-side {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  justify-content: center;
  padding: 0.95rem 1.05rem;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
}
.import-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 7%, transparent);
}
.import-hero-stat:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.import-hero-stat > span {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.import-hero-stat strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.import-hero-stat.is-ok strong { color: #047857; }
.import-hero-stat.is-warn strong { color: #b45309; }
.import-hero-sub {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.import-workspace {
  padding: 1.05rem 1.15rem 1.2rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  animation: import-in 0.5s ease 0.05s both;
}
.import-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.05rem;
}
.import-mode {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.85rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface, #f8fafc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.import-mode:hover {
  background: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}
.import-mode.is-active {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--brand);
  transform: translateY(-1px);
}
.import-mode-ico {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  background: #fff;
  color: var(--navy, #1e293b);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  flex-shrink: 0;
}
.import-mode-ico svg { width: 1.1rem; height: 1.1rem; display: block; }
.import-mode.is-active .import-mode-ico {
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}
.import-mode-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.import-mode-label {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink);
}
.import-mode-hint {
  font-size: 0.76rem;
  color: var(--muted);
}
.import-mode-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  min-width: 1.35rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.import-campaign { margin-bottom: 0.9rem; }
.import-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.import-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1rem 1.05rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface, #f8fafc);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 9%, transparent);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.import-tile:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent),
    0 10px 24px -16px rgba(15, 23, 42, 0.35);
}
.import-tile:disabled { opacity: 0.55; cursor: not-allowed; }
.import-tile-primary {
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, transparent);
}
.import-tile-primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  box-shadow:
    inset 0 0 0 1.5px var(--brand),
    0 10px 24px -14px color-mix(in srgb, var(--brand) 55%, transparent);
}
.import-tile-kicker {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}
.import-tile strong {
  font-size: 1.05rem;
  color: var(--ink);
}
.import-tile > span:last-child {
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--muted);
}

.import-photo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface, #f8fafc);
}
.import-photo-banner.has-work {
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}
.import-photo-banner.is-done {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.import-photo-banner strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.import-photo-banner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.import-panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}
.import-panel-head p { margin: 0 0 0.85rem; }
.import-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}
.import-field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.import-field-compact {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.import-field-compact .igca-input {
  width: auto;
  min-width: 4.5rem;
}
.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.import-more,
.import-recent,
.import-tech,
.import-log-wrap {
  margin-top: 0.85rem;
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in srgb, var(--surface, #f8fafc) 80%, #fff);
}
.import-recent,
.import-tech {
  margin-top: 1.15rem;
  padding: 0;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.import-more > summary,
.import-recent > summary,
.import-tech > summary,
.import-log-wrap > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.import-more > summary::-webkit-details-marker,
.import-recent > summary::-webkit-details-marker,
.import-tech > summary::-webkit-details-marker,
.import-log-wrap > summary::-webkit-details-marker { display: none; }
.import-recent > summary strong,
.import-tech > summary strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}
.import-recent > summary .muted,
.import-tech > summary .muted { font-size: 0.82rem; font-weight: 500; }
.import-more-body,
.import-tech-body {
  padding: 0 0.85rem 0.85rem;
  display: grid;
  gap: 0.65rem;
}
.import-tech-body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-all;
}
.import-tech-body code {
  font-size: 0.8rem;
  background: var(--surface, #f8fafc);
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
}
.import-recent-timeline {
  margin: 0;
  padding: 0 0.85rem 0.85rem;
  max-height: 260px;
  overflow: auto;
}

.import-status {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: calc(var(--radius) - 2px);
  background: #fff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  animation: import-in 0.25s ease both;
}
.import-status.is-running {
  background: color-mix(in srgb, #0ea5e9 7%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #0ea5e9 28%, transparent);
}
.import-status.is-done {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}
.import-status.is-error {
  background: #fef2f2;
  box-shadow: inset 0 0 0 1px #fecaca;
}
.import-status-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.import-spinner {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-top-color: var(--brand);
  flex-shrink: 0;
  opacity: 0;
}
.import-status.is-running .import-spinner {
  opacity: 1;
  animation: import-spin 0.7s linear infinite;
}
.import-status.is-done .import-spinner,
.import-status.is-error .import-spinner {
  opacity: 1;
  border: 0;
  background: currentColor;
  mask: none;
  position: relative;
}
.import-status.is-done .import-spinner {
  background: transparent;
  border: 2px solid #059669;
  box-shadow: inset 0 0 0 2px #ecfdf5;
}
.import-status.is-done .import-spinner::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.1rem;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #059669;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.import-status.is-error .import-spinner {
  background: transparent;
  border: 2px solid #dc2626;
}
.import-status.is-error .import-spinner::before,
.import-status.is-error .import-spinner::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 0.55rem;
  background: #dc2626;
}
.import-status.is-error .import-spinner::before { transform: translate(-50%, -50%) rotate(45deg); }
.import-status.is-error .import-spinner::after { transform: translate(-50%, -50%) rotate(-45deg); }
.import-status strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.98rem;
}
.import-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.import-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--surface, #f8fafc);
  font-size: 0.78rem;
  color: var(--muted);
}
.import-chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.import-chip.is-ok { background: #ecfdf5; color: #047857; }
.import-chip.is-ok b { color: #047857; }
.import-chip.is-warn { background: #fffbeb; color: #b45309; }
.import-chip.is-warn b { color: #b45309; }

.import-log-wrap { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); }
.import-log {
  margin: 0;
  padding: 0 0.85rem 0.75rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.76rem;
  color: var(--muted);
}
.import-csv-form {
  display: grid;
  gap: 0.75rem;
  max-width: 32rem;
}

html.import-is-busy .import-tile,
html.import-is-busy .import-hero-actions .igca-btn,
html.import-is-busy .import-photo-banner .igca-btn,
html.import-is-busy .import-actions .igca-btn {
  pointer-events: none;
  opacity: 0.65;
}

@media (max-width: 1024px) {
  .import-hero { grid-template-columns: 1fr; }
  .import-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .import-modes { grid-template-columns: 1fr; }
  .import-hero-actions { flex-direction: column; align-items: stretch; }
  .import-hero-actions .igca-btn { width: 100%; justify-content: center; }
  .import-actions .igca-btn { flex: 1; justify-content: center; }
  .import-field-compact { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* —— Événements (feed + calendrier) —— */
.evt-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 1.25rem;
  align-items: start;
}
.evt-board-main { min-width: 0; }
.evt-day-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink);
}
.evt-day-filter[hidden],
.evt-empty-day[hidden] { display: none !important; }
.evt-empty-day { margin: 0.5rem 0 0; }

.evt-cal {
  position: sticky;
  top: 1rem;
  padding: 0.85rem 0.9rem 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.evt-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.evt-cal-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  flex: 1;
}
.evt-cal-nav {
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--surface, #f0eeea);
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.evt-cal-nav:hover,
.evt-cal-nav:focus-visible {
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand-dark);
  outline: none;
}
.evt-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.15rem;
  margin-bottom: 0.25rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.evt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
  width: 100%;
}
.evt-cal-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.evt-cal-cell.is-pad { visibility: hidden; pointer-events: none; }
.evt-cal-cell:hover,
.evt-cal-cell:focus-visible {
  background: color-mix(in srgb, var(--ink) 6%, #fff);
  outline: none;
}
.evt-cal-cell.is-today {
  box-shadow: inset 0 0 0 1.5px var(--ink);
  font-weight: 800;
}
.evt-cal-cell.has-event {
  background: color-mix(in srgb, var(--brand) 10%, #fff);
  color: var(--brand-dark);
  font-weight: 800;
}
.evt-cal-cell.has-event:hover,
.evt-cal-cell.has-event:focus-visible {
  background: color-mix(in srgb, var(--brand) 18%, #fff);
}
.evt-cal-cell.is-selected {
  background: var(--brand);
  color: #fff;
}
.evt-cal-cell.is-selected.is-today {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #fff 55%, transparent);
}
.evt-cal-mark {
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--brand);
  transform: translateX(-50%);
}
.evt-cal-cell.is-selected .evt-cal-mark { background: #fff; }
.evt-cal-legend {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.65rem 0 0.45rem;
  font-size: 0.75rem;
}
.evt-cal-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--brand);
  flex-shrink: 0;
}
.evt-cal-today { width: 100%; justify-content: center; }

.sg-feed {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: none;
}

.sg-card {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sg-card[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .sg-card:hover {
    transform: translateY(-1px);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent),
      0 10px 24px -16px rgba(20, 35, 60, 0.3);
  }
}
.sg-card:focus-within {
  outline: 3px solid rgba(194, 59, 74, 0.35);
  outline-offset: 2px;
}
.sg-card.is-live {
  box-shadow:
    0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, transparent),
    0 10px 24px -16px color-mix(in srgb, var(--brand) 35%, transparent);
}
.sg-card.is-done {
  background: color-mix(in srgb, var(--surface) 55%, #fff);
}

.sg-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.55rem 0.3rem;
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.sg-card.is-live .sg-date { background: var(--brand); }
.sg-card.is-soon .sg-date { background: #1c314f; }
.sg-date-mon {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}
.sg-date-day {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.sg-date-week { display: none; }

.sg-body {
  padding: 0.65rem 0.85rem 0.7rem;
  min-width: 0;
}
.sg-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem 0.55rem;
  margin-bottom: 0.25rem;
}
.sg-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.sg-badge {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--muted);
}
.sg-card.is-live .sg-badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.sg-card.is-soon .sg-badge {
  background: #e8eef8;
  color: #1c314f;
}
.sg-card.is-done .sg-badge {
  background: #e8e4de;
  color: #334155;
}

.sg-line {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  align-items: baseline;
}
.sg-line .sg-dot { color: var(--muted); }
.sg-line .is-empty {
  font-style: italic;
  color: var(--muted);
  font-weight: 500;
}

.sg-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.sg-meta li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.4;
}
.sg-meta svg {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  color: var(--muted);
}
.sg-venue {
  font-weight: 700;
  font-size: 1rem;
}
.sg-venue svg { color: var(--brand); }
.sg-venue.is-empty {
  font-weight: 500;
  font-style: italic;
  color: var(--muted);
}

.sg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
}
.sg-stat {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.4rem;
  background: var(--surface, #f0eeea);
  text-align: left;
}
.sg-stat dt {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.sg-stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.sg-stat dd small {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.sg-stat.is-ok dd { color: #047857; }
.sg-stat.is-warn dd { color: #b45309; }
.sg-stat.is-bad dd { color: #b91c1c; }
.sg-card.is-live .sg-stat {
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}

.sg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.sg-actions form { margin: 0; }
.sg-actions .igca-btn {
  min-height: 2.1rem;
  padding-inline: 0.65rem;
  font-size: 0.82rem;
}
.sg-delete { margin-left: auto !important; }

.sg-form {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.2rem;
}
.sg-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.sg-fieldset legend {
  padding: 0;
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.sg-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
}
.sg-field > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.sg-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.sg-addr { position: relative; }
.sg-addr > label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0 0 0.3rem;
}
.sg-addr > label > span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.sg-addr-list {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0.25rem 0 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 14rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.65rem;
  background: #fff;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent),
    0 16px 32px -18px rgba(20, 35, 60, 0.45);
}
.sg-addr #evtLocation { position: relative; z-index: 1; }
.sg-addr-list { top: 4.35rem; }
.sg-addr-option {
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
}
.sg-addr-option:hover,
.sg-addr-option.is-active,
.sg-addr-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--brand) 10%, #fff);
  color: var(--brand-dark);
}

.sg-form-when,
.sg-form-extra {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 0.65rem;
}
.sg-form-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.sg-form-footer .igca-btn { min-height: 2.75rem; }

.modal-backdrop[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .sg-card { transition: none; }
  .sg-card:hover { transform: none; }
}

@media (max-width: 1100px) {
  .evt-board { grid-template-columns: 1fr; }
  .evt-cal { position: static; order: -1; }
}

@media (max-width: 720px) {
  .sg-card { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .sg-date { padding: 0.45rem 0.25rem; }
  .sg-date-day { font-size: 1.2rem; }
  .sg-body { padding: 0.55rem 0.7rem 0.6rem; }
  .sg-actions .igca-btn { flex: 1 1 auto; justify-content: center; }
  .sg-delete { margin-left: 0 !important; }
  .sg-form-when,
  .sg-form-extra { grid-template-columns: 1fr; }
  .sg-form-footer { flex-direction: column-reverse; }
  .sg-form-footer .igca-btn { width: 100%; justify-content: center; }
  .page-head .page-actions { width: 100%; }
  .page-head .page-actions .igca-btn { flex: 1; justify-content: center; }
  .evt-cal-cell { min-height: 2.35rem; }
}

/* —— Live entrée —— */
.live-page {
  max-width: 56rem;
  margin: 0 auto;
}
.live-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}
.live-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.live-back:hover,
.live-back:focus-visible { color: var(--brand); }
.live-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.live-export-label {
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 0.15rem;
}
.live-hero { margin-bottom: 1rem; }
.live-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.live-hero .sg-title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}
.live-stat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
  align-items: stretch;
}
.live-stat-tab {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 4.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.live-stat-tab:hover,
.live-stat-tab:focus-visible {
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 40%, transparent);
  outline: none;
}
.live-stat-tab.is-active {
  box-shadow: 0 0 0 2px var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
}
.live-stat-tab-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.live-stat-tab strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.live-stat-tab.is-ok strong { color: #047857; }
.live-stat-tab.is-warn strong { color: #b45309; }
.live-stat-tab.is-bad strong { color: #b91c1c; }
.live-stat-tab.is-warn.has-count {
  background: #fff7ed;
  box-shadow: 0 0 0 1.5px #f59e0b;
}
.live-stat-tab.is-warn.has-count.is-active {
  box-shadow: 0 0 0 2px #d97706;
  background: #ffedd5;
}
.live-alert-already {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.75rem;
  background: #fff7ed;
  box-shadow: inset 0 0 0 1.5px #f59e0b;
  color: #9a3412;
  font-size: 0.92rem;
}
.live-alert-already[hidden] { display: none !important; }
.live-alert-already strong { font-variant-numeric: tabular-nums; }
.live-flag-already {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.15rem;
  padding: 0.12rem 0.45rem;
  border-radius: 0.35rem;
  background: #ffedd5;
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.live-row.is-already {
  background: #fff7ed;
}
.live-row.is-rescanned {
  background: color-mix(in srgb, #fff7ed 70%, #fff);
}
.live-row.is-already .live-pill.is-warn,
.live-pill.is-warn {
  background: #f59e0b;
  color: #fff;
}
.live-stat-places {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  margin-left: auto;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}
.live-stat-places strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.live-stat-places small {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.live-feed {
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
}
.live-feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.live-feed-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(560px, 65vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.live-table-wrap {
  max-height: min(560px, 65vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.live-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.live-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f1ed;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  white-space: nowrap;
}
.live-table td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  vertical-align: middle;
  color: var(--ink);
}
.live-table .col-n {
  width: 2.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.live-table .col-time {
  width: 5.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}
.live-table .col-num {
  width: 7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  white-space: nowrap;
}
.live-table .col-name {
  min-width: 7rem;
}
.live-table .col-name strong {
  font-weight: 800;
}
.live-table .col-status {
  width: 8rem;
  white-space: nowrap;
}
.live-table .col-msg {
  min-width: 10rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}
.live-table tr.is-already td {
  background: #fff7ed;
}
.live-table tr.is-rescanned td {
  background: color-mix(in srgb, #fff7ed 65%, #fff);
}
.live-table .live-empty {
  text-align: center;
  padding: 1.5rem 1rem;
}
.live-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem 0.85rem;
  align-items: center;
  padding: 0.75rem 1.05rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.live-row:last-child { border-bottom: 0; }
.live-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.live-row-main strong {
  font-size: 0.95rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-row-main .muted { font-size: 0.8rem; }
.live-msg {
  font-size: 0.78rem !important;
  line-height: 1.3;
  white-space: normal;
}
.live-row time {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}
.live-pill {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #e8e4de;
  color: #334155;
}
.live-pill.is-ok { background: #ecfdf5; color: #047857; }
.live-pill.is-warn { background: #f59e0b; color: #fff; }
.live-pill.is-bad { background: #fef2f2; color: #b91c1c; }
.live-empty {
  padding: 1.5rem 1rem;
  text-align: center;
}

@media (max-width: 720px) {
  .live-table { font-size: 0.82rem; }
  .live-table thead th,
  .live-table td { padding: 0.55rem 0.5rem; }
  .live-table .col-msg { min-width: 8rem; }
}

@media (max-width: 640px) {
  .live-export { width: 100%; }
  .live-stat-places { margin-left: 0; width: 100%; }
  .live-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main time"
      "pill pill";
  }
  .live-row-main { grid-area: main; }
  .live-row time { grid-area: time; }
  .live-pill { grid-area: pill; justify-self: start; }
}

/* ——— Paramètres (onglets) ——— */
.settings-page { display: grid; gap: 1rem; }
.settings-tabs { margin-bottom: 0.15rem; }
.settings-panel-card {
  padding: 1.1rem 1.15rem 1.25rem;
}
.settings-panel-card--danger {
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border));
}
.settings-panel-intro h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.settings-panel-intro .muted { margin: 0; font-size: 0.9rem; line-height: 1.4; }
.settings-panel-intro { margin-bottom: 1rem; }
.settings-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.2rem;
  background: var(--surface);
  border-radius: var(--radius);
}
.settings-subtab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.settings-subtab.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 35, 60, 0.08);
  color: var(--brand-dark);
}
.settings-vars { margin: 0 0 0.65rem; font-size: 0.82rem; }
.settings-editor-stack { display: grid; gap: 0.75rem; }
.settings-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.settings-editor-pane {
  padding: 0.65rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent);
}
.tpl-toolbar {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.settings-block-adds {
  display: flex;
  gap: 0.28rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}
.settings-preview-label { margin: 0 0 0.45rem; }
.settings-preview-frame {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: #fff;
}
.settings-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}
.settings-inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 1rem;
}
.settings-inline-field { flex: 1; min-width: 180px; }
.settings-backup-list {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--surface);
}
.settings-backup-list-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.settings-backup-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.settings-backup-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.settings-backup-list code { font-size: 0.82rem; }
.settings-backup-list .muted {
  font-size: 0.78rem;
  display: block;
}
.settings-backup-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}
.settings-restore-inline {
  margin: 0;
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}
.settings-restore-inline .igca-input {
  width: 7.5rem;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
}
.settings-restore-file { margin-top: 0.25rem; }
.settings-kpis { margin-bottom: 0.85rem; }
.settings-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}
@media (max-width: 900px) {
  .settings-editor-grid { grid-template-columns: 1fr; }
  .settings-tabs .ms-tab { flex: 1 1 auto; text-align: center; }
}

/* ——— Utilisateurs ——— */
.users-page { display: grid; gap: 0.85rem; }
.users-head-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
}
.users-stat {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 650;
}
.users-stat b {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  margin-right: 0.15rem;
}
.users-stat--ok b { color: #047857; }
.users-stat--off b { color: var(--danger); }
.users-tabs { max-width: 22rem; }
.users-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  margin-left: 0.3rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--ink) 8%, #fff);
}
.ms-tab.is-active .users-tab-count {
  background: color-mix(in srgb, var(--brand) 14%, #fff);
  color: var(--brand-dark);
}
.users-shell {
  padding: 0;
  overflow: visible;
}
.users-shell .users-list,
.users-shell .user-row,
.users-shell .user-actions {
  overflow: visible;
}
.users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto minmax(10rem, 0.9fr);
  gap: 0.55rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.users-search { display: block; min-width: 0; }
.users-search .igca-input { width: 100%; }
.users-status-seg {
  display: inline-flex;
  padding: 0.15rem;
  gap: 0.15rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
}
.users-seg {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  min-height: 2rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.users-seg.is-active {
  background: var(--ink);
  color: #fff;
}
.users-role-filter { min-width: 0; }
.users-role-filter .igca-input {
  width: 100%;
  min-height: 2.35rem;
  font-size: 0.88rem;
}
.users-table-head {
  display: none;
  grid-template-columns: minmax(0, 1.6fr) 13.5rem 7.5rem;
  gap: 0.75rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.users-list { display: grid; }
.user-row {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.user-row:last-child { border-bottom: 0; }
.user-row:hover { background: color-mix(in srgb, var(--surface) 70%, #fff); }
.user-row.is-off { opacity: 0.7; }
.user-row.is-me {
  background: color-mix(in srgb, var(--brand-soft) 45%, #fff);
  box-shadow: inset 3px 0 0 var(--brand);
}
.user-identity {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  min-width: 0;
}
.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.user-name {
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.2;
}
.user-email {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}
.user-chip--you,
.user-chip--owner {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.user-chip--off {
  background: #fef2f2;
  color: #991b1b;
}
.user-role-cell .igca-input {
  min-height: 2.35rem;
  font-size: 0.85rem;
  padding-inline: 0.55rem;
}
.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.user-actions form { margin: 0; }
.user-menu {
  position: relative;
}
.user-menu-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  padding: 0.38rem 0.7rem !important;
  font-size: 0.8rem !important;
}
.user-menu-toggle svg {
  width: 0.95rem;
  height: 0.95rem;
}
.user-menu.is-open .user-menu-toggle svg {
  transform: rotate(180deg);
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 80;
  min-width: 12rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 14px 34px rgba(15, 28, 46, 0.14);
  display: grid;
  gap: 0.1rem;
}
.user-menu.is-open {
  z-index: 81;
}
.user-menu-panel[hidden] { display: none !important; }
.user-menu-item {
  appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.user-menu-item:hover {
  background: color-mix(in srgb, var(--brand-soft) 70%, #fff);
  color: var(--brand-dark);
}
.user-menu-item.is-danger {
  color: #b42318;
}
.user-menu-item.is-danger:hover {
  background: #fef2f2;
  color: #912018;
}
.user-menu-note {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.user-action-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem !important;
  padding: 0.38rem 0.65rem !important;
  min-height: 2.15rem;
}
.user-action-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}
.user-protected {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 650;
}
.user-protected svg {
  width: 0.95rem;
  height: 0.95rem;
}
.users-empty {
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--muted);
  font-weight: 650;
}
.users-create-shell { padding: 1.1rem 1.15rem 1.25rem; }
.users-create-intro h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.users-create-intro .muted { margin: 0 0 1rem; font-size: 0.88rem; }
.users-create-grid {
  display: grid;
  gap: 0.75rem;
}
.users-create-grid label {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 0.28rem;
}
.users-create-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
@media (min-width: 860px) {
  .users-table-head { display: grid; }
  .user-row {
    grid-template-columns: minmax(0, 1.6fr) 13.5rem 7.5rem;
    gap: 0.75rem;
  }
  .user-actions { justify-content: flex-end; }
}
@media (min-width: 720px) {
  .users-create-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .users-toolbar {
    grid-template-columns: 1fr;
  }
  .users-status-seg { width: 100%; }
  .users-seg { flex: 1; text-align: center; }
  .users-tabs { max-width: none; }
  .users-tabs .ms-tab { flex: 1 1 auto; text-align: center; }
}

/* ——— Import (onglets + alerte) ——— */
.import-tabs { margin: 0 0 0.85rem; max-width: 36rem; }
.import-panel-card {
  padding: 1rem 1.1rem 1.15rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
}
.import-alert-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #b45309 28%, transparent);
}
.import-alert-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b45309;
}
.import-alert-title {
  margin: 0.2rem 0 0;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.35;
}
.import-alert-meta { margin: 0.25rem 0 0; font-size: 0.8rem; }
.import-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.import-journal-error {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  background: #fffbeb;
}
.import-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 0;
}
.import-tech-grid dt {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.2rem;
}
.import-tech-grid dd {
  margin: 0;
  font-weight: 650;
  color: var(--ink);
  word-break: break-word;
}
.import-tech-wide { grid-column: 1 / -1; }
.import-tech-grid code {
  font-size: 0.78rem;
  word-break: break-all;
}
.import-recent-inline { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.import-recent-inline h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-family: var(--font-display);
}
.import-hero-actions .igca-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.import-hero-actions .igca-btn svg {
  width: 1rem;
  height: 1rem;
}
@media (max-width: 720px) {
  .import-tech-grid { grid-template-columns: 1fr; }
  .import-tabs .ms-tab { flex: 1 1 auto; text-align: center; }
}
