/* ==========================================================================
   CSE LCIE Bureau Veritas - Modern Blue Corporate System
   Font: Plus Jakarta Sans (Trending UI/SaaS Typography)
   Primary Color Theme: Royal Blue (#2563eb / #1d4ed8)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --bv-primary: #2563eb;
  --bv-primary-dark: #1d4ed8;
  --bv-navy: #0f172a;
  --bv-navy-dark: #090d16;
  --sidebar-width: 210px;
}

/* Reset and Base Modern Typography (Inter & DM Sans) */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
  background-color: #f8fafc;
  color: #0f172a;
  transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-weight: 600 !important;
  letter-spacing: -0.022em;
}

/* Tone down heavy bold weights to modern, refined semi-bold */
.font-extrabold,
.font-black,
.font-bold {
  font-weight: 600 !important;
}

.font-semibold {
  font-weight: 500 !important;
}

/* Desktop Fixed Sidebar (210px) - Adaptive Height & Invisible Scrollbar */
.app-sidebar {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

.app-sidebar::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera */
  width: 0 !important;
  height: 0 !important;
}

@media (min-width: 1024px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 210px !important;
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    z-index: 50 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.05) !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
  }

  .main-content {
    margin-left: 210px !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    width: calc(100% - 210px) !important;
  }

  .mobile-header {
    display: none !important;
  }

  .sidebar-text-label {
    display: inline-block !important;
    white-space: nowrap !important;
  }
}

/* Mobile Sidebar Drawer */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 40;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(3px);
    z-index: 55;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .sidebar-text-label {
    display: block !important;
  }
}

/* Sidebar Nav Items (Blue Theme) */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 38px;
  width: 100%;
}

.sidebar-nav-item i {
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  shrink: 0;
}

.sidebar-nav-item:hover {
  background-color: #f1f5f9;
  color: #2563eb;
  transform: translateX(2px);
}

.sidebar-nav-item.active {
  background-color: rgba(37, 99, 235, 0.08) !important;
  border: 2px solid #2563eb !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.sidebar-nav-item.active i,
.sidebar-nav-item.active span {
  color: #2563eb !important;
}

/* Dribbble-Style Cards */
.card-standard {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.card-standard:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.12);
}

/* Minimalist Refined Buttons (Apple/Stripe Style: Clean, Subtle, Non-Gimmicky) */
.btn-cse-primary {
  background-color: transparent !important;
  color: #2563eb !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 8px !important;
  border: 1.5px solid #2563eb !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.05) !important;
}

.btn-cse-primary i {
  transition: transform 0.2s ease !important;
  color: #2563eb !important;
}

.btn-cse-primary:hover {
  background-color: rgba(37, 99, 235, 0.06) !important;
  border-color: #1d4ed8 !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15) !important;
}

.btn-cse-primary:hover i {
  color: #1d4ed8 !important;
  transform: translateX(3px) !important;
}

.btn-cse-secondary {
  background-color: transparent !important;
  color: #475569 !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.btn-cse-secondary i {
  transition: transform 0.2s ease !important;
}

.btn-cse-secondary:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background-color: rgba(37, 99, 235, 0.05) !important;
  transform: translateY(-1px) !important;
}

.btn-cse-secondary:hover i {
  transform: translateX(2px) !important;
}

.btn-cse-secondary {
  background-color: transparent !important;
  color: #475569 !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  padding: 0.45rem 1rem !important;
  border-radius: 10px !important;
  border: 1.5px solid #cbd5e1 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.btn-cse-secondary i {
  transition: transform 0.2s ease !important;
}

.btn-cse-secondary:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background-color: rgba(37, 99, 235, 0.06) !important;
  transform: translateY(-2px) !important;
}

.btn-cse-secondary:hover i {
  transform: translateX(2px) !important;
}

.btn-read-more {
  background-color: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.55rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-read-more:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-1px);
}

/* Modern Geometric Shape Language (Inspired by myOrthos SaaS UI) */
.card-standard,
.hero-bg-nextgen,
.rounded-xl, .rounded-2xl, .rounded-3xl {
  border-radius: 18px !important;
}

/* Sleek, Slim & Modern Button Geometry (Non-Grossier, Medium Weight) */
.btn-cse-primary,
.btn-cse-secondary,
.btn-read-more {
  border-radius: 10px !important;
  padding: 0.45rem 1rem !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  letter-spacing: -0.01em !important;
  line-height: 1.35 !important;
}

input, select, textarea {
  border-radius: 10px !important;
}

/* Primary Button: Clean Flat Royal Blue (Slim, Crisp, Fine) */
.btn-cse-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #2563eb !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.15) !important;
}

