/* ============================================================
   SUITEPAY — Charte graphique complète (PHP/HTML5/CSS3)
   Police : Inter | Couleur primaire : #705CC3
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: #1d1d25;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --info-bg: #F4F0FF;
  --info-text: #5B536B;
  --info-title: #342D42;
  --info-icon: #705A92;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --border-control: #b8bbc3;
  --focus-ring: 0 0 0 3px rgba(108,58,237,.16);
  --purple:      #705cc3;
  --purple-dark: #5745a0;
  --purple-light:#f4f2fa;
  --gray-50:  #f7f8fa;
  --gray-100: #f0f1f4;
  --gray-200: #e7e8ec;
  --gray-300: #c7c7d0;
  --gray-400: #6b6b76;
  --gray-500: #60606c;
  --gray-600: #51515e;
  --gray-700: #383843;
  --gray-800: #292933;
  --gray-900: #1d1d25;
  --green-50:  #f0fdf4;
  --green-400: #4ade80;
  --green-700: #15803d;
  --orange-50:  #fff7ed;
  --orange-400: #fb923c;
  --orange-700: #c2410c;
  --orange-800: #9a3412;
  --red-50:   #fef2f2;
  --red-400:  #f87171;
  --red-500:  #ef4444;
  --red-600:  #dc2626;
  --red-700:  #b91c1c;
  --blue-50:  #eff6ff;
  --blue-100: #dbeafe;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --violet-200: #ddd6fe;
  --yellow-100: #fef9c3;
  --pink-200:   #fbcfe8;
  --purple-50:  #f5f3ff;
  --purple-400: #a78bfa;
  --purple-700: #6d28d9;
  --sidebar-w: 288px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
  --shadow:    0 2px 8px rgba(29,29,37,.06);
  --shadow-md: 0 8px 24px rgba(29,29,37,.08);
  --transition: 200ms ease;
}

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--gray-50);
}

/* ─── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #f8f8f8;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar.open,
.sidebar-static { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar {
    position: static;
    transform: none;
  }
}

.sidebar-logo {
  padding: 24px 24px 8px;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-logo img { height: 24px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.sidebar-date {
  font-size: 12px;
  color: #1d1d25;
  margin-bottom: 20px;
  text-transform: capitalize;
  margin-left: 64px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-radius: 8px;
  position: relative;
  transition: background var(--transition), color var(--transition);
  color: #1d1d25;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  margin-bottom: 0;
}
.nav-item:hover { background: #e9eaec; }
.nav-item.active { background: transparent; color: #1d1d25; font-weight: 600; }
.nav-item svg { width: 16px; height: 16px; color: #1d1d25; flex-shrink: 0; }

/* Notifications button */
.sidebar-notif-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  width: 100%;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition);
  position: relative;
  margin: 4px 0;
}
.sidebar-notif-btn:hover { background: #e9eaec; }
.notif-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 4px;
  background: #EF4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Profile section */
.sidebar-profile {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
}
.profile-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background var(--transition);
}
.profile-btn:hover { background: var(--gray-100); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(108,58,237,.1);
  color: var(--purple);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.profile-name { font-size: 14px; font-weight: 600; color: #1d1d25; }
.profile-id   { font-size: 12px; color: #1d1d25; }
.chevron-icon { width: 16px; height: 16px; color: #1d1d25; margin-left: auto; }

/* Compliance box */
.sidebar-compliance {
  padding: 12px 16px 16px;
}
.compliance-box {
  background-color: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 12px;
}
.compliance-box p { font-size: 11px; color: #1d1d25; line-height: 1.6; margin-bottom: 12px; }
.compliance-logos { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.compliance-logos img:first-child { height: 32px; }
.compliance-logos img:last-child  { height: 24px; }
.sidebar-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 12px;
}
.sidebar-footer p { font-size: 12px; color: #1d1d25; }
.sidebar-footer svg { width: 12px; height: 12px; color: #1d1d25; }

/* ─── MOBILE HEADER ──────────────────────────────────────────── */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
}
.mobile-header img { height: 20px; }
.hamburger-btn {
  padding: 8px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  display: flex; align-items: center;
}
.hamburger-btn svg { width: 20px; height: 20px; }

@media (min-width: 1024px) { .mobile-header { display: none !important; } }

/* ─── OVERLAY ────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 30;
}
.overlay.show { display: block; }
@media (min-width: 1024px) { .overlay { display: none !important; } }

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}
.main-inner {
  min-height: 100%;
  padding-top: 56px;
}
@media (min-width: 1024px) { .main-inner { padding-top: 0; } }

/* ─── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  padding: 32px 32px 16px;
  background-color: #ffffff;
}
.page-header-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .page-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.page-title { font-size: 23px; line-height: 1.35; letter-spacing: -.015em; font-weight: 500; color: #1d1d25; }
.verified-badge {
  display: flex; align-items: center; gap: 4px; margin-top: 4px;
}
.verified-badge span { font-size: 11px; color: #1d1d25; font-weight: 500; }

.unverified-badge {
  display: flex; align-items: center; gap: 4px; margin-top: 4px;
}
.unverified-badge span { font-size: 11px; color: #9a3412; font-weight: 500; }
.unverified-badge svg {
    width: 16px;
    height: 16px;
    color: #f97316;
}

/* ─── ALERT BANNER ───────────────────────────────────────────── */
.alert-banner {
  background: #fff7ed;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
@media (min-width: 640px) {
  .alert-banner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.alert-banner-left { display: flex; align-items: flex-start; gap: 10px; }
.alert-banner-left svg { width: 16px; height: 16px; color: #f97316; flex-shrink: 0; margin-top: 2px; }
.alert-title { font-size: 14px; font-weight: 700; color: #9a3412; margin-bottom: 4px; }
.alert-desc  { font-size: 13px; color: #c2410c; display: none; }
@media (min-width: 640px) { .alert-desc { display: block; } }
.btn-alert {
  font-size: 12px; font-weight: 700; color: #c2410c;
  border: 1px solid #fdba74; border-radius: 4px;
  padding: 6px 16px; white-space: nowrap;
  transition: background var(--transition);
}
.btn-alert:hover { background: #fed7aa; }

/* ─── STAT CARDS ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 0;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--gray-200);
}
@media (min-width: 640px)  { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: #fff;
  border: none;
  border-left: 1px solid var(--gray-200);
  border-radius: 0;
  padding: 0 20px;
}
.stat-card-label { font-size: 13px; font-weight: 400; color: #1d1d25; margin-bottom: 8px; }
.stat-card-amount { font-size: 24px; line-height: 1.3; letter-spacing: -.025em; font-variant-numeric: tabular-nums; font-weight: 500; color: #1d1d25; }
.stat-card-count  { font-size: 13px; color: #1d1d25; margin-top: 2px; }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--radius);
  line-height: 20px; font-size: 14px; font-weight: 500; font-family: var(--font-sans);
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  border: 1px solid var(--purple);
}
.btn-primary:hover { background: var(--purple-dark); border-color: var(--purple-dark); }

.btn-outline {
  background: #fff; color: #1d1d25;
  border: 1px solid var(--border-control);
  box-shadow: none;
}
.btn-outline:hover { background: var(--gray-50); }

.btn-ghost {
  background: transparent; color: #1d1d25;
  border: 1px solid transparent;
  padding: 6px;
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 6px; }

/* ─── SEARCH BAR ─────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  flex: 1;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: #1d1d25;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 40px 8px 36px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px; font-family: var(--font-sans);
  color: #1d1d25;
  background: #f4f5f8;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: #1d1d25; }
.search-input:focus {
  border-color: var(--purple);
  box-shadow: var(--focus-ring);
}
.search-ok-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 600; color: #1d1d25;
  background: none; border: none;
}
.search-ok-btn:hover { color: #1d1d25; }

/* ─── SP-INPUT (helper pour les pages avec Tailwind) ─────────── */
.sp-input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-sans);
  color: #1d1d25;
  background: #fff;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.sp-input::placeholder { color: #1d1d25; }
.sp-input:focus {
  border-color: var(--purple);
  box-shadow: var(--focus-ring);
}
.sp-input:disabled { background: var(--gray-50); color: #1d1d25; cursor: not-allowed; }

/* ─── FORM FIELDS ────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 14px; font-weight: 500; color: #1d1d25;
  margin-bottom: 6px;
}
.form-label .req { color: var(--red-500); }
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  font-size: 14px; font-family: var(--font-sans);
  color: #1d1d25; background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder { color: #1d1d25; }
.form-input:focus {
  border-color: var(--purple);
  box-shadow: var(--focus-ring);
}
.form-input-wrap { position: relative; }
.toggle-pw-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #1d1d25;
  display: flex; align-items: center;
}
.toggle-pw-btn:hover { color: #1d1d25; }
.toggle-pw-btn svg { width: 16px; height: 16px; }

.filter-label {
  display: block;
  min-height: 16px;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 16px;
  color: #1d1d25;
}
.filter-select, .filter-input {
  width: 100%; height: 40px; padding: 8px 10px;
  border: 1px solid #dedfe4; border-radius: 6px;
  font-size: 14px; font-family: var(--font-sans);
  color: #1d1d25; background: #fff; outline: none;
  transition: border-color var(--transition);
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--purple);
  box-shadow: var(--focus-ring);
}
.filter-select:hover:not(:focus):not(:disabled),
.filter-input:hover:not(:focus):not(:disabled) {
  border-color: #cfd1d7;
}

/* ─── FILTERS BAR ────────────────────────────────────────────── */
.filters-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 640px) {
  .filters-bar {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
  }
}
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 100px; }
.filter-group-pair { display: flex; align-items: flex-end; gap: 8px; flex: 1; }
.filter-group-pair > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px)  { .filters-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px)  { .filters-grid { grid-template-columns: repeat(5, 1fr); } }

/* ─── TABLE / TRANSACTION LIST ───────────────────────────────── */
.transactions-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.t-row {
  width: 100%;
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
  cursor: pointer;
  box-sizing: border-box;
}
.t-row:last-child { border-bottom: none; }
.t-row:hover { background: #f5f5f8 !important; }
.t-row.striped { background: #fff; }
.t-row.selected { background: #f2f2f7 !important; }

/* Desktop row layout */
.t-row-desktop {
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
}
/* Le tableau complet tient sur un ordinateur portable. Sur les largeurs plus
   serrées, il reste accessible par un léger défilement horizontal. */
@media (min-width: 1180px) {
  .t-row-desktop { display: flex; }
  /* Les intitulés figurent déjà dans l’en-tête du tableau sur ordinateur. */
  .t-row-desktop .t-cell-label { display: none; }
}

/* Mobile row layout */
.t-row-mobile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
@media (min-width: 1180px) { .t-row-mobile { display: none; } }

/* Colonnes resserrées pour les écrans d'ordinateur portable. Les largeurs
   définies dans les pages restent inchangées sur les grands écrans. */
@media (min-width: 1180px) and (max-width: 1599px) {
  .t-row { padding: 10px 12px; }
  .t-row-desktop { gap: 8px; min-width: 1050px; }
  .t-row-desktop .t-cell-flex { min-width: 100px; }
  :is(.t-row-desktop, .t-header) > [style*="width:100px"] { width: 78px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:190px"] { width: 115px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:120px"] { width: 80px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:145px"] { width: 110px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:170px"] { width: 110px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:155px"] { width: 110px !important; }
  :is(.t-row-desktop, .t-header) > [style*="width:115px"] { width: 80px !important; }
}

.t-icon {
  width: 36px; height: 36px;
  border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.t-icon svg { width: 27px; height: 27px; color: currentColor; stroke-width: 1.65; }
.t-icon.caution  { position: relative; background: transparent; color: #6C3AED; }
.t-icon.caution::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 45%, 14% 29%, 40% 55%, 86% 9%, 100% 24%, 40% 85%);
  transform: translate(-50%, -55%);
}
.t-icon.no_show  { background: transparent; color: #9C5C16; }
.t-icon.paiement { background: transparent; color: #08715B; }

/* t-cell-flex grows to fill remaining space */
.t-cell         { flex-shrink: 0; }
.t-cell-status  { position: relative; top: 3px; }
.t-cell-flex    { flex: 1; min-width: 0; overflow: hidden; }
.t-cell-label {
  margin-bottom: 5px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.25;
  color: #1d1d25;
}
.t-cell-value,
.t-cell-mono {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #1d1d25;
}

/* Row action dropdown */
.row-action-wrap {
  position: relative;
  flex-shrink: 0;
}
.row-action-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(29,29,37,.08);
  min-width: 200px;
  z-index: 300;
  padding: 4px 0;
  display: none;
}
/* Last few rows open upward to avoid overflow */
.row-action-menu.upward {
  top: auto;
  bottom: calc(100% + 4px);
}
.row-action-menu.show { display: block; }
.row-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #1d1d25;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.row-action-item:hover { background: var(--gray-50); }
.row-action-item.danger { color: var(--red-600); }
.row-action-item svg { width: 15px; height: 15px; flex-shrink: 0; color: #1d1d25; }
.row-action-item.danger svg { color: var(--red-400); }
.row-action-separator { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* ─── BADGES DE STATUT, TYPE ET MODE DE GARANTIE ───────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
}
.badge,
#sd-type-badge,
#sd-mode-badge,
#cds-type-badge,
#cds-mode-badge,
#pds-type-badge,
/* Badges des pages publiques de paiement et de confirmation. */
body.min-h-screen span.inline-block.text-xs.rounded-full,
.sr-left span[style*="border-radius:999px"] {
  /* Priorité sur les dimensions et arrondis définis en ligne dans les pages. */
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 20px;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
.badge-en_attente { background: #fff7ed; color: #c2410c; }
.badge-en_attente .badge-dot { background: #fb923c; }
.badge-paye    { background: var(--green-50); color: var(--green-700); }
.badge-paye    .badge-dot { background: var(--green-400); }
.badge-actif   { background: var(--purple-50); color: var(--purple-700); }
.badge-actif   .badge-dot { background: var(--purple-400); }
.badge-encaisse { background: var(--red-50); color: var(--red-700); }
.badge-encaisse .badge-dot { background: var(--red-400); }
.badge-libere  { background: var(--green-50); color: var(--green-700); }
.badge-libere  .badge-dot { background: var(--green-400); }
.badge-retenu  { background: #fffbeb; color: #b45309; }
.badge-retenu  .badge-dot { background: #fbbf24; }
.badge-annule  { background: var(--gray-50); color: #1d1d25; }
.badge-annule  .badge-dot { background: var(--gray-400); }
.badge-expire  { background: var(--gray-50); color: #1d1d25; }
.badge-expire  .badge-dot { background: var(--gray-400); }
.badge-envoye  { background: var(--blue-50); color: var(--blue-700); }
.badge-envoye  .badge-dot { background: #60a5fa; }
.badge-refuse  { background: var(--red-50); color: var(--red-700); }
.badge-refuse  .badge-dot { background: var(--red-400); }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.pagination-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-top: 1px solid var(--gray-200);
  flex-wrap: wrap; gap: 12px;
}
.page-size-wrap { display: flex; align-items: center; gap: 8px; }
.page-size-wrap label { font-size: 14px; color: #1d1d25; }
.page-size-select {
  height: 36px; padding: 0 8px;
  border: 1px solid var(--border-control); border-radius: 6px;
  font-size: 14px; font-family: var(--font-sans);
  outline: none;
}
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; border: 1px solid transparent;
  font-size: 14px; font-family: var(--font-sans);
  color: #1d1d25;
  transition: background var(--transition), border-color var(--transition);
}
.page-btn:hover { background: var(--gray-100); border-color: var(--gray-200); }
.page-btn.active {
  background: #1d1d25; color: #fff; border-color: #1d1d25;
}
.page-btn:disabled { opacity: .4; cursor: default; }

/* ─── INFO BUBBLES ───────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px; margin-bottom: 24px;
}
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-bubble {
  background: var(--info-bg);
  border-radius: var(--radius); padding: 16px;
  display: flex; gap: 12px;
}
.info-bubble-icon {
  width: 32px; height: 32px;
  background: transparent; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-bubble-icon svg { width: 16px; height: 16px; color: var(--info-icon); }
.info-bubble-title { font-size: 14px; font-weight: 500; color: #1d1d25; margin-bottom: 4px; }
.info-bubble-text  { font-size: 13px; color: #1d1d25; line-height: 1.6; }

/* ─── CHARTS GRID ────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px; margin-bottom: 32px;
}
@media (min-width: 1024px) { .charts-grid { grid-template-columns: 1fr 1fr; } }

.chart-card {
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: 20px;
}
.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-card-title { font-size: 14px; font-weight: 500; color: #1d1d25; margin-bottom: 2px; }
.chart-card-sub   { font-size: 12px; color: #1d1d25; }

.chart-period-selector {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  border-radius: 4px;
  padding: 3px;
  flex-shrink: 0;
}
.chart-period-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #1d1d25;
  transition: background var(--transition), color var(--transition);
}
.chart-period-btn.active {
  background: #1c1c1c;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.chart-period-btn:hover:not(.active) { color: #1d1d25; }

.chart-canvas-wrap {
  position: relative;
  width: 100%;
}
.chart-canvas-wrap canvas {
  display: block;
  width: 100% !important;
}

/* ─── TRANSACTIONS SECTION ────────────────────────────────────── */
.transactions-section {
  background: #fff;
  border: none;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 32px;
}
.transactions-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
  flex-wrap: wrap;
}

/* Filters bar inside section */
.filters-bar-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  background: #fff;
}
.filters-bar-2 .filter-select,
.filters-bar-2 .filter-input {
  background: #f5f6fa;
}
@media (min-width: 640px)  { .filters-bar-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .filters-bar-2 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* At laptop widths, five dashboard filters make each control too narrow. */
@media (min-width: 1024px) and (max-width: 1719px) {
  .filters-bar-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Table header row (desktop only) */
.t-header {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1180px) { .t-header { display: flex; } }

.t-header-check {
  width: 20px; flex-shrink: 0;
  display: flex; align-items: center;
}
.t-header-icon {
  width: 36px; flex-shrink: 0;
}
/* Header flex column (mirrors .t-cell-flex) */
.t-header-cell-flex {
  flex: 1; min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #1d1d25;
  text-transform: none;
  letter-spacing: normal;
}
.t-header-cell {
  font-size: 12px;
  font-weight: 500;
  color: #1d1d25;
  text-transform: none;
  letter-spacing: normal;
  flex-shrink: 0;
}

.t-cell-check {
  width: 20px; flex-shrink: 0;
  display: flex; align-items: center;
}
.t-cell-actions {
  width: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Period cell secondary line */
.t-period { line-height: 1.4; }

/* ─── HOME / AUTH PAGE ───────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) { .auth-shell { flex-direction: row; } }

.auth-left {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  padding: 48px 24px;
  position: relative;
}
@media (min-width: 1024px) {
  .auth-left { width: 60%; min-height: 100vh; padding: 0 24px; }
}
.auth-left-inner { width: 100%; max-width: 480px; }

.auth-right {
  width: 100%;
  background: linear-gradient(135deg, #6C3AED 0%, #5B21B6 50%, #4F46E5 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 64px 32px;
  position: relative; overflow: hidden;
}
@media (min-width: 1024px) { .auth-right { width: 40%; } }

.auth-deco {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.auth-deco-1 { width: 256px; height: 256px; top: -80px; right: -80px; }
.auth-deco-2 { width: 192px; height: 192px; bottom: -60px; left: -60px; }
.auth-deco-3 { width: 96px;  height: 96px;  top: 33%;   left: -30px; }

.auth-right-inner { position: relative; z-index: 10; max-width: 400px; width: 100%; }
.auth-tagline {
  color: #fff; font-size: 28px; font-weight: 800;
  line-height: 1.2; text-transform: uppercase; letter-spacing: -.5px;
}
@media (min-width: 1024px) { .auth-tagline { font-size: 36px; } }

.auth-quote {
  margin-top: 48px; font-size: 14px; color: rgba(255,255,255,.8);
  font-style: italic; line-height: 1.6;
}
.auth-quote strong { text-decoration: underline; font-weight: 500; color: #fff; }
.auth-quote-author { color: rgba(255,255,255,.7); font-size: 14px; font-weight: 500; margin-top: 12px; }

.auth-logo { height: 30px; margin-bottom: 32px; }

/* Auth forms */
.auth-form-title { font-size: 24px; font-weight: 800; color: #1d1d25; margin-bottom: 8px; }
.auth-form-sub   { font-size: 14px; color: #1d1d25; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form-row { display: flex; gap: 12px; }
.auth-form-row > * { flex: 1; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 4px 0;
}
.auth-divider-line { flex: 1; height: 1px; background: var(--gray-200); }
.auth-divider-text { font-size: 12px; color: #1d1d25; }
.btn-login {
  width: 100%; padding: 12px; border-radius: 4px;
  background: #000; color: #fff;
  font-size: 14px; font-weight: 700; font-family: var(--font-sans);
  letter-spacing: .02em;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-login:hover { background: #1a1a1a; box-shadow: var(--shadow-md); }
.btn-google {
  width: 100%; padding: 12px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 1px solid var(--gray-200); border-radius: 4px;
  background: #fff; color: #1d1d25;
  font-size: 14px; font-weight: 500; font-family: var(--font-sans);
  transition: background var(--transition); box-shadow: var(--shadow-sm);
}
.btn-google:hover { background: var(--gray-50); }
.auth-switch { text-align: center; font-size: 14px; color: #1d1d25; margin-top: 8px; }
.auth-switch button {
  font-weight: 700; color: #1d1d25;
  transition: color var(--transition);
}
.auth-switch button:hover { color: var(--purple); }
.forgot-pw {
  display: flex; justify-content: flex-end;
}
.forgot-pw button {
  font-size: 14px; color: #1d1d25; font-weight: 500;
  transition: color var(--transition);
}
.forgot-pw button:hover { color: var(--purple); }

/* Trustpilot badge */
.trustpilot-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 24px; padding: 8px 14px;
  background: rgba(255,255,255,.12); border-radius: 4px;
}
.trustpilot-stars { display: flex; gap: 3px; }
.star { width: 18px; height: 18px; background: #00b67a; display: flex; align-items: center; justify-content: center; }
.star svg { width: 12px; height: 12px; fill: #fff; }
.trustpilot-text { font-size: 12px; color: rgba(255,255,255,.9); font-weight: 600; }

/* Mention de confiance en bas de la page de connexion. */
.auth-security-note {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
  color: #1d1d25;
}
.auth-security-note > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #6C3AED;
  stroke-width: 1.8;
}
.auth-security-text {
  max-width: none;
  margin-top: 0;
  color: #1d1d25;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
@media (min-width: 1024px) {
  .auth-security-note {
    position: absolute;
    bottom: 28px;
    left: 50%;
    margin-top: 0;
    transform: translateX(-50%);
  }
}

/* ─── SUCCESS / EMPTY STATES ─────────────────────────────────── */
.empty-state { padding: 32px; text-align: center; color: #1d1d25; font-size: 14px; }
.success-box {
  background: var(--green-50); border: 1px solid #bbf7d0;
  border-radius: 4px; padding: 16px;
  font-size: 14px; color: var(--green-700);
}

/* ─── DROPDOWN MENU ──────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  background: #fff; border: 1px solid var(--gray-200);
  border-radius: 6px; box-shadow: 0 4px 16px rgba(29,29,37,.08);
  padding: 4px 0; z-index: 200;
  min-width: 220px;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 13px; font-weight: 500; color: #1d1d25;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item.danger { color: var(--red-600); }
.dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; color: #1d1d25; }
.dropdown-item.danger svg { color: var(--red-500); }
.dropdown-separator { height: 1px; background: var(--gray-100); margin: 4px 0; }

/* Profile dropdown — opens upward, full sidebar width */
.profile-dropdown-menu {
  bottom: calc(100% + 6px);
  top: auto;
  left: 0;
  right: 0;
  min-width: unset;
  width: 100%;
  padding: 0 0 4px;
  border-radius: 6px;
}
.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.avatar-lg {
  width: 40px; height: 40px;
  font-size: 16px;
  flex-shrink: 0;
}

/* Notification dropdown */
.notif-dropdown {
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: 520px;
  padding: 0;
  overflow: hidden;
  left: calc(100% + 10px); top: -8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 24, 39, .14), 0 2px 8px rgba(17, 24, 39, .06);
}
.notif-header {
  position: sticky; top: 0; z-index: 2; background: #fff;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #eceef2;
  display: flex; align-items: center; justify-content: space-between;
}
.notif-header p { margin: 0; font-size: 15px; font-weight: 700; color: #17171c; }
.notif-header span { display: block; margin-top: 3px; font-size: 11px; color: #7b8190; }
.notif-delete-all {
  padding: 7px 10px;
  border-radius: 5px;
  color: #5f6470;
  background: #f5f6f8;
  font-size: 11px;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.notif-delete-all:hover { color: #1d1d25; background: #eceef2; }
#notif-list { max-height: 440px; overflow-y: auto; }
.notif-item {
  position: relative;
  padding: 16px 14px 16px 16px;
  border-bottom: 1px solid #f0f1f4;
  transition: background var(--transition);
  display: flex; align-items: flex-start; gap: 12px;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #fafafa; }
.notif-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #f1edff;
  color: #6C3AED;
  flex: 0 0 36px;
}
.notif-item-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.notif-content { flex: 1; min-width: 0; }
.notif-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.notif-title { margin: 0; font-size: 13px; line-height: 18px; font-weight: 700; color: #1d1d25; }
.notif-meta { display: grid; gap: 5px; margin-top: 10px; }
.notif-meta p { display: flex; justify-content: space-between; gap: 16px; margin: 0; font-size: 11px; line-height: 16px; }
.notif-meta span { color: #7b8190; }
.notif-meta strong { overflow: hidden; color: #30343d; font-weight: 600; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { margin: 0; color: #9297a3; font-size: 10px; line-height: 16px; white-space: nowrap; }
.notif-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: -5px -3px 0 0;
  border-radius: 5px;
  color: #9ca1ac;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition), background var(--transition);
  flex: 0 0 26px;
}
.notif-item:hover .notif-close { opacity: 1; }
.notif-close svg { width: 14px; height: 14px; }
.notif-close:hover { color: #1d1d25; background: #eceef2; }
.notif-empty { padding: 36px 20px; color: #7b8190; font-size: 13px; text-align: center; }

/* ─── CHECKBOX ───────────────────────────────────────────────── */
input[type="checkbox"] {
  width: 16px; height: 16px;
  border-radius: 4px; border: 1px solid var(--gray-300);
  accent-color: var(--purple);
  cursor: pointer; flex-shrink: 0;
}

/* ─── SELECTION BAR ──────────────────────────────────────────── */
.selection-bar {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--gray-200); border-radius: 6px;
  background: rgba(249,250,251,.7);
  font-size: 12px; color: #1d1d25;
  margin-bottom: 12px;
}
.selection-count { font-size: 12px; color: var(--purple); font-weight: 600; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.p-6  { padding: 24px; }
.p-8  { padding: 32px; }
.w-full { width: 100%; }
.text-sm   { font-size: 14px; }
.text-xs   { font-size: 12px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.text-gray-400 { color: #1d1d25; }
.text-gray-500 { color: #1d1d25; }
.text-gray-600 { color: #1d1d25; }
.text-gray-700 { color: #1d1d25; }
.text-gray-800 { color: #1d1d25; }
.text-gray-900 { color: #1d1d25; }
.text-purple   { color: var(--purple); }
.text-red      { color: var(--red-600); }
.text-green    { color: var(--green-700); }
.section-title { font-size: 18px; line-height: 1.4; letter-spacing: -.01em; font-weight: 500; color: #1d1d25; margin-bottom: 24px; }
.divider       { height: 1px; background: var(--gray-200); }

/* ─── ANIMATION SLIDE-IN ─────────────────────────────────────── */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-left  { animation: fadeInLeft  .7s ease both; }
.anim-right { animation: fadeInRight .7s ease both; }
.anim-up    { animation: fadeInUp    .4s ease both; }
.delay-1 { animation-delay: .3s; }
.delay-2 { animation-delay: .6s; }
.delay-3 { animation-delay: .8s; }

/* ─── SECTION PADDING ────────────────────────────────────────── */
.section-wrap { padding: 24px 32px; }
@media (max-width: 640px) { .section-wrap { padding: 16px; } }
.page-content { padding: 0 32px 32px; background-color: #ffffff; }
@media (max-width: 640px) { .page-content { padding: 0 16px 24px; } }

/* ─── HOW IT WORKS LINK ──────────────────────────────────────── */
.how-it-works-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: #1d1d25; font-size: 12px; font-weight: 600;
  transition: color var(--transition);
}
.how-it-works-link:hover { color: #1d1d25; }
.how-it-works-link svg { width: 16px; height: 16px; }

/* ─── TOTALS ROW ─────────────────────────────────────────────── */
.totals-row {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px;
}
@media (min-width: 640px) { .totals-row { flex-direction: row; gap: 24px; } }
.totals-item { font-size: 14px; color: #1d1d25; }
.totals-item strong { font-weight: 700; color: #1d1d25; }

/* ─── ARCHIVE TOGGLE BTN ─────────────────────────────────────── */
.btn-archive {
  height: 40px; padding: 0 12px;
  font-size: 14px; font-family: var(--font-sans);
  border-radius: 6px; border: 1px solid var(--border-control);
  color: #1d1d25; white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-archive:hover, .btn-archive.active {
  background: var(--gray-800); color: #fff; border-color: var(--gray-800);
}

/* ═══════════════════════════════════════════════════════════════
   DETAIL SHEET — panneau latéral glissant (TransactionDetailsSheet)
   ═══════════════════════════════════════════════════════════════ */

/* Overlay sombre */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  backdrop-filter: blur(1px);
  opacity: 0;
  transition: opacity .25s ease;
}
.sheet-overlay.show {
  display: block;
  opacity: 1;
}

/* Panel */
.sheet-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 860px;
  background: #fff;
  z-index: 500;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--gray-200);
  box-shadow: -4px 0 16px rgba(29,29,37,.05);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sheet-panel.show {
  transform: translateX(0);
}

/* Header */
.sheet-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
  background: #363a3f;
  border-bottom: 1px solid #363a3f;
  flex-shrink: 0;
}
.sheet-title {
  font-size: 18px;
  font-weight: 500;
  color: #1d1d25;
}
.sheet-ref {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #1d1d25;
  margin-top: 2px;
}
.sheet-close-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: #1d1d25;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.sheet-close-btn:hover { background: var(--gray-100); color: #1d1d25; }

/* Action buttons row (Email/Imprimer) */
.sheet-header-actions {
  display: flex;
  gap: 8px;
  padding: 10px 24px 14px;
  border-bottom: 1px solid var(--gray-100);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.sheet-header-actions .btn {
  flex: 1;
  justify-content: center;
  min-width: 130px;
}

/* Scrollable body */
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

/* Objet box */
.sheet-objet-box {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.sheet-objet-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #1d1d25;
  margin-bottom: 4px;
}
.sheet-objet-value {
  font-size: 14px;
  color: #1d1d25;
}

/* 2 colonnes */
.sheet-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .sheet-cols { grid-template-columns: 1fr 1fr; }
}
.sheet-col { display: flex; flex-direction: column; gap: 16px; }

/* Info cards */
.sheet-info-card {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
  padding: 14px 16px;
}
.sheet-info-title {
  font-size: 14px;
  font-weight: 500;
  color: #1d1d25;
  margin-bottom: 12px;
}
.sheet-info-rows { display: flex; flex-direction: column; gap: 6px; }
.sheet-info-row  { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sheet-info-label {
  font-size: 13px;
  color: #1d1d25;
  white-space: nowrap;
  flex-shrink: 0;
}
.sheet-info-val {
  font-size: 14px;
  font-weight: 500;
  color: #1d1d25;
  overflow-wrap: anywhere;
}
.sheet-info-val.font-bold { font-weight: 700; }
.sheet-info-val.font-mono { font-family: 'Courier New', monospace; }

/* Payment link box */
.sheet-link-box {
  flex: 1;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #1d1d25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Timeline */
.sheet-timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 10px; }
.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--gray-200);
  color: #1d1d25;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tl-dot.done {
  background: var(--purple);
  color: #fff;
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: var(--gray-200);
  margin: 4px 0;
}
.tl-content { flex: 1; padding-bottom: 14px; }
.tl-title { font-size: 13px; font-weight: 600; color: #1d1d25; }
.tl-desc  { font-size: 12px; color: #1d1d25; margin-top: 1px; }
.tl-date  { font-size: 12px; color: #1d1d25; margin-top: 2px; }

/* Actions section */
.sheet-actions-section { }
.sheet-actions-inner {
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}
.sheet-actions-title {
  font-size: 15px;
  font-weight: 500;
  color: #1d1d25;
  margin-bottom: 12px;
}
.sheet-action-btn {
  width: 100%;
  justify-content: center;
  font-size: 14px;
  padding: 10px 16px;
}
.sheet-encaisser-form {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 16px;
}
.sheet-status-box {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 16px;
  border-radius: 10px;
  margin-top: 16px;
}

/* utility used inside sheet */
.w-full { width: 100%; }
.flex-1 { flex: 1; }

/* ═══════════════════════════════════════════════════════════════
   MODAL OVERLAY & DIALOG — shared by cautions.php, paiements.php, locataires.php
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-overlay.show { opacity: 1; }

.modal-dialog {
  display: none;
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.97);
  width: min(520px, 94vw);
  max-height: 88vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.1);
  z-index: 510;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.modal-dialog.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header-purple {
  background: #6C3AED;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-close-btn {
  width: 32px; height: 32px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.8);
  transition: background .15s, color .15s;
}
.modal-close-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

.modal-body {
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-field-group { margin-bottom: 20px; }
.modal-label {
  display: block;
  font-size: 13px; font-weight: 600; color: #1d1d25;
  margin-bottom: 8px;
}
.modal-label-sm {
  display: block;
  font-size: 12px; font-weight: 500; color: #1d1d25;
  margin-bottom: 4px;
}
.modal-error { font-size: 12px; color: #dc2626; margin-top: 4px; }

.modal-tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f3f4f6;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
.modal-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 500; color: #1d1d25;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.modal-tab.active {
  background: #6C3AED;
  color: #fff;
  box-shadow: 0 1px 4px rgba(108,58,237,.3);
}
.modal-tab:hover:not(.active) { color: #1d1d25; background: rgba(0,0,0,.04); }

.modal-radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s;
}
.modal-radio.active { border-color: #6C3AED; }
.modal-radio.active::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6C3AED;
}
.modal-info-box {
  padding: 10px 12px;
  background: #eff6ff;
  border-radius: 4px;
  font-size: 13px; color: #1d4ed8;
  line-height: 1.5;
}
.modal-client-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(29,29,37,.08);
  max-height: 200px;
  overflow-y: auto;
  z-index: 520;
}
.modal-client-item {
  padding: 9px 14px;
  font-size: 13px; color: #1d1d25;
  cursor: pointer;
  transition: background .1s;
}
.modal-client-item:hover { background: #f9fafb; }
.modal-client-empty {
  padding: 10px 14px;
  font-size: 12px; color: #1d1d25;
  text-align: center;
}

/* ── Spinner animation ──────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Sheet z-index overrides per page ───────────────────────── */
#client-detail-sheet  { z-index: 410; }
#client-sheet-overlay { z-index: 405; }
#caution-detail-sheet  { z-index: 410; }
#caution-sheet-overlay { z-index: 405; }
#paiement-detail-sheet  { z-index: 410; }
#paiement-sheet-overlay { z-index: 405; }
/* ─── MENU SIDEBAR : Notifications + sous-menu "Plus..." ────── */
/* Le dropdown notifications (position absolue, s'ouvre à droite)
   est désormais dans .sidebar-nav : on l'autorise à déborder */
.sidebar-nav { overflow: visible; }

/* Aligne le bouton Notifications sur les items du menu */
.sidebar-nav .sidebar-notif-btn {
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 400;
  color: #1d1d25;
  margin: 0;
}
.sidebar-nav .sidebar-notif-btn svg {
  width: 16px;
  height: 16px;
  color: #1d1d25;
  flex-shrink: 0;
}
/* Compteur après le mot "Notifications" */
.sidebar-nav .sidebar-notif-btn .notif-count {
  margin-left: 2px;
  flex-shrink: 0;
}

/* Bouton "Plus..." */
.nav-more-toggle { width: 100%; text-align: left; }
.nav-more-chevron {
  margin-left: auto;
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}
.nav-more-toggle.open .nav-more-chevron { transform: rotate(180deg); }

/* Sous-menu repliable */
.nav-more-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 24px;
}
.nav-more-sub.open { display: flex; }

/* Photo de profil dans le grand avatar (dropdown profil) */
.avatar-lg img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
/* ─── FINITIONS : lisibilité et interactions ────────────────── */
/* Spécificité suffisante face à la classe Tailwind chargée après ce fichier. */
body.font-sans, body .font-sans { font-family: var(--font-sans); }
.nav-item.active svg { color: currentColor; }
.stat-card, .chart-card { box-shadow: none; }
.t-row, .totals-row, .sheet-info-val { font-variant-numeric: tabular-nums; }
.btn svg { flex-shrink: 0; }
.btn-outline:hover { border-color: var(--gray-500); }
.search-input, .sp-input, .filter-select, .filter-input { min-height: 40px; }
.search-input::placeholder, .sp-input::placeholder, .form-input::placeholder,
.filter-input::placeholder { color: #1d1d25; opacity: 1; }
.search-input:hover:not(:focus):not(:disabled),
.sp-input:hover:not(:focus):not(:disabled),
.form-input:hover:not(:focus):not(:disabled) { border-color: var(--gray-500); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
.modal-header-purple :focus-visible { outline-color: #fff; }
.notif-item:focus-within .notif-close { opacity: 1; }
@media (hover: none) { .notif-close { opacity: 1; } }
@media (max-width: 639px) {
  .page-header { padding: 24px 16px 16px; }
  .page-title { font-size: 22px; }
  .dashboard-header-actions {
    width: 100%;
    max-width: none !important;
    flex: none !important;
    justify-content: stretch !important;
  }
  .dashboard-header-actions .dashboard-how-link { display: none !important; }
  .dashboard-header-actions #btn-creer-caution {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .search-input, .sp-input, .form-input, .filter-select, .filter-input,
  .page-size-select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-left, .anim-right, .anim-up, .badge-dot { animation: none; }
  .sidebar, .sheet-panel, .sheet-overlay, .modal-overlay, .modal-dialog {
    transition: none;
  }
}

/* Repères discrets et surfaces plates, inspirés de la référence fournie. */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--purple);
}
.stat-card:first-child { border-left: none; padding-left: 0; }
@media (min-width: 640px) and (max-width: 1279px) {
  .stat-card:nth-child(odd) { border-left: none; padding-left: 0; }
}
@media (max-width: 639px) {
  .stat-card { border-left: none; padding: 0; }
}

/* Hiérarchie de la liste et du panneau de détail. */
.nav-item.active svg { color: var(--purple); }
.nav-item svg, .sidebar-nav .sidebar-notif-btn svg { stroke-width: 1.5; }
.t-cell[style*="text-align:right"] .t-cell-value,
.t-cell[style*="text-align: right"] .t-cell-value { color: #1d1d25; }
.sheet-header .sheet-title, .sheet-header .sheet-close-btn { color: #fff; }
.sheet-header .sheet-ref { color: #d0d2d6; }
.sheet-header .sheet-close-btn:hover { background: rgba(255,255,255,.12); }
.sheet-header :focus-visible { outline-color: #fff; }

/* Couleur de marque des boutons « Créer une demande ». */
#btn-creer-caution,
#btn-creer-paiement,
#btn-creer-permalien,
#cs-btn-create-request {
  --purple: #6C3AED;
  --purple-dark: #5B21B6;
}

/* Messages explicatifs : même présentation pour les composants partagés
   et leurs équivalents Tailwind. Les badges de statut ne sont pas ciblés.
   Le préfixe body prime sur les styles de modale chargés après style.css. */
body .modal-info-box,
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100) {
  background: var(--info-bg);
  color: #1d1d25;
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
}
body .modal-info-box { padding: 10px 12px; }
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100) {
  padding: 16px;
  gap: 12px;
}
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100)
  :is(p, li, [class*="text-blue-"]) {
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.6;
}
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100)
  :is(.font-semibold, .font-bold) {
  color: #1d1d25;
  font-size: 14px;
  font-weight: 500;
}
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100) .bg-blue-100 {
  background: transparent;
  border-radius: var(--radius);
}
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100) svg {
  color: var(--info-icon);
  flex-shrink: 0;
}
body .modal-info-box a,
body :is(.bg-blue-50.items-start, .bg-blue-50.border-blue-100) a {
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Icônes de listes : pictogrammes seuls, plus grands et sans fond. */
.link-row .w-9.h-9.rounded-full.bg-gray-200 {
  background: transparent;
  border-radius: 0;
  color: #1d1d25;
}
.link-row .w-9.h-9.rounded-full.bg-gray-200 > svg {
  width: 27px;
  height: 27px;
  color: #1d1d25;
  stroke: currentColor;
  stroke-width: 1.65;
}
/* Les avatars locataires ont leur fond défini en ligne dans le PHP. */
:is(.client-row, #client-detail-sheet) div[style*="background:#ede9fe"] {
  background: transparent !important;
  border-radius: 0 !important;
  color: #FF6E03C7;
}
:is(.client-row, #client-detail-sheet) div[style*="background:#ede9fe"] > svg {
  width: 27px;
  height: 27px;
  color: #FF6E03C7;
  stroke: currentColor;
  stroke-width: 1.65;
}

/* ─── ONBOARDING : PANNEAU FORMULAIRE ─────────────────────────
   La présence du formulaire rend ces ajustements propres à onboarding.php. */
body:has(#onboarding-form),
body:has(#onboarding-form) * {
  font-family: var(--font-sans);
}

body:has(#onboarding-form),
body:has(#onboarding-form) > div:first-child {
  background: #fff;
}

body:has(#onboarding-form) > div:first-child :is(h1, h2, h3, p, label, a),
body:has(#onboarding-form) #onboarding-form :is(.sp-input, input[type="tel"], select[name="phone_country"]) {
  color: #1d1d25;
}

body:has(#onboarding-form) > div:first-child > div {
  padding-top: 48px;
  padding-bottom: 56px;
}

body:has(#onboarding-form) #onboarding-form h2,
body:has(#onboarding-form) #onboarding-form h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

body:has(#onboarding-form) #onboarding-form label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

body:has(#onboarding-form) #onboarding-form .sp-input,
body:has(#onboarding-form) #onboarding-form input[type="tel"],
body:has(#onboarding-form) #onboarding-form select[name="phone_country"] {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body:has(#onboarding-form) #onboarding-form .sp-input:disabled {
  opacity: 1;
}

/* Le téléphone reste visuellement un seul champ. */
body:has(#onboarding-form) #onboarding-form div:has(> select[name="phone_country"]) {
  min-height: 42px;
  border-radius: 6px;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body:has(#onboarding-form) #onboarding-form div:has(> select[name="phone_country"]) > select,
body:has(#onboarding-form) #onboarding-form div:has(> select[name="phone_country"]) > input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body:has(#onboarding-form) #onboarding-form div:has(> select[name="phone_country"]) > select {
  width: 108px;
}

/* Choix du type de compte : sélection franche, sans carte surdimensionnée. */
body:has(#onboarding-form) #onboarding-form div:has(> #ut-particulier) {
  gap: 0;
}

body:has(#onboarding-form) #onboarding-form :is(#ut-particulier, #ut-professionnel) {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

body:has(#onboarding-form) #onboarding-form #ut-particulier {
  border-radius: 4px 0 0 4px;
}

body:has(#onboarding-form) #onboarding-form #ut-professionnel {
  margin-left: -1px;
  border-radius: 0 4px 4px 0;
}

body:has(#onboarding-form) #onboarding-form :is(#ut-particulier, #ut-professionnel):hover {
  border-color: #9ca3af;
}

body:has(#onboarding-form) #onboarding-form :is(#ut-particulier, #ut-professionnel).border-\[\#111827\] {
  position: relative;
  z-index: 1;
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #1d1d25;
  font-weight: 600;
  box-shadow: none;
}

body:has(#onboarding-form) #onboarding-form #pro-section {
  padding-top: 4px;
}

body:has(#onboarding-form) #onboarding-form #pro-section > h2 {
  padding-top: 20px;
}

body:has(#onboarding-form) #onboarding-form .sp-checkbox {
  width: 17px;
  height: 17px;
  border-width: 1px;
  border-radius: 4px;
}

body:has(#onboarding-form) #onboarding-form #submit-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

body:has(#onboarding-form) #onboarding-form #submit-btn:disabled {
  cursor: wait;
  opacity: .7;
}

body:has(#onboarding-form) #onboarding-form a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  body:has(#onboarding-form) > div:first-child > div {
    padding: 32px 20px 44px;
  }

  body:has(#onboarding-form) #onboarding-form .grid-cols-2,
  body:has(#onboarding-form) #onboarding-form .grid-cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  body:has(#onboarding-form) #onboarding-form .col-span-1 {
    grid-column: auto;
  }
}

/* Parrainage : imposer le gris commun même avec l’ancien style intégré à la page. */
body:has(.sp-referral) .sp-referral .sp-referral-share,
body:has(.sp-referral) .sp-referral .sp-referral-form,
body:has(.sp-referral) .sp-referral .sp-guide-contact-links > a,
body:has(.sp-referral) .sp-referral .sp-guide-contact-links > button {
  border: 0 !important;
  background: #f8f8f8 !important;
}

/* ─── MODALE : LIBÉRATION TOTALE D’UNE CAUTION ─────────────── */
#liberer-total-overlay {
  background: rgba(17, 24, 39, .48);
}

#liberer-total-modal {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

#liberer-total-modal .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #ccebd8;
  background: #effaf3 !important;
}

#liberer-total-modal .modal-header-purple > div {
  gap: 10px !important;
}

#liberer-total-modal .modal-header-purple > div > div {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #168344;
  box-shadow: 0 1px 2px rgba(21, 128, 61, .16);
}

#liberer-total-modal .modal-header-purple h2 {
  color: #1d1d25 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

#liberer-total-modal .modal-close-btn {
  width: 30px;
  height: 30px;
  color: #1d1d25;
}

#liberer-total-modal .modal-close-btn:hover {
  background: #dff3e7;
  color: #1d1d25;
}

#liberer-total-modal .modal-body {
  padding: 20px 24px 18px;
}

#liberer-total-modal .modal-body > p:first-child {
  margin-bottom: 18px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
  line-height: 1.55;
}

#liberer-total-modal .modal-body > p:first-child + div {
  padding: 12px !important;
  border-color: #d2ecd9 !important;
  border-radius: 4px !important;
  background: #f3faf5 !important;
  box-shadow: none;
}

#liberer-total-modal .modal-body > p:first-child + div p {
  color: #176b3a !important;
  font-size: 13px !important;
  line-height: 1.65;
}

#liberer-total-modal #lt-error {
  border-radius: 4px !important;
}

#liberer-total-modal .modal-body > div:last-child {
  gap: 8px !important;
  padding-top: 0;
}

#liberer-total-modal .modal-body > div:last-child .btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

#liberer-total-modal #lt-confirm-btn {
  background: #168344 !important;
  border-color: #168344 !important;
}

#liberer-total-modal #lt-confirm-btn:hover {
  background: #126f39 !important;
  border-color: #126f39 !important;
}

@media (max-width: 420px) {
  #liberer-total-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  #liberer-total-modal .modal-header-purple,
  #liberer-total-modal .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  #liberer-total-modal .modal-body > div:last-child {
    flex-direction: column-reverse;
  }

  #liberer-total-modal .modal-body > div:last-child .btn {
    width: 100%;
    flex: none !important;
  }
}

/* ─── MODALE : RETENUE D’UNE CAUTION ────────────────────────── */
#retenir-overlay {
  background: rgba(17, 24, 39, .48);
}

#retenir-modal {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

#retenir-modal .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #ddd6fe;
  background: #f4f0ff !important;
}

#retenir-modal .modal-header-purple > div {
  gap: 10px !important;
}

#retenir-modal .modal-header-purple > div > div {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #6C3AED;
  box-shadow: 0 1px 2px rgba(76, 29, 149, .16);
}

#retenir-modal .modal-header-purple h2 {
  color: #1d1d25 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

#retenir-modal .modal-close-btn {
  width: 30px;
  height: 30px;
  color: #1d1d25;
}

#retenir-modal .modal-close-btn:hover {
  background: #e9e3f8;
  color: #1d1d25;
}

#retenir-modal .modal-body {
  padding: 20px 24px 18px;
}

#retenir-modal .modal-body > p:first-child {
  margin-bottom: 18px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
  line-height: 1.55;
}

#retenir-modal .modal-field-group {
  margin-bottom: 16px !important;
}

#retenir-modal .modal-label {
  margin-bottom: 7px;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 600;
}

#retenir-modal .form-input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

#retenir-modal textarea.form-input {
  min-height: 74px;
  line-height: 1.45;
}

#retenir-modal .form-input:hover {
  border-color: #c7c7d0;
}

#retenir-modal .form-input:focus {
  border-color: #6C3AED;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .10);
}

#retenir-modal #ret-preview {
  padding: 12px !important;
  border-color: #e5e7eb !important;
  border-radius: 4px !important;
  background: #f7f8fa !important;
  color: #1d1d25 !important;
  line-height: 1.45;
  box-shadow: none;
}

#retenir-modal #ret-error {
  border-radius: 4px !important;
}

#retenir-modal .modal-body > div:last-child {
  gap: 8px !important;
  padding-top: 2px;
}

#retenir-modal .modal-body > div:last-child .btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

#retenir-modal #ret-confirm-btn {
  background: #6C3AED !important;
  border-color: #6C3AED !important;
}

#retenir-modal #ret-confirm-btn:hover {
  background: #5B21B6 !important;
  border-color: #5B21B6 !important;
}

@media (max-width: 420px) {
  #retenir-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  #retenir-modal .modal-header-purple,
  #retenir-modal .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  #retenir-modal .modal-body > div:last-child {
    flex-direction: column-reverse;
  }

  #retenir-modal .modal-body > div:last-child .btn {
    width: 100%;
    flex: none !important;
  }
}

/* ─── MODALE : REMBOURSEMENT D’UN DÉPÔT DE GARANTIE ────────── */
#rembourser-overlay {
  background: rgba(17, 24, 39, .48);
}

#rembourser-modal {
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

#rembourser-modal .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff !important;
}

#rembourser-modal .modal-header-purple > div {
  gap: 10px !important;
}

#rembourser-modal .modal-header-purple > div > div {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #2563eb;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .16);
}

#rembourser-modal .modal-header-purple h2 {
  margin: 0;
  color: #1d1d25 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

#rembourser-modal .modal-close-btn {
  width: 30px;
  height: 30px;
  color: #1d1d25;
}

#rembourser-modal .modal-close-btn:hover {
  background: #dbeafe;
  color: #1d1d25;
}

#rembourser-modal .modal-body {
  padding: 20px 24px 18px;
}

#rembourser-modal .modal-body > p:first-child {
  margin-bottom: 18px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
  line-height: 1.55;
}

#rembourser-modal .modal-body > p:first-child + div {
  padding: 12px !important;
  border-color: #dbeafe !important;
  border-radius: 4px !important;
  background: #f6f9ff !important;
  color: #1e3a8a !important;
  font-size: 13px !important;
  line-height: 1.6;
  box-shadow: none;
}

#rembourser-modal .modal-field-group {
  margin-bottom: 16px !important;
}

#rembourser-modal .modal-label {
  margin-bottom: 7px;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 600;
}

#rembourser-modal .form-input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

#rembourser-modal textarea.form-input {
  min-height: 74px;
  line-height: 1.45;
}

#rembourser-modal .form-input:hover {
  border-color: #c7c7d0;
}

#rembourser-modal .form-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

#rembourser-modal #rb-preview {
  padding: 12px !important;
  border-color: #e5e7eb !important;
  border-radius: 4px !important;
  background: #f7f8fa !important;
  color: #1d1d25 !important;
  line-height: 1.45;
  box-shadow: none;
}

#rembourser-modal #rb-error {
  border-radius: 4px !important;
}

#rembourser-modal .modal-body > div:last-child {
  gap: 8px !important;
  padding-top: 2px;
}

#rembourser-modal .modal-body > div:last-child .btn {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

#rembourser-modal #rb-confirm-btn {
  background: #6C3AED !important;
  border-color: #6C3AED !important;
}

#rembourser-modal #rb-confirm-btn:hover {
  background: #5B21B6 !important;
  border-color: #5B21B6 !important;
}

@media (max-width: 420px) {
  #rembourser-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  #rembourser-modal .modal-header-purple,
  #rembourser-modal .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  #rembourser-modal .modal-body > div:last-child {
    flex-direction: column-reverse;
  }

  #rembourser-modal .modal-body > div:last-child .btn {
    width: 100%;
    flex: none !important;
  }
}

/* ─── MODALE : REMBOURSEMENT D’UN PAIEMENT ────────────────── */
#paiement-refund-overlay {
  background: rgba(17, 24, 39, .48);
}

#paiement-refund-modal {
  display: flex;
  flex-direction: column;
  width: min(480px, 100%);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

#paiement-refund-modal .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff;
}

