/* CSS pour page-produit-memoire.php - Layout produit moderne */

/* Prévention du scintillement jQuery UI - À CHARGER EN PREMIER */
.ui-selectmenu-button,
.ui-selectmenu-menu,
.ui-widget:not(.form-select):not(.form-input),
.ui-button:not(.form-select):not(.form-input),
.ui-helper-hidden-accessible {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
}

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Désactiver le header fixe sur cette page */
.main-header {
  position: static !important;
  transform: none !important;
}

.main-header.is-stuck {
  position: static !important;
  transform: none !important;
  top: auto !important;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f8fafc;
  padding-top: 0 !important;
  overflow-x: hidden;
}

/* Container principal */
.product-container {
  /* max-width: 1600px; */
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Layout principal - galerie à gauche, infos à droite */
.product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

/* ===== GALERIE PRODUIT (GAUCHE) ===== */
.product-gallery {
  position: sticky;
  top: 2rem;
  max-width: 85vw;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.slider-container {
  position: relative;
  width: 100%;
  min-width: 500px; /* Taille minimale fixe pour agrandir le slider */
  aspect-ratio: 1 / 1; /* Format carré */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  background: white;
  cursor: grab;
  touch-action: pan-y; /* Permettre le scroll vertical, gérer horizontalement */
  user-select: none; /* Empêcher la sélection de texte */
  transition: transform 0.2s ease-out;
}

/* États du curseur pour l'interaction tactile */
.slider-container.touch-slider-enabled {
  cursor: grab;
}

.slider-container.touch-slider-enabled:active {
  cursor: grabbing;
}

/* Amélioration de l'accessibilité */
.slider-container:focus {
  outline: 2px solid #4072d8;
  outline-offset: 2px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Navigation du slider */
.slider-nav {
  background: #4072d8;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(64, 114, 216, 0.3);
  flex-shrink: 0;
}

.slider-nav.modern-arrow {
  background: #ffffff;
  border: 2px solid #4072d8;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(64, 114, 216, 0.3);
}

.slider-nav:hover {
  background: #2c5aa0;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(64, 114, 216, 0.4);
}

.slider-nav.modern-arrow:hover {
  background: #4072d8;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(64, 114, 216, 0.4);
}

.slider-nav svg {
  width: 24px;
  height: 24px;
  color: white;
}

.slider-nav.modern-arrow svg {
  width: 32px;
  height: 32px;
  color: #4072d8;
}

.slider-nav.modern-arrow:hover svg {
  color: #ffffff;
}

/* Indicateurs */
.slider-dots {
  text-align: center;
  margin-top: 1rem;
}

.dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  margin: 0 6px;
  transition: all 0.3s ease;
}

.dot.active {
  background: #4072d8;
  transform: scale(1.2);
}

/* ===== INFORMATIONS PRODUIT (DROITE) ===== */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 615px;
}

/* Titre du produit */
.product-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
  margin: 0;
}

/* Bloc unique */
.product-block {
  background: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
}