.btn-cse-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25) !important;
}

/* Secondary Button: Ultra-Minimal Ghost Button */
.btn-cse-secondary {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.btn-cse-secondary:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html.dark .btn-cse-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

html.dark .btn-cse-secondary {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark .btn-cse-secondary:hover {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #ffffff !important;
}

/* Generous Breathing Space & Sleek Slim Pill Shape for Badges (Non-Gras, Slim & Refined) */
.badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.25rem 0.75rem !important;
  border-radius: 9999px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  font-weight: 500 !important; /* Slim, refined font weight */
  font-size: 0.75rem !important;
  letter-spacing: -0.01em !important;
}

/* ==========================================================================
   DRIBBBLE BLUE LIGHT MODE (html.light)
   ========================================================================== */
html.light {
  color-scheme: light;
}

/* Animated Grid & Ambient Wave Motion Keyframes */
@keyframes bgGridSlide {
  0% {
    background-position: 0px 0px, 0px 0px;
  }
  100% {
    background-position: 72px 72px, 72px 72px;
  }
}

@keyframes arcPulse {
  0%, 100% {
    border-bottom-left-radius: 50% 90px;
    border-bottom-right-radius: 50% 90px;
    transform: translateY(0px) scale(1);
  }
  33% {
    border-bottom-left-radius: 68% 130px;
    border-bottom-right-radius: 32% 65px;
    transform: translateY(-10px) scale(1.02);
  }
  66% {
    border-bottom-left-radius: 32% 65px;
    border-bottom-right-radius: 68% 130px;
    transform: translateY(8px) scale(1.01);
  }
}

@keyframes waveFloat {
  0%, 100% {
    transform: translateX(0px) translateY(0px) scale(1) rotate(0deg);
  }
  33% {
    transform: translateX(35px) translateY(-18px) scale(1.05) rotate(1.5deg);
  }
  66% {
    transform: translateX(-30px) translateY(12px) scale(0.96) rotate(-1.5deg);
  }
}

/* Continuous Rotating & Floating Circular Arcs */
@keyframes spinClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinCounterClockwise {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes floatCircleLeft {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.15); }
}

@keyframes floatCircleRight {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-45px, 35px) scale(1.12); }
}

.anim-spin-slow {
  animation: spinClockwise 45s linear infinite !important;
  transform-origin: center !important;
}

.anim-spin-reverse {
  animation: spinCounterClockwise 55s linear infinite !important;
  transform-origin: center !important;
}

.anim-float-left {
  animation: floatCircleLeft 18s ease-in-out infinite !important;
}

.anim-float-right {
  animation: floatCircleRight 22s ease-in-out infinite !important;
}

/* Real Animated Background Grid (Guaranteed 60FPS Infinite Motion Canvas) */
#bg-animated-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.32) 1.5px, transparent 1.5px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.32) 1.5px, transparent 1.5px) !important;
  background-size: 36px 36px !important;
  animation: gridContinuousDrift 16s linear infinite !important;
}

@keyframes gridContinuousDrift {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: 36px 36px;
  }
}

html.light body {
  background-color: #f8fafc;
  color: #0f172a;
}

/* Floating Left & Right Background Vibrant Watermark Orbs (Warm & Rich Color Ambiance) */
html.light body::before {
  content: '' !important;
  position: fixed !important;
  top: 10% !important;
  left: -80px !important;
  width: 450px !important;
  height: 450px !important;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.24) 0%, rgba(99, 102, 241, 0.14) 45%, transparent 70%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: orbPulseLeft 16s ease-in-out infinite !important;
}

html.light body::after {
  content: '' !important;
  position: fixed !important;
  bottom: 5% !important;
  right: -100px !important;
  width: 500px !important;
  height: 500px !important;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.18) 0%, rgba(244, 63, 94, 0.12) 50%, transparent 75%) !important;
  border-radius: 50% !important;
  pointer-events: none !important;
  z-index: 0 !important;
  animation: orbPulseRight 20s ease-in-out infinite !important;
}

@keyframes orbPulseLeft {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  50% { transform: translateY(-30px) rotate(15deg) scale(1.10); }
}

@keyframes orbPulseRight {
  0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
  50% { transform: translateY(30px) rotate(-15deg) scale(1.08); }
}

/* ==========================================================================
   MULTI-LAYERED ARCHITECTURAL ANIMATED ARC BACKGROUND & MARGIN DRESSING
   ========================================================================== */

.main-content {
  position: relative !important;
  overflow-x: hidden !important;
}

