/* ============================================
   BatchRemove - Suppresseur de Fond
   ============================================ */

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --popover: 222.2 84% 4.9%;
  --popover-foreground: 210 40% 98%;
  --primary: 210 40% 98%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 212.7 26.8% 83.9%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  min-height: 100vh;
}

/* Typography & Utility Overrides */
.text-muted {
  color: hsl(var(--muted-foreground)) !important;
}

.text-white-50 {
  color: hsl(var(--muted-foreground)) !important;
}

small, .small {
  color: hsl(var(--muted-foreground));
}

/* Typography & Utility Overrides */
.text-muted {
  color: hsl(var(--muted-foreground)) !important;
}

small, .small {
  color: hsl(var(--muted-foreground));
}

/* Base Components */
.glass-card {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.glass-card:hover {
  border-color: hsl(var(--muted-foreground) / 0.5);
}

/* Logo */
.logo-icon {
  width: 40px;
  height: 40px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Status Indicator - Removed Pulse Animation */
.status-indicator {
  width: 10px;
  height: 10px;
  background-color: #10b981; /* Success stays consistent */
  border-radius: 50%;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed hsl(var(--border));
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  background-color: hsl(var(--background));
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--muted));
}

.upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Buttons */
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-success {
  background-color: #10b981;
  color: white;
  border: none;
  padding: 8px 16px;
  font-weight: 500;
  border-radius: var(--radius);
}

.btn-outline-light {
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: var(--radius);
}

.btn-outline-light:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.btn-accent {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius);
}

/* Image Card */
.image-card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.image-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: hsl(var(--muted) / 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-card:hover .image-preview img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(var(--background) / 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.image-card:hover .image-overlay {
  opacity: 1;
}

.image-info {
  padding: 12px;
}

/* Status Badges */
.status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background-color: hsl(45 93% 47% / 0.1);
  color: #f59e0b;
}

.status-processing {
  background-color: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
}

.status-done {
  background-color: #10b9811a;
  color: #10b981;
}

.status-error {
  background-color: #ef44441a;
  color: #ef4444;
}

/* Progress Bar */
.progress {
  background-color: hsl(var(--muted));
  border-radius: var(--radius);
  overflow: hidden;
}

.progress-bar {
  background-color: hsl(var(--primary));
}

/* Toast Styling */
.toast {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.toast-header {
  background-color: transparent;
  border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}

.toast-body {
  color: hsl(var(--muted-foreground));
}

/* Action Buttons */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.action-btn.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Navigation */
.nav-link {
  color: hsl(var(--muted-foreground));
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
}

.nav-link.active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .upload-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: var(--radius);
  }

  .logo h1 {
    font-size: 1.1rem;
  }

  header.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: hsl(var(--border));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: hsl(var(--muted-foreground));
}

/* Editor Page Styles */
.editor-canvas-container {
  background-color: hsl(var(--muted) / 0.3);
  border-radius: var(--radius);
  min-height: 300px;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid hsl(var(--border));
  position: relative;
}

.editor-canvas-container canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.editor-btn {
  background-color: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  font-weight: 500;
}

.editor-btn:hover {
  background-color: hsl(var(--accent));
}

.editor-btn.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

/* Images Gallery */
.images-gallery {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

@media (max-width: 767.98px) {
  .images-gallery {
    flex-direction: row;
    max-height: 120px;
    padding-bottom: 8px;
    padding-right: 0;
  }
  
  .gallery-thumb {
    flex: 0 0 100px;
  }
}

.gallery-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid hsl(var(--border));
  transition: all 0.2s ease;
  background-color: hsl(var(--muted) / 0.5);
}

.gallery-thumb:hover {
  border-color: hsl(var(--primary) / 0.5);
}

.gallery-thumb.selected {
  border-color: hsl(var(--primary));
  ring: 2px hsl(var(--ring));
}

.gallery-thumb img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  display: block;
  background-color: hsl(var(--background) / 0.3);
}

.thumb-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, hsl(var(--background) / 0.98));
  padding: 12px 8px 4px;
  pointer-events: none;
}

.thumb-name {
  font-size: 0.65rem;
  color: hsl(var(--foreground));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.thumb-badge, .thumb-rotation {
  position: absolute;
  top: 4px;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

.thumb-badge { right: 4px; }
.thumb-rotation { left: 4px; background-color: #f59e0b; }

/* Theme Toggle Button Styles */
.theme-toggle {
  background: none;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: hsl(var(--accent));
}

.theme-toggle .bi-sun { display: none; }
.dark .theme-toggle .bi-sun { display: block; }
.dark .theme-toggle .bi-moon { display: none; }

/* ============================================
   App Header
   ============================================ */
.app-header {
  height: 60px;
  background-color: hsl(var(--background));
  display: flex;
  align-items: center;
  z-index: 100;
}

/* ============================================
   Mobile Hamburger Menu Button
   ============================================ */
.mobile-menu-btn {
  background: none;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background-color 0.2s;
}

.mobile-menu-btn:hover {
  background-color: hsl(var(--accent));
}

/* ============================================
   Mobile Sidebar Drawer
   ============================================ */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background-color: hsl(var(--card) / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid hsl(var(--border));
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
}

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

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

.close-sidebar-btn {
  background: none;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.close-sidebar-btn:hover {
  background-color: hsl(var(--accent));
}

.mobile-sidebar-nav {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.sidebar-link:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
  transform: translateX(4px);
}

.sidebar-link.active {
  color: hsl(var(--foreground));
  background-color: hsl(var(--accent));
  font-weight: 600;
}

.sidebar-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid hsl(var(--border));
  flex-shrink: 0;
}

/* ============================================
   Sidebar Overlay
   ============================================ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
