/* ============================================
   Base CSS - Styles communs à toutes les pages
   ============================================ */

/* Fonts */
@font-face {
  font-family: 'Fatkat';
  src: url('/assets/fonts/fatkat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}



:root {
  /* Couleurs principales */
  --primary: #119FB8;
  --primary-dark: #0e8a9f;
  --primary-light: #3dbfd6;
  --secondary: #F29CA3;
  --success: #2A9D8F;
  --info: #f7cacd;
  --warning: #ffc107;
  --danger: #E63946;
  
  /* Surcharge Bootstrap colors */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 17, 159, 184;
  --bs-secondary: var(--secondary);
  --bs-secondary-rgb: 242, 156, 163;
  --bs-success: var(--success);
  --bs-success-rgb: 42, 157, 143;
  --bs-info: var(--info);
  --bs-info-rgb: 247, 202, 205;
  --bs-warning: var(--warning);
  --bs-warning-rgb: 255, 193, 7;
  --bs-danger: var(--danger);
  --bs-danger-rgb: 230, 57, 70;
  
  /* Links */
  --bs-link-color: var(--primary);
  --bs-link-color-rgb: 17, 159, 184;
  --bs-link-hover-color: var(--primary-dark);
  --bs-link-hover-color-rgb: 14, 138, 159;
  
  /* Sidebar */
  --sidebar-bg: #64113F;
  --sidebar-width: 260px;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: rgba(13, 110, 253, 0.15);
  --sidebar-text: rgba(255, 255, 255, 0.8);
  --sidebar-text-active: #fff;
  
  /* Layout */
  --header-height: 60px;
  --content-bg: #f4f6f9;
  --card-bg: #fff;
  --border-color: #dee2e6;
  --border-radius: 0.5rem;
  
  /* Texte */
  --text-color: #212529;
  --text-muted: #6c757d;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Dark mode */
[data-bs-theme="dark"] {
  --content-bg: #1a1d21;
  --card-bg: #212529;
  --border-color: #373b3e;
  --text-color: #dee2e6;
  --text-muted: #adb5bd;
  --sidebar-bg: #121420;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Varela Round', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--content-bg);
  color: var(--text-color);
  overflow-x: hidden;
}

.modal-content {
  border-radius: 0 !important;
}

/* ============================================
   Sidebar
   ============================================ */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, width 0.3s ease;
}

.sidebar-header {
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.sidebar-nav .nav-link:not(.simple) {
  color: var(--info);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-text {
  white-space: nowrap;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.sidebar-toggle:hover {
  color: #fff;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav .nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav .nav-item {
  margin: 0.125rem 0.75rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  font-size: 0.9375rem;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  font-weight: 500;
}

.sidebar-nav .nav-link.active .nav-icon {
  color: var(--primary);
}

.nav-icon {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.8;
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 1.25rem;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  color: #fff;
  font-weight: 500;
  font-size: 0.9375rem;
}

.user-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8125rem;
}

/* ============================================
   Main Content
   ============================================ */
.admin-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* Header */
.admin-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--sidebar-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1030;
}

/* Bouton toggle sidebar dans le header (mode tablette/mobile) */
.admin-header .sidebar-toggle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  padding: 0.5rem;
}

.admin-header .sidebar-toggle:hover {
  color: #fff;
}

.page-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--info);
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Boutons icônes dans le header */
.admin-header .btn-icon {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.admin-header .btn-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Boutons icônes */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.btn-icon:hover {
  background: var(--content-bg);
  color: var(--text-color);
  border-color: var(--text-muted);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Badge quota */
.quota-badge {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

a.quota-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Quota badges dans le header */
.admin-header .quota-badge.quota-success {
  background: rgba(42, 157, 143, 0.2);
  color: #5dd4c4;
  border-color: rgba(42, 157, 143, 0.4);
}

.admin-header .quota-badge.quota-warning {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border-color: rgba(255, 193, 7, 0.4);
}

.admin-header .quota-badge.quota-danger {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b7a;
  border-color: rgba(220, 53, 69, 0.4);
}

.quota-badge.quota-success {
  background: rgba(25, 135, 84, 0.1);
  color: var(--success);
  border-color: rgba(25, 135, 84, 0.3);
}

.quota-badge.quota-success:hover {
  background: rgba(25, 135, 84, 0.2);
}

.quota-badge.quota-warning {
  background: rgba(255, 193, 7, 0.1);
  color: #997404;
  border-color: rgba(255, 193, 7, 0.3);
}

.quota-badge.quota-warning:hover {
  background: rgba(255, 193, 7, 0.2);
}

.quota-badge.quota-danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
  border-color: rgba(220, 53, 69, 0.3);
}

.quota-badge.quota-danger:hover {
  background: rgba(220, 53, 69, 0.2);
}

/* Content area */
.admin-content {
  padding: 1.5rem;
  min-height: calc(100vh - var(--header-height));
}

/* ============================================
   Cards
   ============================================ */

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: var(--shadow-sm);
}

.admin-card .card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
  min-height: 65px;
  display: flex;
  align-items: center;
}

.admin-card .card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.admin-card .card-body {
  padding: 1.25rem;
}

/* ============================================
   Tab Content
   ============================================ */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ============================================
   Status Messages
   ============================================ */
.status {
  padding: 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
}

.status.loading {
  background: rgba(13, 110, 253, 0.1);
  color: var(--primary);
  border: 1px solid rgba(13, 110, 253, 0.2);
}

.status.success {
  background: rgba(25, 135, 84, 0.1);
  color: var(--success);
  border: 1px solid rgba(25, 135, 84, 0.2);
}

.status.error {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
  border: 1px solid rgba(220, 53, 69, 0.2);
}

/* ============================================
   Debug Card
   ============================================ */
.debug-card {
  background: #fff3cd;
  border-color: #ffc107;
}

.debug-card h4 {
  color: #856404;
}

/* ============================================
   Sidebar Overlay (Mobile)
   ============================================ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1035;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   Accordion Customization
   ============================================ */
.accordion-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 !important;
  margin-bottom: 0.5rem;
}