#paiement-refund-modal .pr-modal-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#paiement-refund-modal .pr-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .16);
}

#paiement-refund-modal h2 {
  margin: 0;
  color: #1d1d25;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

#paiement-refund-modal .modal-close-btn {
  width: 30px;
  height: 30px;
  color: #1d1d25;
}

#paiement-refund-modal .modal-close-btn:hover {
  background: #dbeafe;
  color: #1d1d25;
}

#paiement-refund-modal .modal-body {
  padding: 20px 24px 18px;
}

#paiement-refund-modal .pr-modal-intro {
  margin: 0 0 18px;
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.55;
}

#paiement-refund-modal .pr-modal-info {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  background: #f6f9ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.6;
}

#paiement-refund-modal .modal-field-group {
  margin-bottom: 16px;
}

#paiement-refund-modal .modal-label {
  margin-bottom: 7px;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 600;
}

#paiement-refund-modal .form-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

#paiement-refund-modal textarea.form-input {
  min-height: 74px;
  line-height: 1.45;
  resize: vertical;
}

#paiement-refund-modal .form-input:hover {
  border-color: #c7c7d0;
}

#paiement-refund-modal .form-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

#paiement-refund-modal #pr-preview {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.45;
}

#paiement-refund-modal #pr-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
}

#paiement-refund-modal .pr-modal-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