/* Layer 1: Luminous Sky Blue & Indigo Arc Gradient */
html.light .main-content::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 540px !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.98) 0%, rgba(219, 234, 254, 0.85) 50%, rgba(224, 231, 255, 0.70) 100%) !important;
  border-bottom-left-radius: 50% 90px !important;
  border-bottom-right-radius: 50% 90px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  box-shadow: 0 20px 45px -15px rgba(37, 99, 235, 0.08) !important;
  animation: arcPulse 18s ease-in-out infinite !important;
}

/* Layer 2: Dual Slate Wave Path Lines & Margin Watermarks */
html.light .main-content::after {
  content: '' !important;
  position: absolute !important;
  top: 80px !important;
  left: 0 !important;
  right: 0 !important;
  height: 440px !important;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-opacity='0.35' stroke-dasharray='8 8' d='M0,160 C320,280 640,40 960,220 C1280,360 1440,120 1440,120'%3E%3C/path%3E%3Cpath fill='none' stroke='%23cbd5e1' stroke-width='1.2' stroke-opacity='0.40' d='M0,80 C400,220 800,20 1440,240'%3E%3C/path%3E%3Ccircle cx='120' cy='80' r='40' fill='none' stroke='%23cbd5e1' stroke-width='1' stroke-opacity='0.25'/%3E%3Ccircle cx='1320' cy='240' r='60' fill='none' stroke='%2394a3b8' stroke-width='1' stroke-opacity='0.20' stroke-dasharray='4 4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
  animation: waveFloat 14s ease-in-out infinite !important;
}

.main-content > div {
  position: relative !important;
  z-index: 10 !important;
}

/* Sidebar & Mobile Header in Light Mode (Moins de blanc à gauche + Trame dédiée) */
html.light .app-sidebar {
  background-color: #f8fafc !important;
  background-image: 
    linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.94) 100%),
    radial-gradient(rgba(148, 163, 184, 0.35) 1.2px, transparent 1.2px) !important;
  background-size: 100% 100%, 20px 20px !important;
  border-right: 1px solid #cbd5e1 !important;
  box-shadow: 4px 0 16px -4px rgba(15, 23, 42, 0.06) !important;
}

