/* Polices Ubuntu pour fonctionnement hors ligne */

@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./1cbb1b79a23478cc89ad.ttf) format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(./e37c5546eb1a6efc4818.ttf) format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fec2d0f1431a6114a6ce.ttf) format('truetype');
}

/* Optionnel: Version italic si vous les avez */
@font-face {
  font-family: 'Ubuntu';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(./fbb3310412795b02afc4.ttf) format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(./d68d789a6be6e034d129.ttf) format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(./6fe54aaa592aa54a8c88.ttf) format('truetype');
}

/* Fallback pour les styles manquants */
@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(./0dd2d5986e2731a16ee7.ttf) format('truetype');
}

@font-face {
  font-family: 'Ubuntu';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./e37c5546eb1a6efc4818.ttf) format('truetype');
}
/* Base styles et variables améliorées */
:root {
  /* Couleurs principales */
  --primary: #3b82f6;
  --primary-rgb: 59, 130, 246;
  --primary-hover: #2563eb;
  --primary-light: #dbeafe;
  --secondary: #64748b;
  --secondary-hover: #475569;
  --success: #00d563; /* MODIFIÉ: Vert plus vif et moderne */
  --success-hover: #00b84f; /* MODIFIÉ: Vert hover plus saturé */
  --success-light: #d0ffd8; /* MODIFIÉ: Vert clair plus lumineux */
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --warning-light: #fef3c7;
  --info: #06b6d4;
  --info-hover: #0891b2;
  --info-light: #cffafe;
  
  /* Arrière-plans */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #f8fafc;
  --bg-card: #ffffff;
  
  /* Textes */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-muted: #cbd5e1;
  
  /* Bordures et ombres */
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Rayons */
  --radius-sm: 0.125rem;
  --radius: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Transitions */
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Espacements */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-success: linear-gradient(135deg, #00d563 0%, #00b84f 100%); /* MODIFIÉ: Gradient vert plus vif */
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Mode sombre avec classes - MODIFIÉ */
.dark-theme,
html.dark-theme {
  /* Couleurs principales en mode sombre */
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --primary-light: #1e3a8a;
  
  /* Arrière-plans sombres */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-hover: #1e293b;
  --bg-card: #1e293b;
  
  /* Textes en mode sombre */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  
  /* Bordures et ombres en mode sombre */
  --border-color: #334155;
  --border-hover: #475569;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  
  /* Couleurs de statut ajustées */
  --success-light: #0a3d1a;
  --danger-light: #7f1d1d;
  --warning-light: #92400e;
  --info-light: #164e63;
}

/* GARDÉ: Pour compatibilité avec les préférences système par défaut */
@media (prefers-color-scheme: dark) {
  :root:not(.light-theme) {
    /* Mêmes variables que ci-dessus */
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #1e3a8a;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #1e293b;
    --bg-card: #1e293b;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-hover: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    
    --success-light: #0a3d1a;
    --danger-light: #7f1d1d;
    --warning-light: #92400e;
    --info-light: #164e63;
  }
}

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

body {
  /* MODIFIÉ: Utiliser Ubuntu comme police principale */
  font-family: 'Ubuntu', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typographie améliorée */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  /* MODIFIÉ: S'assurer qu'Ubuntu est utilisé pour les titres */
  font-family: 'Ubuntu', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

h2 {
  font-size: 1.875rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

/* NOUVEAU: S'assurer qu'Ubuntu est utilisé partout */
input, button, select, textarea {
  font-family: 'Ubuntu', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Classes d'utilitaires étendues */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

.info-text {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
  line-height: 1.5;
}

.error-text {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
}

.success-text {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: var(--space-sm);
}

/* Espacements fluides */
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

/* Animation de transition globale */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius);
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Focus visible amélioré */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Sélection de texte */
::selection {
  background-color: rgba(var(--primary-rgb), 0.2);
  color: var(--text-primary);
}

/* AJOUT: Classe pour bloquer le défilement */
body.panel-open {
  overflow: hidden !important;
  height: 100vh !important;
}
/* filepath: /Users/benoit/Documents/GitHub/CMS-cut-machine/parser-optimizer/src/css/layout.css */
/* Styles de mise en page générale */

/* Container de l'application */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-md);
  min-height: 100vh;
  background: var(--bg-primary);
  transition: all var(--transition);
}

/* Header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.main-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.logo {
  flex: 1;
  z-index: 1;
  padding-left: var(--space-xl);
}

.logo h1 {
  margin: 0;
  line-height: 1.2;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.025em;
}

.tagline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: var(--space-xs) 0 0 0;
  font-weight: 400;
  letter-spacing: 0.025em;
}

/* Navigation */
.main-nav {
  display: flex;
  gap: var(--space-sm);
  z-index: 1;
  padding-right: var(--space-xl);
}

/* Contenu principal */
.main-content {
  min-height: calc(100vh - 200px);
  animation: fadeIn 0.6s ease-out;
}

/* Sections de contenu */
.content-section {
  display: none;
  animation: sectionFadeIn 0.5s ease-out;
}

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

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* En-tête de section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.section-header h2 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.section-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Conteneur de panneau - CORRECTION COMPLÈTE */
.panels-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

/* CORRECTION: Grille côte à côte seulement au-dessus de 1300px */
@media (min-width: 1301px) {
  .panels-container {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
  }
}

/* CORRECTION: En dessous de 1300px, colonne unique avec barres mères en premier */
@media (max-width: 1300px) {
  .panels-container {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl);
  }
  
  /* Réorganiser l'ordre des panneaux : barres mères en premier */
  .panels-container .panel:nth-child(2) {
    order: -1;
  }
}

/* Animation de transition */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation pour l'apparition du bouton d'édition */
#results-nav {
  animation: slideInFromRight 0.5s ease-out;
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* MODIFIÉ: Bouton d'édition sans inversion de couleur */
.btn-edit-data {
  background: var(--gradient-warning);
  color: white;
  border: none;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
}

.btn-edit-data:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
  /* SUPPRIMÉ: l'inversion de couleur */
}