#paiement-refund-modal .pr-modal-actions .btn {
  flex: 1;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

#paiement-refund-modal #pr-confirm-btn {
  background: #6C3AED;
  border-color: #6C3AED;
}

#paiement-refund-modal #pr-confirm-btn:hover {
  background: #5B21B6;
  border-color: #5B21B6;
}

.sp-payment-refund-action {
  background: #168344;
  border-color: #168344;
  color: #fff;
}

.sp-payment-refund-action:hover {
  background: #126f39;
  border-color: #126f39;
  color: #fff;
}

@media (max-width: 420px) {
  #paiement-refund-overlay {
    padding: 10px !important;
  }

  #paiement-refund-modal .modal-header-purple,
  #paiement-refund-modal .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  #paiement-refund-modal .pr-modal-actions {
    flex-direction: column-reverse;
  }

  #paiement-refund-modal .pr-modal-actions .btn {
    width: 100%;
    flex: none;
  }
}

/* ─── MON COMPTE ───────────────────────────────────────────────
   Finition sobre et cohérente, limitée à la page mon_compte.php. */
body:has(#compte-tabs),
body:has(#compte-tabs) * {
  font-family: var(--font-sans);
}

body:has(#compte-tabs) .min-h-screen.bg-white > .w-full {
  max-width: 1280px;
  margin-inline: auto;
  padding: 30px 32px 48px;
}

body:has(#compte-tabs) .mc-header {
  margin-bottom: 28px;
}

body:has(#compte-tabs) .mc-header-top {
  align-items: center;
  padding-bottom: 22px;
}

body:has(#compte-tabs) .mc-title {
  color: #1d1d25;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.025em;
}

body:has(#compte-tabs) .mc-subtitle {
  margin-top: 6px;
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.5;
}

body:has(#compte-tabs) .mc-badge {
  margin-top: 0;
  padding: 7px 10px;
  border-color: #e2e3e8;
  border-radius: 4px;
  background: #f7f8fa;
  color: #1d1d25;
  font-size: 12px;
  font-weight: 500;
}

body:has(#compte-tabs) .mc-badge svg {
  color: #6C3AED;
}

body:has(#compte-tabs) .mc-tabs {
  gap: 24px;
  border-color: #e5e7eb;
}

body:has(#compte-tabs) .mc-tab,
body:has(#compte-tabs) .mc-tab:first-child {
  gap: 7px;
  padding: 12px 0 13px;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
}

body:has(#compte-tabs) .mc-tab::after,
body:has(#compte-tabs) .mc-tab:not(:first-child)::after {
  right: 0;
  left: 0;
  height: 2px;
  border-radius: 0;
}

body:has(#compte-tabs) .mc-tab:hover,
body:has(#compte-tabs) .mc-tab.is-active {
  color: #1d1d25;
}

body:has(#compte-tabs) .mc-tab.is-active::after {
  background: #6C3AED;
}

body:has(#compte-tabs) .mc-tab-ico {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
}

/* Le formulaire est découpé en blocs blancs fins, sans effet de carte massif. */
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex {
  max-width: 780px;
  gap: 14px;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) {
  padding: 22px 24px 24px;
  border: 1px solid #e6e7eb;
  border-radius: 6px;
  background: #fff;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > .pt-4 {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) h2 {
  color: #1d1d25;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

body:has(#compte-tabs) #ccontent-profile h2 {
  margin-bottom: 18px;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) > .border-t {
  margin-inline: -24px;
  padding: 22px 24px 0;
  border-color: #e6e7eb;
}

body:has(#compte-tabs) #ccontent-profile .max-w-lg,
body:has(#compte-tabs) #ccontent-profile .max-w-2xl,
body:has(#compte-tabs) #ccontent-banking .max-w-lg,
body:has(#compte-tabs) #ccontent-paiement .max-w-lg {
  max-width: 100%;
}

body:has(#compte-tabs) #ccontent-profile label:not([title]),
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) label {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
}

body:has(#compte-tabs) #ccontent-profile :is(.sp-input, input[type="tel"], select[name="phone_country"]),
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) :is(input:not([type="checkbox"]), select) {
  min-height: 42px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

body:has(#compte-tabs) #ccontent-profile :is(.sp-input, input[type="tel"], select[name="phone_country"]):focus,
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) :is(input:not([type="checkbox"]), select):focus {
  border-color: #6C3AED;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .09);
}

body:has(#compte-tabs) #ccontent-profile .sp-input:disabled {
  border-color: #e5e7eb;
  background: #f7f8fa;
  color: #1d1d25;
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]) {
  min-height: 42px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]):focus-within {
  border-color: #6C3AED;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .09);
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]) > select {
  border-right: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full {
  width: 64px;
  height: 64px;
  border: 1px solid #e3e4e9;
  border-radius: 6px;
  background: #f3f4f6;
}

body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full img {
  border-radius: 5px;
}

body:has(#compte-tabs) #ccontent-profile label[title="Changer la photo"] {
  right: -6px;
  bottom: -6px;
  padding: 7px;
  border: 2px solid #fff;
  border-radius: 4px;
  background: #6C3AED;
  color: #fff !important;
}

body:has(#compte-tabs) #ccontent-profile label[title="Changer la photo"] svg {
  color: #fff !important;
  stroke: currentColor;
}

/* Cartes Stripe, documents et messages : rayons réduits et couleurs calmes. */
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) :is(.rounded-xl, .rounded-2xl) {
  border-radius: 6px;
  box-shadow: none;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) .rounded-full {
  border-radius: 4px;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) :is(.bg-blue-50, .bg-purple-50) {
  border-color: #e1dcf5;
  background: #f5f2fb;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) :is(.bg-blue-50, .bg-purple-50) :is(p, span, svg) {
  color: #1d1d25;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) :is(.bg-gray-50, .bg-white\/60) {
  border-color: #e5e7eb;
  background: #f7f8fa;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) .w-8.h-8.rounded-full,
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement) .w-10.h-10.rounded-full {
  border-radius: 4px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .border {
  padding: 20px;
  border-color: #e4e5ea;
  border-radius: 6px;
  background: #fff;
}

/* Actions principales cohérentes avec la couleur de marque. */
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices)
  :is(button, a)[class*="bg-"] {
  border-radius: 4px;
  box-shadow: none;
}

body:has(#compte-tabs) #ccontent-profile button[class*="bg-black"],
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-amber"],
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-gray-900"] {
  min-height: 42px;
  padding: 9px 16px;
  background: #6C3AED;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

body:has(#compte-tabs) #ccontent-profile button[class*="bg-black"]:hover,
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-amber"]:hover,
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-gray-900"]:hover {
  background: #5B21B6;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-\[\#6C3AED\]"] {
  min-height: 42px;
  border-radius: 4px;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-\[\#6C3AED\]"] svg {
  color: #fff !important;
  stroke: currentColor;
}

body:has(#compte-tabs) #ccontent-profile a[class*="bg-\[\#6C3AED\]"] {
  color: #fff !important;
}

body:has(#compte-tabs) #ccontent-profile a[class*="bg-\[\#6C3AED\]"] svg {
  color: #fff !important;
  stroke: currentColor;
}

/* Commissions et factures : filtres alignés, tableaux plus lisibles. */
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end {
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f7f8fa;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 {
  border-color: #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 span {
  color: #1d1d25;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .hidden.md\:flex {
  padding-top: 10px;
  padding-bottom: 10px;
  border: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(#compte-tabs) :is(#comm-list, #inv-list) {
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row) {
  min-height: 52px;
  background: #fff;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row):hover {
  background: #fafafa;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) :is(.text-\[14px\], .text-sm) {
  font-size: 13px;
}

body:has(#compte-tabs) :is(#comm-prev, #comm-next, #inv-prev, #inv-next) {
  min-width: 30px;
  min-height: 30px;
  border-color: #dfe1e6;
  border-radius: 4px;
  background: #fff;
}

@media (max-width: 900px) {
  body:has(#compte-tabs) .min-h-screen.bg-white > .w-full {
    padding: 24px 22px 40px;
  }

  body:has(#compte-tabs) .mc-tabs {
    gap: 20px;
  }
}

@media (max-width: 640px) {
  body:has(#compte-tabs) .min-h-screen.bg-white > .w-full {
    padding: 20px 16px 36px;
  }

  body:has(#compte-tabs) .mc-header-top {
    align-items: flex-start;
  }

  body:has(#compte-tabs) .mc-title {
    font-size: 22px;
  }

  body:has(#compte-tabs) .mc-tabs {
    gap: 18px;
  }

  body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) {
    padding: 18px 16px 20px;
  }

  body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) > .border-t {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  body:has(#compte-tabs) #ccontent-profile :is(.grid-cols-2, .grid-cols-3) {
    grid-template-columns: minmax(0, 1fr);
  }

  body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end > * {
    width: 100%;
    min-width: 0;
  }
}

/* ─── MODALE : CRÉATION D’UNE CAUTION / DEMANDE ────────────── */
#create-caution-modal-c {
  width: min(560px, 94vw);
  max-height: 90vh;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, .16);
}

#create-caution-modal-c .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #1d1d25;
  background: #1d1d25;
}

#create-caution-modal-c .modal-header-purple > div {
  gap: 10px !important;
}

#create-caution-modal-c .modal-header-purple > div > div {
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent;
  box-shadow: none;
}

#create-caution-modal-c .modal-header-purple > div > div svg {
  stroke: #fff;
}

#create-caution-modal-c .modal-header-purple h2 {
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

#create-caution-modal-c .modal-close-btn {
  width: 30px;
  height: 30px;
  color: #fff;
}

#create-caution-modal-c .modal-close-btn:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

#create-caution-modal-c .modal-body {
  padding: 20px 24px 18px;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#create-caution-modal-c .modal-body > p:first-child {
  margin-bottom: 18px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
}

#create-caution-modal-c .modal-field-group {
  margin-bottom: 18px;
}

#create-caution-modal-c :is(.modal-label, .modal-label-sm) {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 600;
}

/* Sélecteurs continus gris/blanc, sans capsule violette. */
#create-caution-modal-c .modal-tab-bar {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
}

#create-caution-modal-c .modal-tab {
  min-height: 40px;
  padding: 8px 12px;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

#create-caution-modal-c .modal-tab:last-child {
  border-right: 0;
}

#create-caution-modal-c .modal-tab.active {
  background: #f3f4f6;
  color: #1d1d25;
  font-weight: 600;
  box-shadow: none;
}

#create-caution-modal-c .modal-tab:hover:not(.active) {
  background: #fafafa;
  color: #1d1d25;
}

#create-caution-modal-c .form-input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

#create-caution-modal-c .form-input:hover {
  border-color: #c7c7d0;
}

#create-caution-modal-c .form-input:focus {
  border-color: #6C3AED;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .10);
}

#create-caution-modal-c #c-modal-devise {
  border-radius: 0 4px 4px 0 !important;
  color: #1d1d25 !important;
}

#create-caution-modal-c #c-caution-mode-choices {
  gap: 18px !important;
}

#create-caution-modal-c #c-caution-mode-choices label span {
  color: #1d1d25 !important;
  font-size: 13px !important;
}

#create-caution-modal-c .modal-radio {
  width: 16px;
  height: 16px;
  border-width: 1px;
}

#create-caution-modal-c .modal-radio.active::after {
  width: 8px;
  height: 8px;
}

#create-caution-modal-c .modal-info-box {
  padding: 12px;
  border: 0;
  border-radius: 4px;
  background: #f7f8fa;
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: none;
}

#create-caution-modal-c #c-modal-selected-client {
  border-color: #e5e7eb !important;
  border-radius: 4px !important;
  background: #f7f8fa !important;
}

#create-caution-modal-c #c-modal-selected-client :is(p, span) {
  color: #1d1d25 !important;
}

#create-caution-modal-c .modal-body label[for="c-modal-terms"],
#create-caution-modal-c .modal-body label[for="c-modal-terms"] a,
#create-caution-modal-c > div[style*="padding:8px 32px 12px"] {
  color: #1d1d25 !important;
}

#create-caution-modal-c .modal-footer {
  padding: 14px 24px;
  border-top-color: #e5e7eb;
  background: #fff;
}

#create-caution-modal-c .modal-footer .btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

#create-caution-modal-c #c-modal-submit-btn {
  background: #6C3AED;
  color: #fff;
}

#create-caution-modal-c #c-modal-submit-btn:hover {
  background: #5B21B6;
}

#create-caution-modal-c :is(#c-modal-success, #c-modal-error) {
  border-radius: 4px !important;
  font-size: 13px !important;
}

