/* AVIA COGES — Noir + couleurs vives
   Structure sombre (noir), accents bleu / violet / vert / or.
*/

:root {
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --io-black: #000000;
  --io-black-soft: #0f0f0f;
  --io-ink: #111111;
  --io-charcoal: #1a1a1a;
  --io-blue: #2563eb;
  --io-blue-dark: #1d4ed8;
  --io-blue-light: #3b82f6;
  --io-purple: #7c3aed;
  --io-purple-dark: #6d28d9;
  --io-green: #16a34a;
  --io-green-dark: #15803d;
  --io-orange: #f59e0b;
  --io-gold: #2563eb;
  --io-cream: #f8fafc;
  --io-off-white: #ffffff;
  --io-gray: #64748b;
  --io-gray-border: #94a3b8;
  --io-white: #ffffff;
  --io-error: #ef4444;
  --io-success: #22c55e;

  /* aliases (compat anciennes règles) */
  --io-brown: #000000;
  --io-brown-deep: #000000;
  --io-brown-soft: #1a1a1a;
  --io-beige: #e2e8f0;
  --io-cream-dark: #e2e8f0;
  --io-gold-light: #3b82f6;
  --io-rose-light: #f9a8d4;

  --primary-color: var(--io-blue);
  --secondary-color: var(--io-black);
  --accent-color: var(--io-purple);
  --dark-text: var(--io-ink);
  --light-bg: var(--io-cream);
  --primary-500: #2563eb;
  --primary-600: #1d4ed8;
}

html { font-size: 16px; }