.btn-edit-data:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Animation d'attention */
@keyframes editPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.btn-edit-data.pulse {
  animation: editPulse 2s infinite;
}

/* Responsive design sophistiqué */
@media (max-width: 1200px) {
  .app-container {
    max-width: 100%;
    padding: var(--space-md);
  }
}

@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    padding: var(--space-lg) var(--space-md);
  }
  
  .logo {
    flex: none;
    padding-left: 0;
  }
  
  .main-nav {
    justify-content: center;
    padding-right: 0;
  }
  
  .section-header {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
    padding: var(--space-lg);
  }
  
  .section-actions {
    justify-content: center;
    width: 100%;
  }
  
  .panels-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .app-container {
    padding: var(--space-sm);
  }
  
  .main-header {
    margin-bottom: var(--space-xl);
    padding: var(--space-md);
  }
  
  .logo h1 {
    font-size: 1.75rem;
  }
  
  .tagline {
    font-size: 0.8125rem;
  }
  
  .section-header {
    padding: var(--space-md);
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .btn-edit-data {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* Amélioration de l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible amélioré pour la navigation au clavier */
.main-nav .nav-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Container avec effet de profondeur */
.main-content {
  position: relative;
}

.main-content::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  right: -50px;
  bottom: -50px;
  background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* MODIFIÉ: Panneaux sans effet de mouvement */
.panel {
  transition: box-shadow var(--transition);
}
/* Composants d'interface améliorés */

/* Boutons avec design moderne */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  background-clip: padding-box;
}



.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:active {
  transform: translateY(1px);
}

/* Tailles de boutons */
.btn-xs {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  border-radius: var(--radius);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

.btn-xl {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

/* Variantes de boutons */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

/* MODIFIÉ: Bouton de navigation sans soulignement animé */
.nav-btn {
  background-color: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}



.nav-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}



.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow);
}

/* Panneaux avec design moderne */
.panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}



.panel-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* NOUVEAU: Boutons reset dans le header du panel */
.panel-header #reset-pieces-btn,
.panel-header #reset-mother-bars-btn {
  background: var(--gradient-danger);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  opacity: 0.9;
}

.panel-header #reset-pieces-btn:hover,
.panel-header #reset-mother-bars-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 1;
}

.panel-header #reset-pieces-btn:active,
.panel-header #reset-mother-bars-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.panel-header #reset-pieces-btn .btn-icon,
.panel-header #reset-mother-bars-btn .btn-icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.panel-content {
  padding: var(--space-lg);
}

/* Tables modernes */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.data-table th,
.data-table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.data-table tr {
  transition: all var(--transition);
}

.data-table tbody tr:hover {
  background-color: var(--bg-hover);
  /*transform: scale(1.01);*/
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* MODIFIÉ: Formulaires avec focus persistant même avec hover */
.form-group {
  margin-bottom: var(--space-lg);
  padding: 0 2px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.form-group input,
.form-group select,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  background-color: var(--bg-primary);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

/* MODIFIÉ: Focus visible maintenu même avec hover */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-1px);
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
  border-color: var(--border-hover);
}

.form-group input[disabled],
.form-group select[disabled] {
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-help {
  display: block;
  margin-top: var(--space-xs);
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  line-height: 1.4;
  font-style: italic;
}

.form-group.error input,
.form-group.error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.error .form-help {
  color: var(--danger);
  font-weight: 500;
  font-style: normal;
}

/* Modals sophistiquées */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  width: 100%;
  max-width: 600px;
  background: var(--bg-card); /* MODIFIÉ: Utilise la variable au lieu de white */
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid var(--border-color);
}

.modal-header {
  flex-shrink: 0;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-xl);
}

.modal-footer {
  flex-shrink: 0;
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.close-modal:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Loading overlay sophistiqué */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeInOverlay 0.3s ease-out;
}

#loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  text-align: center;
  max-width: 450px;
  width: 90%;
  animation: slideInUp 0.4s ease-out;
  border: 1px solid var(--border-color);
}

.loading-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.025em;
}

.loading-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0 0 var(--space-2xl) 0;
  text-align: center;
  line-height: 1.5;
}

.loading-progress {
  margin-top: var(--space-xl);
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius);
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading-steps {
  margin-top: var(--space-xl);
  text-align: left;
  max-width: 300px;
  max-height: 300px;
  overflow-y: auto;
  scroll-behavior: smooth;
  /* Cache la barre de défilement */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer et Edge */
  /* AJOUTÉ: Toujours commencer en haut */
  scroll-padding-top: 0;
}

/* Cache la barre de défilement pour WebKit (Chrome, Safari) */
.loading-steps::-webkit-scrollbar {
  display: none;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  border-radius: var(--radius);
  margin-bottom: var(--space-xs);
}

.loading-step.active {
  color: var(--primary);
  font-weight: 600;
  /*background-color: var(--primary-light);*/
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

.loading-step.completed {
  color: var(--success);
  font-weight: 500;
}

.step-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  transition: all var(--transition);
  border: 2px solid var(--border-color);
}