@media (max-width: 640px) {
  #create-caution-modal-c {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    top: 10px;
    transform: translateX(-50%) scale(.97);
  }

  #create-caution-modal-c.open {
    transform: translateX(-50%) scale(1);
  }

  #create-caution-modal-c .modal-header-purple,
  #create-caution-modal-c .modal-body,
  #create-caution-modal-c .modal-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  #create-caution-modal-c .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  #create-caution-modal-c .modal-footer {
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  #create-caution-modal-c #c-caution-mode-choices {
    flex-direction: column;
    gap: 10px !important;
  }
}

/* ─── VÉRIFICATION STRIPE : CONTINUITÉ DE L’ONBOARDING ─────── */
body:has(#activate-btn),
body:has(#activate-btn) * {
  font-family: var(--font-sans);
}

body:has(#activate-btn),
body:has(#activate-btn) > div:first-child {
  background: #fff;
}

body:has(#activate-btn) > div:first-child > div {
  padding-top: 48px;
  padding-bottom: 56px;
}

/* Toute la partie éditoriale du panneau blanc reste noire. */
body:has(#activate-btn) > div:first-child :is(h1, h2, h3, p, span, a, strong) {
  color: #1d1d25;
}

body:has(#activate-btn) > div:first-child h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

body:has(#activate-btn) > div:first-child p {
  font-size: 13px;
  line-height: 1.6;
}

body:has(#activate-btn) > div:first-child .bg-gray-50.border-gray-200 {
  padding: 16px;
  border-color: #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
  box-shadow: none;
}

body:has(#activate-btn) #activate-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

body:has(#activate-btn) #activate-btn,
body:has(#activate-btn) #activate-btn * {
  color: #fff;
}

body:has(#activate-btn) #activate-btn:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

body:has(#activate-btn) > div:first-child a {
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 640px) {
  body:has(#activate-btn) > div:first-child > div {
    padding: 32px 20px 44px;
  }

  body:has(#activate-btn) > div:first-child h2 {
    font-size: 24px;
  }
}

/* Vérification Stripe : une étape courte, lisible et sans encart décoratif. */
body:has(#activate-btn) > div:first-child .w-full.max-w-xl {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 104px);
}

body:has(#activate-btn) > div:first-child .auth-logo {
  align-self: flex-start;
  width: auto;
  max-width: 180px;
  height: 24px;
  margin-bottom: 0;
  object-fit: contain;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .justify-between {
  position: absolute;
  top: 3px;
  right: 0;
  width: auto;
  margin: 0;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .justify-between > a[href="onboarding.php"] {
  display: none;
}

body:has(#activate-btn) > div:first-child a[href="dashboard.php"] {
  color: #52525b;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

body:has(#activate-btn) > div:first-child a[href="dashboard.php"]:hover {
  color: #1d1d25;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > p.uppercase {
  margin: auto 0 10px;
  color: #71717a;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > h2 {
  margin-bottom: 22px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .bg-gray-50.border-gray-200 {
  max-width: 480px;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  background: transparent;
}

body:has(#activate-btn) > div:first-child .bg-gray-50.border-gray-200 p {
  margin: 0;
  color: #52525b;
  font-size: 14px;
  line-height: 1.6;
}

body:has(#activate-btn) > div:first-child .bg-gray-50.border-gray-200 strong {
  color: inherit;
  font-weight: 600;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .gap-2.mb-8 {
  margin-bottom: 26px;
  color: #71717a;
}

body:has(#activate-btn) > div:first-child .gap-2.mb-8 span {
  color: #71717a;
  font-size: 13px;
  font-weight: 400;
}

body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .gap-6 {
  margin-bottom: auto;
}

body:has(#activate-btn) #activate-btn {
  min-width: 190px;
  min-height: 48px;
  justify-content: center;
  padding: 12px 22px;
  font-size: 14px;
}

@media (max-width: 1023px) {
  body:has(#activate-btn) > div:first-child .w-full.max-w-xl {
    min-height: 0;
  }

  body:has(#activate-btn) > div:first-child .w-full.max-w-xl > p.uppercase {
    margin-top: 44px;
  }

  body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .gap-6 {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  body:has(#activate-btn) > div:first-child .w-full.max-w-xl > .justify-between {
    position: static;
    justify-content: flex-start;
    margin-top: 20px;
  }

  body:has(#activate-btn) > div:first-child .w-full.max-w-xl > p.uppercase {
    margin-top: 48px;
  }

  body:has(#activate-btn) > div:first-child .w-full.max-w-xl > h2 {
    font-size: 23px;
  }
}

/* ─── RETOUR STRIPE : CONFIRMATION SOBRE ───────────────────── */
body:has(.sr-wrap),
body:has(.sr-wrap) * {
  font-family: var(--font-sans);
}

body:has(.sr-wrap),
body:has(.sr-wrap) .sr-left {
  background: #fff;
}

body:has(.sr-wrap) .sr-left {
  color: #1d1d25;
}

body:has(.sr-wrap) .sr-left .sr-nav-link {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
}

/* Carte de synthèse : le statut reste porté par l’anneau et le badge. */
body:has(.sr-wrap) .sr-left div[style*="border-radius:20px"] {
  padding: 20px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 4px !important;
  background: #f7f8fa !important;
  box-shadow: none !important;
}

body:has(.sr-wrap) .sr-left div[style*="border-radius:20px"] h1 {
  color: #1d1d25 !important;
  font-size: 21px !important;
  font-weight: 600 !important;
  letter-spacing: -.015em !important;
}

body:has(.sr-wrap) .sr-left div[style*="border-radius:20px"] p {
  color: #1d1d25 !important;
  font-size: 13px !important;
}

/* Lignes de contrôle plus proches d’une liste que de cartes flottantes. */
body:has(.sr-wrap) .sr-left div[style*="border-radius:14px"] {
  border-radius: 4px !important;
  box-shadow: none !important;
}

body:has(.sr-wrap) .sr-left div[style*="border-radius:14px"] > div:nth-child(2) > div:first-child {
  color: #1d1d25 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

body:has(.sr-wrap) .sr-left div[style*="border-radius:14px"] > div:nth-child(2) > div:last-child {
  color: #1d1d25 !important;
  font-size: 12px !important;
}

/* Identifiant, alertes et dernière étape : mêmes angles sobres. */
body:has(.sr-wrap) .sr-left div[style*="border-radius:12px"],
body:has(.sr-wrap) .sr-left div[style*="border-radius:16px"] {
  border-radius: 4px !important;
  box-shadow: none !important;
}

body:has(.sr-wrap) .sr-left code {
  border-radius: 3px !important;
}

body:has(.sr-wrap) .sr-left .sr-copy-btn {
  border-radius: 4px !important;
}

body:has(.sr-wrap) .sr-left :is(.sr-cta, .sr-cta-violet) {
  min-height: 44px;
  padding: 10px 18px !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

body:has(.sr-wrap) .sr-left :is(.sr-cta, .sr-cta-violet):focus-visible,
body:has(.sr-wrap) .sr-left .sr-copy-btn:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body:has(.sr-wrap) .sr-left > div {
    padding: 32px 20px 44px !important;
  }

  body:has(.sr-wrap) .sr-left div[style*="border-radius:20px"] {
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 16px !important;
  }

  body:has(.sr-wrap) .sr-left div[style*="border-radius:20px"] h1 {
    font-size: 19px !important;
  }
}

/* ─── CARTE BANCAIRE BAILLEUR : SUITE DU PARCOURS STRIPE ───── */
body:has(a[href="https://stripe.com"]),
body:has(a[href="https://stripe.com"]) * {
  font-family: var(--font-sans);
}

body:has(a[href="https://stripe.com"]) {
  background: #fff !important;
  color: #1d1d25;
}

body:has(a[href="https://stripe.com"]) > .max-w-lg {
  max-width: 576px;
}

body:has(a[href="https://stripe.com"]) > .max-w-lg > .text-center p,
body:has(a[href="https://stripe.com"]) > .max-w-lg > p,
body:has(a[href="https://stripe.com"]) > .max-w-lg > p :is(span, a) {
  color: #1d1d25;
}

/* Carte principale et état « carte déjà enregistrée ». */
body:has(a[href="https://stripe.com"]) :is(.bg-white.rounded-2xl.shadow-lg) {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

/* En-tête de la carte : neutre et lisible. */
body:has(a[href="https://stripe.com"]) .bg-gradient-to-r.from-\[\#6C3AED\] {
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(a[href="https://stripe.com"]) .bg-gradient-to-r.from-\[\#6C3AED\] p {
  color: #1d1d25;
}

body:has(a[href="https://stripe.com"]) .bg-gradient-to-r.from-\[\#6C3AED\] .bg-white\/20 {
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
}

body:has(a[href="https://stripe.com"]) .bg-gradient-to-r.from-\[\#6C3AED\] svg {
  color: #1d1d25;
}

body:has(a[href="https://stripe.com"]) .bg-white.rounded-2xl :is(h1, p, span, strong) {
  color: #1d1d25;
}

/* Bloc tarifaire gris, avec les mêmes proportions que les autres écrans. */
body:has(a[href="https://stripe.com"]) .bg-violet-50.border-violet-100 {
  border-color: #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
  box-shadow: none;
}

body:has(a[href="https://stripe.com"]) .bg-violet-50.border-violet-100 :is(p, span) {
  color: #1d1d25;
}

body:has(a[href="https://stripe.com"]) .bg-violet-50.border-violet-100 > p:first-child {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

body:has(a[href="https://stripe.com"]) .bg-violet-50.border-violet-100 .text-sm {
  font-size: 13px;
}

body:has(a[href="https://stripe.com"]) .bg-red-50.border-red-200 {
  border-radius: 4px;
  box-shadow: none;
}

/* Actions cohérentes avec les CTA des étapes précédentes. */
body:has(a[href="https://stripe.com"]) :is(#cb-btn, a[href="dashboard.php"].bg-\[\#6C3AED\], button[type="submit"]) {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

body:has(a[href="https://stripe.com"]) :is(#cb-btn, a[href="dashboard.php"].bg-\[\#6C3AED\], button[type="submit"]):focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body:has(a[href="https://stripe.com"]) {
    align-items: flex-start;
    padding: 24px 16px;
  }

  body:has(a[href="https://stripe.com"]) .bg-white.rounded-2xl :is(.px-8, .p-8) {
    padding-left: 20px;
    padding-right: 20px;
  }

  body:has(a[href="https://stripe.com"]) .flex.gap-3.justify-center {
    flex-direction: column;
  }
}

/* ─── SUCCÈS CARTE BAILLEUR : CONFIRMATION FINALE ──────────── */
body:has(.fade-up .bg-emerald-50),
body:has(.fade-up .bg-emerald-50) * {
  font-family: var(--font-sans);
}

body:has(.fade-up .bg-emerald-50) {
  background: #fff !important;
  color: #1d1d25;
}

body:has(.fade-up .bg-emerald-50) .bg-white.rounded-2xl.shadow-lg {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\] {
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\] > .rounded-full {
  width: 52px;
  height: 52px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
}

body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\] > .rounded-full svg {
  width: 26px;
  height: 26px;
}

body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\] :is(h1, p) {
  color: #1d1d25;
}

body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\] h1 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.015em;
}

/* Les confirmations deviennent une liste blanche ; les coches portent le statut. */
body:has(.fade-up .bg-emerald-50) .space-y-3 {
  gap: 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

body:has(.fade-up .bg-emerald-50) .space-y-3 > .bg-emerald-50 {
  padding: 12px 4px;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
}

body:has(.fade-up .bg-emerald-50) .space-y-3 > .bg-emerald-50:last-child {
  border-bottom: 0;
}

body:has(.fade-up .bg-emerald-50) .space-y-3 > .bg-emerald-50 span {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
}

body:has(.fade-up .bg-emerald-50) .bg-gray-50.rounded-xl {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
  color: #1d1d25;
  font-size: 13px;
  box-shadow: none;
}

body:has(.fade-up .bg-emerald-50) a[href="dashboard.php"] {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

body:has(.fade-up .bg-emerald-50) a[href="dashboard.php"]:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  body:has(.fade-up .bg-emerald-50) {
    align-items: flex-start;
    padding: 24px 16px;
  }

  body:has(.fade-up .bg-emerald-50) .bg-\[\#F5F3FF\],
  body:has(.fade-up .bg-emerald-50) .bg-white.rounded-2xl > .px-8 {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ─── PARCOURS DE PAIEMENT PUBLIC : BASE COMMUNE ───────────── */
:is(
  body:has(#pay-form),
  body:has(.btn-stripe),
  body:has(#form-state),
  body:has(a[href="stripe_cb_bailleur.php"]),
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500),
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
),
:is(
  body:has(#pay-form),
  body:has(.btn-stripe),
  body:has(#form-state),
  body:has(a[href="stripe_cb_bailleur.php"]),
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500),
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) * {
  font-family: var(--font-sans);
}

:is(
  body:has(#pay-form),
  body:has(.btn-stripe),
  body:has(#form-state),
  body:has(a[href="stripe_cb_bailleur.php"]),
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500),
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) {
  background: #fff !important;
  color: #1d1d25;
}

/* Annulation de l’enregistrement de la carte bailleur. */
body:has(a[href="stripe_cb_bailleur.php"]) > .max-w-md {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

body:has(a[href="stripe_cb_bailleur.php"]) > .max-w-md > .rounded-full {
  width: 52px;
  height: 52px;
  border-radius: 4px;
}

body:has(a[href="stripe_cb_bailleur.php"]) > .max-w-md :is(h1, p, strong) {
  color: #1d1d25;
}

body:has(a[href="stripe_cb_bailleur.php"]) > .max-w-md h1 {
  font-size: 20px;
  font-weight: 600;
}

body:has(a[href="stripe_cb_bailleur.php"]) > .max-w-md a {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Formulaire de paiement par permalien. */
body:has(#pay-form) > .max-w-md > .bg-white {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

body:has(#pay-form) .bg-gradient-to-r.from-\[\#6C3AED\] {
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(#pay-form) .bg-gradient-to-r.from-\[\#6C3AED\] :is(p, svg) {
  color: #1d1d25;
}

body:has(#pay-form) .bg-gradient-to-r.from-\[\#6C3AED\] .bg-white\/20 {
  border-radius: 4px;
  background: #fff;
}

body:has(#pay-form) :is(h2, label),
body:has(#pay-form) form p,
body:has(#pay-form) form strong {
  color: #1d1d25 !important;
}

body:has(#pay-form) h2 {
  font-size: 15px;
  font-weight: 600;
}

body:has(#pay-form) .sp-input {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

body:has(#pay-form) .sp-input:focus {
  border-color: #6C3AED;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .10);
}

body:has(#pay-form) form .bg-gray-50,
body:has(#pay-form) form .bg-red-50 {
  border-radius: 4px;
  box-shadow: none;
}

body:has(#pay-form) #pay-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

/* Confirmation et annulation d’un paiement par permalien. */
:is(
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500)
) > .max-w-md > .bg-white {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

:is(
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500)
) > .max-w-md > .bg-white > .rounded-full {
  width: 52px;
  height: 52px;
  border-radius: 4px;
}

:is(
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500)
) > .max-w-md > .bg-white :is(h1, p, strong) {
  color: #1d1d25;
}

:is(
  body:has(.bg-green-100 .text-green-500),
  body:has(.bg-red-100 .text-red-500)
) h1 {
  font-size: 20px;
  font-weight: 600;
}

body:has(.bg-green-100 .text-green-500) .bg-gray-50.rounded-xl {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
}

body:has(.bg-red-100 .text-red-500) a[class*="bg-\[\#6C3AED\]"] {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Demande de caution : formulaire en deux étapes. */
body:has(#form-state) #form-state > .rounded-2xl,
body:has(#form-state) #success-state .rounded-2xl,
body:has(#form-state) :is(#step-0, #step-1) {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

body:has(#form-state) .bg-gradient-to-r.from-slate-800 {
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa;
}

body:has(#form-state) .bg-gradient-to-r.from-slate-800 p {
  color: #1d1d25;
}

body:has(#form-state) .bg-blue-50.border-blue-100 {
  border-color: #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
}

body:has(#form-state) .bg-blue-50.border-blue-100 :is(p, svg) {
  color: #1d1d25;
}

body:has(#form-state) :is(#step-0, #step-1) h2 {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 600;
}

body:has(#form-state) :is(#step-0, #step-1) .rounded-lg {
  border-radius: 4px;
}

body:has(#form-state) .sp-input,
body:has(#form-state) input[type="tel"],
body:has(#form-state) select {
  min-height: 42px;
  border-radius: 6px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

body:has(#form-state) :is(#step-0, #step-1) button {
  min-height: 42px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: none;
}

/* Page intermédiaire avant Stripe pour la caution. */
body:has(.btn-stripe) > .max-w-md > div[style*="border-radius:20px"] {
  border: 1px solid #e5e7eb !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

body:has(.btn-stripe) div[style*="padding:32px 32px 28px"] {
  border-bottom: 1px solid #e5e7eb !important;
  background: #f7f8fa !important;
}

body:has(.btn-stripe) div[style*="width:64px;height:64px"] {
  width: 52px !important;
  height: 52px !important;
  border-width: 1px !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

body:has(.btn-stripe) div[style*="background:#f9fafb"] {
  border-color: #e5e7eb !important;
  border-radius: 4px !important;
  background: #f7f8fa !important;
}

body:has(.btn-stripe) .btn-stripe {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 600;
  transform: none;
  box-shadow: none;
}

body:has(.btn-stripe) .btn-stripe:hover {
  transform: none;
}

/* Résultats du parcours de caution. */
:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up > .bg-white.rounded-2xl {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: none;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up > .bg-white.rounded-2xl > div:nth-child(2) {
  border-bottom: 1px solid #e5e7eb;
  background: #f7f8fa !important;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up h1 {
  color: #1d1d25;
  font-size: 20px;
  font-weight: 600;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up h2,
:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up :is(p, span) {
  color: #1d1d25;
}

body:has(.fade-up .ping-anim) .ping-anim {
  display: none;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up .w-20.h-20.rounded-full {
  width: 52px;
  height: 52px;
  border-width: 1px;
  border-radius: 4px;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up .w-20.h-20.rounded-full svg {
  width: 26px;
  height: 26px;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up .bg-gray-50.rounded-xl {
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

:is(
  body:has(.fade-up .ping-anim),
  body:has(.fade-up .bg-amber-50)
) .fade-up :is(button, a[class*="bg-gray-900"]) {
  min-height: 42px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: none;
}

@media (max-width: 640px) {
  body:has(#pay-form) form > div:first-child,
  body:has(#form-state) :is(#step-0, #step-1) .grid-cols-2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  :is(
    body:has(#pay-form),
    body:has(.btn-stripe),
    body:has(#form-state),
    body:has(a[href="stripe_cb_bailleur.php"]),
    body:has(.bg-green-100 .text-green-500),
    body:has(.bg-red-100 .text-red-500),
    body:has(.fade-up .ping-anim),
    body:has(.fade-up .bg-amber-50)
  ) {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Retour Stripe : enregistrement de la carte, présentation professionnelle.
   Ciblage du lien existant pour conserver le template PHP intact. */
body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) {
  margin-top: 24px !important;
  padding: 24px !important;
  background: #fff !important;
  border: 1px solid #dfe3ea !important;
  border-top: 3px solid #6c3aed !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 12px rgba(17, 24, 39, .04) !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div {
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 22px !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div > div:first-child {
  width: 44px !important;
  height: 44px !important;
  border: 1px solid #e5e1f5;
  border-radius: 10px !important;
  background: #f6f4fc !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div > div:first-child svg {
  width: 21px !important;
  height: 21px !important;
  stroke: #6340ba;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div > div:last-child {
  min-width: 0;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div p:first-child {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  letter-spacing: -.015em;
  color: #1d1d25 !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div p + p {
  margin-top: 5px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #1d1d25 !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet {
  min-height: 46px;
  padding: 12px 18px !important;
  gap: 10px !important;
  background: #6334ce !important;
  border: 1px solid transparent;
  border-radius: 6px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transition: background .15s ease, border-color .15s ease !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet:hover {
  background: #5125b5 !important;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet:focus-visible {
  outline: 3px solid #6334ce;
  outline-offset: 3px;
}

body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > p {
  margin: 18px 0 0 !important;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.7 !important;
  color: #1d1d25 !important;
}

@media (max-width: 540px) {
  body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) {
    padding: 18px !important;
  }
  body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > div {
    align-items: flex-start !important;
    gap: 12px !important;
  }
}

/* Modale de création / modification d'un permalien. */
#lnk-modal-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  border: 1px solid #e3e4e9;
  border-radius: 6px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, .14);
}

#lnk-modal-dialog .modal-header-purple {
  min-height: 64px;
  padding: 16px 24px;
  border-bottom: 1px solid #ddd6fe;
  background: #f4f0ff;
}

#lnk-modal-dialog .modal-header-purple > div > div {
  width: 32px !important;
  height: 32px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #6C3AED;
}

#lnk-modal-dialog #lnk-modal-title {
  color: #1d1d25 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

#lnk-modal-dialog .modal-close-btn {
  color: #1d1d25;
}

#lnk-modal-dialog .modal-close-btn:hover {
  background: #e9e3fb;
  color: #1d1d25;
}

#lnk-modal-dialog .modal-body {
  padding: 20px 24px 16px;
}

#lnk-modal-dialog .modal-body > p:first-child {
  margin-bottom: 18px !important;
  color: #1d1d25 !important;
}

#lnk-modal-dialog .modal-field-group {
  margin-bottom: 18px;
}

#lnk-modal-dialog :is(.modal-label, .modal-label-sm) {
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
}

#lnk-modal-dialog .form-input {
  min-height: 42px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25;
  font-size: 14px;
  box-shadow: none;
}

#lnk-modal-dialog .form-input:focus {
  border-color: #6C3AED;
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 58, 237, .09);
}

#lnk-modal-dialog #lnk-devise {
  border-left-color: #e3e4e9 !important;
  border-radius: 0 4px 4px 0 !important;
  background: #f7f8fa !important;
  color: #1d1d25 !important;
}

#lnk-modal-dialog .modal-tab-bar {
  gap: 0;
  padding: 3px;
  border: 1px solid #e1e2e7;
  border-radius: 5px;
  background: #f3f4f6;
}

#lnk-modal-dialog .modal-tab {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 3px;
  color: #1d1d25;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

#lnk-modal-dialog .modal-tab.active {
  background: #fff;
  color: #1d1d25;
  box-shadow: 0 1px 3px rgba(17, 24, 39, .10);
}

#lnk-modal-dialog .modal-tab:hover:not(.active) {
  background: rgba(255, 255, 255, .55);
  color: #1d1d25;
}

#lnk-modal-dialog .modal-radio {
  border-color: #c8cbd3;
}

#lnk-modal-dialog .modal-radio.active {
  border-color: #6C3AED;
}

#lnk-modal-dialog .modal-info-box {
  padding: 11px 12px;
  border: 1px solid #e4e0ef;
  border-radius: 4px;
  background: #f7f5fb;
  color: #1d1d25;
  line-height: 1.55;
}

#lnk-modal-dialog .modal-info-box strong {
  color: #1d1d25;
  font-weight: 600;
}

#lnk-modal-dialog a {
  color: #5b32c7 !important;
  text-underline-offset: 2px;
}

#lnk-modal-dialog > div[style*="padding:8px 32px 12px"] {
  padding: 8px 24px 12px !important;
  color: #1d1d25 !important;
}

#lnk-modal-dialog :is(#lnk-success, #lnk-modal-error) {
  margin-right: 24px !important;
  margin-left: 24px !important;
  border-radius: 4px !important;
}

#lnk-modal-dialog .modal-footer {
  gap: 10px;
  padding: 14px 24px 16px;
  border-top-color: #e8e9ed;
  background: #fff;
}

#lnk-modal-dialog .modal-footer .btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

#lnk-modal-dialog .modal-footer .btn-outline {
  border-color: #d6d8df;
  background: #fff;
  color: #1d1d25;
}

#lnk-modal-dialog .modal-footer .btn-primary {
  background: #6C3AED;
  color: #fff;
}

@media (max-width: 540px) {
  #lnk-modal-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  #lnk-modal-dialog .modal-header-purple,
  #lnk-modal-dialog .modal-body,
  #lnk-modal-dialog .modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  #lnk-modal-dialog .modal-body div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  #lnk-modal-dialog .modal-tab {
    white-space: normal;
    line-height: 1.25;
  }
}


/* Retour Stripe : identifiant secondaire et quatrième étape du parcours. */
body:has(.sr-wrap) .sr-left .sr-account-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -16px 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
}
body:has(.sr-wrap) .sr-left .sr-account-meta > div {
  flex-wrap: wrap;
  gap: 6px !important;
}
body:has(.sr-wrap) .sr-left .sr-account-meta > div > svg { display: none; }
body:has(.sr-wrap) .sr-left .sr-account-meta code {
  padding: 0 !important;
  background: transparent !important;
  color: #1d1d25 !important;
  font-weight: 400 !important;
}
body:has(.sr-wrap) .sr-left .sr-verification-flow {
  gap: 0 !important;
  border: 1px solid #dfe3ea;
  border-radius: 6px;
  overflow: hidden;
}
body:has(.sr-wrap) .sr-left .sr-verification-flow > div:not(.sr-card-step) {
  border: 0 !important;
  border-bottom: 1px solid #edf0f4 !important;
  border-radius: 0 !important;
  padding: 17px 20px !important;
}
body:has(.sr-wrap) .sr-left .sr-verification-flow > .sr-card-step {
  position: relative;
  margin-top: 0 !important;
  padding: 22px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #faf9fd !important;
  box-shadow: none !important;
}
body:has(.sr-wrap) .sr-left .sr-verification-flow > .sr-card-step > div > div:first-child {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  color: #6334ce;
  font-size: 13px;
  font-weight: 600;
}
body:has(.sr-wrap) .sr-left .sr-card-step > div > div:first-child::before { content: "4"; }
body:has(.sr-wrap) .sr-left .sr-card-step > div > div:first-child svg { display: none; }
body:has(.sr-wrap) .sr-left .sr-card-step > div { position: relative; }
body:has(.sr-wrap) .sr-left .sr-card-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 36px;
  height: 20px;
  border-left: 1px solid #d8d1ea;
}
@media (max-width: 540px) {
  body:has(.sr-wrap) .sr-left .sr-verification-flow > .sr-card-step {
    padding: 20px !important;
  }
}


/* Retour Stripe : action carte utilisant les couleurs de la charte. */
body:has(.sr-wrap) .sr-left .sr-account-meta {
  justify-content: flex-start;
  gap: 8px;
}
body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet {
  background: var(--purple) !important;
}
body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet:hover {
  background: var(--purple-dark) !important;
}
body:has(.sr-wrap) .sr-left div:has(> a.sr-cta-violet) > a.sr-cta-violet:focus-visible {
  outline-color: var(--purple);
}
body:has(.sr-wrap) .sr-left .sr-verification-flow > .sr-card-step {
  background: var(--gray-50) !important;
}
body:has(.sr-wrap) .sr-left .sr-verification-flow > .sr-card-step > div > div:first-child {
  background: var(--purple-light) !important;
  border-color: var(--gray-200);
  color: var(--purple);
}
body:has(.sr-wrap) .sr-left .sr-card-step::before {
  border-color: var(--gray-200);
}

/* Connexion : confirmation du lien, dans le style sobre des formulaires.
   Les !important remplacent uniquement les styles inline de cet écran. */
.auth-left-inner--check-login > br { display: none; }
#form-check_login_email > .anim-up {
  padding: 16px 0 !important;
}
#form-check_login_email > .anim-up > div:first-child {
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 20px !important;
  border-radius: 4px !important;
  background: var(--purple-light) !important;
}
#form-check_login_email > .anim-up > div:first-child svg {
  width: 24px;
  height: 24px;
  stroke: var(--purple);
  stroke-width: 1.5;
}
#form-check_login_email h2 {
  margin: 0 0 12px !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.4;
  color: #1d1d25 !important;
  text-wrap: balance;
}
#form-check_login_email h2 + p {
  margin: 0 0 8px !important;
  color: #1d1d25 !important;
  line-height: 1.7 !important;
}
/* Ce paragraphe est présent uniquement si l'adresse est renseignée. */
#form-check_login_email h2 + p + p:not(:nth-last-child(2)):not(:last-child) {
  margin: 0 0 20px !important;
  color: #1d1d25 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  overflow-wrap: anywhere;
}
#form-check_login_email > .anim-up > p:nth-last-child(2) {
  margin: 0 0 24px !important;
  color: #1d1d25 !important;
  line-height: 1.8 !important;
}
#form-check_login_email #btn-back-login-magic {
  min-height: 44px;
  max-width: 100%;
  padding: 10px 0 !important;
  color: #1d1d25 !important;
  font-weight: 600 !important;
  line-height: 1.5;
  text-decoration: none !important;
  transition: color var(--transition);
}
#form-check_login_email #btn-back-login-magic:hover {
  color: var(--purple) !important;
}
#form-check_login_email #btn-back-login-magic:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
  border-radius: 4px;
}
@media (max-width: 540px) {
  #form-check_login_email h2 { font-size: 19px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #form-check_login_email #btn-back-login-magic { transition: none; }
}

/* Confirmation de connexion par e-mail : présentation compacte et structurée. */
.auth-left-inner--check-login {
  max-width: 460px;
}

.auth-left-inner--check-login > a:first-child {
  display: block;
  width: max-content;
  margin: 0 auto 24px;
}

.auth-left-inner--check-login .auth-logo {
  height: 28px !important;
  margin: 0 !important;
}

.auth-left-inner--check-login #form-check_login_email > .anim-up {
  padding: 30px 32px 28px !important;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}

.auth-left-inner--check-login #form-check_login_email > .anim-up > div:first-child {
  width: 44px !important;
  height: 44px !important;
  margin-bottom: 18px !important;
  border-radius: 4px !important;
  background: #6C3AED !important;
}

.auth-left-inner--check-login #form-check_login_email > .anim-up > div:first-child svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 1.75;
}

.auth-left-inner--check-login #form-check_login_email h2 {
  margin-bottom: 10px !important;
  color: #1d1d25 !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.auth-left-inner--check-login #form-check_login_email h2 + p {
  margin-bottom: 12px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.auth-left-inner--check-login #form-check_login_email h2 + p + p:not(:nth-last-child(2)):not(:last-child) {
  margin: 0 0 18px !important;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #f7f8fa;
  color: #1d1d25 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4;
}

.auth-left-inner--check-login #form-check_login_email > .anim-up > p:nth-last-child(2) {
  margin: 0 0 20px !important;
  color: #1d1d25 !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
}

.auth-left-inner--check-login #form-check_login_email > .anim-up > p:last-child {
  margin: 0;
}

.auth-left-inner--check-login #form-check_login_email #btn-back-login-magic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 9px 14px !important;
  border: 1px solid #dfe1e6 !important;
  border-radius: 4px;
  background: #fff;
  color: #1d1d25 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.auth-left-inner--check-login #form-check_login_email #btn-back-login-magic:hover {
  border-color: #c7c9d1 !important;
  background: #f7f8fa;
  color: #1d1d25 !important;
}