html.light .app-sidebar .bg-slate-900,
html.light .app-sidebar .bg-slate-950,
html.light .app-sidebar .bg-slate-950\/90 {
  background-color: rgba(255, 255, 255, 0.80) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html.light .app-sidebar .border-slate-800 {
  border-color: #cbd5e1 !important;
}

html.light .app-sidebar .text-white,
html.light .app-sidebar span.text-white {
  color: #0f172a !important;
}

html.light .app-sidebar .text-slate-400,
html.light .app-sidebar .text-slate-500 {
  color: #64748b !important;
}

html.light .mobile-header {
  background-color: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}

html.light .mobile-header .text-white {
  color: #0f172a !important;
}

html.light .sidebar-nav-item {
  color: #475569 !important;
}

html.light .sidebar-nav-item i {
  color: #2563eb !important;
}

html.light .sidebar-nav-item:hover {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

html.light .sidebar-nav-item.active {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 2px solid #2563eb !important;
  color: #2563eb !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12) !important;
}

html.light .sidebar-nav-item.active i,
html.light .sidebar-nav-item.active span {
  color: #2563eb !important;
}

/* Sleek Theme Switcher Button in Light Mode */
html.light .theme-toggle-btn {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .theme-toggle-btn:hover {
  background-color: #e2e8f0 !important;
}

/* Modern Frameless Open UI Architecture (Solid Opaque White Cards for Maximum Contrast) */
html.light .card-standard {
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 1rem !important;
  box-shadow: 0 4px 14px -3px rgba(15, 23, 42, 0.06) !important;
}

html.light .card-standard:hover {
  border-color: #2563eb !important;
  background-color: #ffffff !important;
  box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.12) !important;
}

/* Modals & Dialogs in Light Mode */
html.light [id*="modal"] > div,
html.light .modal-content {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

html.light [id*="modal"] h1,
html.light [id*="modal"] h2,
html.light [id*="modal"] h3,
html.light [id*="modal"] h4 {
  color: #0f172a !important;
}

html.light [id*="modal"] p,
html.light [id*="modal"] label,
html.light [id*="modal"] li,
html.light [id*="modal"] span {
  color: #1e293b !important;
}

html.light [id*="modal"] .bg-slate-950,
html.light [id*="modal"] .bg-slate-900,
html.light [id*="modal"] .bg-slate-800 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

html.light [id*="modal"] button[id*="close"] {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

html.light [id*="modal"] button[id*="close"]:hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Sub-containers inside cards */
html.light .card-standard .bg-slate-950,
html.light .card-standard .bg-slate-900,
html.light .card-standard .bg-slate-800,
html.light .card-standard .bg-slate-50,
html.light div[class*="bg-slate-50"],
html.light div[class*="bg-slate-100"],
html.light div[class*="dark:bg-slate-950"],
html.light div[class*="dark:bg-slate-900"] {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* High Contrast & Crisp Typography in Light Mode */
html.light h1, html.light h2, html.light h3, html.light h4, html.light h5, html.light h6 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

html.light .text-white,
html.light [class*="dark:text-white"],
html.light [class*="dark:text-slate-100"],
html.light [class*="dark:text-slate-200"],
html.light [class*="dark:text-slate-300"],
html.light [class*="dark:text-slate-400"] {
  color: #0f172a !important;
}

html.light p {
  color: #1e293b !important; /* Dark Slate 800 for high readability */
}

html.light .text-slate-900,
html.light .text-slate-800,
html.light .text-slate-700,
html.light .text-slate-600,
html.light p.text-slate-600 {
  color: #0f172a !important; /* Maximum legibility for body text */
}

html.light .text-slate-500,
html.light p.text-slate-500,
html.light .text-slate-400,
html.light .text-slate-300 {
  color: #334155 !important;
}

/* Primary Button in Light Mode: Solid Blue for maximum contrast */
html.light .btn-cse-primary {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border: 1.5px solid #2563eb !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}

html.light .btn-cse-primary * {
  color: #ffffff !important;
}

html.light .btn-cse-primary:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

html.light .btn-cse-primary:hover * {
  color: #ffffff !important;
}

html.light .btn-cse-secondary {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
}

html.light .btn-cse-secondary * {
  color: #0f172a !important;
}

html.light .btn-cse-secondary:hover {
  border-color: #2563eb !important;
  color: #2563eb !important;
  background-color: #eff6ff !important;
}

html.light .btn-cse-secondary:hover * {
  color: #2563eb !important;
}

/* High-Contrast Colored Sub-Boxes & Badges in Light Mode */
html.light div[class*="bg-purple-"],
html.light div[class*="dark:bg-purple-"] {
  background-color: #f3e8ff !important;
  border-color: #d8b4fe !important;
}
html.light div[class*="bg-purple-"] *,
html.light div[class*="dark:bg-purple-"] * {
  color: #581c87 !important; /* Deep Purple 900 */
}

html.light div[class*="bg-emerald-"],
html.light div[class*="dark:bg-emerald-"] {
  background-color: #d1fae5 !important;
  border-color: #6ee7b7 !important;
}
html.light div[class*="bg-emerald-"] *,
html.light div[class*="dark:bg-emerald-"] * {
  color: #064e3b !important; /* Deep Emerald 900 */
}

html.light div[class*="bg-blue-"],
html.light div[class*="dark:bg-blue-"] {
  background-color: #dbeafe !important;
  border-color: #93c5fd !important;
}
html.light div[class*="bg-blue-"] *,
html.light div[class*="dark:bg-blue-"] * {
  color: #1e3a8a !important; /* Deep Blue 900 */
}

html.light div[class*="bg-amber-"],
html.light div[class*="dark:bg-amber-"] {
  background-color: #fef3c7 !important;
  border-color: #fde047 !important;
}
html.light div[class*="bg-amber-"] *,
html.light div[class*="dark:bg-amber-"] * {
  color: #78350f !important; /* Deep Amber 900 */
}

html.light .hero-bg-nextgen {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.95)), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&w=1920&q=80') !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.08) !important;
}

html.light .hero-bg-nextgen h1 {
  color: #0f172a !important;
}
  color: #059669 !important;
}

html.light .text-amber-300,
html.light .text-amber-400 {
  color: #d97706 !important;
}

html.light .text-teal-300,
html.light .text-teal-400 {
  color: #0d9488 !important;
}

/* Dribbble Light Hero Banners (Blue Theme) */
html.light .hero-bg-nextgen {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.90)), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?auto=format&fit=crop&w=1920&q=80') !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.08) !important;
}

html.light .hero-bg-nextgen h1 {
  color: #0f172a !important;
}

html.light .hero-bg-nextgen .text-rose-400,
html.light .hero-bg-nextgen .text-blue-400 {
  color: #2563eb !important;
}

html.light .hero-bg-nextgen p.text-slate-200 {
  color: #475569 !important;
}

html.light [style*="background-image: linear-gradient"] {
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 246, 255, 0.90)), url('https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1920') !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.08) !important;
}

