body {
  background: #ffffff;
  color: #111827;
  font-family: 'DM Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', sans-serif;
}

.comparateur-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 16px 40px;
}

.comparateur-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  padding: 28px;
}

.comparateur-card h1 {
  margin: 0 0 8px;
  color: #111827;
}

.comparateur-subtitle {
  margin: 0 0 20px;
  color: #4b5563;
}

.comparateur-message {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  color: #374151;
}

.comparateur-message p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.selectors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.selector-block label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.selector-block select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 15px;
  color: #111827;
  background: #fff;
}

#compareBtn {
  background: #2563eb;
  border-color: #2563eb;
}

.compare-error {
  margin: 10px 0 0;
  color: #dc2626;
  font-weight: 500;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 15px;
}

.compare-table th,
.compare-table td {
  border: 1px solid #e5e7eb;
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.compare-table thead th {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.compare-table .section-row td {
  background: #f8fafc;
  font-weight: 700;
  color: #111827;
}

.compare-table td.winner {
  color: #10b981;
  font-weight: 700;
}

.compare-table .ok {
  margin-left: 6px;
}

.back-link-wrap {
  margin-top: 20px;
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
}

@media (max-width: 800px) {
  .selectors-grid {
    grid-template-columns: 1fr;
  }

  .comparateur-card {
    padding: 20px;
  }

  .compare-table {
    font-size: 14px;
  }
}

.comparateur-disclaimer {
  font-size: 0.82rem;
  color: #6b7280;
  background: #f8fafc;
  border-left: 3px solid #2563eb;
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 12px;
  margin-bottom: 4px;
}

.col-regime {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Base */
.comparateur-page,
.comparateur-card,
.comparateur-card p,
.comparateur-card label,
.comparateur-card select,
.comparateur-card button,
.compare-table td,
.compare-table th {
  font-family: 'DM Sans', sans-serif;
}

/* Titre principal */
.comparateur-card h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 28px;
  color: #111827;
  letter-spacing: -0.02em;
}

/* Sous-titre */
.comparateur-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 24px;
}

/* En-têtes du tableau */
.compare-table thead th {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #2563eb;
}

/* Nom de simulation dans le header colonne */
.compare-table thead th {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

/* Sous-label régime (LMNP / LOCATION NUE) */
.col-regime {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Titres de section dans le tableau */
.compare-table .section-row td {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 13px;
}

/* Tooltip KPI — aligné simulateurs LMNP / NUE online */
.rl-tooltip-trigger {
  display: inline-block;
  margin-left: 5px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font-size: 11px;
  line-height: 14px;
  font-weight: 700;
  text-align: center;
  color: #2563eb;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rl-tooltip-trigger[data-tooltip-key="tri10"] {
  width: 15px;
  height: 15px;
  font-size: 10px;
  line-height: 13px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.rl-tooltip-trigger:hover,
.rl-tooltip-trigger:focus-visible,
.rl-tooltip-trigger.is-open {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
  outline: none;
}

.rl-tooltip-trigger[data-tooltip-key="tri10"]:hover,
.rl-tooltip-trigger[data-tooltip-key="tri10"]:focus-visible,
.rl-tooltip-trigger[data-tooltip-key="tri10"].is-open {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
  transform: scale(1.04);
}

.rl-tooltip {
  position: fixed;
  z-index: 5000;
  width: min(280px, calc(100vw - 32px));
  max-width: 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.rl-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rl-tooltip[data-placement="top"]::before,
.rl-tooltip[data-placement="bottom"]::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

.rl-tooltip[data-placement="top"]::before {
  bottom: -6px;
  left: var(--arrow-left, 20px);
  border-left: none;
  border-top: none;
}

.rl-tooltip[data-placement="bottom"]::before {
  top: -6px;
  left: var(--arrow-left, 20px);
  border-right: none;
  border-bottom: none;
}

.rl-tooltip-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 6px;
}

.rl-tooltip-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: #111827;
}

.rl-tooltip-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #64748b;
}

.rl-tooltip[data-tooltip-key="tri10"] {
  width: min(270px, calc(100vw - 32px));
  max-width: 320px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(37, 99, 235, 0.06);
  padding: 16px 16px 14px;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.rl-tooltip[data-tooltip-key="tri10"].is-visible {
  transform: translateY(0) scale(1);
}

.rl-tooltip[data-tooltip-key="tri10"] .rl-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rl-tooltip[data-tooltip-key="tri10"] .rl-tooltip-badge {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  flex: 0 0 22px;
}

.rl-tooltip[data-tooltip-key="tri10"] .rl-tooltip-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0;
}

.rl-tooltip[data-tooltip-key="tri10"] .rl-tooltip-body {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.rl-tooltip[data-tooltip-key="tri10"] .rl-tooltip-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.rl-tooltip[data-tooltip-key="tri10"][data-placement="top"]::before,
.rl-tooltip[data-tooltip-key="tri10"][data-placement="bottom"]::before {
  background: #f8fbff;
  border-color: rgba(37, 99, 235, 0.16);
}

@media (max-width: 1000px) {
  .rl-tooltip {
    width: min(calc(100vw - 32px), 320px);
  }
}
