/* ===== 404/403 – style cohérent Bootstrap/Tarapro ===== */
.tp-error{
  --tp-radius: 1rem;
  --tp-border: var(--bs-border-color, #e5e7eb);
  --tp-muted: var(--bs-secondary-color, #6b7280);
  --tp-heading: var(--bs-emphasis-color, #0f172a);
  --tp-body: var(--bs-body-color, #0f172a);
  --tp-bg: var(--bs-body-bg, #ffffff);
  --tp-subtle: var(--bs-tertiary-bg, #f8f9fa);
  --tp-accent: var(--bs-primary, #0ea5e9);
  color: var(--tp-body);
}

.tp-error-card{
  background: var(--tp-subtle);
  border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}

.tp-error .display-6{ color: var(--tp-heading); letter-spacing: -.01em; }
.tp-error .text-body-secondary{ color: var(--tp-muted) !important; }

.tp-error a{ color: var(--tp-accent); text-underline-offset: 2px; }
.tp-error a:hover{ opacity: .9; }
.tp-error .btn{ border-radius: calc(var(--tp-radius) - .35rem); }

.tp-error-placeholder{
  background: #fff;
  border: 1px dashed var(--tp-border);
  color: var(--tp-muted);
  border-radius: calc(var(--tp-radius) - .25rem);
}

.tp-error-list{
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: calc(var(--tp-radius) - .25rem);
  padding: 1rem 1.25rem;
}

/* Impression (garde le message et les liens) */
@media print{
  .tp-error-card{ box-shadow: none; background: #fff; }
  .tp-error a[href]::after{ content: " (" attr(href) ")"; font-size: .9em; }
}

/* Dark mode de secours si le thème ne gère pas */
@media (prefers-color-scheme: dark){
  .tp-error{
    --tp-border: #2d3748;
    --tp-muted: #9aa4b2;
    --tp-heading: #e7eaf0;
    --tp-body: #e7eaf0;
    --tp-bg: #0b1220;
    --tp-subtle: #111a2b;
  }
}