html.light [style*="background-image: linear-gradient"] h2 {
  color: #0f172a !important;
}

html.light [style*="background-image: linear-gradient"] .text-rose-400,
html.light [style*="background-image: linear-gradient"] .text-blue-400 {
  color: #2563eb !important;
}

html.light [style*="background-image: linear-gradient"] p.text-slate-200 {
  color: #475569 !important;
}

html.light .bg-gradient-to-r.from-slate-900 {
  background-image: linear-gradient(135deg, #ffffff, #eff6ff) !important;
  border-color: #bfdbfe !important;
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.06) !important;
}

html.light .bg-gradient-to-r.from-slate-900 h4 {
  color: #0f172a !important;
}

html.light .bg-gradient-to-r.from-slate-900 p.text-slate-300 {
  color: #475569 !important;
}

html.light .bg-gradient-to-r.from-slate-900 .bg-blue-600\/20,
html.light .bg-gradient-to-r.from-slate-900 .bg-rose-600\/20 {
  background-color: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #2563eb !important;
}

html.light .bg-gradient-to-r.from-slate-900 .bg-blue-600\/20 i,
html.light .bg-gradient-to-r.from-slate-900 .bg-rose-600\/20 i {
  color: #2563eb !important;
}

/* Inputs & Form Controls */
html.light input[type="number"],
html.light input[type="text"],
html.light select,
html.light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  border-radius: 0.6rem !important;
}

/* Modern Footer */
html.light footer {
  background-color: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* Prevent layout shift and page jumping when cinema grid items count changes */
#cinema-movies-grid {
  min-height: 490px !important;
  align-content: start !important;
}

/* ==========================================================================
   SUBTLE & ELEGANT MICRO-ANIMATIONS
   ========================================================================== */

/* Page Smooth Fade-In & Entrance Slide */
@keyframes pageEntrance {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-content > div {
  animation: pageEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Card Smooth Lift & Scale on Hover */
.card-standard {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-standard:hover {
  transform: translateY(-3px) !important;
}

/* Icon Subtle Pulse & Lift on Card Hover */
.card-standard:hover i[class*="fa-"] {
  transform: scale(1.06) translateY(-1px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Buttons Scale Press */
.btn-cse-primary,
.btn-cse-secondary,
.sidebar-nav-item,
button {
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease !important;
}

.btn-cse-primary:active,
.btn-cse-secondary:active {
  transform: scale(0.97) !important;
}

/* Soft Badge Hover Glow */
.badge:hover {
  transform: scale(1.04);
}

/* Prevent Card Vertical Stretching & Blank White Spaces */
.grid {
  align-items: start !important;
}

/* Discrete Small Snake Launcher with Pure Border SVG Beam Tracer (Zero Projection, Distinct Text Color) */
.snake-discrete-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: transparent !important;
  text-decoration: none;
  overflow: hidden;
  box-shadow: none !important;
  filter: none !important;
  transition: transform 0.2s ease;
}

.snake-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.snake-border-static {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1.2;
}

.snake-border-beam {
  fill: none;
  stroke: #f59e0b; /* Golden lueur on the contour line */
  stroke-width: 1.6;
  stroke-dasharray: 30 200;
  stroke-dashoffset: 0;
  animation: svgContourTrace 1.1s linear infinite;
}

@keyframes svgContourTrace {
  0% {
    stroke-dashoffset: 230;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.snake-discrete-btn:hover {
  transform: scale(1.05);
}

/* Mobile Readability & High-Contrast Typography */
@media (max-width: 640px) {
  /* Subtitles & Descriptions legible on mobile screens */
  p, p.text-xs, .text-xs p {
    font-size: 0.875rem !important; /* 14px instead of 12px for body descriptions */
    line-height: 1.55 !important;
  }

  .text-[11px], .text-[10px] {
    font-size: 0.75rem !important; /* 12px minimum for badges */
  }

  /* Make background grid canvas soft & discrete on mobile */
  #bg-animated-canvas {
    opacity: 0.15 !important;
  }

  /* Ensure card headings are crisp and clear */
  h1, h2, h3, h4 {
    letter-spacing: -0.015em !important;
  }

  /* Generous bottom padding to clear mobile Safari / Chrome floating URL bar */
  .main-content {
    padding-bottom: 7rem !important;
  }

  .main-content > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-top: 1rem !important;
    padding-bottom: 7rem !important;
  }

  /* Prevent elements from being squished */
  .p-5, .p-6, .p-10 {
    padding: 1rem !important;
  }
}