body, body.font-sans, .font-sans {
  font-family: var(--font-body) !important;
  font-size: 13px;
  line-height: 1.6;
  color: var(--io-ink);
  background-color: var(--io-cream) !important;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.page-title, .navbar-brand, .hero-title, .section-title, .card-title {
  font-family: var(--font-display) !important;
  font-weight: 600;
  color: var(--io-ink);
}

a { color: var(--io-blue); text-underline-offset: 3px; }
a:hover { color: var(--io-purple); }

/* Champs */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
input[type="search"], input[type="date"], input[type="datetime-local"],
input[type="time"], input[type="file"], select, textarea,
.form-control, .form-select, .form-input {
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: var(--io-ink) !important;
  background-color: #fff !important;
  border: 2px solid #94a3b8 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
input:focus, select:focus, textarea:focus,
.form-control:focus, .form-select:focus {
  border-color: var(--io-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

/* Boutons vifs */
.btn, button[type="submit"], .btn-primary {
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  border-radius: 6px !important;
}
.btn-primary, button.bg-indigo-600, a.bg-indigo-600, a.bg-purple-600,
button.bg-blue-600, .bg-gradient-to-r.from-indigo-500 {
  background: var(--io-blue) !important;
  background-image: none !important;
  color: #fff !important;
  border: 1px solid var(--io-blue) !important;
}
.btn-primary:hover {
  background: var(--io-blue-dark) !important;
  color: #fff !important;
}
.btn-secondary, .btn-outline-primary {
  background: transparent !important;
  color: var(--io-blue) !important;
  border: 1px solid var(--io-blue) !important;
}
.btn-secondary:hover {
  background: var(--io-blue) !important;
  color: #fff !important;
}

/* Cartes */
.card, .content-container, .stats-card {
  background: #fff !important;
  border: 2px solid #94a3b8 !important;
  border-radius: 10px !important;
}

/* ========== NOIR structure ========== */
.sidebar, aside.sidebar, #sidebar, aside#sidebar,
.bg-slate-900, .bg-gray-900, .navbar-dark, .bg-dark,
nav.navbar.navbar-dark,
footer.footer, .footer.site-footer, .site-footer {
  background-color: #000000 !important;
  background-image: none !important;
  color: #fff !important;
}
.sidebar a, .sidebar span, .sidebar .nav-link, .sidebar .sidebar-text,
#sidebar a, #sidebar span,
.navbar-dark .nav-link, .navbar-dark .navbar-brand,
.footer *, .site-footer * {
  color: #fff !important;
}
.footer a, .site-footer a { color: #93c5fd !important; }
.footer a:hover, .site-footer a:hover { color: #fbbf24 !important; }
.footer-bottom, .site-footer .footer-bottom {
  background: #0a0a0a !important;
  color: #cbd5e1 !important;
}
.footer .btn, .footer button[type="submit"], .site-footer .btn {
  background: var(--io-blue) !important;
  color: #fff !important;
  border-color: var(--io-blue) !important;
}

/* Flash / search */
.flash-info-container {
  background: #000 !important;
  color: #fff !important;
  border-top: 3px solid var(--io-blue) !important;
}
.flash-info-label {
  background: var(--io-blue) !important;
  color: #fff !important;
}
.flash-info-marquee, .flash-info-marquee * { color: #fff !important; }

.navbar-dark .form-inline .btn,
.navbar-dark form button[type="submit"],
nav.navbar .btn-secondary.btn-sm,
.search-button {
  background: var(--io-blue) !important;
  color: #fff !important;
  border: 1px solid var(--io-blue) !important;
  border-radius: 6px !important;
}
.navbar-dark .form-inline .btn *,
.navbar-dark form button[type="submit"] * {
  color: #fff !important;
}
.navbar-dark .form-control,
.navbar-dark input[type="search"] {
  background: #fff !important;
  color: #111 !important;
}

/* Sections accueil vives */
#kpi-visites, section#kpi-visites { background: linear-gradient(145deg, #020617 0%, #0f172a 50%, #1d4ed8 100%) !important; color: #fff !important; }
#kpi-visites .section-title, #kpi-visites h2, #kpi-visites p, #kpi-visites small {
  color: #fff !important;
}
#kpi-visites .card, #kpi-visites .bg-white {
  background: #fff !important;
  color: #111 !important;
}

.avis-section, section.avis-section { background: linear-gradient(135deg, #000000 0%, #0f172a 45%, #1e3a8a 100%) !important; color: #fff !important; }
.avis-section .section-title, .avis-section h2, .avis-section p {
  color: #fff !important;
}
.avis-section::before, #kpi-visites::before {
  content: none !important;
  display: none !important;
}
.btn-avis {
  background: #fff !important;
  color: #6d28d9 !important;
  border: 1px solid #fff !important;
}

/* Auth */
body:has(.auth-card), body:has(.auth-container) {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 55%, #000 100%) !important;
}
.auth-header, body .card-header, .card .card-header {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important;
}
.auth-header *, .card-header h3, .card-header i { color: #fff !important; }
body .btn-primary, .card .btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.user-type-card .card-header, body .user-type-card .card-header {
  background: #fff !important;
  color: #111 !important;
}
.user-type-card .card-title { color: #111 !important; }
.user-type-card .card-subtitle { color: #475569 !important; }
.submit-btn.enabled {
  background: #2563eb !important;
  color: #fff !important;
  border-color: #2563eb !important;
}

/* Font Awesome */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands,
i.fa, i.fas, i.far, i.fab, .btn .fa, .btn .fas, .card-header .fa, .card-header i {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome !important;
  font-style: normal !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.fab, .fa-brands { font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important; font-weight: 400 !important; }
.fas, .fa, .fa-solid { font-weight: 900 !important; }

.section-title { color: var(--io-ink) !important; }
.section-title::after { background: var(--io-blue) !important; }

/* Hero overlays */
.carousel-caption, .carousel-captions, .hero-overlay { color: #fff !important; }
.carousel-caption *, .carousel-captions * { color: #fff !important; }
.carousel-caption .btn-connexion, .carousel-caption .btn-primary {
  background: var(--io-blue) !important;
  color: #fff !important;
  border-color: var(--io-blue) !important;
}

/* FORCE: plus de marron — noir partout (structure) */
.sidebar, aside.sidebar, #sidebar, .navbar-dark, .bg-dark,
footer.footer, .footer.site-footer, .site-footer,
.flash-info-container {
  background-color: #000000 !important;
  background-image: none !important;
}
.btn-primary, .search-button, .flash-info-label,
.navbar-dark .form-inline .btn, .navbar-dark form button[type="submit"] {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}
.auth-header, body .card-header:not(.user-type-card .card-header) {
  background: linear-gradient(135deg, #000000, #2563eb) !important;
  color: #fff !important;
}

/* SEARCH SECTION WHITE */
.search-section,
section.search-section {
  background: #ffffff !important;
  background-image: none !important;
  color: #111111 !important;
}
.search-section .section-title,
.search-section h1,
.search-section h2,
.search-section h3,
.search-section p {
  color: #111111 !important;
}
.search-section .section-title::after {
  background: #2563eb !important;
}
.search-section .search-button,
.search-section .btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

/* FIELD BORDERS VISIBLE GRAY */
.search-section input[type="search"],
.search-section input[type="text"],
.search-section .search-input,
.search-section .form-control,
.navbar-dark input[type="search"],
.navbar-dark .form-control,
footer.footer input,
.site-footer input,
.form-control,
input.form-control,
input[type="search"] {
  border: 2px solid #94a3b8 !important;
  background: #ffffff !important;
  color: #111111 !important;
}
.search-section input:focus,
.search-section .search-input:focus,
.search-section .form-control:focus,
.form-control:focus,
input[type="search"]:focus {
  border-color: #64748b !important;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.35) !important;
}

/* COHERENT PRO GRADIENTS — noir / bleu (plus de violet/vert plats) */
.avis-section,
section.avis-section {
  background: linear-gradient(135deg, #000000 0%, #0f172a 45%, #1e3a8a 100%) !important;
  color: #ffffff !important;
}
.avis-section .section-title,
.avis-section h2,
.avis-section p,
.avis-section .section-title::after {
  color: #ffffff !important;
}
.avis-section .section-title::after {
  background: #60a5fa !important;
}
.btn-avis,
.avis-section .btn-avis {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #ffffff !important;
  border-radius: 8px !important;
}
.btn-avis:hover,
.avis-section .btn-avis:hover {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

#kpi-visites,
section#kpi-visites {
  background: linear-gradient(145deg, #020617 0%, #0f172a 50%, #1d4ed8 100%) !important;
  color: #ffffff !important;
}
#kpi-visites .section-title,
#kpi-visites h2,
#kpi-visites p,
#kpi-visites small,
#kpi-visites .text-white {
  color: #ffffff !important;
}
#kpi-visites .section-title::after {
  background: #60a5fa !important;
}
#kpi-visites .card,
#kpi-visites .stats-card,
#kpi-visites .bg-white {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18) !important;
  color: #0f172a !important;
}
#kpi-visites .card *,
#kpi-visites .card .h2 {
  color: #0f172a !important;
}
#kpi-visites .card .text-muted,
#kpi-visites .card small {
  color: #64748b !important;
}

/* COMPACT PRO UI */
body { font-size: 13px !important; }
.card, .content-container, .stats-card, .bg-white.rounded-xl, .bg-white.rounded-lg {
  border-radius: 8px !important;
}
/* densifier sidebar tous espaces */
.sidebar a, .sidebar button, .sidebar .nav-link,
#sidebar a, #sidebar button {
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
  font-size: 12.5px !important;
}
.sidebar .sidebar-text { font-size: 12.5px !important; }

/* APP TOPBAR + COMPACT FIELDS — pro / moderne / lisible */
nav.navbar:not(.navbar-dark),
#main-content > nav.navbar,
.main-content > nav.navbar,
 .sticky.top-0.z-40 {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
#main-content > nav.navbar *,
.main-content > nav.navbar .text-gray-700,
.main-content > nav.navbar .text-gray-600,
.main-content > nav.navbar .text-gray-800,
nav.navbar:not(.navbar-dark) .font-semibold {
  color: #0f172a !important;
}
nav.navbar:not(.navbar-dark) i.fa-bars,
nav.navbar:not(.navbar-dark) i.fa-bell,
nav.navbar:not(.navbar-dark) .fa-regular,
nav.navbar:not(.navbar-dark) .fa-solid {
  color: #334155 !important;
}

/* Champs compacts partout */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
input[type="search"], input[type="date"], input[type="datetime-local"],
input[type="time"], input[type="file"], select, textarea,
.form-control, .form-select, .form-input,
select.rounded-xl, select.rounded-lg,
button.rounded-xl.border {
  font-size: 13px !important;
  padding: 0.45rem 0.75rem !important;
  min-height: 34px !important;
  height: auto !important;
  border-radius: 6px !important;
  border: 1px solid #94a3b8 !important;
  line-height: 1.3 !important;
}
textarea.form-control, textarea {
  min-height: 72px !important;
}
label, .form-label {
  font-size: 11px !important;
  margin-bottom: 0.25rem !important;
}
.btn, button[type="submit"], .btn-primary, .btn-secondary {
  font-size: 11px !important;
  padding: 0.45rem 0.85rem !important;
  min-height: 34px !important;
  border-radius: 6px !important;
}
.select2-container--default .select2-selection--single {
  min-height: 34px !important;
  padding: 2px 6px !important;
  font-size: 13px !important;
}

/* Typo globale plus dense */
body { font-size: 13px !important; }
h1, .h1 { font-size: 1.25rem !important; }
h2, .h2 { font-size: 1.1rem !important; }
h3, .h3 { font-size: 0.95rem !important; }
.card, .bg-white.rounded-xl, .rounded-xl.shadow-sm {
  border-radius: 8px !important;
}

/* Sidebar brand compact */
#sidebar .h-20.w-20, .sidebar .h-20.w-20 { height: 3rem !important; width: 3rem !important; }
#sidebar .h-14.w-14, .sidebar .h-14.w-14 { height: 2.25rem !important; width: 2.25rem !important; }
#sidebar h2.text-xl, .sidebar h2.text-xl {
  font-size: 0.85rem !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
}

/* INPUT ICONS: ne pas écraser le padding gauche/droite */
.input-group {
  position: relative !important;
}
.input-group > .input-icon,
.input-group > .input-action-icon {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 3 !important;
  pointer-events: none;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  color: #64748b !important;
}
.input-group > .input-action-icon {
  pointer-events: auto;
  cursor: pointer;
}
.input-group > .input-icon {
  left: 0.9rem !important;
  right: auto !important;
}
.input-group > .input-action-icon {
  right: 0.9rem !important;
  left: auto !important;
}
.input-group > .form-control,
.input-group > input.form-control,
.input-group > input[type="text"],
.input-group > input[type="email"],
.input-group > input[type="password"],
.input-group > input[type="tel"] {
  padding-left: 2.85rem !important;
  padding-right: 0.85rem !important;
}
.input-group:has(> .input-action-icon) > .form-control,
.input-group:has(> .input-action-icon) > input {
  padding-right: 2.85rem !important;
}