.loading-step.active .step-icon {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  animation: pulse 2s infinite;
  box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

.loading-step.completed .step-icon {
  background: var(--gradient-success);
  color: white;
  border-color: var(--success);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Panneaux latéraux améliorés */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 950;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.panel-overlay.visible {
  display: block;
}

/* Styles pour les titres et boutons de fermeture */
.panel-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

/* Responsive amélioré */
@media (max-width: 1024px) {
  .side-panel {
    width: 380px;
  }
}

@media (max-width: 768px) {
  .side-panel {
    width: 100vw;
    max-width: none;
  }
  
  .modal-content {
    margin: var(--space-md);
    max-width: calc(100vw - 2rem);
  }
  
  .loading-content {
    padding: var(--space-xl);
    margin: var(--space-md);
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 0.625rem 0.875rem;
  }
}

/* Ajouter à la fin du fichier */

/* Conteneur des actions d'optimisation */
.optimization-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1rem;
}

/* Bouton de test */
#test-algorithms-btn {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  transition: all 0.3s ease;
}

#test-algorithms-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Modal pour sélection de scénario */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card); /* MODIFIÉ: Utilise la variable au lieu de white */
  border-radius: 8px;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-modal:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-secondary);
}

/* Liste des scénarios */
.scenario-list {
  display: grid;
  gap: 1rem;
}

.scenario-item {
  padding: 1.5rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--bg-primary); /* MODIFIÉ: Utilise la variable au lieu de white */
}

.scenario-item:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.scenario-item h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.scenario-item p {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.4;
}

.scenario-item small {
  color: var(--text-secondary);
  font-weight: 500;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .optimization-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .scenario-item {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .body-f4c {
    grid-template-columns: 1fr;
  }
  
  .piece-f4c {
    grid-template-columns: 1fr;
  }
  
  .F4C-preview-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}

/* Ajouter ces styles pour l'interaction */

.efficiency-comparison {
  transition: all 0.2s ease;
}

.efficiency-comparison:hover {
  background-color: var(--bg-secondary);
  transform: translateY(-1px);
}

.efficiency-comparison.best {
  border: 2px solid var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Bouton d'édition des données mis en évidence */
.btn-edit-data {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-hover) 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-edit-data:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, var(--warning-hover) 0%, var(--danger) 100%);
}

.btn-edit-data:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

/* Animation pour attirer l'attention */
@keyframes editPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.btn-edit-data.pulse {
  animation: editPulse 2s infinite;
}

