/* BailleurVérif — light theme global stylesheet
   Loaded BEFORE Tailwind CDN. Uses !important to override Tailwind dark utility classes
   so legacy generated pages flip to light theme without rewriting every Tailwind class.
   Palette inspired by service-public.fr / impots.gouv.fr (sobre, neutre, lisible).
*/

:root {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;
  --bg-card:       #ffffff;
  --bg-hover:      #f1f5f9;
  --text-primary:  #0f172a;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --accent:        #1d4ed8;
  --accent-hover:  #1e40af;
  --accent-soft:   #dbeafe;
  --success:       #059669;
  --success-soft:  #d1fae5;
  --warning:       #d97706;
  --warning-soft:  #fef3c7;
  --danger:        #dc2626;
  --danger-soft:   #fee2e2;
  --border:        #cbd5e1;
  --border-strong: #94a3b8;
  --shadow-sm:     0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.08);
  --shadow-md:     0 4px 6px rgba(15,23,42,0.07), 0 2px 4px rgba(15,23,42,0.06);
}

html, body {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); }

/* ---- Override Tailwind dark utility classes (legacy generated pages) ---- */
.bg-slate-900, .bg-slate-800, .bg-slate-800\/50, .bg-slate-800\/60,
.bg-gray-900, .bg-gray-800, .bg-zinc-900, .bg-zinc-800,
.bg-neutral-900, .bg-neutral-800 {
  background-color: var(--bg-card) !important;
}

.bg-indigo-500, .bg-indigo-600, .bg-indigo-700 {
  background-color: var(--accent) !important;
  color: #ffffff !important;
}
.bg-indigo-400, .bg-indigo-300 { background-color: var(--accent-hover) !important; color: #ffffff !important; }
.hover\:bg-indigo-400:hover, .hover\:bg-indigo-500:hover, .hover\:bg-indigo-600:hover {
  background-color: var(--accent-hover) !important;
}

.text-white, .text-slate-50, .text-gray-50 { color: var(--text-primary) !important; }
.text-gray-100, .text-gray-200, .text-gray-300, .text-slate-100, .text-slate-200, .text-slate-300 {
  color: var(--text-primary) !important;
}
.text-gray-400, .text-gray-500, .text-slate-400, .text-slate-500 { color: var(--text-secondary) !important; }
.text-gray-600 { color: var(--text-secondary) !important; }

.text-indigo-200, .text-indigo-300, .text-indigo-400, .text-indigo-500 { color: var(--accent) !important; }
.text-emerald-300, .text-emerald-400, .text-emerald-500, .text-green-400, .text-green-500 { color: var(--success) !important; }
.text-amber-300, .text-amber-400, .text-amber-500, .text-yellow-400, .text-yellow-500 { color: var(--warning) !important; }
.text-rose-300, .text-rose-400, .text-rose-500, .text-red-400, .text-red-500 { color: var(--danger) !important; }
.text-fuchsia-300, .text-fuchsia-400, .text-fuchsia-500 { color: var(--accent) !important; }

.border-slate-700, .border-slate-800, .border-slate-800\/60, .border-slate-600,
.border-gray-700, .border-gray-800, .border-gray-600,
.border-slate-100, .border-slate-200, .border-slate-300,
.border-gray-100, .border-gray-200, .border-gray-300,
.border-neutral-100, .border-neutral-200, .border-zinc-100, .border-zinc-200 {
  border-color: var(--border) !important;
}
.border-indigo-400, .border-indigo-500, .border-indigo-600, .border-indigo-500\/30 {
  border-color: var(--accent) !important;
}

/* Indigo→fuchsia gradient text used by legacy pages → flatten to solid accent */
.gradient-text {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: initial !important;
  color: var(--accent) !important;
}

/* Legacy gradient backgrounds */
.bg-gradient-to-br, .bg-gradient-to-r, .bg-gradient-to-b {
  background-image: none !important;
  background-color: var(--bg-secondary) !important;
}

.from-indigo-950\/40, .via-slate-900\/40, .to-fuchsia-950\/30 { /* tailwind from/to color tokens */ }

/* Glass effect (legacy dark) → flat light card */
.glass {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  backdrop-filter: none !important;
  box-shadow: var(--shadow-md) !important;
}

/* Form fields */
input, select, textarea {
  background: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: 6px;
  padding: 0.625rem 0.875rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }

/* ---- Reusable components for new pages ---- */
.bv-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.bv-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.bv-footer a { color: var(--text-secondary); text-decoration: underline; }
.bv-footer a:hover { color: var(--accent); }

.bv-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}
.bv-logo-mark {
  width: 28px; height: 28px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
}

.bv-trust-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}
.bv-trust-bar strong { color: var(--text-primary); }
.bv-trust-bar .bv-lock {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--success);
  font-weight: 500;
}

.bv-update-pill {
  display: inline-block;
  background: var(--success-soft);
  color: var(--success);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.bv-btn {
  display: inline-block;
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
  padding: 0.7rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.bv-btn:hover { background: var(--accent-hover); }
.bv-btn-secondary {
  background: var(--bg-primary);
  color: var(--accent) !important;
  border: 1px solid var(--accent);
}
.bv-btn-secondary:hover { background: var(--accent-soft); }

.bv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.bv-prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.bv-prose h1 { font-size: 2rem; font-weight: 700; margin: 0 0 1rem; }
.bv-prose h2 { font-size: 1.4rem; font-weight: 600; margin: 2rem 0 0.75rem; }
.bv-prose h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.bv-prose p, .bv-prose li { color: var(--text-primary); }
.bv-prose ul, .bv-prose ol { padding-left: 1.5rem; }
.bv-prose li { margin: 0.3rem 0; }
.bv-prose a { color: var(--accent); }
.bv-prose .lead { font-size: 1.05rem; color: var(--text-secondary); }
.bv-prose .meta { color: var(--text-muted); font-size: 0.875rem; margin: 0 0 1.5rem; }

/* Mobile responsiveness */
@media (max-width: 640px) {
  .bv-trust-bar { font-size: 0.8rem; gap: 0.5rem 1rem; }
  .bv-prose h1 { font-size: 1.65rem; }
}