.accordion-button {
  background: var(--card-bg);
  color: var(--text-color);
  font-weight: 500;
  border-radius: var(--border-radius) !important;
}

.accordion-button:not(.collapsed) {
  background: var(--content-bg);
  color: var(--text-color);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--border-color);
}

.accordion-body {
  background: var(--card-bg);
}

/* ============================================
   Form Controls
   ============================================ */
.form-select,
.form-control {
  border-color: var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
}

.form-select:focus,
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* App Input - Style auth unifié */
.app-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 0;
  font-size: 1rem;
  background: #f8f9fa;
  color: var(--text-color);
  transition: all 0.2s;
}

.app-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 0 0 3px rgba(17, 159, 184, 0.15);
}

.app-input::placeholder {
  color: #aaa;
}

/* App Input avec contenu */
.app-input:not(:placeholder-shown) {
  color: var(--primary);
}

/* Select2 fixes */
.select2-container--bootstrap-5 .select2-selection {
  border-color: var(--border-color);
  min-height: 48px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  border-radius: 0;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
  --bs-btn-disabled-bg: var(--primary);
  --bs-btn-disabled-border-color: var(--primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary);
  --bs-btn-hover-border-color: var(--primary);
  --bs-btn-active-bg: var(--primary);
  --bs-btn-active-border-color: var(--primary);
}

.btn-secondary {
  --bs-btn-bg: var(--secondary);
  --bs-btn-border-color: var(--secondary);
  --bs-btn-hover-bg: #e8858d;
  --bs-btn-hover-border-color: #e57a83;
  --bs-btn-active-bg: #e57a83;
  --bs-btn-active-border-color: #e06f79;
  --bs-btn-disabled-bg: var(--secondary);
  --bs-btn-disabled-border-color: var(--secondary);
}

.btn-outline-secondary {
  --bs-btn-color: var(--secondary);
  --bs-btn-border-color: var(--secondary);
  --bs-btn-hover-bg: var(--secondary);
  --bs-btn-hover-border-color: var(--secondary);
  --bs-btn-active-bg: var(--secondary);
  --bs-btn-active-border-color: var(--secondary);
}

.btn-success {
  --bs-btn-bg: var(--success);
  --bs-btn-border-color: var(--success);
  --bs-btn-hover-bg: #238b7e;
  --bs-btn-hover-border-color: #1f7a6f;
  --bs-btn-active-bg: #1f7a6f;
  --bs-btn-active-border-color: #1b6a61;
  --bs-btn-disabled-bg: var(--success);
  --bs-btn-disabled-border-color: var(--success);
}