@media (max-width: 540px) {
  .auth-left-inner--check-login #form-check_login_email > .anim-up {
    padding: 24px 20px 22px !important;
    box-shadow: none;
  }

  .auth-left-inner--check-login #form-check_login_email h2 {
    font-size: 18px !important;
  }
}

/* Mon compte : présentation des coordonnées bancaires et moyens de paiement. */
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > h2 {
  font-size: 20px; letter-spacing: -.025em; margin-bottom: 8px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > p {
  max-width: 720px; color: #1d1d25; font-size: 14px; line-height: 1.7; margin-bottom: 24px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg {
  width: 100%; max-width: 760px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .border {
  padding: 28px; border: 1px solid #e4e7ec; border-radius: 16px; background: #fff; box-shadow: 0 4px 20px rgba(16,24,40,.045);
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .flex:first-child {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; margin-bottom: 0; border-bottom: 1px solid #eaecf0;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .flex:first-child > p {
  margin: 0; color: #1d1d25; font-size: 15px; font-weight: 600; line-height: 1.5;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) .inline-flex.rounded-full {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) span.rounded-full:empty {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 {
  margin-top: 8px; margin-bottom: 20px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex {
  display: grid; grid-template-columns: minmax(140px, .8fr) minmax(0, 1.2fr); align-items: center; gap: 16px; margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; line-height: 1.55;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex:last-child {
  border-bottom: 0;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex > span:first-child {
  color: #1d1d25;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex > span:last-child {
  justify-self: end; max-width: 100%; text-align: right; overflow-wrap: anywhere;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: .025em;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) .bg-blue-50 {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid #e9e4fa; border-radius: 10px; background: #f8f6fd;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) .bg-blue-50 p {
  margin: 0; color: #1d1d25; font-size: 12px; line-height: 1.75;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) .bg-blue-50 svg {
  width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; color: #7957bc; stroke-width: 1.6;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: auto; max-width: 100%; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 9px; background: #6c3aed; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: none; text-align: center; transition: background .15s ease, box-shadow .15s ease;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-"]:hover {
  background: #5727ce; box-shadow: 0 3px 8px rgba(108,58,237,.18);
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-"]:focus-visible {
  outline: 3px solid #bba4f7; outline-offset: 3px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-"] svg {
  width: 16px; height: 16px; flex-shrink: 0; color: #fff;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > :is(.bg-amber-50, .bg-gray-50) {
  background: #fffdf8; border-color: #efdfbd;
}

@media (max-width: 600px) {
  body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .border { padding: 20px 16px; border-radius: 12px; }
  body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .flex:first-child { align-items: flex-start; gap: 12px; }
  body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex { grid-template-columns: 1fr; gap: 5px; padding: 12px 0; }
  body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .bg-white > .space-y-2 > .flex > span:last-child { justify-self: start; text-align: left; }
  body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) a[class*="bg-"] { width: 100%; }
}

/* Mon compte : style commun à tous les onglets, sans ombre. */
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) {
  --mc-border: #e4e7ec; --mc-muted: #1d1d25; --mc-radius: 16px; color: #1d1d25;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) h2 {
  color: #1d1d25; font-size: 20px; font-weight: 600; line-height: 1.4; letter-spacing: -.025em;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex {
  width: 100%; max-width: 760px; gap: 24px;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) {
  padding: 28px; border: 1px solid var(--mc-border); border-radius: var(--mc-radius); background: #fff;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) > .border-t {
  margin-inline: -28px; padding: 24px 28px 0; border-color: var(--mc-border);
}

body:has(#compte-tabs) #ccontent-profile h2 {
  margin-bottom: 24px;
}

body:has(#compte-tabs) #ccontent-profile :is(.rounded-xl, .rounded-2xl) {
  border-radius: 10px;
}

body:has(#compte-tabs) #ccontent-profile .rounded-full {
  border-radius: 999px;
}

body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full {
  border-radius: 14px;
}

body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full img {
  border-radius: 13px;
}

body:has(#compte-tabs) #ccontent-profile label[title="Changer la photo"] {
  border-radius: 9px;
}

body:has(#compte-tabs) #ccontent-profile :is(.sp-input, input[type="tel"], select[name="phone_country"]), :is(#ccontent-commissions, #ccontent-invoices) :is(input:not([type="checkbox"]), select) {
  min-height: 44px; border-color: #dfe3e9; border-radius: 9px; font-size: 13px;
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]) {
  border-radius: 9px; min-height: 44px;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(input, select, button, a):focus-visible {
  outline: 2px solid #9a78ed; outline-offset: 3px;
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]):focus-within {
  outline: 2px solid #9a78ed; outline-offset: 3px;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"] {
  min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 600; line-height: 1.5; text-decoration: none; transition: background .15s ease;
}

body:has(#compte-tabs) #ccontent-profile button[class*="bg-black"], :is(#ccontent-commissions, #ccontent-invoices) #dl-btn {
  background: #6c3aed; color: #fff;
}

body:has(#compte-tabs) #ccontent-profile button[class*="bg-black"]:hover, :is(#ccontent-commissions, #ccontent-invoices) #dl-btn:hover {
  background: #5727ce;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) {
  padding: 28px; border: 1px solid var(--mc-border); border-radius: var(--mc-radius); background: #fff;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex:first-child {
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex:first-child > button {
  min-height: 44px; padding: 11px 18px; border-radius: 9px; font-size: 13px; font-weight: 600;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end {
  gap: 12px; padding: 18px; border: 1px solid var(--mc-border); border-radius: 12px; background: #f9fafb;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 {
  padding: 12px 16px; border: 1px solid #e9e4fa; border-radius: 10px; background: #f8f6fd;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 span {
  color: #1d1d25; font-size: 13px;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .hidden.md\:flex {
  padding-block: 14px; border: 1px solid var(--mc-border); border-radius: 10px 10px 0 0; background: #f9fafb;
}

body:has(#compte-tabs) :is(#comm-list, #inv-list) {
  border-color: #e4e7ec; border-radius: 0 0 10px 10px; overflow: hidden;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row) {
  padding-block: 16px; border-color: #f0f2f5; line-height: 1.55;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row):hover {
  background: #f5f5f8;
}

body:has(#compte-tabs) .inv-row:has(.inv-check:checked) {
  background: #f0f1f4;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row) p {
  overflow-wrap: anywhere;
}

body:has(#compte-tabs) :is(#comm-prev, #comm-next, #inv-prev, #inv-next) {
  min-width: 36px; min-height: 36px; border: 1px solid #dfe3e9; border-radius: 9px;
}

body:has(#compte-tabs) :is(#comm-prev, #comm-next, #inv-prev, #inv-next):disabled {
  opacity: .4; cursor: not-allowed;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices), :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) * {
  box-shadow: none !important; text-shadow: none !important;
}

@media (min-width: 768px) {
body:has(#compte-tabs) #ccontent-commissions > .hidden.md\:flex, body:has(#compte-tabs) #ccontent-commissions .comm-row > .flex { display: grid; grid-template-columns: 1fr 1.35fr 1.15fr 1.5fr 1.2fr 1.1fr; gap: 12px; align-items: center; }
body:has(#compte-tabs) #ccontent-commissions > .hidden.md\:flex > *, body:has(#compte-tabs) #ccontent-commissions .comm-row > .flex > * { width: auto; min-width: 0; }
body:has(#compte-tabs) #ccontent-invoices > .hidden.md\:flex, body:has(#compte-tabs) #ccontent-invoices .inv-row > .flex { display: grid; grid-template-columns: 28px 1.4fr 1.6fr 1fr 1.1fr 1fr 36px; gap: 12px; align-items: center; }
body:has(#compte-tabs) #ccontent-invoices > .hidden.md\:flex > *, body:has(#compte-tabs) #ccontent-invoices .inv-row > .flex > * { width: auto; min-width: 0; }
}
@media (max-width: 767px) {
body:has(#compte-tabs) :is(#comm-list, #inv-list) { border-top: 1px solid #e4e7ec; border-radius: 10px; }
}
@media (max-width: 640px) {
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4), :is(#ccontent-commissions, #ccontent-invoices) { padding: 20px 16px; border-radius: 12px; }
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) > .border-t { margin-inline: -16px; padding-inline: 16px; }
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end { padding: 14px; }
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end :is(input, select) { width: 100%; min-width: 0; }
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex:last-child > .flex { flex-wrap: wrap; }
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > .pt-4 > button { width: 100%; }
}

/* Mon compte : interactions neutres et proportions de la charte commune. */
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) {
  --mc-radius: 6px;
}

body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .border {
  border-radius: 6px;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"] {
  background: var(--gray-900); border-color: var(--gray-900); color: #fff; border-radius: var(--radius);
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"]:hover {
  background: var(--gray-800); border-color: var(--gray-800); color: #fff;
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"]:hover svg {
  color: inherit;
}

body:has(#compte-tabs) .mc-tab:hover {
  color: #1d1d25; background: transparent;
}

body:has(#compte-tabs) .mc-tab:not(.is-active):hover::after {
  background: var(--gray-200);
}

body:has(#compte-tabs) .mc-tab.is-active::after {
  background: var(--gray-900);
}

body:has(#compte-tabs) :is(.comm-row, .inv-row):hover {
  background: #f5f5f8;
}

body:has(#compte-tabs) .inv-row:has(.inv-check:checked) {
  background: var(--gray-100);
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(.sp-input, input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]), select) {
  border-radius: var(--radius);
}

body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(input, select, button, a):focus-visible {
  outline-color: var(--gray-600);
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex:first-child > button {
  border-radius: var(--radius);
}

/* Tarifs : même typographie, palette et contrôles que les pages de gestion. */
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen {
  min-height: auto; padding: 30px 32px 48px; background: #fff; color: #1d1d25; font-family: var(--font-sans);
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen * {
  font-family: inherit; box-shadow: none !important; text-shadow: none !important;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl {
  width: 100%; max-width: 1280px; margin-inline: auto;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:first-child {
  text-align: left; margin-bottom: 30px; padding-bottom: 24px; border-bottom: 1px solid var(--gray-200);
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen h1 {
  max-width: 800px; margin: 0; color: #1d1d25; font-size: 23px; font-weight: 500; letter-spacing: -.015em; line-height: 1.35;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; margin-bottom: 28px;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--gray-200); border-radius: 6px; background: #fff; transform: none;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white:hover {
  border-color: var(--gray-200); background: #fff; transform: none;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .text-center {
  display: flex; flex-direction: column; align-items: flex-start; padding: 26px 24px 24px; text-align: left; border-bottom: 1px solid var(--gray-200); background: var(--gray-50);
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white h3 {
  min-height: 72px; margin: 0 0 22px; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; color: #1d1d25;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .text-center > .mb-2 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 8px;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white .text-5xl {
  font-size: 38px; font-weight: 600; line-height: 1.15; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: #1d1d25;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white .text-lg {
  margin-left: 0; font-size: 13px; font-weight: 400; line-height: 1.5; color: #1d1d25; white-space: nowrap;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .text-center > p {
  margin: 0 0 22px; font-size: 13px; color: #1d1d25; line-height: 1.6;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button {
  display: inline-flex; justify-content: center; align-items: center; width: 100%; min-height: 42px; padding: 10px 16px; border: 1px solid var(--border-control); border-radius: var(--radius); background: #fff; color: #1d1d25; font-size: 13px; font-weight: 500; line-height: 20px; transition: background var(--transition), border-color var(--transition);
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button:hover {
  background: var(--gray-100); border-color: var(--gray-500); color: #1d1d25;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button:focus-visible, body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:last-child a:focus-visible {
  outline: 2px solid var(--gray-600); outline-offset: 3px;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .flex-1 {
  flex: 1; padding: 14px 24px 20px;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white ul {
  list-style: none; margin: 0; padding: 0;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white li {
  display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 0; border-bottom: 1px solid var(--gray-100);
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white li:last-child {
  border-bottom: 0;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white li svg {
  width: 15px; height: 15px; flex: 0 0 15px; margin-top: 3px; color: #1d1d25; stroke-width: 1.8;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white li span {
  min-width: 0; color: #1d1d25; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:last-child {
  padding-top: 20px; border-top: 1px solid var(--gray-200); text-align: left;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:last-child p {
  color: #1d1d25; font-size: 13px; line-height: 1.6;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:last-child a {
  color: #1d1d25; font-weight: 500; text-underline-offset: 3px;
}

body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .text-center:last-child a:hover {
  color: #1d1d25; text-decoration-thickness: 2px;
}

@media (max-width: 1100px) {
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .text-center { border-bottom: 0; border-right: 1px solid var(--gray-200); }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white h3 { min-height: 0; }
}
@media (max-width: 640px) {
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen { padding: 24px 16px 36px; }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen h1 { font-size: 23px; }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white { display: flex; }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .text-center { padding: 22px 20px; border-right: 0; border-bottom: 1px solid var(--gray-200); }
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white > .flex-1 { padding: 12px 20px 18px; }
}

/* Tarifs : rappel des quatre modes de la modale, sans ombre ni survol coloré. */
.pricing-explanations {
  margin: 36px 0 28px;
  color: #1d1d25;
}
.pricing-explanations-header { margin-bottom: 20px; }
.pricing-explanations-header h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.015em;
}
.pricing-explanations-header p {
  margin: 0;
  color: #1d1d25;
  font-size: 13px;
  line-height: 1.6;
}
.pricing-explanations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pricing-explanation {
  padding: 22px 24px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.pricing-explanation h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #1d1d25;
}
.pricing-explanation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: #1d1d25;
}
.pricing-explanation .pricing-explanation-summary {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  color: #1d1d25;
  font-size: 12px;
  font-weight: 500;
}
@media (max-width: 640px) {
  .pricing-explanations-grid { grid-template-columns: minmax(0, 1fr); }
  .pricing-explanation { padding: 20px; }
}

/* Texte neutre : même noir sur toutes les pages, y compris les utilitaires Tailwind. */
body :is(
  .text-gray-300,
  .text-gray-400,
  .text-gray-500,
  .text-gray-600,
  .text-gray-700,
  .text-gray-800,
  .text-gray-900,
  .text-gray-950,
  .text-slate-300,
  .text-slate-400,
  .text-slate-500,
  .text-slate-600,
  .text-slate-700,
  .text-slate-800,
  .text-slate-900,
  .text-slate-950,
  .text-zinc-300,
  .text-zinc-400,
  .text-zinc-500,
  .text-zinc-600,
  .text-zinc-700,
  .text-zinc-800,
  .text-zinc-900,
  .text-zinc-950,
  .text-neutral-300,
  .text-neutral-400,
  .text-neutral-500,
  .text-neutral-600,
  .text-neutral-700,
  .text-neutral-800,
  .text-neutral-900,
  .text-neutral-950,
  .text-stone-300,
  .text-stone-400,
  .text-stone-500,
  .text-stone-600,
  .text-stone-700,
  .text-stone-800,
  .text-stone-900,
  .text-stone-950,
  .text-black
) {
  color: #1d1d25 !important;
}

/* CTA Tarifs et Mon compte : fond noir et contenu blanc dans tous les états. */
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button,
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button:hover,
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button:active,
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button:focus-visible,
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"],
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"]:hover,
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"]:active,
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"]:focus-visible {
  background: #1d1d25 !important;
  border-color: #1d1d25 !important;
  color: #fff !important;
  box-shadow: none !important;
}
body:has(.nav-item.active[href="tarifs.php"]) .min-h-screen > .max-w-7xl > .grid > .bg-white button :is(span, svg, path),
body:has(#compte-tabs) :is(#ccontent-profile, #ccontent-banking, #ccontent-paiement, #ccontent-commissions, #ccontent-invoices) :is(button, a)[class*="bg-"] :is(span, svg, path) {
  color: #fff !important;
}

/* Tableau de bord : une grille partagée entre les intitulés et les données. */
@media (min-width: 1180px) {
  .dashboard-transactions {
    --transaction-columns: 22px 24px 78px 108px 70px 108px minmax(110px, 1fr) minmax(130px, 1.4fr) 90px 98px 82px 26px;
  }
  .dashboard-transactions .t-header,
  .dashboard-transactions .t-row-desktop {
    display: grid;
    grid-template-columns: var(--transaction-columns);
    column-gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
  }
  .dashboard-transactions .t-header,
  .dashboard-transactions .t-row {
    min-width: 1180px;
    padding: 12px 16px;
  }
  .dashboard-transactions .t-row-desktop { min-height: 36px; }
  .dashboard-transactions .t-header > *,
  .dashboard-transactions .t-row-desktop > * {
    width: auto !important;
    min-width: 0 !important;
  }
  .dashboard-transactions .t-header { background: #f7f8fa; }
  .dashboard-transactions :is(.t-header-cell, .t-header-cell-flex) {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #1d1d25;
  }
  .dashboard-transactions :is(.t-cell-value, .t-cell-mono) {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #1d1d25;
    font-variant-numeric: tabular-nums;
  }
  .dashboard-transactions .t-cell-mono,
  .dashboard-transactions .t-recipient,
  .dashboard-transactions .t-description {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dashboard-transactions .t-recipient { font-weight: 500; }
  .dashboard-transactions .t-description { font-style: normal; }
  .dashboard-transactions .t-period span { display: block; white-space: nowrap; }
  .dashboard-transactions .t-amount { white-space: nowrap; text-align: right; font-weight: 600; }
  .dashboard-transactions .t-cell-status { top: 0; }
  .dashboard-transactions .badge { font-size: 11px; white-space: nowrap; }
  .dashboard-transactions .t-icon { width: 24px; height: 24px; }
  .dashboard-transactions .t-icon svg { width: 21px; height: 21px; }
  .dashboard-transactions .t-icon.caution::after { width: 10px; height: 8px; }
  .dashboard-transactions .row-action-btn { padding: 4px; }
}

/* Comment ça marche : guide produit aligné sur les pages de gestion. */
.sp-guide { max-width: 1280px; margin: 0 auto; padding: 30px 32px 48px; background: #fff; color: #1d1d25; font-family: var(--font-sans); font-size: 13px; line-height: 1.65; }
.sp-guide *, .sp-guide *::before, .sp-guide *::after { box-sizing: border-box; box-shadow: none; }
.sp-guide :is(h1,h2,h3,p,ol,dl,dd,figure) { margin: 0; }
.sp-guide h1 { font-size: 23px; font-weight: 500; line-height: 1.35; letter-spacing: -.015em; }
.sp-guide h2 { font-size: 21px; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.sp-guide h3 { font-size: 14px; font-weight: 600; line-height: 1.5; }
.sp-guide p { color: #1d1d25; }
.sp-guide-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sp-guide-header p { margin-top: 6px; }
.sp-guide .sp-guide-button, .sp-guide .sp-guide-button:hover, .sp-guide .sp-guide-button:active { display: inline-flex; align-items: center; justify-content: center; gap: 18px; flex-shrink: 0; padding: 10px 16px; min-height: 42px; background: #1d1d25; border: 1px solid #1d1d25; border-radius: 4px; color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }
.sp-guide-button span { color: #fff; }
.sp-guide a:focus-visible, .sp-guide summary:focus-visible { outline: 2px solid #1d1d25; outline-offset: 4px; }
.sp-guide-nav { display: flex; gap: 26px; overflow-x: auto; border-bottom: 1px solid #e7e8ec; margin: 26px 0 32px; padding-bottom: 14px; }
.sp-guide-nav a { white-space: nowrap; color: #1d1d25; font-size: 12px; }
.sp-guide-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.sp-guide section { scroll-margin-top: 24px; }
.sp-guide-overline { display: block; margin-bottom: 12px; font-size: 10px; font-weight: 600; letter-spacing: .1em; color: #1d1d25; }
.sp-guide-start { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 32px; background: #f7f8fa; border: 1px solid #e7e8ec; border-radius: 6px; }
.sp-guide-start h2 { font-size: 26px; line-height: 1.4; }
.sp-guide-start > div > p { max-width: 330px; margin: 16px 0 20px; }
.sp-guide .sp-guide-text-link { color: #1d1d25; font-size: 12px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.sp-guide-text-link:hover { text-decoration-thickness: 2px; }
.sp-guide-checklist, .sp-guide-steps { list-style: none; padding: 0; }
.sp-guide-checklist li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid #e1e3e8; }
.sp-guide-checklist li:first-child { padding-top: 0; }
.sp-guide-checklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.sp-guide-checklist p { margin-top: 3px; font-size: 12px; }
.sp-guide-number { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid #d6d8df; border-radius: 4px; background: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.sp-guide-section { padding-top: 44px; }
.sp-guide-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 22px; }
.sp-guide-section-heading > p { max-width: 330px; font-size: 12px; }
.sp-guide-modes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #e7e8ec; border-radius: 6px; overflow: hidden; }
.sp-guide-modes article { display: flex; flex-direction: column; padding: 22px; border-right: 1px solid #e7e8ec; }
.sp-guide-modes article:last-child { border-right: 0; }
.sp-guide-modes .sp-guide-mode-key { margin: 5px 0 16px; font-size: 12px; }
.sp-guide-modes article > p:not(.sp-guide-mode-key) { font-size: 12px; padding-bottom: 20px; }
.sp-guide-mode-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid #e7e8ec; }
.sp-guide-mode-bottom span { display: block; font-size: 11px; margin-bottom: 3px; }
.sp-guide-mode-bottom strong { font-size: 12px; font-weight: 500; }
.sp-guide .sp-guide-note { padding: 16px 0 0; font-size: 12px; }
.sp-guide-note strong { font-weight: 500; }
.sp-guide-journey { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.sp-guide-steps li { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid #e7e8ec; }
.sp-guide-steps li:first-child { padding-top: 0; }
.sp-guide-steps li:last-child { border-bottom: 0; }
.sp-guide-steps p { margin: 6px 0 10px; max-width: 410px; font-size: 12px; }
.sp-guide-example { border: 1px solid #e7e8ec; border-radius: 6px; overflow: hidden; }
.sp-guide-example figcaption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 22px; background: #f7f8fa; border-bottom: 1px solid #e7e8ec; font-size: 10px; letter-spacing: .04em; }
.sp-guide-example-tag { border: 1px solid #d6d8df; padding: 2px 7px; border-radius: 3px; letter-spacing: 0; }
.sp-guide-example-body { padding: 24px; }
.sp-guide-example-title { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.sp-guide-example-title p { font-size: 12px; margin-top: 2px; }
.sp-guide-example-data > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f1f4; font-size: 12px; }
.sp-guide-example-data dd { text-align: right; font-weight: 500; }
.sp-guide-example-flow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 16px 0; margin-top: 6px; font-size: 11px; font-weight: 500; }
.sp-guide-example-caption { border-top: 1px solid #e7e8ec; padding-top: 14px; font-size: 12px; }
.sp-guide-statuses { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.sp-guide-statuses article { border-top: 2px solid #e7e8ec; padding: 20px 0; }
.sp-guide-status-label { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 14px; }
.sp-guide-statuses p { margin-top: 8px; font-size: 12px; }
.sp-guide-close-note { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 24px; padding: 20px 24px; background: #f7f8fa; border: 1px solid #e7e8ec; border-radius: 6px; }
.sp-guide-close-note strong { font-weight: 500; }
.sp-guide-close-note p { font-size: 12px; }
.sp-guide-faq-section { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.sp-guide-faq-section > div > p { margin-top: 10px; max-width: 230px; font-size: 12px; }
.sp-guide-faq details { border-bottom: 1px solid #e7e8ec; }
.sp-guide-faq details:first-child { border-top: 1px solid #e7e8ec; }
.sp-guide-faq summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px 0; font-size: 13px; font-weight: 500; list-style: none; cursor: pointer; }
.sp-guide-faq summary::-webkit-details-marker { display: none; }
.sp-guide-faq summary::after { content: '+'; font-size: 18px; font-weight: 400; }
.sp-guide-faq details[open] summary::after { content: '−'; }
.sp-guide-faq summary:hover { background: #f7f8fa; }
.sp-guide-faq details p { padding: 0 24px 18px 0; font-size: 12px; }
.sp-guide-faq a { text-decoration: underline; text-underline-offset: 3px; }
.sp-guide-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 44px; padding-top: 28px; border-top: 1px solid #e7e8ec; }
.sp-guide-footer h2 { font-size: 18px; }
.sp-guide-footer p { margin-top: 6px; font-size: 12px; }
.sp-guide-footer-actions { display: flex; align-items: center; gap: 22px; }
@media (max-width: 1200px) {
  .sp-guide-modes { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sp-guide-modes article:nth-child(2) { border-right: 0; }
  .sp-guide-modes article:nth-child(-n+2) { border-bottom: 1px solid #e7e8ec; }
  .sp-guide-journey, .sp-guide-start { gap: 28px; }
  .sp-guide-close-note { grid-template-columns: 1fr; gap: 8px; }
  .sp-guide-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 800px) {
  .sp-guide-start, .sp-guide-journey, .sp-guide-faq-section { grid-template-columns: 1fr; gap: 26px; }
  .sp-guide-start h2 br { display: none; }
  .sp-guide-start > div > p { max-width: none; }
  .sp-guide-section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .sp-guide-section-heading > p { max-width: none; }
  .sp-guide-statuses { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 540px) {
  .sp-guide { padding: 24px 16px 36px; }
  .sp-guide-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sp-guide-start { padding: 22px 20px; }
  .sp-guide-start h2 { font-size: 23px; }
  .sp-guide-section { padding-top: 32px; }
  .sp-guide-modes { grid-template-columns: 1fr; }
  .sp-guide-modes article { border-right: 0; border-bottom: 1px solid #e7e8ec; padding: 20px; }
  .sp-guide-modes article:last-child { border-bottom: 0; }
  .sp-guide-footer-actions { align-items: flex-start; flex-direction: column; gap: 18px; width: 100%; }
  .sp-guide-footer .sp-guide-button { width: 100%; }
  .sp-guide-example-body { padding: 20px; }
}

/* Guide : les cautions en violet, les paiements en vert, comme les listes. */
.sp-guide .sp-guide-modes article { border-top: 3px solid #6C3AED; }
.sp-guide .sp-guide-modes article:last-child { border-top-color: #08715B; }
.sp-guide .sp-guide-modes .sp-guide-mode-key { color: #6C3AED; font-weight: 500; }
.sp-guide .sp-guide-modes article:last-child .sp-guide-mode-key { color: #08715B; }
.sp-guide .sp-guide-example { border-top: 3px solid #6C3AED; }
.sp-guide .sp-guide-number { background: transparent; border: 0; color: #1d1d25; font-weight: 600; }
.sp-guide .sp-guide-status-label { padding: 0; background: transparent; color: #1d1d25; font-weight: 600; }

/* Guide : onglets sélectionnés noirs, panneaux contrastés et lexique complet. */
.sp-guide .sp-guide-nav { gap: 6px; padding: 6px; background: #f0f1f4; border: 1px solid #e1e3e8; border-radius: 6px; }
.sp-guide .sp-guide-nav a { padding: 10px 14px; border-radius: 4px; font-weight: 500; text-decoration: none; }
.sp-guide .sp-guide-nav a:hover { background: #e7e8ec; color: #1d1d25; }
.sp-guide .sp-guide-nav a[aria-current="page"],
.sp-guide .sp-guide-nav a[aria-current="page"]:hover,
.sp-guide .sp-guide-nav a[aria-selected="true"],
.sp-guide .sp-guide-nav a[aria-selected="true"]:hover { background: #1d1d25; color: #fff; }
.sp-guide-tabbed > section[hidden] { display: none !important; }
.sp-guide-tabbed > .sp-guide-section { padding: 28px; background: #f7f8fa; border: 1px solid #e7e8ec; border-radius: 6px; }
.sp-guide .sp-guide-modes, .sp-guide .sp-guide-example, .sp-guide .sp-guide-faq { background: #fff; }
.sp-guide .sp-guide-checklist { padding: 20px; background: #fff; border: 1px solid #e7e8ec; border-radius: 4px; }
.sp-guide .sp-guide-steps { padding: 22px; background: #fff; border: 1px solid #e7e8ec; border-radius: 4px; }
.sp-guide-journey-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sp-guide .sp-guide-payment-methods { padding: 22px; background: #fff; border: 1px solid #e7e8ec; border-radius: 4px; }
.sp-guide .sp-guide-payment-methods h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.sp-guide .sp-guide-payment-methods p { margin: 0 0 18px; color: #61616e; font-size: 12px; }
.sp-guide-payment-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-guide-payment-brands li { display: block; width: 44px; height: 31px; }
.sp-guide-payment-logo { display: block; width: 44px; height: 31px; background-image: url("../images/payment-methods-guide.png"); background-repeat: no-repeat; background-size: 495px 60px; }
.sp-guide-payment-logo-cb { background-position: -15px -14px; }
.sp-guide-payment-logo-visa { background-position: -67px -14px; }
.sp-guide-payment-logo-mastercard { background-position: -120px -14px; }
.sp-guide-payment-logo-amex { background-position: -172px -14px; }
.sp-guide-payment-logo-apple-pay { background-position: -226px -14px; }
.sp-guide-payment-logo-google-pay { background-position: -278px -14px; }
.sp-guide-payment-logo-paypal { background-position: -330px -14px; }
.sp-guide-payment-logo-link { background-position: -383px -14px; }
.sp-guide-payment-logo-klarna { background-position: -435px -14px; }

.sp-guide .sp-guide-faq { padding: 0 20px; border: 1px solid #e7e8ec; border-radius: 4px; }
.sp-guide .sp-guide-faq details:first-child { border-top: 0; }
.sp-guide .sp-guide-faq details:last-child { border-bottom: 0; }
.sp-guide-status-list { background: #fff; border: 1px solid #e1e3e8; border-radius: 4px; overflow: hidden; }
.sp-guide-status-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px; padding: 16px 20px; border-bottom: 1px solid #e7e8ec; }
.sp-guide-status-list > div:nth-child(even) { background: #fafafb; }
.sp-guide-status-list > div:last-child { border-bottom: 0; }
.sp-guide-status-list dt { font-weight: 600; font-size: 12px; }
.sp-guide-status-list dd { color: #1d1d25; font-size: 13px; line-height: 1.65; }
.sp-guide .sp-guide-close-note { margin-top: 20px; background: #fff; }
@media (max-width: 640px) {
  .sp-guide-tabbed > .sp-guide-section { padding: 20px 16px; }
  .sp-guide-status-list > div { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .sp-guide .sp-guide-checklist, .sp-guide .sp-guide-steps { padding: 16px; }
}

/* Statuts regroupés par mode de caution. */
.sp-guide-status-groups { display: grid; gap: 28px; }
.sp-guide-status-group > h3 { margin-bottom: 6px; font-size: 16px; }
.sp-guide-status-group > p { margin-bottom: 14px; font-size: 12px; }

/* Parcours : repères agrandis et aperçu mobile du mail de caution. */
.sp-guide .sp-guide-steps > li > .sp-guide-number { width: 48px; height: 60px; flex-basis: 48px; justify-content: flex-start; align-items: flex-start; font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: -.05em; }
.sp-guide-step-brands { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.sp-guide-step-brands img { display: block; border-radius: 6px; object-fit: contain; }
.sp-guide-channel { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; }
.sp-guide-phone-preview { margin: 0; width: 100%; min-width: 0; }
.sp-guide-phone-preview > figcaption { text-align: center; font-size: 14px; font-weight: 600; margin-bottom: 18px; }
.sp-guide-phone-preview > figcaption span { display: block; margin-top: 5px; font-size: 10px; font-weight: 400; }
.sp-guide-phone { width: 340px; max-width: 100%; margin: auto; border: 7px solid #1d1d25; border-radius: 42px; background: #fff; overflow: hidden; }
.sp-guide-phone-top { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font-size: 11px; font-weight: 600; }
.sp-guide-phone-island { width: 90px; height: 24px; border-radius: 20px; background: #1d1d25; }
.sp-guide-mail-header { padding: 8px 16px 14px; border-bottom: 1px solid #e7e8ec; }
.sp-guide-mail-header > span { font-size: 10px; }
.sp-guide-mail-header > strong { display: block; margin: 8px 0 12px; font-size: 16px; font-weight: 600; }
.sp-guide-mail-header > div { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.sp-guide-mail-header small { display: block; font-size: 9px; }
.sp-guide-phone-scroll { max-height: 500px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: #f7f8fa; }
.sp-guide-phone-scroll:focus-visible { outline: 2px solid #1d1d25; outline-offset: -2px; }
.sp-guide-mail-content { padding: 22px 16px; margin: 8px; background: #fff; text-align: center; }
.sp-guide .sp-guide-mail-content h3 { font-size: 16px; margin-bottom: 18px; }
.sp-guide .sp-guide-mail-content p { font-size: 11px; line-height: 1.65; margin: 0 0 12px; }
.sp-guide-mail-amount { padding: 16px 10px; margin: 18px 0 12px; border-radius: 6px; background: #f4f2ff; }
.sp-guide-mail-amount span { display: block; font-size: 10px; text-transform: uppercase; }
.sp-guide-mail-amount strong { font-size: 25px; color: #4a22b2; }
.sp-guide .sp-guide-mail-security { font-size: 9px; }
.sp-guide-mail-security span { color: #635bff; }
.sp-guide-mail-content dl > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f0eff7; padding: 9px 0; font-size: 10px; }
.sp-guide-mail-content dt { text-align: left; }
.sp-guide-mail-content dd { text-align: right; font-weight: 500; }
.sp-guide-mail-waiting { display: inline-block; margin: 18px 0; padding: 4px 10px; background: #fef0e8; color: #a74e22; border-radius: 16px; font-size: 10px; }
.sp-guide-mail-cta { display: block; padding: 11px 12px; margin-bottom: 12px; border-radius: 6px; background: #6c3aed; color: #fff; font-size: 12px; font-weight: 600; }
.sp-guide .sp-guide-mail-info { text-align: left; padding: 12px; border-left: 3px solid #cecad9; background: #f8f8fa; }
.sp-guide-phone-bottom { width: 95px; height: 4px; background: #1d1d25; border-radius: 4px; margin: 12px auto; }
.sp-guide .sp-guide-phone-help { text-align: center; font-size: 10px; margin-top: 12px; }
@media (max-width: 540px) { .sp-guide .sp-guide-steps > li > .sp-guide-number { font-size: 38px; width: 36px; flex-basis: 36px; } .sp-guide-phone { border-width: 6px; } }

/* Mention de sécurité sous les cartes de demandes. */
.sp-guide-payment-security { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; margin-top: 12px; font-size: 11px; line-height: 1.4; color: #61616e; text-align: right; }
.sp-guide-payment-security > div { display: flex; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; }
.sp-guide-payment-security img { display: block; flex: 0 0 48px; width: 48px; height: 27px; object-fit: contain; }

/* En-têtes des listes, alignés sur les colonnes de chaque page. */
.sp-list-header, .sp-links-header { background: #f7f8fa; }
@media (min-width: 1180px) and (max-width: 1599px) {
  .sp-list-header { gap: 8px; padding: 8px 12px; min-width: 1074px; }
  .sp-list-header .t-header-cell-flex { min-width: 100px; }
}
.sp-links-header { display: none; }
@media (min-width: 768px) {
  #links-list { overflow-x: auto; }
  #links-list .sp-links-header,
  #links-list .link-row > .hidden.md\:flex {
    display: grid; grid-template-columns: 36px 100px 180px 140px minmax(160px, 1fr) 70px 70px 110px 70px 32px; gap: 16px; align-items: center;
  }
  #links-list .link-row { min-width: 1144px; }
  #links-list .sp-links-header { min-width: 1144px; padding: 8px 16px; border-bottom: 1px solid #e7e8ec; font-size: 12px; font-weight: 500; color: #1d1d25; }
  #links-list .link-row > .hidden.md\:flex > div { width: auto !important; min-width: 0; }
  #links-list .sp-links-header > :nth-child(8), #links-list .sp-links-header > :nth-child(9) { text-align: right; }
  #links-list .link-row > .hidden.md\:flex > div > [class~="text-[11px]"] { display: none; }
}

/* Colonnes de largeur égale ; les contrôles conservent une largeur compacte. */
@media (min-width: 1180px) {
  .dashboard-transactions .t-header, .dashboard-transactions .t-row-desktop {
    display: grid !important;
    grid-template-columns: 20px 36px repeat(9, minmax(0, 1fr)) 36px !important;
    gap: 12px !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  .dashboard-transactions .t-header, .dashboard-transactions .t-row {
    width: 100%; min-width: 1080px !important; padding: 12px 16px !important; box-sizing: border-box;
  }
  .dashboard-transactions .t-row-desktop { min-width: 0 !important; }
  .dashboard-transactions .t-header > *, .dashboard-transactions .t-row-desktop > * {
    width: auto !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box;
  }
  .dashboard-transactions .t-header-cell, .dashboard-transactions .t-header-cell-flex { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  .dashboard-transactions .t-cell-value, .dashboard-transactions .t-cell-mono { overflow: hidden; text-overflow: ellipsis; }
  #clients-list .t-header, #clients-list .t-row-desktop {
    display: grid !important;
    grid-template-columns: 20px 48px repeat(6, minmax(0, 1fr)) 36px !important;
    gap: 12px !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  #clients-list .t-header, #clients-list .t-row {
    width: 100%; min-width: 880px !important; padding: 12px 16px !important; box-sizing: border-box;
  }
  #clients-list .t-row-desktop { min-width: 0 !important; }
  #clients-list .t-header > *, #clients-list .t-row-desktop > * {
    width: auto !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box;
  }
  #clients-list .t-header-cell, #clients-list .t-header-cell-flex { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  #clients-list .t-cell-value, #clients-list .t-cell-mono { overflow: hidden; text-overflow: ellipsis; }
  #cautions-list .t-header, #cautions-list .t-row-desktop {
    display: grid !important;
    grid-template-columns: 20px 36px repeat(9, minmax(0, 1fr)) 36px !important;
    gap: 12px !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  #cautions-list .t-header, #cautions-list .t-row {
    width: 100%; min-width: 1080px !important; padding: 12px 16px !important; box-sizing: border-box;
  }
  #cautions-list .t-row-desktop { min-width: 0 !important; }
  #cautions-list .t-header > *, #cautions-list .t-row-desktop > * {
    width: auto !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box;
  }
  #cautions-list .t-header-cell, #cautions-list .t-header-cell-flex { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  #cautions-list .t-cell-value, #cautions-list .t-cell-mono { overflow: hidden; text-overflow: ellipsis; }
  #paiements-list .t-header, #paiements-list .t-row-desktop {
    display: grid !important;
    grid-template-columns: 20px 36px repeat(7, minmax(0, 1fr)) 36px !important;
    gap: 12px !important;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }
  #paiements-list .t-header, #paiements-list .t-row {
    width: 100%; min-width: 940px !important; padding: 12px 16px !important; box-sizing: border-box;
  }
  #paiements-list .t-row-desktop { min-width: 0 !important; }
  #paiements-list .t-header > *, #paiements-list .t-row-desktop > * {
    width: auto !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box;
  }
  #paiements-list .t-header-cell, #paiements-list .t-header-cell-flex { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  #paiements-list .t-cell-value, #paiements-list .t-cell-mono { overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 768px) {
  #links-list .sp-links-header, #links-list .link-row > .hidden.md\:flex {
    display: grid !important;
    grid-template-columns: 36px repeat(8, minmax(0, 1fr)) 32px !important;
    gap: 12px !important; width: 100%; box-sizing: border-box;
  }
  #links-list .sp-links-header, #links-list .link-row {
    min-width: 980px !important; padding-left: 16px; padding-right: 16px; box-sizing: border-box;
  }
  #links-list .sp-links-header > *, #links-list .link-row > .hidden.md\:flex > * {
    width: auto !important; min-width: 0 !important; max-width: 100%;
  }
  #links-list .sp-links-header > * { overflow-wrap: anywhere; line-height: 1.4; }
}

/* Guide : fond blanc sur toute la zone centrale, contenu aligné à gauche. */
.main-content:has(> .main-inner > .sp-guide) {
  background: #fff;
}
.main-inner:has(> .sp-guide) {
  background: #fff;
}
.main-inner > .sp-guide {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

/* Assistance : trois cartes de contact cohérentes. */
.sp-guide-footer.sp-guide-support { display: block; margin-top: 36px; padding-top: 28px; }
.sp-guide-support > div { width: 100%; }
.sp-guide .sp-guide-support h2 { font-size: 18px; font-weight: 600; }
.sp-guide .sp-guide-support p { margin-top: 6px; color: #1d1d25; font-size: 13px; }
.sp-guide-contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.sp-guide .sp-guide-contact-links > a,
.sp-guide .sp-guide-contact-links > button {
  display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; min-height: 88px;
  padding: 18px; border: 1px solid #e7e8ec; border-radius: 12px; background: #fff;
  color: #1d1d25; font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.sp-guide-contact-links .sp-guide-contact-icon { display: block; width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; border-radius: 8px; }
.sp-guide-contact-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.sp-guide-contact-copy strong { font-size: 14px; font-weight: 600; line-height: 1.4; }
.sp-guide-contact-copy > span { color: #1d1d25; font-size: 12px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.sp-guide-contact-arrow { color: #8b8b96; font-size: 19px; flex: 0 0 auto; }
.sp-guide .sp-guide-contact-links > a:hover,
.sp-guide .sp-guide-contact-links > button:hover { background: #f7f8fa; border-color: #c9cbd3; }
.sp-guide .sp-guide-contact-links > a:focus-visible,
.sp-guide .sp-guide-contact-links > button:focus-visible { outline: 2px solid #6c3aed; outline-offset: 3px; }
@media (max-width: 900px) {
  .sp-guide-contact-links { grid-template-columns: 1fr; gap: 10px; }
  .sp-guide .sp-guide-contact-links > a,
  .sp-guide .sp-guide-contact-links > button { min-height: 78px; padding: 16px; }
}

/* Parrainage : harmonisation visuelle, sans modification de la page. */
body:has(#email-fields):has(#msg-area) .main-content { background: #fff; }
body:has(#email-fields):has(#msg-area) .min-h-screen { min-height: 100%; background: #fff; color: #1d1d25; font-family: var(--font-sans); }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl { width: 100%; max-width: 1280px; margin: 0; padding: 30px 32px 48px; box-sizing: border-box; }
body:has(#email-fields):has(#msg-area) .min-h-screen h1 { margin: 0; font-size: 23px; font-weight: 500; line-height: 1.35; letter-spacing: -.015em; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .mb-8 { margin-bottom: 28px; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .mb-8 > .flex > .w-10 { display: none; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .mb-8 > p { margin: 6px 0 0; font-size: 13px; line-height: 1.65; }
body:has(#email-fields):has(#msg-area) .info-bubble { padding: 24px; margin-bottom: 28px; gap: 20px; border: 1px solid #e7e8ec; border-radius: 6px; background: #f7f8fa; box-shadow: none; }
body:has(#email-fields):has(#msg-area) .info-bubble-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 10px; border: 1px solid #e7e8ec; border-radius: 8px; background: #fff; box-sizing: border-box; }
body:has(#email-fields):has(#msg-area) .info-bubble-title { font-size: 14px; font-weight: 600; }
body:has(#email-fields):has(#msg-area) .info-bubble-text { margin-top: 5px; font-size: 13px; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 24px; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .grid > .space-y-4 { min-width: 0; padding: 24px; border: 1px solid #e7e8ec; border-radius: 6px; background: #f7f8fa; }
body:has(#email-fields):has(#msg-area) .min-h-screen h2 { font-size: 14px; font-weight: 600; color: #1d1d25; }
body:has(#email-fields):has(#msg-area) .grid > .space-y-4 > .flex { flex-wrap: wrap; row-gap: 8px; }
#email-fields { display: grid; gap: 10px; }
#email-fields .email-row { margin: 0; }
#email-fields .email-input, #msg-area { width: 100%; border: 1px solid #d9dbe2; border-radius: 6px; background: #fff; color: #1d1d25; font-family: var(--font-sans); font-size: 13px; line-height: 1.65; box-shadow: none; box-sizing: border-box; }
#email-fields .email-input { min-height: 44px; padding: 10px 12px 10px 38px; }
#email-fields .email-input.border-red-400 { border-color: #dc2626; }
#msg-area { padding: 16px; min-height: 365px; resize: vertical; }
#email-fields .email-input:focus, #msg-area:focus { outline: 2px solid #6c3aed; outline-offset: 2px; box-shadow: none; }
body:has(#email-fields):has(#msg-area) button[onclick="addEmail()"], body:has(#email-fields):has(#msg-area) button[onclick="resetMessage()"] { color: #1d1d25; font-size: 12px; font-weight: 500; }
body:has(#email-fields):has(#msg-area) button[onclick="addEmail()"] { min-height: 36px; }
body:has(#email-fields):has(#msg-area) button[onclick="addEmail()"]:hover, body:has(#email-fields):has(#msg-area) button[onclick="resetMessage()"]:hover { text-decoration: underline; text-underline-offset: 4px; }
body:has(#email-fields):has(#msg-area) #copy-btn, body:has(#email-fields):has(#msg-area) #send-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 10px 18px; border: 1px solid #1d1d25 !important; border-radius: 6px; background: #1d1d25 !important; color: #fff !important; font-size: 13px; font-weight: 500; box-shadow: none; }
body:has(#email-fields):has(#msg-area) #copy-btn:hover, body:has(#email-fields):has(#msg-area) #send-btn:hover { background: #343440 !important; }
body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .mt-6 { padding-top: 20px; margin-top: 24px; border-top: 1px solid #e7e8ec; }
body:has(#email-fields):has(#msg-area) button:focus-visible { outline: 2px solid #6c3aed; outline-offset: 3px; }
@media (max-width: 900px) {
  body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
  body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl { padding: 24px 16px 36px; }
  body:has(#email-fields):has(#msg-area) .info-bubble { align-items: stretch !important; flex-direction: column; padding: 20px; }
  body:has(#email-fields):has(#msg-area) .min-h-screen > .max-w-6xl > .grid > .space-y-4 { padding: 20px; }
  body:has(#email-fields):has(#msg-area) #send-btn { width: 100%; }
}

/* Dashboard : même fond que le menu et contenus regroupés dans des blocs blancs. */
body:has(.dashboard-transactions) .main-content,
body:has(.dashboard-transactions) .main-inner,
body:has(.dashboard-transactions) .page-header,
body:has(.dashboard-transactions) .page-content {
  background: #f8f8f8;
}

body:has(.dashboard-transactions) .stats-grid {
  gap: 16px;
  padding: 0 0 20px;
  border-bottom: 0;
}

body:has(.dashboard-transactions) .stat-card,
body:has(.dashboard-transactions) .chart-card,
body:has(.dashboard-transactions) .transactions-section {
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

body:has(.dashboard-transactions) .stat-card,
body:has(.dashboard-transactions) .stat-card:first-child {
  padding: 18px 20px;
}

body:has(.dashboard-transactions) .transactions-section {
  overflow: hidden;
}

body:has(.dashboard-transactions) #btn-export,
body:has(.dashboard-transactions) #btn-export:hover {
  border-color: #1d1d25;
  background: #1d1d25;
  color: #fff;
}

body:has(.dashboard-transactions) .dashboard-how-link,
body:has(.dashboard-transactions) .dashboard-how-link:hover {
  border-color: #1d1d25 !important;
  background: #1d1d25 !important;
  color: #fff !important;
}

body:has(.dashboard-transactions) .dashboard-transactions .filter-select,
body:has(.dashboard-transactions) .dashboard-transactions .filter-input {
  border: 0;
  background: #f8f8f8;
}

body:has(.dashboard-transactions) .dashboard-transactions .t-row:hover {
  background: #f8f8f8 !important;
}

body:has(.dashboard-transactions) .dashboard-transactions .t-header {
  background: #f8f8f8;
}

/* Pages de gestion : mêmes contrôles et listes, volet principal blanc. */
body:has(:is(#clients-list, #cautions-list, #paiements-list, #links-list)) .main-content,
body:has(:is(#clients-list, #cautions-list, #paiements-list, #links-list)) .main-inner,
body:has(:is(#clients-list, #cautions-list, #paiements-list, #links-list)) .page-header,
body:has(:is(#clients-list, #cautions-list, #paiements-list, #links-list)) .page-content {
  background: #fff;
}

#btn-export-clients,
#btn-export-clients:hover,
#btn-export-cautions,
#btn-export-cautions:hover,
#btn-export-paiements,
#btn-export-paiements:hover {
  border-color: #1d1d25;
  background: #1d1d25;
  color: #fff;
}

body:has(:is(#clients-list, #cautions-list, #paiements-list)) .filters-bar .filter-select,
body:has(:is(#clients-list, #cautions-list, #paiements-list)) .filters-bar .filter-input {
  border: 0;
  background: #f8f8f8;
}

:is(#clients-list, #cautions-list, #paiements-list) .sp-list-header,
#links-list .sp-links-header {
  background: #f8f8f8;
}

:is(#clients-list, #cautions-list, #paiements-list) .t-row:hover,
#links-list .link-row:hover {
  background: #f8f8f8 !important;
}

#links-list .link-row:not(:hover) {
  background: #fff;
}

body:has(.dashboard-transactions) .search-input,
body:has(#clients-list) .search-input,
body:has(#cautions-list) .search-input,
body:has(#paiements-list) .search-input,
body:has(#links-list) .search-input {
  border: 0;
  background: #f8f8f8;
}

/* CTA textuels : libellés seuls. Les commandes uniquement iconiques sont conservées. */
:is(button, a).btn:not(.btn-icon) svg,
.dashboard-how-link svg {
  display: none;
}

/* Comment ça marche : un seul gris pour tous les blocs secondaires. */
.sp-guide-start,
.sp-guide .sp-guide-nav,
.sp-guide-tabbed > .sp-guide-section,
.sp-guide-example figcaption,
.sp-guide-status-list > div:nth-child(even),
.sp-guide-phone-scroll,
.sp-guide .sp-guide-mail-info,
.sp-guide-faq summary:hover,
.sp-guide .sp-guide-contact-links > button:hover {
  background: #f8f8f8;
}

/* Mon compte : navigation horizontale sobre avec onglet actif souligné. */
body:has(#compte-tabs) .mc-tabs {
  align-items: flex-end;
  gap: 12px;
  width: calc(100% + 32px);
  margin-left: -32px;
  padding-left: 32px;
  border-bottom: 1px solid #e5e7eb;
}

body:has(#compte-tabs) .mc-tab,
body:has(#compte-tabs) .mc-tab:first-child {
  min-height: 52px;
  padding: 14px 20px 15px;
  border-radius: 0;
  color: #686868;
  font-size: 13px;
  font-weight: 500;
}

body:has(#compte-tabs) .mc-tab-ico {
  display: none;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:first-child > h2:first-child,
body:has(#compte-tabs) #ccontent-banking > h2:first-child,
body:has(#compte-tabs) #ccontent-paiement > h2:first-child,
body:has(#compte-tabs) #ccontent-commissions > .flex:first-child > h2:first-child,
body:has(#compte-tabs) #ccontent-invoices > .flex:first-child > h2:first-child {
  display: none;
}

body:has(#compte-tabs) .mc-tab:hover {
  background: #f8f8f8;
  color: #111;
}

body:has(#compte-tabs) .mc-tab.is-active {
  border-radius: 4px 4px 0 0;
  background: #f8f8f8;
  color: #111;
}

body:has(#compte-tabs) .mc-tab::after,
body:has(#compte-tabs) .mc-tab:not(:first-child)::after {
  right: 50%;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 4px;
  border-radius: 2px 2px 0 0;
  transform: translateX(-50%);
  transition: width .18s ease, background .18s ease;
}

body:has(#compte-tabs) .mc-tab.is-active::after {
  width: 64px;
  background: #111;
}

@media (max-width: 900px) {
  body:has(#compte-tabs) .mc-tabs {
    width: calc(100% + 22px);
    margin-left: -22px;
    padding-left: 22px;
  }
}

@media (max-width: 640px) {
  body:has(#compte-tabs) .mc-tabs {
    gap: 6px;
    width: calc(100% + 16px);
    margin-left: -16px;
    padding-left: 16px;
  }

  body:has(#compte-tabs) .mc-tab,
  body:has(#compte-tabs) .mc-tab:first-child {
    min-height: 46px;
    padding: 12px 14px 13px;
    font-size: 12px;
  }
}

/* Mon compte — Factures : blocs sans cadre extérieur. */
body:has(#compte-tabs) #ccontent-invoices,
body:has(#compte-tabs) #ccontent-invoices > .flex.flex-wrap.items-end,
body:has(#compte-tabs) #ccontent-invoices > .hidden.md\:flex,
body:has(#compte-tabs) #inv-list {
  border: 0;
}

body:has(#compte-tabs) #ccontent-invoices,
body:has(#compte-tabs) #ccontent-invoices > .hidden.md\:flex,
body:has(#compte-tabs) #inv-list {
  border-radius: 0;
}

/* Mon compte — Commissions : blocs sans cadre extérieur. */
body:has(#compte-tabs) #ccontent-commissions,
body:has(#compte-tabs) #ccontent-commissions > .flex.flex-wrap.items-end,
body:has(#compte-tabs) #ccontent-commissions > .hidden.md\:flex,
body:has(#compte-tabs) #comm-list {
  border: 0;
}

body:has(#compte-tabs) #ccontent-commissions,
body:has(#compte-tabs) #ccontent-commissions > .hidden.md\:flex,
body:has(#compte-tabs) #comm-list {
  border-radius: 0;
}

/* Mon compte : cartes et filtres uniformisés en gris clair, sans cadre. */
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4),
body:has(#compte-tabs) :is(#ccontent-banking, #ccontent-paiement) > .max-w-lg > .border,
body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50,
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end,
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .hidden.md\:flex {
  border: 0;
  background: #f8f8f8;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end :is(input:not([type="checkbox"]), select) {
  border: 0;
  background: #f8f8f8;
}

/* Les tableaux conservent un cadre fin. */
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .hidden.md\:flex {
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

body:has(#compte-tabs) :is(#comm-list, #inv-list) {
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 4px 4px;
}

@media (max-width: 767px) {
  body:has(#compte-tabs) :is(#comm-list, #inv-list) {
    border-top: 1px solid #e5e7eb;
    border-radius: 4px;
  }
}

/* Tableaux Mon compte : survol gris exact et séparateurs visibles. */
body:has(#compte-tabs) :is(.comm-row, .inv-row) {
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row):last-child {
  border-bottom: 0;
}

body:has(#compte-tabs) :is(.comm-row, .inv-row):hover,
body:has(#compte-tabs) .inv-row:has(.inv-check:checked) {
  background: #f8f8f8;
}

/* Commissions et factures : le gris reste limité aux champs de filtre. */
body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50,
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end,
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .hidden.md\:flex,
body:has(#compte-tabs) :is(.comm-row, .inv-row):hover,
body:has(#compte-tabs) .inv-row:has(.inv-check:checked) {
  background: #fff;
}

body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end :is(input:not([type="checkbox"]), select) {
  border: 0;
  background: #f8f8f8;
}

/* Informations personnelles : fond blanc et champs gris sans bordure. */
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) {
  border: 0;
  background: #fff;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:first-child > .space-y-5 > .border-b {
  border-bottom: 0;
}

body:has(#compte-tabs) #ccontent-profile :is(.sp-input, input[type="tel"], select[name="phone_country"]),
body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]) {
  border: 0;
  background: #f8f8f8;
}

body:has(#compte-tabs) #ccontent-profile div:has(> select[name="phone_country"]) > :is(select, input) {
  border: 0;
  background: transparent;
}

/* Connexion et inscription : champs gris sans bordure. */
body:has(.auth-shell) .auth-form .form-input {
  border: 0;
  background: #f8f8f8;
}

body:has(.auth-shell) .auth-form .form-input:hover:not(:focus):not(:disabled),
body:has(.auth-shell) .auth-form .form-input:focus {
  border: 0;
  background: #f8f8f8;
}

/* Informations personnelles : fond dédié aux documents justificatifs. */
body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 {
  padding: 24px;
  border: 0;
  border-radius: 6px;
  background: #f8f8f8;
}

/* Documents Stripe : validations rondes et légèrement agrandies. */
body:has(#compte-tabs) #ccontent-profile .w-8.h-8.rounded-full.bg-green-500 {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

body:has(#compte-tabs) #ccontent-profile .w-8.h-8.rounded-full.bg-green-500 > svg {
  width: 19px;
  height: 19px;
}

body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 > .max-w-2xl.flex.items-start.gap-3 > svg:first-child {
  width: 28px;
  height: 28px;
}

/* Commissions : total à gauche et export à droite sur la même ligne. */
body:has(#compte-tabs) #ccontent-commissions:not(.hidden) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}

body:has(#compte-tabs) #ccontent-commissions > .flex:first-child {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
  margin-bottom: 0;
}

body:has(#compte-tabs) #ccontent-commissions > .flex:first-child > button {
  margin-left: auto;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin-bottom: 0;
  border: 0;
  background: #f8f8f8;
}

body:has(#compte-tabs) #ccontent-commissions > :nth-child(n + 3) {
  grid-column: 1 / -1;
}

body:has(#compte-tabs) #ccontent-commissions > .flex.flex-wrap.items-end {
  margin-top: 24px;
}

/* Mon compte : les titres restent visibles sous la navigation. */
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:first-child > h2:first-child,
body:has(#compte-tabs) #ccontent-banking > h2:first-child,
body:has(#compte-tabs) #ccontent-paiement > h2:first-child,
body:has(#compte-tabs) #ccontent-commissions > .flex:first-child > h2:first-child,
body:has(#compte-tabs) #ccontent-invoices > .flex:first-child > h2:first-child {
  display: block;
}

/* Le titre Commissions occupe sa propre ligne au-dessus du total et du CTA. */
body:has(#compte-tabs) #ccontent-commissions > .flex:first-child {
  display: contents;
}

body:has(#compte-tabs) #ccontent-commissions > .flex:first-child > h2:first-child {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 24px;
}

body:has(#compte-tabs) #ccontent-commissions > .flex:first-child > button {
  grid-column: 2;
  grid-row: 2;
}

body:has(#compte-tabs) #ccontent-commissions > .bg-purple-50 {
  grid-row: 2;
}

/* Locataires : rapproche les filtres de la recherche. */
body:has(#clients-list) .page-content > div:has(#client-search) {
  padding-bottom: 8px !important;
}

/* Commissions et factures : bordure fine autour des champs de filtre. */
body:has(#compte-tabs) :is(#ccontent-commissions, #ccontent-invoices) > .flex.flex-wrap.items-end :is(input:not([type="checkbox"]), select) {
  border: 1px solid #e5e7eb;
  background: #f8f8f8;
}

/* Documents justificatifs : cadre et validation homogènes. */
body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 {
  border: 1px solid #e5e7eb;
}

body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 .max-w-2xl.space-y-3 > div.border-green-100 {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

body:has(#compte-tabs) #ccontent-profile .w-8.h-8.rounded-full.bg-green-500 {
  width: 28px;
  height: 28px;
  border: 2px solid #22c55e;
  border-radius: 999px;
  background: transparent;
}

body:has(#compte-tabs) #ccontent-profile .w-8.h-8.rounded-full.bg-green-500 > svg {
  width: 16px;
  height: 16px;
  color: #22c55e;
}

/* Mon compte : avatar rond et commande photo plus discrète. */
body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full,
body:has(#compte-tabs) #ccontent-profile .w-20.h-20.rounded-full img {
  border-radius: 50%;
}

body:has(#compte-tabs) #ccontent-profile label[title="Changer la photo"] {
  right: -2px;
  bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  box-sizing: border-box;
}

body:has(#compte-tabs) #ccontent-profile label[title="Changer la photo"] svg {
  width: 13px;
  height: 13px;
}

/* Documents justificatifs : cadre visible et mention de sécurité sous le titre. */
body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 {
  border: 1px solid #dfe1e6;
}

body:has(#compte-tabs) #ccontent-profile div.border-t.border-gray-100.pt-8 > .flex.items-center.justify-between.mb-6 {
  margin-bottom: 8px;
}

body:has(#compte-tabs) #ccontent-profile .mc-stripe-security {
  margin: 0 0 20px;
  color: #1d1d25;
  line-height: 1.5;
}

@media (max-width: 640px) {
  body:has(#compte-tabs) #ccontent-profile .mc-stripe-security {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* Documents justificatifs : carte détachée des bords du formulaire. */
body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > div:not(.pt-4) > div.border-t.border-gray-100.pt-8 {
  margin: 24px 0 0 !important;
  padding: 24px;
  border: 1px solid #dfe1e6;
  border-radius: 6px;
  background: #f8f8f8;
  box-sizing: border-box;
}

/* Ciblage direct du bloc pour garantir une bordure visible. */
body:has(#compte-tabs) #ccontent-profile .mc-documents-card {
  margin: 24px 0 0 28px !important;
  padding: 24px !important;
  border: 1px solid #bfc3cc !important;
  border-radius: 6px !important;
  background: #f8f8f8 !important;
  box-sizing: border-box;
}

/* Le check du document reprend le premier modèle dans un format plus discret. */
body:has(#compte-tabs) #ccontent-profile .mc-documents-card .w-8.h-8.rounded-full.bg-green-500 {
  width: 24px;
  height: 24px;
  border: 2px solid #22c55e;
  border-radius: 999px;
  background: transparent;
}

body:has(#compte-tabs) #ccontent-profile .mc-documents-card .w-8.h-8.rounded-full.bg-green-500 > svg {
  width: 14px;
  height: 14px;
  color: #22c55e;
}

/* La mention de sécurité appartient visuellement au titre du bloc. */
body:has(#compte-tabs) #ccontent-profile .mc-documents-heading {
  align-items: flex-start;
  margin-bottom: 20px;
}

body:has(#compte-tabs) #ccontent-profile .mc-documents-heading .mc-stripe-security {
  margin: 6px 0 0;
}

/* Ajustements d’alignement du bloc Documents justificatifs. */
body:has(#compte-tabs) #ccontent-profile .mc-documents-card {
  margin: 24px 0 0 28px !important;
  width: calc(100% - 28px);
  max-width: none;
  padding: 24px !important;
  border-color: #e5e7eb !important;
  background: #fff !important;
}

body:has(#compte-tabs) #ccontent-profile .mc-documents-heading h2 {
  margin-bottom: 0 !important;
}

body:has(#compte-tabs) #ccontent-profile .mc-documents-heading .mc-stripe-security {
  margin-top: 2px;
}

body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > .pt-4 {
  justify-content: flex-start;
  margin-left: 28px;
}

@media (max-width: 640px) {
  body:has(#compte-tabs) #ccontent-profile .mc-documents-card {
    margin-left: 0 !important;
    width: 100%;
  }

  body:has(#compte-tabs) #ccontent-profile #onboarding-form > .flex > .pt-4 {
    margin-left: 0;
  }
}
#registration-recaptcha {
  display:none;
}

/* Inscription : resserrer la zone CGU, vérification et validation. */
#registration-form > div:has(> #cgu) {
  margin-bottom: 0 !important;
}

#registration-form > div:has(> #registration-recaptcha) {
  margin-top: -8px;
  margin-bottom: 0 !important;
}

#registration-form > #registration-submit {
  margin-top: -8px;
}

/* Onboarding : mêmes champs que la connexion et l'inscription. */
body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form .sp-input {
  min-height: 48px;
  padding: 14px 16px;
  border: 0;
  border-radius: 4px;
  background: #f8f8f8;
  font-size: 14px;
  box-shadow: none;
}

body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form .sp-input:disabled,
body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form .sp-input:hover:not(:focus) {
  border: 0;
  background: #f8f8f8;
}

body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form .sp-input:focus {
  border: 0;
  background: #f8f8f8;
  box-shadow: var(--focus-ring);
}

body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form div:has(> select[name="phone_country"]) {
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  background: #f8f8f8;
  box-shadow: none;
}

body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form div:has(> select[name="phone_country"]):focus-within {
  box-shadow: var(--focus-ring);
}

body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form div:has(> select[name="phone_country"]) > :is(select, input) {
  min-height: 48px;
  padding: 14px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  box-shadow: none;
}

/* Lien de report du profil : présentation en texte simple. */
body:has(#onboarding-form):not(:has(#compte-tabs)) #onboarding-form a[href="dashboard.php"] {
  font-weight: 400;
  text-decoration: none;
}


/* ═══════════════════════════════════════════════════════════════
   VOLETS TRANSACTIONS — surfaces claires et hiérarchie financière
   Périmètre : dashboard, cautions et paiements uniquement.
   Les !important ciblés remplacent les styles présents dans le HTML.
   ═══════════════════════════════════════════════════════════════ */

:is(#sheet-overlay, #caution-sheet-overlay, #paiement-sheet-overlay) {
  background: rgba(24, 28, 40, .32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) {
  --detail-ink: #202536;
  --detail-muted: #697386;
  --detail-border: #e6e9f0;
  --detail-accent: #705cc3;
  --detail-accent-soft: #f4f1fb;
  max-width: 720px;
  background: #f8f9fc;
  border-left: 1px solid rgba(255, 255, 255, .8);
  box-shadow: -16px 0 64px rgba(25, 31, 48, .16);
  color: var(--detail-ink);
  isolation: isolate;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-header {
  align-items: flex-start;
  gap: 20px;
  padding: 26px 28px 18px;
  background: #fff;
  border-bottom: 0;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-title {
  color: var(--detail-ink);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.035em;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-ref {
  display: inline-block;
  max-width: 100%;
  margin-top: 9px;
  padding: 3px 8px;
  border: 1px solid var(--detail-border);
  border-radius: 6px;
  background: #f8f9fc;
  color: var(--detail-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--detail-border);
  border-radius: 4px;
  background: #fff;
  color: var(--detail-muted);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-close-btn:hover {
  background: #f1f2f7;
  color: var(--detail-ink);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-header-actions {
  gap: 10px;
  padding: 0 28px 22px;
  background: #fff;
  border-bottom: 1px solid var(--detail-border);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .btn {
  min-height: 40px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-header-actions .btn {
  flex: 0 0 auto;
  min-width: 0;
  padding: 9px 15px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .btn:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is(button, input):focus-visible {
  outline: 2px solid var(--detail-accent) !important;
  outline-offset: 3px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 22px 28px 32px;
  background: #f8f9fc;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9cdda transparent;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > div {
  flex-shrink: 0;
  min-width: 0;
  margin-bottom: 0 !important;
  order: 3;
}

/* Statut conservé en tête ; le résumé financier précède les contacts. */
:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > div:has(> [id$="-status-badge"]) {
  order: 0;
  gap: 8px !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is(.badge, [id$="-type-badge"], [id$="-mode-badge"]) {
  padding: 4px 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  font-weight: 550 !important;
  line-height: 20px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-type-badge"] {
  background: #edeff5 !important;
  color: #535d70 !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-mode-badge"] {
  background: var(--detail-accent-soft) !important;
  color: #6450ad !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-card,
:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > div:has(> [id$="-timeline"]) {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--detail-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 31, 48, .025);
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-title {
  margin-bottom: 14px;
  color: var(--detail-ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -.01em;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-rows {
  gap: 10px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-row {
  min-width: 0;
  gap: 8px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-label {
  color: var(--detail-muted);
  font-size: 12px;
  line-height: 1.6;
  white-space: normal;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-val {
  min-width: 0;
  color: var(--detail-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > .sheet-cols {
  order: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-cols .sheet-info-row {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-cols .sheet-info-row:first-child .sheet-info-val {
  font-weight: 600;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > .sheet-info-card:has([id$="-montant"]) {
  order: 1;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-card:has([id$="-montant"]) .sheet-info-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-card:has([id$="-montant"]) .sheet-info-row {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-row:has(> [id$="-montant"]) {
  grid-column: 1 / -1;
  padding: 16px 18px;
  border: 1px solid var(--detail-border);
  border-radius: 10px;
  background: #f8f9fc;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-montant"].sheet-info-val {
  color: #30264a !important;
  font-size: 30px !important;
  font-weight: 650 !important;
  line-height: 1.25;
  letter-spacing: -.04em;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-row:has(> :is([id$="-description"], [id$="-motif"])) {
  grid-column: 1 / -1;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is([id$="-description"], [id$="-motif"]).sheet-info-val {
  color: #4b5568 !important;
  font-style: normal !important;
}

/* Champ raccourci visuellement, URL complète toujours sélectionnable. */
:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-payment-card"] > div {
  gap: 10px !important;
  margin-top: 0 !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) input[id$="-payment-link"] {
  width: 0;
  min-width: 0;
  min-height: 40px;
  padding: 10px 12px !important;
  border: 1px solid var(--detail-border) !important;
  border-radius: 9px !important;
  background: #f8f9fc !important;
  color: #5d6678 !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
  text-overflow: ellipsis;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-copy-btn"] {
  flex-shrink: 0;
  min-width: 92px;
  padding: 9px 12px;
  justify-content: center;
}

/* Historique : conserver les couleurs de chaque événement. */
:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] > div {
  position: relative;
  gap: 14px !important;
  padding: 6px 0 16px !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 23px;
  bottom: -9px;
  left: 3px;
  width: 2px;
  background: #e9eaf2;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] > div:last-child {
  padding-bottom: 0 !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] > div > div:first-child {
  position: relative;
  z-index: 1;
  margin-top: 6px !important;
  box-shadow: 0 0 0 4px #fff;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] > div > div:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] p:first-child {
  color: #3d4658 !important;
  font-weight: 550 !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) [id$="-timeline"] p + p {
  margin-top: 3px;
  color: var(--detail-muted) !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is(#sd-actions-section, #cds-actions, #pds-actions) {
  order: 4;
  padding: 18px 20px !important;
  border: 1px solid var(--detail-border) !important;
  border-radius: 14px;
  background: #fff;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is(#sd-actions-section, #cds-actions, #pds-actions):empty {
  display: none !important;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-actions-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
  border-top: 0;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-actions-title {
  margin-bottom: 2px;
  color: var(--detail-ink);
  font-size: 13px;
  font-weight: 650;
}

:is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body .btn {
  justify-content: center;
  white-space: normal;
  text-align: center;
}

@media (max-width: 600px) {
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-header {
    padding: 22px 16px 16px;
    gap: 12px;
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-title {
    font-size: 20px;
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-header-actions {
    padding: 0 16px 18px;
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body {
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > .sheet-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-card,
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-body > div:has(> [id$="-timeline"]),
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) :is(#sd-actions-section, #cds-actions, #pds-actions) {
    padding: 16px !important;
  }

  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) input[id$="-payment-link"] {
    font-size: 16px !important;
  }
}

@media (max-width: 380px) {
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-info-card:has([id$="-montant"]) .sheet-info-rows {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet),
  :is(#sheet-overlay, #caution-sheet-overlay, #paiement-sheet-overlay),
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .btn,
  :is(#detail-sheet, #caution-detail-sheet, #paiement-detail-sheet) .sheet-close-btn {
    transition: none;
  }
}


/* ═══════════════════════════════════════════════════════════════
   CRÉATION D’UNE DEMANDE — formulaire sobre, accent de marque
   Styles limités à la modale partagée ; couleurs des CTA conservées.
   ═══════════════════════════════════════════════════════════════ */

#create-caution-overlay-c {
  background: rgba(24, 28, 40, .32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#create-caution-modal-c {
  --create-ink: #242424;
  --create-muted: #71716b;
  --create-border: #deded8;
  --create-surface: #f8f8f8;
  --create-brand: #6C3AED;
  width: min(800px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  border: 1px solid #deded8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 64px rgba(24, 24, 20, .18);
  color: var(--create-ink);
}

#create-caution-modal-c .modal-header-purple {
  min-height: 88px;
  gap: 18px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--create-border);
  background: #fff;
}

#create-caution-modal-c .modal-header-purple > div {
  min-width: 0;
}

#create-caution-modal-c .modal-header-purple > div > div {
  display: none !important;
}

#create-caution-modal-c .modal-header-purple h2 {
  color: var(--create-ink) !important;
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  letter-spacing: -.04em;
}

#create-caution-modal-c .modal-close-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--create-surface);
  color: var(--create-muted);
}

#create-caution-modal-c .modal-close-btn:hover {
  background: #eaeae5;
  color: var(--create-ink);
}

/* Les modes de garantie restent en regard du destinataire et du montant. */
#create-caution-modal-c .modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas:
    "intro intro"
    "recipient request"
    "amount request"
    "dates request"
    "description description"
    "terms terms";
  gap: 22px 28px;
  align-content: start;
  min-height: 0;
  padding: 20px 28px 24px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #c9c9c2 transparent;
}

#create-caution-modal-c .modal-body > p:first-child {
  grid-area: intro;
  margin-bottom: 0 !important;
  color: var(--create-muted) !important;
  font-size: 13px !important;
}

#create-caution-modal-c .modal-body > div[style*="height:1px"] {
  display: none;
}

#create-caution-modal-c .modal-field-group {
  min-width: 0;
  margin-bottom: 0;
}

#create-caution-modal-c .modal-body > .modal-field-group,
#create-caution-modal-c #c-dates-section {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

#create-caution-modal-c .modal-body > .modal-field-group:has(#c-client-type-tabs) { grid-area: recipient; }
#create-caution-modal-c .modal-body > .modal-field-group:has(#c-type-demande-tabs) { grid-area: request; }
#create-caution-modal-c .modal-body > .modal-field-group:has(#c-modal-montant) { grid-area: amount; }
#create-caution-modal-c #c-dates-section { grid-area: dates; }
#create-caution-modal-c .modal-body > .modal-field-group:has(#c-modal-description) { grid-area: description; }

#create-caution-modal-c .modal-body > .modal-field-group:has(#c-type-demande-tabs) {
  padding: 20px;
  border-radius: 4px;
  background: var(--create-surface);
}

#create-caution-modal-c .modal-body > .modal-field-group:has(#c-modal-description) {
  padding-top: 20px;
  border-top: 1px solid var(--create-border);
}

#create-caution-modal-c :is(.modal-label, .modal-label-sm) {
  margin-bottom: 8px;
  color: var(--create-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

#create-caution-modal-c .modal-tab-bar {
  gap: 0;
  padding: 0;
  border-color: var(--create-border);
  border-radius: 4px;
  background: #fff;
}

#create-caution-modal-c .modal-tab {
  min-width: 0;
  min-height: 42px;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
}

#create-caution-modal-c .modal-tab.active {
  box-shadow: inset 0 -2px 0 var(--create-brand);
}

#create-caution-modal-c .modal-tab svg {
  flex-shrink: 0;
}

#create-caution-modal-c #c-type-demande-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#create-caution-modal-c .form-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-color: var(--create-border);
  border-radius: 4px;
  background: var(--create-surface);
  color: var(--create-ink);
  font-size: 14px;
  line-height: 1.5;
}

#create-caution-modal-c .form-input::placeholder {
  color: var(--create-muted);
  opacity: 1;
}

#create-caution-modal-c .form-input:hover:not(:focus):not(:disabled) {
  border-color: #bdbdb5;
}

#create-caution-modal-c #c-modal-montant {
  min-height: 72px;
  padding-left: 16px;
  background: var(--create-surface);
  color: #000;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

#create-caution-modal-c #c-modal-montant::placeholder {
  color: #000;
  opacity: 1;
}

#create-caution-modal-c #c-modal-devise {
  min-width: 72px;
  border-left-color: var(--create-border) !important;
  border-radius: 0 4px 4px 0 !important;
  color: var(--create-muted) !important;
}

#create-caution-modal-c #c-caution-mode-choices {
  flex-direction: column;
  gap: 0 !important;
  padding: 0 !important;
  margin-bottom: 18px;
}

#create-caution-modal-c #c-caution-mode-choices label {
  min-width: 0;
  min-height: 46px;
  padding: 12px 11px;
  border: 0;
  border-left: 2px solid transparent;
  border-bottom: 1px solid var(--create-border);
  border-radius: 0;
  background: transparent;
  transition: background .15s ease, border-color .15s ease;
}

#create-caution-modal-c #c-caution-mode-choices label:hover {
  background: #ecece6;
}

#create-caution-modal-c #c-caution-mode-choices label:has(.modal-radio.active) {
  border-left-color: var(--create-brand);
  background: #fff;
}

#create-caution-modal-c #c-caution-mode-choices label span {
  font-size: 13px !important;
  line-height: 1.4;
}

#create-caution-modal-c .modal-info-box {
  padding: 0 0 0 12px;
  border: 0;
  border-left: 2px solid #cecec6;
  border-radius: 0;
  background: transparent;
  color: var(--create-muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#create-caution-modal-c .modal-info-box strong {
  color: var(--create-ink);
  font-weight: 600;
}

#create-caution-modal-c #c-modal-selected-client {
  padding: 10px 12px !important;
  border-color: var(--create-border) !important;
  border-radius: 4px !important;
  background: var(--create-surface) !important;
  overflow-wrap: anywhere;
}

#create-caution-modal-c #c-modal-selected-email {
  margin-top: 2px;
  color: var(--create-muted) !important;
}

#create-caution-modal-c .modal-client-dropdown {
  border-color: var(--create-border);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(24, 24, 20, .1);
}

#create-caution-modal-c .modal-client-item {
  padding: 11px 12px;
  overflow-wrap: anywhere;
}

#create-caution-modal-c .modal-client-item > span {
  display: block;
}

#create-caution-modal-c .modal-body > div:has(> #c-modal-terms) {
  grid-area: terms;
  min-width: 0;
  align-items: flex-start !important;
  margin-top: 0 !important;
  padding: 2px 0;
}

#create-caution-modal-c #c-modal-terms {
  margin-top: 2px;
}

#create-caution-modal-c .modal-body label[for="c-modal-terms"] {
  color: var(--create-muted) !important;
  font-size: 12px !important;
  line-height: 1.6;
}

#create-caution-modal-c label[for="c-modal-terms"] a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#create-caution-modal-c > div[style*="padding:8px 32px 12px"] {
  flex-shrink: 0;
  padding: 12px 28px !important;
  color: var(--create-muted) !important;
  font-size: 11px !important;
  line-height: 1.5;
}

#create-caution-modal-c :is(#c-modal-success, #c-modal-error) {
  flex-shrink: 0;
  margin: 0 28px 12px !important;
}

#create-caution-modal-c .modal-footer {
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top-color: var(--create-border);
}

#create-caution-modal-c .modal-footer .btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

#create-caution-modal-c :is(button, input, select, a):focus-visible {
  outline: 2px solid var(--purple) !important;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  #create-caution-modal-c {
    top: 12px;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 8px;
    transform: translateX(-50%) scale(.97);
  }

  #create-caution-modal-c.open {
    transform: translateX(-50%) scale(1);
  }

  #create-caution-modal-c .modal-header-purple {
    min-height: 76px;
    padding: 18px 16px;
    gap: 12px;
  }

  #create-caution-modal-c .modal-header-purple h2 {
    font-size: 22px !important;
  }

  #create-caution-modal-c .modal-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "recipient" "request" "amount" "dates" "description" "terms";
    padding: 16px;
    gap: 22px;
  }

  #create-caution-modal-c .modal-body > .modal-field-group,
  #create-caution-modal-c #c-dates-section {
    padding: 0;
  }

  #create-caution-modal-c .modal-body > .modal-field-group:has(#c-type-demande-tabs) {
    padding: 16px;
  }

  #create-caution-modal-c .modal-body > .modal-field-group:has(#c-modal-description) {
    padding-top: 18px;
  }

  #create-caution-modal-c .form-input {
    font-size: 16px;
  }

  #create-caution-modal-c > div[style*="padding:8px 32px 12px"] {
    padding: 10px 16px !important;
  }

  #create-caution-modal-c :is(#c-modal-success, #c-modal-error) {
    margin-inline: 16px !important;
  }

  #create-caution-modal-c .modal-footer {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  #create-caution-modal-c :is(#c-dates-caution, #c-tab-nouveau, #c-paiement-recurrent) > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #create-caution-modal-c #c-client-type-tabs .modal-tab {
    gap: 4px;
    padding-inline: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #create-caution-modal-c,
  #create-caution-overlay-c,
  #create-caution-modal-c :is(.modal-tab, .modal-close-btn, .form-input, .btn),
  #create-caution-modal-c #c-caution-mode-choices label {
    transition: none;
  }
}

/* Démonstration vidéo depuis le tableau de bord. */
body:has(.dashboard-transactions) .dashboard-how-link {
  padding-block: 7px;
}

body:has(.dashboard-transactions) .dashboard-how-link svg {
  display: block;
  flex: none;
  width: 22px;
  height: 22px;
}

.dashboard-video-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 12, 20, .45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.dashboard-video-overlay[hidden],
.dashboard-video-overlay [hidden] {
  display: none !important;
}

.dashboard-video-box {
  position: relative;
  width: min(70vw, 960px, calc(70vh * 16 / 9));
}

.dashboard-video-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.dashboard-video-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.dashboard-video-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dashboard-video-loading,
.dashboard-video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  color: #fff;
  font-size: 15px;
  text-align: center;
}

.dashboard-video-fallback {
  flex-direction: column;
  gap: 12px;
}

.dashboard-video-fallback a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard-video-sound {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 700px) {
  .dashboard-video-box { width: 92vw; }
}