/* Navigation mise à jour */
.main-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Responsive pour le bouton d'édition */
@media (max-width: 768px) {
  .btn-edit-data {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .main-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .main-nav {
    justify-content: center;
  }
}

/* AJOUT: Styles pour les notifications */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: var(--bg-card); /* MODIFIÉ: Utilise la variable au lieu de white */
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 8px;
  pointer-events: auto;
  transform: translateX(100%);
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.notification.notification-success {
  border-left: 4px solid #10b981;
}

.notification.notification-warning {
  border-left: 4px solid #f59e0b;
}

.notification.notification-error {
  border-left: 4px solid #ef4444;
}

.notification.notification-info {
  border-left: 4px solid #3b82f6;
}

/* Amélioration de l'aide contextuelle dans les formulaires */
.form-help {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.8em;
  font-style: italic;
  line-height: 1.3;
}

.form-group input:focus + .form-help,
.form-group select:focus + .form-help {
  color: var(--primary);
}

/* Style pour les messages d'erreur de validation dans les champs */
.form-group.error input,
.form-group.error select {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.form-group.error .form-help {
  color: var(--danger);
  font-weight: 500;
}

/* NOUVEAU: Conteneur pour le système de profil */
.profile-input-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

.profile-select {
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.profile-select:hover {
  border-color: var(--border-hover);
}

.profile-select:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-1px);
}

.profile-input {
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

/* Mode lecture seule */
.profile-input.readonly-mode {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.profile-input.readonly-mode:hover {
  border-color: var(--primary);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

/* Mode saisie personnalisée */
.profile-input.custom-mode {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: text;
}

.profile-input.custom-mode:hover:not(:focus) {
  border-color: var(--border-hover);
}

.profile-input:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  transform: translateY(-1px);
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Indicateur visuel pour le mode saisie */
.profile-input.custom-mode::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  opacity: 0.7;
}

/* Animation de transition entre les modes */
.profile-input {
  position: relative;
}

.profile-input.readonly-mode::after {
  content: '📝';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.profile-input.readonly-mode:hover::after {
  opacity: 0.6;
}

.mb-3 {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Responsive pour le conteneur de profil */
@media (max-width: 768px) {
  .profile-input-container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .profile-select,
  .profile-input {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .profile-input-container {
    gap: 0.375rem;
  }
  
  .profile-select,
  .profile-input {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* VÉRIFICATION: S'assurer qu'il n'y a pas de règles conflictuelles */
@media (max-width: 768px) {
  /* SUPPRIMER si présent : */
  /*
  .panels-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  */
  
  /* GARDER SEULEMENT: Les règles spécifiques aux composants */
  .side-panel {
    width: 100vw;
    max-width: none;
  }
  
  .modal-content {
    margin: var(--space-md);
    max-width: calc(100vw - 2rem);
  }
  
  .loading-content {
    padding: var(--space-xl);
    margin: var(--space-md);
  }
}

/* NOUVEAU: Styles pour les boutons d'action avec icônes SVG */
.action-buttons {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  justify-content: center;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  padding: 0;
  background-clip: padding-box;
}

.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-action:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-action-edit {
  background-color: var(--primary);
}

.btn-action-edit:hover {
  background-color: var(--primary-hover);
}

.btn-action-delete {
  background-color: var(--danger);
}

.btn-action-delete:hover {
  background-color: var(--danger-hover);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  filter: currentColor;
  transition: all var(--transition);
}

/* Taille spécifique pour les boutons plus larges */
.btn-lg .btn-icon {
  width: 20px; /* MODIFIÉ: Augmenté de 18px à 20px pour l'icône gears */
  height: 20px;
}

.btn-xl .btn-icon {
  width: 22px; /* MODIFIÉ: Augmenté de 20px à 22px */
  height: 22px;
}

/* Petits boutons */
.btn-sm .btn-icon,
.btn-xs .btn-icon {
  width: 14px;
  height: 14px;
}

/* Effet hover sur les icônes */
.btn:hover .btn-icon {
  transform: scale(1.1);
}

/* Icônes spécifiques pour les boutons d'action */
.btn-action .btn-icon {
  width: 14px;
  height: 14px;
  /* AJOUTÉ: Forcer les icônes edit et delete en blanc */
  filter: brightness(0) invert(1) !important;
}

.btn-action:hover .btn-icon {
  transform: scale(1.15);
}

/* Couleurs spécifiques pour les icônes selon le contexte */
.btn-primary .btn-icon,
.btn-success .btn-icon,
.btn-danger .btn-icon,
.btn-warning .btn-icon,
.btn-action-edit .btn-icon,  /* AJOUTÉ: Force le blanc pour edit */
.btn-action-delete .btn-icon { /* AJOUTÉ: Force le blanc pour delete */
  filter: brightness(0) invert(1) !important; /* Icônes blanches pour boutons colorés */
}

.btn-secondary .btn-icon,
.btn-outline .btn-icon,
.btn-ghost .btn-icon {
  filter: brightness(0) saturate(100%) invert(45%) sepia(11%) saturate(1210%) hue-rotate(202deg) brightness(94%) contrast(86%);
}

.btn-outline:hover .btn-icon {
  filter: brightness(0) saturate(100%) invert(35%) sepia(91%) saturate(2574%) hue-rotate(218deg) brightness(99%) contrast(93%);
}

/* Icône pour le bouton "Éditer les données" */
.btn-edit-data .btn-icon {
  filter: brightness(0) invert(1); /* Blanc */
}

.btn-edit-data:hover .btn-icon {
  transform: scale(1.1);
}

/* AJOUTÉ: Taille spéciale pour l'icône gears dans le bouton principal */
.btn-success.btn-lg .btn-icon {
  width: 30px; /* Plus gros pour l'icône gears */
  height: 30px;
}

/* Espacement dans les boutons avec icônes */
.btn .btn-icon + span,
.btn span + .btn-icon {
  margin-left: var(--space-xs);
}

/* Alignement parfait dans les boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

/* Responsive pour les icônes */
@media (max-width: 480px) {
  .btn-icon {
    width: 14px;
    height: 14px;
  }
  
  .btn-lg .btn-icon {
    width: 18px; /* MODIFIÉ: Augmenté de 16px à 18px pour mobile */
    height: 18px;
  }
  
  /* Maintenir la taille spéciale pour gears même en mobile */
  .btn-success.btn-lg .btn-icon {
    width: 20px;
    height: 20px;
  }
}

/* ===============================
   MODAL F4C - STYLES ADAPTÉS AU DARK MODE
   =============================== */

/* Modal spécifique pour les informations F4C */
.F4C-info-modal .F4C-modal-content {
  max-width: 700px;
  max-height: 85vh;
}

.F4C-modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* En-tête avec informations principales */
.F4C-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.F4C-header-item {
  text-align: center;
}

.F4C-header-label {
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.F4C-header-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

/* Informations de performance */
.F4C-performance-info {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.F4C-performance-item {
  color: var(--text-tertiary);
  font-size: 0.95em;
}

.F4C-performance-value {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Sections de la modal */
.F4C-section {
  margin-bottom: 2rem;
}

.F4C-section-title {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Grille des paramètres BODY */
.F4C-params-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.F4C-param-tag {
  background: var(--bg-primary);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  font-weight: 600;
  transition: all var(--transition);
}

.F4C-param-tag:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Liste des pièces */
.F4C-pieces-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.F4C-piece-item {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  position: relative;
  background: var(--bg-primary);
  transition: all var(--transition);
}

.F4C-piece-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Index de la pièce */
.F4C-piece-index {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Nom de la pièce */
.F4C-piece-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-right: 3rem;
  line-height: 1.4;
}

/* Grille des codes F4C */
.F4C-f4c-grid {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.F4C-f4c-tag {
  background: var(--bg-primary);
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  font-weight: 600;
  transition: all var(--transition);
}

.F4C-f4c-tag:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

/* Responsive pour la modal F4C */
@media (max-width: 768px) {
  .F4C-header-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    text-align: left;
  }
  
  .F4C-header-item {
    text-align: left;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
  }
  
  .F4C-performance-info {
    justify-content: flex-start;
    gap: 1rem;
  }
  
  .F4C-params-grid,
  .F4C-f4c-grid {
    gap: 0.375rem;
  }
  
  .F4C-param-tag,
  .F4C-f4c-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  
  .F4C-piece-item {
    padding: 0.75rem;
  }
  
  .F4C-piece-name {
    padding-right: 2.5rem;
    font-size: 0.9rem;
  }
  
  .F4C-piece-index {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (max-width: 480px) {
  .F4C-info-modal .F4C-modal-content {
    max-width: 95vw;
    margin: 1rem;
  }
  
  .F4C-header-grid {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .F4C-f4c-grid {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .F4C-f4c-tag {
    text-align: center;
  }
}

/* Mode sombre - ajustements spécifiques */
@media (prefers-color-scheme: dark) {
  .F4C-param-tag,
  .F4C-f4c-tag {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }
  
  .F4C-param-tag:hover,
  .F4C-f4c-tag:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
  }
  
  .F4C-piece-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
  }
  
  .F4C-piece-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
  }
  
  .F4C-header-grid {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
  }
  
  @media (max-width: 768px) {
    .F4C-header-item {
      background: var(--bg-secondary);
    }
  }
}

/* ===============================
   TOGGLE THEME DESIGN - SIMPLIFIÉ AVEC VARIABLES
   =============================== */
.theme-toggle-container {
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

.theme-toggle {
  position: relative;
  width: 60px;
  height: 32px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: 50px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition);
  overflow: visible;
  box-shadow: var(--shadow-sm);
  user-select: none;
  -webkit-user-select: none;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: var(--bg-primary);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  z-index: 3;
}

/* État mode sombre */
.theme-toggle.dark {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: #475569;
}

.theme-toggle.dark .theme-toggle-slider {
  transform: translateX(26px);
  background: #0f172a;
  border-color: #475569;
}

/* SIMPLIFIÉ: Icônes avec variables de couleur */
.theme-icon {
  position: absolute;
  width: 14px;
  height: 14px;
  transition: all var(--transition);
  pointer-events: none;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
}

.theme-icon-light {
  left: 8px;
  opacity: 1;
  transform: translateY(-50%) scale(1);
  /* NOUVEAU: Utilise la variable pour le soleil */
  filter: brightness(0) saturate(100%) invert(1);
  /* La couleur sera appliquée via une classe spécifique */
}

.theme-icon-dark {
  right: 8px;
  opacity: 1;
  transform: translateY(-50%) scale(0.8);
  /* NOUVEAU: Utilise la variable pour la lune */
  filter: brightness(0) saturate(100%) invert(1);
  /* La couleur sera appliquée via une classe spécifique */
}

/* NOUVEAU: Application des couleurs spécifiques */
.theme-icon-light {
  /* Convertir le SVG en utilisant la variable --theme-icon-sun */
  filter: brightness(0) saturate(100%) invert(79%) sepia(88%) saturate(355%) hue-rotate(360deg) brightness(108%) contrast(96%);
}

.theme-icon-dark {
  /* Convertir le SVG en utilisant la variable --theme-icon-moon */
  filter: brightness(0) saturate(100%) invert(67%) sepia(85%) saturate(4065%) hue-rotate(202deg) brightness(97%) contrast(101%);
}

/* Animation lors du passage en mode sombre */
.theme-toggle.dark .theme-icon-light {
  opacity: 1;
  transform: translateY(-50%) scale(0.8);
}

.theme-toggle.dark .theme-icon-dark {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Effet de focus pour l'accessibilité */
.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}



/* Responsive pour le toggle */
@media (max-width: 768px) {
  .theme-toggle {
    width: 54px;
    height: 28px;
  }
  
  .theme-toggle-slider {
    width: 20px;
    height: 20px;
  }
  
  .theme-toggle.dark .theme-toggle-slider {
    transform: translateX(22px);
  }
  
  .theme-icon {
    width: 12px;
    height: 12px;
  }
  
  .theme-icon-light {
    left: 6px;
  }
  
  .theme-icon-dark {
    right: 6px;
  }
}

/* Styles spécifiques aux sections de contenu - VERSION PREMIUM */

/* ===============================
   SECTION IMPORT - DESIGN PREMIUM
   =============================== */
.import-container {
  margin-bottom: 3rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.file-drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.file-drop-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.file-drop-zone:hover::before,
.file-drop-zone.active::before {
  opacity: 0.05;
}

.file-drop-zone:hover,
.file-drop-zone.active {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.file-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.file-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.file-drop-zone:hover .file-icon,
.file-drop-zone.active .file-icon {
  color: var(--primary-hover);
}

.file-prompt {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.file-hint {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 400px;
}

.file-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

/* Erreurs d'import avec design amélioré */
#import-error {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--danger-light) 0%, rgba(239, 68, 68, 0.05) 100%);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  width: 100%;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s ease-out;
}

/* ===============================
   SECTION OPTIMISATION
   =============================== */
.optimization-actions {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius-xl);
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.optimization-actions::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-success);
}

/* ===============================
   SECTION RÉSULTATS - DESIGN PREMIUM
   =============================== */
.results-summary {
  padding: 2rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-xl);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.results-summary::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-success);
}

/* Information algorithme avec style premium */
.algorithm-info {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.algorithm-used {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.algorithm-comparison {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Grille de statistiques améliorée */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0.7;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.efficiency-card {
  background: var(--gradient-success);
  border-color: var(--success);
}

.efficiency-card::before {
  background: rgba(255, 255, 255, 0.3);
}

.efficiency-card .stat-label,
.efficiency-card .stat-value {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* NOUVEAU: Grille de statistiques compacte pour affichage en ligne */
.stats-grid-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card-compact {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}




.stat-label-compact {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.stat-value-compact {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

/* Efficacité avec style spécial */
.stat-card-compact.efficiency-card {
  background: var(--gradient-success);
  border-color: var(--success);
}


.stat-card-compact.efficiency-card .stat-label-compact,
.stat-card-compact.efficiency-card .stat-value-compact {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE: Passage en grille 2x2 pour écrans étroits */
@media (max-width: 768px) {
  .stats-grid-compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .stat-card-compact {
    padding: 0.75rem;
    min-height: 70px;
  }
  
  .stat-label-compact {
    font-size: 0.7rem;
    margin-bottom: 0.375rem;
  }
  
  .stat-value-compact {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .stats-grid-compact {
    gap: 0.5rem;
  }
  
  .stat-card-compact {
    padding: 0.625rem;
    min-height: 60px;
  }
  
  .stat-label-compact {
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-value-compact {
    font-size: 1rem;
  }
}

/* ANCIEN: Garder l'ancienne grille pour les détails par modèle */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0.7;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.efficiency-card {
  background: var(--gradient-success);
  border-color: var(--success);
}

.efficiency-card::before {
  background: rgba(255, 255, 255, 0.3);
}

.efficiency-card .stat-label,
.efficiency-card .stat-value {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Résultats des modèles avec design premium */
.model-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.model-card {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease;
}

.model-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.model-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
}

.model-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.model-content {
  padding: 1.5rem;
}

.model-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.model-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}


.model-stat .stat-label {
  color: var(--text-secondary);
  font-size: 0.7rem;
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.model-stat .stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

/* Efficacité avec style spécial pour les modèles */
.model-stat .efficiency-tag {
  color: var(--success);
  font-weight: 700;
  font-size: 1rem;
}

/* RESPONSIVE: Passage en grille 2x2 pour écrans moyens */
@media (max-width: 900px) {
  .model-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
  }
  
  .model-stat {
    padding: 0.625rem 0.375rem;
    min-height: 65px;
  }
  
  .model-stat .stat-label {
    font-size: 0.65rem;
    margin-bottom: 0.25rem;
  }
  
  .model-stat .stat-value,
  .model-stat .efficiency-tag {
    font-size: 0.9rem;
  }
}

/* RESPONSIVE: Grille encore plus compacte pour très petits écrans */
@media (max-width: 480px) {
  .model-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .model-stat {
    padding: 0.5rem 0.25rem;
    min-height: 60px;
  }
  
  .model-stat .stat-label {
    font-size: 0.6rem;
    margin-bottom: 0.25rem;
  }
  
  .model-stat .stat-value,
  .model-stat .efficiency-tag {
    font-size: 0.85rem;
  }
}

/* MODIFIÉ: Schémas de coupe avec border radius réduit */
.cut-schemes {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
}

.cut-scheme {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.cut-scheme-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.cut-pieces, .waste {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.waste-value {
  color: var(--danger);
  font-weight: 600;
}

/* Barres de coupe avec design premium */
.cut-bar {
  height: 40px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--border-color) 100%);
  border-radius: var(--radius-md);
  display: flex;
  overflow: hidden;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cut-piece {
  height: 100%;
  background: var(--primary-hover);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.3s ease;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  min-width: 25px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}



.cut-piece:last-of-type {
  border-right: none;
}


.waste-piece {
  height: 100%;
  background: var(--danger);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 20px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bar-length-badge {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.75rem;
  box-shadow: var(--shadow-sm);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===============================
   FICHIERS F4C - DESIGN PREMIUM
   =============================== */
.F4C-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.F4C-file-item:hover {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.F4C-file-item:last-child {
  border-bottom: none;
}

.F4C-file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.F4C-file-name {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-weight: 600;
  min-width: 200px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.F4C-file-actions {
  display: flex;
  gap: 0.75rem;
}

.F4C-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

/* ===============================
   PANNEAUX D'ÉDITION COMPACTS
   =============================== */
.panels-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* MODIFIÉ: Panneaux sans animation de mouvement */
.panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}

.panel::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
}

/* ===============================
   PANNEAUX LATÉRAUX - VERSION FIXÉE
   =============================== */

.side-panel {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 420px;
  max-width: 90vw;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-xl);
  z-index: 960;
  
  /* IMPORTANT: Structure flexbox pour fixer les actions en bas */
  display: flex !important;
  flex-direction: column !important;
  
  transition: transform var(--transition-slow);
  border: 1px solid var(--border-color);
  overscroll-behavior: contain;
}

/* Header - fixe en haut */
.panel-header {
  flex-shrink: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

/* Zone de formulaire - défilable */
.panel-form {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  padding: 2rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Actions - fixées en bas */
.panel-actions {
  flex-shrink: 0 !important;
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  background: var(--bg-secondary);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Positionnement spécifique */
.piece-panel {
  right: 0;
  transform: translateX(100%);
  border-left: 3px solid var(--primary);
}

.piece-panel.visible {
  transform: translateX(0);
}

.stock-panel {
  left: 0;
  transform: translateX(-100%);
  border-right: 3px solid var(--primary);
}

.stock-panel.visible {
  transform: translateX(0);
}

/* Overlay */
.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 950;
  display: none;
  overflow: hidden;
}

.panel-overlay.visible {
  display: block;
}

/* Blocage du scroll de la page */
body.panel-open {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Styles pour les titres et boutons */
.panel-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: scale(1.1);
}

/* Scrollbar pour la zone de formulaire */
.panel-form::-webkit-scrollbar {
  width: 8px;
}

.panel-form::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

.panel-form::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius);
}

.panel-form::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Responsive */
@media (max-width: 768px) {
  .side-panel {
    width: 100vw;
    max-width: none;
  }
  
  .panel-header,
  .panel-form,
  .panel-actions {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .panel-header,
  .panel-form,
  .panel-actions {
    padding: 1rem;
  }
  
  .panel-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .panel-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===============================
   NOTIFICATIONS - DESIGN PREMIUM
   =============================== */
#notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  width: 350px;
}

.notification {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: notification-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

.notification.hiding {
  opacity: 0;
  transform: translateX(100%);
}

.notification-message {
  flex: 1;
  font-weight: 500;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  padding: 0 0 0 1rem;
  transition: all 0.3s ease;
}

.notification-close:hover {
  transform: scale(1.1);
}

.notification.success {
  background: linear-gradient(135deg, var(--success-light) 0%, rgba(16, 185, 129, 0.1) 100%);
  color: var(--success);
  border-color: var(--success);
}

.notification.warning {
  background: linear-gradient(135deg, var(--warning-light) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: var(--warning);
  border-color: var(--warning);
}

.notification.error {
  background: linear-gradient(135deg, var(--danger-light) 0%, rgba(239, 68, 68, 0.1) 100%);
  color: var(--danger);
  border-color: var(--danger);
}

.notification.info {
  background: linear-gradient(135deg, var(--info-light) 0%, rgba(6, 182, 212, 0.1) 100%);
  color: var(--info);
  border-color: var(--info);
}

@keyframes notification-in {
  from {
    transform: translateX(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

/* ===============================
   CARTES D'ERREUR - DESIGN PREMIUM
   =============================== */
.model-card.error-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
  position: relative;
  border-color: rgba(239, 68, 68, 0.2);
}

.error-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
  text-align: center;
  flex: 1;
  flex-direction: column;
}

.error-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-bottom: 1rem;
  color: var(--danger);
  opacity: 0.8;
}

.error-message h4 {
  margin: 0 0 1rem 0;
  color: var(--danger);
  font-size: 1.25rem;
  font-weight: 600;
}

.error-message p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

.model-card,
.model-card.error-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.model-content,
.error-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.error-content {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ===============================
   OVERLAY DE CHARGEMENT - PREMIUM
   =============================== */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  text-align: center;
  border: 1px solid var(--border-color);
  max-width: 500px;
  width: 90%;
}

/* ===============================
   RESPONSIVE DESIGN - PREMIUM
   =============================== */
@media (min-width: 768px) {
  /* Maintenir grille 2 colonnes sur tablette */
  .model-results {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (min-width: 1200px) {
  /* Maintenir grille 2 colonnes sur desktop */
  .model-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .side-panel {
    width: 100vw;
    max-width: none;
  }
  
  .panel-header,
  .panel-form,
  .panel-actions {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .import-container {
    margin-bottom: 2rem;
  }
  
  .file-drop-zone {
    padding: 2rem 1rem;
    min-height: 150px;
  }
  
  .file-icon {
    font-size: 2.5rem;
  }
  
  .file-prompt {
    font-size: 1.1rem;
  }
  
  .optimization-actions {
    padding: 1.5rem;
  }
  
  .results-summary {
    padding: 1.5rem;
  }
  
  .model-content {
    padding: 1rem;
  }
  
  .cut-bar {
    height: 35px;
  }
  
  .edit-form-sidebar {
    width: 95%;
    padding: 0;
  }
  
  .edit-form-sidebar.piece {
    left: 2.5%;
  }
  
  .edit-form-sidebar.stock {
    right: 2.5%;
  }
  
  .edit-form-header {
    padding: 1.25rem;
  }
  
  .edit-form-content {
    padding: 1.25rem;
  }
  
  .edit-form-actions {
    padding: 1rem 1.25rem;
  }
}

/* ===============================
   AMÉLIORATION MODE SOMBRE
   =============================== */
@media (prefers-color-scheme: dark) {
  .file-drop-zone {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-color: var(--border-color);
  }
  
  .file-drop-zone:hover,
  .file-drop-zone.active {
    border-color: var(--primary);
  }
  
  .cut-bar {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
  }
  
  .notification {
    backdrop-filter: blur(15px);
  }
  
  .notification.success {
    background: linear-gradient(135deg, var(--success-light) 0%, rgba(16, 185, 129, 0.15) 100%);
  }
  
  .notification.warning {
    background: linear-gradient(135deg, var(--warning-light) 0%, rgba(245, 158, 11, 0.15) 100%);
  }
  
  .notification.error {
    background: linear-gradient(135deg, var(--danger-light) 0%, rgba(239, 68, 68, 0.15) 100%);
  }
  
  .notification.info {
    background: linear-gradient(135deg, var(--info-light) 0%, rgba(6, 182, 212, 0.15) 100%);
  }
}

/* ===============================
   ANIMATIONS SUPPRIMÉES/RÉDUITES
   =============================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===============================
   ACCESSIBILITÉ
   =============================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible amélioré */
.F4C-file-item:focus-visible,
.cut-scheme:focus-visible,
.model-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.banter-loader-container {
  width: 100%;
  display: flex;
  flex-direction: row;
  -ms-flex-align: center;
  justify-content: center;
  align-items: center;
}

.banter-loader {
  position: relative;
  width: 72px;
  height: 72px;
  
}

.banter-loader__box {
  float: left;
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 6px;
}

.banter-loader__box:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
}

.banter-loader__box:nth-child(3n) {
  margin-right: 0;
  margin-bottom: 6px;
}

.banter-loader__box:nth-child(1):before, .banter-loader__box:nth-child(4):before {
  margin-left: 26px;
}

.banter-loader__box:nth-child(3):before {
  margin-top: 52px;
}

.banter-loader__box:last-child {
  margin-bottom: 0;
}

@keyframes moveBox-1 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(0px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 26px);
  }

  54.5454545455% {
    transform: translate(26px, 26px);
  }

  63.6363636364% {
    transform: translate(26px, 26px);
  }

  72.7272727273% {
    transform: translate(26px, 0px);
  }

  81.8181818182% {
    transform: translate(0px, 0px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(1) {
  animation: moveBox-1 4s infinite;
}

@keyframes moveBox-2 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 26px);
  }

  54.5454545455% {
    transform: translate(26px, 26px);
  }

  63.6363636364% {
    transform: translate(26px, 26px);
  }

  72.7272727273% {
    transform: translate(26px, 26px);
  }

  81.8181818182% {
    transform: translate(0px, 26px);
  }

  90.9090909091% {
    transform: translate(0px, 26px);
  }

  100% {
    transform: translate(0px, 0);
  }
}

.banter-loader__box:nth-child(2) {
  animation: moveBox-2 4s infinite;
}

@keyframes moveBox-3 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(-26px, 0);
  }

  45.4545454545% {
    transform: translate(-26px, 0);
  }

  54.5454545455% {
    transform: translate(-26px, 0);
  }

  63.6363636364% {
    transform: translate(-26px, 0);
  }

  72.7272727273% {
    transform: translate(-26px, 0);
  }

  81.8181818182% {
    transform: translate(-26px, -26px);
  }

  90.9090909091% {
    transform: translate(0px, -26px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(3) {
  animation: moveBox-3 4s infinite;
}

@keyframes moveBox-4 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, -26px);
  }

  36.3636363636% {
    transform: translate(0px, -26px);
  }

  45.4545454545% {
    transform: translate(0px, 0px);
  }

  54.5454545455% {
    transform: translate(0px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(-26px, -26px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(4) {
  animation: moveBox-4 4s infinite;
}

@keyframes moveBox-5 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(0, 0);
  }

  27.2727272727% {
    transform: translate(0, 0);
  }

  36.3636363636% {
    transform: translate(26px, 0);
  }

  45.4545454545% {
    transform: translate(26px, 0);
  }

  54.5454545455% {
    transform: translate(26px, 0);
  }

  63.6363636364% {
    transform: translate(26px, 0);
  }

  72.7272727273% {
    transform: translate(26px, 0);
  }

  81.8181818182% {
    transform: translate(26px, -26px);
  }

  90.9090909091% {
    transform: translate(0px, -26px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(5) {
  animation: moveBox-5 4s infinite;
}

@keyframes moveBox-6 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, 0);
  }

  36.3636363636% {
    transform: translate(0px, 0);
  }

  45.4545454545% {
    transform: translate(0px, 0);
  }

  54.5454545455% {
    transform: translate(0px, 0);
  }

  63.6363636364% {
    transform: translate(0px, 0);
  }

  72.7272727273% {
    transform: translate(0px, 26px);
  }

  81.8181818182% {
    transform: translate(-26px, 26px);
  }

  90.9090909091% {
    transform: translate(-26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(6) {
  animation: moveBox-6 4s infinite;
}

@keyframes moveBox-7 {
  9.0909090909% {
    transform: translate(26px, 0);
  }

  18.1818181818% {
    transform: translate(26px, 0);
  }

  27.2727272727% {
    transform: translate(26px, 0);
  }

  36.3636363636% {
    transform: translate(0px, 0);
  }

  45.4545454545% {
    transform: translate(0px, -26px);
  }

  54.5454545455% {
    transform: translate(26px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(0px, 0px);
  }

  90.9090909091% {
    transform: translate(26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(7) {
  animation: moveBox-7 4s infinite;
}

@keyframes moveBox-8 {
  9.0909090909% {
    transform: translate(0, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(-26px, -26px);
  }

  36.3636363636% {
    transform: translate(0px, -26px);
  }

  45.4545454545% {
    transform: translate(0px, -26px);
  }

  54.5454545455% {
    transform: translate(0px, -26px);
  }

  63.6363636364% {
    transform: translate(0px, -26px);
  }

  72.7272727273% {
    transform: translate(0px, -26px);
  }

  81.8181818182% {
    transform: translate(26px, -26px);
  }

  90.9090909091% {
    transform: translate(26px, 0px);
  }

  100% {
    transform: translate(0px, 0px);
  }
}

.banter-loader__box:nth-child(8) {
  animation: moveBox-8 4s infinite;
}

@keyframes moveBox-9 {
  9.0909090909% {
    transform: translate(-26px, 0);
  }

  18.1818181818% {
    transform: translate(-26px, 0);
  }

  27.2727272727% {
    transform: translate(0px, 0);
  }

  36.3636363636% {
    transform: translate(-26px, 0);
  }

  45.4545454545% {
    transform: translate(0px, 0);
  }

  54.5454545455% {
    transform: translate(0px, 0);
  }

  63.6363636364% {
    transform: translate(-26px, 0);
  }

  72.7272727273% {
    transform: translate(-26px, 0);
  }

  81.8181818182% {
    transform: translate(-52px, 0);
  }

  90.9090909091% {
    transform: translate(-26px, 0);
  }

  100% {
    transform: translate(0px, 0);
  }
}

.banter-loader__box:nth-child(9) {
  animation: moveBox-9 4s infinite;
}