.btn-outline-success {
  --bs-btn-color: var(--success);
  --bs-btn-border-color: var(--success);
  --bs-btn-hover-bg: var(--success);
  --bs-btn-hover-border-color: var(--success);
  --bs-btn-active-bg: var(--success);
  --bs-btn-active-border-color: var(--success);
}

.btn-info {
  --bs-btn-bg: var(--info);
  --bs-btn-border-color: var(--info);
  --bs-btn-hover-bg: #31d2f2;
  --bs-btn-hover-border-color: #25cff2;
  --bs-btn-active-bg: #3dd5f3;
  --bs-btn-active-border-color: #25cff2;
  --bs-btn-disabled-bg: var(--info);
  --bs-btn-disabled-border-color: var(--info);
}

.btn-outline-info {
  --bs-btn-color: var(--info);
  --bs-btn-border-color: var(--info);
  --bs-btn-hover-bg: var(--info);
  --bs-btn-hover-border-color: var(--info);
  --bs-btn-active-bg: var(--info);
  --bs-btn-active-border-color: var(--info);
}

.btn-warning {
  --bs-btn-bg: var(--warning);
  --bs-btn-border-color: var(--warning);
  --bs-btn-hover-bg: #ffca2c;
  --bs-btn-hover-border-color: #ffc720;
  --bs-btn-active-bg: #ffcd39;
  --bs-btn-active-border-color: #ffc720;
  --bs-btn-disabled-bg: var(--warning);
  --bs-btn-disabled-border-color: var(--warning);
}

.btn-outline-warning {
  --bs-btn-color: var(--warning);
  --bs-btn-border-color: var(--warning);
  --bs-btn-hover-bg: var(--warning);
  --bs-btn-hover-border-color: var(--warning);
  --bs-btn-active-bg: var(--warning);
  --bs-btn-active-border-color: var(--warning);
}

.btn-danger {
  --bs-btn-bg: var(--danger);
  --bs-btn-border-color: var(--danger);
  --bs-btn-hover-bg: #c5303b;
  --bs-btn-hover-border-color: #b82b35;
  --bs-btn-active-bg: #b82b35;
  --bs-btn-active-border-color: #ab2830;
  --bs-btn-disabled-bg: var(--danger);
  --bs-btn-disabled-border-color: var(--danger);
}

.btn-outline-danger {
  --bs-btn-color: var(--danger);
  --bs-btn-border-color: var(--danger);
  --bs-btn-hover-bg: var(--danger);
  --bs-btn-hover-border-color: var(--danger);
  --bs-btn-active-bg: var(--danger);
  --bs-btn-active-border-color: var(--danger);
}