/* Prix discret */
.product-price {
  text-align: left;
  color: black;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.price-unit {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Alerte ratio */
.ratio-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: slideDown 0.3s ease-out;
  margin-bottom: 10px;
}

.ratio-warning-icon {
  color: #f59e0b;
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ratio-warning-content {
  flex: 1;
}

.ratio-warning-title {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.ratio-warning-message {
  color: #a16207;
  font-size: 0.8rem;
  line-height: 1.4;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FORMULAIRE ===== */
.form-group {
  margin-bottom: 0.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-label i {
  color: #4072d8;
  margin-right: 0.5rem;
  width: 16px;
}

/* Champs de formulaire unifiés */
.form-select,
.form-input {
  width: 100% !important;
  padding: 0.875rem 1rem !important;
  border: 2px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 0.95rem !important;
  background: white !important;
  font-family: "Inter", sans-serif !important;
  transition: all 0.3s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
}

.form-select:focus,
.form-input:focus {
  outline: none !important;
  border-color: #4072d8 !important;
  box-shadow: 0 0 0 3px rgba(64, 114, 216, 0.1) !important;
}

/* Lignes de formulaire */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Dimensions personnalisées */
.custom-dimensions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.custom-dimensions.show {
  display: grid;
}

/* Upload et Actions */
.upload-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* gap: 12px; */
  /* border-top: 1px solid #e5e7eb; */
  /* padding-top: 1.5rem; */
  flex-wrap: wrap;
}

.upload-btn {
  background: #4072d8;
  color: white;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  font-size: 1rem;
  border: none;
  width: auto;
  min-width: 180px;
  min-height: 56px;
  line-height: 1.2;
  font-family: "Inter", sans-serif;
  align-self: stretch;
}

.upload-btn:hover {
  background: #fb9921;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(64, 114, 216, 0.3);
}

/* Succès upload */
.upload-success {
  display: none;
  padding: 1rem;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: 1px solid #10b981;
  border-radius: 12px;
  align-items: center;
  gap: 1rem;
}

.upload-success.show {
  display: flex;
}

.success-icon i {
  color: #10b981;
  font-size: 1.5rem;
}

.success-content {
  flex: 1;
}

.success-filename {
  font-weight: 600;
  color: #065f46;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.change-file-btn {
  background: #6b7280;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.change-file-btn:hover {
  background: #374151;
}

/* Section panier */
.cart-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.add-to-cart-btn {
  background: #4072d8 !important;
  color: white !important;
  padding: 1rem 1.25rem !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.75rem !important;
  min-width: 180px !important;
  height: 56px !important;
  font-family: "Inter", sans-serif !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  align-self: stretch !important;
  pointer-events: auto !important;
}

.add-to-cart-btn:hover {
  background: #fb9921 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(64, 114, 216, 0.3) !important;
  color: white !important;
}

.add-to-cart-btn:focus,
.add-to-cart-btn:active {
  background: #4072d8 !important;
  color: white !important;
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Contrer spécifiquement les styles Elementor */
button.add-to-cart-btn,
.add-to-cart-btn[class*="elementor"],
.elementor-widget .add-to-cart-btn,
.elementor-element .add-to-cart-btn,
.add-to-cart-btn.elementor-button {
  background: #4072d8 !important;
  color: white !important;
  padding: 1rem 1.25rem !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  font-family: "Inter", sans-serif !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/* ===== SECTION APERÇU ===== */
.apercu-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  margin-top: 3rem;
  display: none;
}

.apercu-section.show {
  display: block;
}

.apercu-title {
  color: #4072d8;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.apercu-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.canvas-container {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

#carte-visite-canvas {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #f8fafc;
  border-radius: 8px;
}

.file-upload-section {
  text-align: center;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 9999 !important;
  max-width: 400px !important;
}

.notification {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-left: 4px solid #4072d8;
  transform: translateY(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.notification.show {
  transform: translateY(0);
}

.notification.success {
  border-left-color: #10b981;
}
.notification.error {
  border-left-color: #ef4444;
}
.notification.warning {
  border-left-color: #f59e0b;
}
.notification.info {
  border-left-color: #3b82f6;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  color: #10b981;
}
.notification.error .notification-icon {
  color: #ef4444;
}
.notification.warning .notification-icon {
  color: #f59e0b;
}
.notification.info .notification-icon {
  color: #3b82f6;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.notification-message {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.notification-close:hover {
  color: #6b7280;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none; /* Masqué par défaut */
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.loading-content {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4072d8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.loading-message {
  color: #6b7280;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1240px) {
  .product-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-gallery {
    position: static;
  }

  .product-info {
    min-width: 0px;
    gap: 1rem;
  }

  /* Améliorer la visibilité des champs sur écrans moyens */
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 768px) {
  .product-container {
    padding: 1rem;
  }

  .product-title {
    font-size: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .upload-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-btn,
  .add-to-cart-btn {
    width: 100%;
    min-width: auto;
  }

  .slider-container {
    min-width: 0px; /* Supprime la min-width pour permettre le rétrécissement */
    max-width: 100%;
    width: 100%;
    aspect-ratio: 1 / 1; /* Format plus adapté aux mobiles */
  }

  .slider-nav {
    width: 40px;
    height: 40px;
  }

  .slider-nav svg {
    width: 20px;
    height: 20px;
  }

  /* Améliorer l'espacement des labels et champs */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-label {
    margin-bottom: 0.75rem;
    font-size: 1rem;
  }

  .form-select,
  .form-input {
    padding: 1rem !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 900px) {
  /* Media query intermédiaire pour tablettes */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-container {
    padding: 1.5rem;
  }

  .product-title {
    font-size: 2.25rem;
  }

  /* Améliorer l'espacement pour les tablettes */
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-label {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 480px) {
  .product-title {
    font-size: 1.75rem;
  }

  .price-current {
    font-size: 1.1rem;
  }

  .slider-container {
    aspect-ratio: 1 / 1;
  }

  .apercu-controls {
    grid-template-columns: 1fr;
  }

  .custom-dimensions {
    grid-template-columns: 1fr;
  }

  /* Améliorer la lisibilité sur très petits écrans */
  .form-group {
    margin-bottom: 1.25rem;
  }

  .form-label {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .form-select,
  .form-input {
    padding: 1rem 0.875rem !important;
    font-size: 1rem !important;
  }

  /* Améliorer les checkboxes */
  .custom-checkbox {
    font-size: 0.95rem;
  }

  .custom-checkbox .checkmark {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
  }
}

/* Masquer les inputs de fichier */
input[type="file"] {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Masquer les éléments jQuery UI dès le chargement */
.ui-selectmenu-button,
.ui-selectmenu-menu,
.ui-widget,
.ui-button,
.ui-helper-hidden-accessible {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Forcer l'affichage des selects natifs */
select.form-select {
  display: block !important;
  visibility: visible !important;
}

/* Empêcher jQuery UI de cacher nos éléments */
.form-group select,
.form-group input {
  display: block !important;
  visibility: visible !important;
}

/* Styles spécifiques pour la mémoire */
.memoire-hero {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  color: black;
}

.hero-title .highlight {
  color: #4072d8;
}

.hero-subtitle {
  font-weight: bold;
  color: black;
  font-size: 1.2rem;
  opacity: 0.9;
}

.content-layout {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
  align-items: center;
  max-width: 100vw;
}

.modern-slider {
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 0 500px;
  min-height: 500px;
}

.form-container {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-width: 280px;
  overflow: hidden;
}

.memoire-order {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  flex: 0 0 280px;
  min-height: 400px;
  overflow: hidden;
}

.memoire-pricing {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  flex: 0 0 250px;
  min-height: 400px;
  overflow: hidden;
}

#pages-couleur-container {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border-left: 4px solid #4072d8;
  transition: all 0.3s ease;
}

#pages-couleur-container.show {
  display: block;
}

.upload-zone {
  border: 2px dashed #4072d8 !important;
  border-radius: 16px !important;
  padding: 2rem !important;
  text-align: center !important;
  background: #f8fafc !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

.upload-zone:hover {
  background: #f1f5f9 !important;
  border-color: #2c5aa0 !important;
}

.btn_continuer {
  background: #4072d8;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn_continuer:hover {
  background: #2c5aa0;
  transform: translateY(-2px);
}

.btn_continuer:disabled {
  background: #6b7280;
  cursor: not-allowed;
  transform: none;
}

.btn_ask_devis {
  background: #b2e8f4;
  color: black !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn_ask_devis:hover {
  transform: translateY(-2px);
  background: #4072d8 !important;
  color: #b2e8f4 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn_devis.show {
  display: block;
}

.btn_devis:disabled {
  background: #6b7280;
  cursor: not-allowed;
  transform: none;
}

.price-section {
  background: linear-gradient(135deg, #4072d8, #2c5aa0);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  text-align: center;
}

.price-title {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.price-total {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.price-unit {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 1300px) {
  .content-layout {
    flex-direction: column;
  }

  .modern-slider,
  .memoire-order,
  .memoire-pricing {
    flex: none;
    width: 100%;
  }

  .form-container {
    width: 100%;
  }

  .slider-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .memoire-container {
    padding: 1rem;
  }

  .form-container,
  .memoire-order,
  .memoire-pricing {
    padding: 1rem;
  }

  .slider-container {
    max-width: 100%;
  }

  .form-container div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .form-container div[style*="grid-template-columns"] > div {
    margin-bottom: 1rem;
  }

  .slider-nav {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .form-container,
  .memoire-order,
  .memoire-pricing {
    padding: 0.75rem;
  }

  .slider-container {
    max-width: 100%;
  }

  .slider-nav {
    width: 35px;
    height: 35px;
  }

  .slider-nav svg {
    width: 18px;
    height: 18px;
  }

  .slider-wrapper {
    gap: 10px;
  }
}

.notification-container {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999 !important;
  max-width: 400px !important;
}

.notification {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-left: 4px solid #4072d8;
  transform: translateY(100%);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2147483647 !important;
}

.notification.show {
  transform: translateY(0);
}

.notification.success {
  border-left-color: #10b981;
}

.notification.error {
  border-left-color: #ef4444;
}

.notification.warning {
  border-left-color: #f59e0b;
}

.notification.info {
  border-left-color: #3b82f6;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification.success .notification-icon {
  color: #10b981;
}

.notification.error .notification-icon {
  color: #ef4444;
}

.notification.warning .notification-icon {
  color: #f59e0b;
}

.notification.info .notification-icon {
  color: #3b82f6;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.notification-message {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.notification-close:hover {
  color: #6b7280;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.loading-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 320px;
  width: 90%;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-left-color: #4072d8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.loading-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.loading-message {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .notification-container {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .notification {
    margin-bottom: 0.5rem;
  }

  .notification.show {
    transform: translateY(0);
  }

  .notification.hide {
    transform: translateY(100%);
  }
}

.custom-checkbox {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-checkbox .checkmark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: white;
  border: 2px solid #4072d8;
  border-radius: 3px;
  margin-right: 0.4rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
  background-color: #4072d8;
  border-color: #4072d8;
}

.custom-checkbox .checkmark:after {
  content: "";
  display: block;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark:after {
  opacity: 1;
}

.custom-checkbox:hover .checkmark {
  background-color: #f0f8ff;
}

/* ===== FORCER LES BOUTONS À RESTER SUR LA MÊME LIGNE ===== */
.action-buttons-row {
  display: flex !important;
  gap: 1rem !important;
  align-items: center !important;
  margin-top: 0rem !important;
  flex-wrap: wrap !important; /* Changé de nowrap à wrap */
  justify-content: flex-start !important;
  width: 100% !important;
}

.action-buttons-row > * {
  flex: 1 !important;
  min-width: 180px !important;
  max-width: none !important;
  white-space: nowrap !important;
}

/* S'assurer que les boutons gardent leur taille même sur mobile */
@media (max-width: 768px) {
  .action-buttons-row {
    flex-wrap: wrap !important; /* Permettre le wrap sur mobile */
    gap: 0.75rem !important;
    justify-content: center !important; /* Centrer les boutons */
  }

  .action-buttons-row > * {
    flex: 1 !important;
    min-width: 160px !important;
    max-width: none !important;
  }
}

@media (max-width: 670px) {
  .action-buttons-row {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .action-buttons-row > * {
    flex: none !important;
    width: 83vw !important;
    min-width: auto !important;
  }
}