.btn-outline-light {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.show {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .sidebar-footer {
    padding: 1rem 1.25rem 7rem;
  }

}

@media (max-width: 767.98px) {
  .admin-content {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .page-title i {
    display: none;
  }
  
  .quota-badge span:not(#remaining-count) {
    display: none;
  }
}

/* ============================================
   Upload Zone (réutilisable)
   ============================================ */
.upload-zone {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4/3;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  background: var(--content-bg);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(13, 110, 253, 0.02);
}

.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(13, 110, 253, 0.05);
  transform: scale(1.02);
}

.upload-zone.has-image {
  border-style: solid;
  border-color: var(--primary);
}

/* Animation lors du dépôt/sélection d'un fichier */
.upload-zone.upload-success {
  animation: uploadPulse 0.6s ease-out;
}

.upload-zone.upload-success .upload-preview-img {
  animation: uploadImagePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes uploadPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(17, 159, 184, 0.5);
    transform: scale(1);
  }
  30% {
    transform: scale(1.02);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(17, 159, 184, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(17, 159, 184, 0);
    transform: scale(1);
  }
}

@keyframes uploadImagePop {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation de suppression */
.upload-zone.upload-removing {
  animation: uploadRemove 0.4s ease-out;
}

.upload-zone.upload-removing .upload-preview-img {
  animation: uploadImageShrink 0.3s ease-in forwards;
}

@keyframes uploadRemove {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
    border-color: var(--danger);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes uploadImageShrink {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

.upload-zone.has-image .upload-placeholder {
  display: none;
}

.upload-zone.has-image .upload-remove {
  display: flex;
}

.upload-placeholder {
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.upload-text {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.upload-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.upload-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--content-bg);
  display: none;
}

.upload-zone.has-image .upload-preview-img {
  display: block;
}

.upload-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  z-index: 5;
  transition: transform 0.2s;
}

.upload-remove:hover {
  transform: scale(1.1);
}

/* ============================================
   Chips (réutilisables)
   ============================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.chip:hover {
  border-color: var(--primary);
  background: rgba(13, 110, 253, 0.05);
}

.chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.chip-icon {
  font-size: 1.1rem;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

/* ============================================
   Selection Bar (réutilisable)
   ============================================ */
.selection-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  background: var(--content-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.selection-bar.visible {
  display: flex;
}

.selection-count {
  font-weight: 600;
  font-size: 0.875rem;
}

.selection-clear {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: 0;
  color: var(--danger);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.selection-clear:hover {
  background: var(--danger);
  color: #fff;
}

/* ============================================
   Grid Cards (réutilisable pour listes)
   ============================================ */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.grid-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.grid-card-body {
  padding: 1rem;
}

.grid-card-title {
  font-weight: 600;
  margin: 0 0 0.375rem 0;
  font-size: 0.9375rem;
}

.grid-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.grid-card-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.grid-card-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.grid-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 767.98px) {
  .grid-cards {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Fullscreen Loader (réutilisable)
   ============================================ */
.fullscreen-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.fullscreen-loader.active {
  opacity: 1;
  visibility: visible;
}

.loader-content {
  text-align: center;
  color: #fff;
  width: 400px;
  max-width: 90vw;
  padding: 2rem;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-logo {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  animation: bounce 1s ease-in-out infinite;
}

.loader-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.loader-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.loader-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.loader-progress {
  margin-bottom: 1.5rem;
}

.loader-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loader-progress-bar-inner {
  height: 100%;
  background: #fff;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

/* ============================================
   Modal Enhancements (réutilisable)
   ============================================ */
.modal-gallery {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.modal-gallery-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
  z-index: 10;
}

.modal-nav-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.modal-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.modal-nav-prev { left: 1rem; }
.modal-nav-next { right: 1rem; }

/* ============================================
   Thumbnail avec badge
   ============================================ */
.thumb-badge {
  position: relative;
  display: block;
}

.thumb-badge img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 2px solid var(--border-color);
}

.thumb-badge span {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
}

/* ============================================
   Modal Preview - Style unifié pour toutes les modals
   ============================================ */

/* Header avec succès (gradient vert) */
.modal-header-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-bottom: none;
  padding: 1rem 1.5rem;
}

.modal-header-success .modal-title {
  color: #fff;
  font-weight: 600;
}

.modal-header-success .btn-close-white {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.modal-header-success .btn-close-white:hover {
  opacity: 1;
}

.modal-header-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-success-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

/* Container preview en deux colonnes */
.preview-container {
  display: flex;
  gap: 2rem;
}

/* Wrapper image avec navigation */
.preview-image-wrapper {
  flex: 1;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.preview-image-nav {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image-link {
  display: block;
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: #000;
}

.preview-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.preview-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
}

.preview-image-link:hover .preview-image-overlay {
  opacity: 1;
}

.preview-image-overlay i {
  font-size: 2rem;
}

.preview-image-overlay span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Boutons navigation dans l'image */
.preview-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-color);
  transition: all 0.2s;
  z-index: 10;
}

.preview-nav-btn:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.preview-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.preview-nav-btn.prev {
  left: 0.5rem;
}

.preview-nav-btn.next {
  right: 0.5rem;
}

/* Compteur d'images */
.preview-counter {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--content-bg);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Détails du preview */
.preview-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 250px;
}

.preview-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-color);
  font-size: 0.9375rem;
}

.meta-item i {
  width: 20px;
  color: var(--primary);
}

/* Sections dans le preview */
.preview-section {
  background: var(--content-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.preview-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-section-title i {
  color: var(--primary);
}

/* Images sources */
.preview-source-images {
  display: flex;
  gap: 0.75rem;
}

.preview-source-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.preview-source-item img {
  width: 100%;
  max-width: 80px;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 2px solid var(--border-color);
  transition: border-color 0.2s;
}

.preview-source-item:hover img {
  border-color: var(--primary);
}

/* Placeholder mode aléatoire dans les sources */
.preview-source-item .random-icon-box {
  width: 100%;
  max-width: 80px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light, #4cc9db));
  border-radius: var(--border-radius);
  border: 2px solid var(--primary);
}

.preview-source-item .random-icon-box i {
  font-size: 1.5rem;
  color: white;
}

.preview-source-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Liste d'options */
.preview-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
}

.preview-option-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0.625rem;
  background: var(--card-bg);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
}

.preview-option-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.preview-option-value {
  color: var(--text-color);
  font-weight: 500;
  text-align: right;
  max-width: 55%;
}

/* Actions du preview */
.preview-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.preview-actions .btn {
  width: 100%;
}

/* Responsive pour les modals */
@media (max-width: 992px) {
  .preview-container {
    flex-direction: column;
  }
  
  .preview-image-wrapper {
    max-width: 100%;
  }
  
  .preview-details {
    min-width: auto;
  }
  
  .preview-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .preview-actions .btn {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 576px) {
  .preview-name {
    font-size: 1.25rem;
  }
  
  .preview-nav-btn {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   Demo Overlay (Mode invité) - Style unifié
   ============================================ */
.demo-wrapper {
  position: relative;
  min-height: 400px;
}

.demo-blur {
  filter: blur(6px);
  opacity: 0.7;
  pointer-events: none;
  user-select: none;
}

.demo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  border-radius: var(--border-radius);
}

.demo-overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.demo-overlay-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 10px 40px rgba(17, 159, 184, 0.3);
}

.demo-overlay-content h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.demo-overlay-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.demo-overlay-content .btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: var(--shadow-lg), 0 4px 20px rgba(17, 159, 184, 0.4);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.demo-overlay-content .btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 6px 25px rgba(17, 159, 184, 0.5);
}

@media (max-width: 576px) {
  .demo-overlay-content {
    padding: 1.5rem;
  }
  
  .demo-overlay-content h4 {
    font-size: 1.25rem;
  }
  
  .demo-overlay-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .demo-overlay-content .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ============================================
   Option Chips (réutilisables)
   ============================================ */
.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.option-chip:hover {
  border-color: var(--primary);
  background: rgba(13, 110, 253, 0.05);
}

.option-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.option-chip-icon {
  font-size: 1rem;
}

/* ============================================
   Mood Chips (liste verticale - réutilisable)
   ============================================ */
.mood-chips {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mood-chip {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.mood-chip:hover {
  border-color: var(--primary);
  background: rgba(13, 110, 253, 0.05);
}

.mood-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Variante 2 colonnes */
.mood-chips.mood-chips-2cols {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mood-chips.mood-chips-2cols .mood-chip {
  width: calc(50% - 0.25rem);
  flex-shrink: 0;
}

/* ============================================
   Système de Toasts / Notifications
   ============================================ */
.app-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 1.5rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  font-weight: 500;
  font-size: 0.9375rem;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 90vw;
}

.app-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.app-toast i {
  font-size: 1.125rem;
}

/* Toast Success */
.app-toast-success {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
  box-shadow: 0 10px 40px rgba(0, 184, 148, 0.3);
}

/* Toast Error */
.app-toast-error {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  box-shadow: 0 10px 40px rgba(231, 76, 60, 0.3);
}

/* Toast Warning */
.app-toast-warning {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  box-shadow: 0 10px 40px rgba(243, 156, 18, 0.3);
}

/* Toast Info */
.app-toast-info {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 10px 40px rgba(52, 152, 219, 0.3);
}

/* ============================================
   Popup de Confirmation (via showConfirmDialog)
   ============================================ */
.confirm-dialog-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

#appConfirmDialog .modal-content {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

#appConfirmDialog .modal-body {
  padding: 1.5rem 2rem;
}

#appConfirmDialog .modal-footer {
  padding: 0 2rem 1.5rem;
  gap: 0.5rem;
}

/* ============================================
   Notification flottante (style léger)
   ============================================ */
.app-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  box-shadow: 0 10px 40px rgba(0, 184, 148, 0.3);
  z-index: 9999;
  font-weight: 500;
  font-size: 0.875rem;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.app-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.app-notification i {
  font-size: 1rem;
}

/* ============================================
   Toast d'erreur détaillé (validation)
   ============================================ */
.app-validation-toast {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 1100;
  max-width: 380px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.app-validation-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-validation-toast-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 1px solid #f87171;
  border-radius: 0;
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25);
}

.app-validation-toast-icon {
  width: 36px;
  height: 36px;
  background: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.app-validation-toast-text {
  flex: 1;
}

.app-validation-toast-text strong {
  display: block;
  color: #991b1b;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.app-validation-toast-text p {
  margin: 0;
  color: #b91c1c;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.app-validation-toast-close {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.app-validation-toast-close:hover {
  background: rgba(185, 28, 28, 0.1);
}

/* Responsive pour les toasts */
@media (max-width: 576px) {
  .app-toast {
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(100px);
    max-width: none;
  }
  
  .app-toast.show {
    transform: translateX(0) translateY(0);
  }
  
  .app-validation-toast {
    left: 1rem;
    right: 1rem;
    bottom: auto;
    top: 5rem;
    max-width: none;
  }
}

/* ============================================
   Toast d'erreur détaillé avec lien
   ============================================ */
.app-error-toast-detailed {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;
  max-width: 400px;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.app-error-toast-detailed.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.app-error-toast-content {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.app-error-toast-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.125rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.app-error-toast-body {
  flex: 1;
  min-width: 0;
}

.app-error-toast-title {
  display: block;
  color: #991b1b;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.app-error-toast-message {
  margin: 0 0 0.75rem 0;
  color: #b91c1c;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.app-error-toast-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #dc2626;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.app-error-toast-link:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #b91c1c;
  text-decoration: none;
}

.app-error-toast-link i {
  font-size: 0.75rem;
}

.app-error-toast-close {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin: -0.25rem -0.25rem 0 0;
}

.app-error-toast-close:hover {
  background: rgba(185, 28, 28, 0.15);
  color: #991b1b;
}

/* Responsive toast d'erreur détaillé */
@media (max-width: 576px) {
  .app-error-toast-detailed {
    left: 1rem;
    right: 1rem;
    bottom: auto;
    top: 5rem;
    max-width: none;
  }
}

/* ============================================
   Sélection multiple - Checkbox
   ============================================ */
.bulk-checkbox {
  margin-left: auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.bulk-checkbox:hover {
  transform: scale(1.1);
}

.bulk-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.bulk-checkbox .checkmark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--border-color, #dee2e6);
  border-radius: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bulk-checkbox .checkmark i {
  opacity: 0;
  color: #fff;
  font-size: 0.75rem;
  transition: opacity 0.15s ease;
}

.bulk-checkbox input:checked + .checkmark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
}

.bulk-checkbox input:checked + .checkmark i {
  opacity: 1;
}

.bulk-checkbox:hover .checkmark {
  border-color: var(--primary);
  transform: scale(1.05);
}

/* ============================================
   Sélection multiple - Barre d'actions flottante
   ============================================ */
.bulk-actions-bar {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 1050;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.bulk-actions-bar.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.bulk-actions-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 0;
  box-shadow: var(--shadow), 0 10px 40px rgba(0, 0, 0, 0.15);
}

.bulk-selection-count {
  display: flex;
  align-items: center;
  color: var(--text-color, #212529);
  font-weight: 600;
  font-size: 0.9375rem;
  padding-right: 1rem;
  border-right: 1px solid var(--border-color, #dee2e6);
}

.bulk-selection-count i {
  color: var(--success, #198754);
}

.bulk-actions-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bulk-actions-buttons .btn {
  white-space: nowrap;
  border-radius: 0;
}

/* Responsive barre d'actions */
@media (max-width: 767.98px) {
  .bulk-actions-bar {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    transform: translateX(0) translateY(100px);
  }
  
  .bulk-actions-bar.visible {
    transform: translateX(0) translateY(0);
  }
  
  .bulk-actions-content {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 1rem;
    padding: 0.75rem;
  }
  
  .bulk-selection-count {
    width: 100%;
    justify-content: center;
    padding-right: 0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color, #dee2e6);
  }
  
  .bulk-actions-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .bulk-actions-buttons .btn {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }
}
