/* =============================================================================
   COMPONENTS CSS - COMPOSANTS RÉUTILISABLES
   Centralisation des composants pour éviter les styles inline
   ============================================================================= */

/* ===== SIDEBAR DASHBOARD (STYLE CURSOR) ===== */
.sidebar-cursor {
    background: var(--sidebar-bg);
    min-height: 100vh;
    width: 280px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 2rem 0;
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 2px 0 20px rgba(31, 46, 66, 0.08);
}

.sidebar-cursor .user-profile {
    padding: 0 1.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1.5rem;
}

.sidebar-cursor .user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--sidebar-active) 0%, var(--sidebar-active-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 12px rgba(212, 113, 70, 0.3);
}

.sidebar-cursor .user-name {
    color: var(--sidebar-text-active);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.sidebar-cursor .user-plan {
    color: var(--sidebar-text-secondary);
    font-size: 0.875rem;
    background: rgba(212, 113, 70, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

.sidebar-cursor .nav-section {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.sidebar-cursor .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-cursor .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.sidebar-cursor .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
    transform: translateX(4px);
}

.sidebar-cursor .nav-link.active {
    background: linear-gradient(135deg, var(--sidebar-active) 0%, var(--sidebar-active-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 113, 70, 0.3);
    font-weight: 600;
}

.sidebar-cursor .nav-link.active:hover {
    transform: none;
    background: linear-gradient(135deg, var(--sidebar-active-dark) 0%, var(--sidebar-active) 100%);
}

.sidebar-cursor .nav-link i {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MAIN CONTENT AVEC SIDEBAR ===== */
.main-content-cursor {
    margin-left: 280px;
    padding: var(--space-2xl);
    background: transparent;
    min-height: 100vh;
}

.main-content-cursor h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

/* ===== ALERTES MODERNISÉES ===== */
.alert-modern {
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.alert-modern.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--color-warning);
    color: #92400e;
}

.alert-modern.alert-info {
    background: rgba(212, 113, 70, 0.1);
    border-left: 4px solid var(--color-primary);
    color: var(--color-primary-dark);
}

.alert-modern.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--color-success);
    color: #065f46;
}

.alert-modern.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--color-danger);
    color: #991b1b;
}

/* ===== CARDS MODERNES ===== */
.card-modern {
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elegant);
    backdrop-filter: blur(10px);
    background: var(--bg-card);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 113, 70, 0.2);
}

.card-modern .card-header {
    border-bottom: 1px solid var(--border-secondary);
    padding: var(--space-lg);
    font-weight: 600;
    font-size: 1rem;
}

.card-modern .card-header.bg-primary {
    background: var(--gradient-primary) !important;
    color: white;
}

.card-modern .card-header.bg-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%) !important;
    color: white;
}

.card-modern .card-header.bg-info {
    background: var(--gradient-primary) !important;
    color: white;
}

.card-modern .card-body {
    padding: var(--space-xl);
}

/* ===== BOUTONS MODERNISÉS ===== */
.btn-modern {
    border-radius: var(--radius-lg);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-elegant);
    border: none;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-modern.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(212, 113, 70, 0.3);
    color: white;
}

.btn-modern.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 113, 70, 0.4);
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: white;
}

.btn-modern.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-modern.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

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

.btn-modern.btn-outline-primary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-modern.btn-outline-info {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-modern.btn-outline-info:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-modern:disabled {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* ===== CERCLE DE PROGRESSION ===== */
.progress-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-circle-modern {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--color-primary) calc(var(--progress) * 1%), rgba(212, 113, 70, 0.1) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.progress-circle-modern::before {
    content: '';
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: white;
    position: absolute;
    box-shadow: inset 0 2px 10px var(--shadow-sm);
}

.progress-circle-modern .progress-text {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ===== FEATURE LIST ===== */
.feature-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 500;
}

.feature-item i {
    color: var(--color-primary);
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

/* ===== ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Délais d'animation pour les cartes */
.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar-cursor {
        width: 100%;
        position: relative;
        min-height: auto;
        margin-bottom: var(--space-lg);
    }
    
    .main-content-cursor {
        margin-left: 0;
        padding: var(--space-lg);
    }
    
    .main-content-cursor h1 {
        font-size: 2rem;
    }
    
    .progress-circle-modern {
        width: 80px;
        height: 80px;
    }
    
    .progress-circle-modern::before {
        width: 60px;
        height: 60px;
    }
}

/* =============================================================================
   COMPOSANTS SPÉCIFIQUES BBT
   Design élégant et chaleureux centré sur #F6EFD8
   ============================================================================= */

/* ===== PAGE TITRE ===== */
.page-title {
  font-family: var(--font-primary);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2xl);
  text-align: center;
  position: relative;
}

.page-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  margin: var(--space-lg) auto 0;
  border-radius: var(--radius-full);
}

/* ===== FORMULAIRES SPÉCIALISÉS ===== */
.form-card {
  background: var(--bg-card-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-elegant);
  padding: var(--space-2xl);
  margin: var(--space-xl) auto;
  max-width: var(--max-width-form);
}

.login-container {
  max-width: var(--max-width-form);
  margin: var(--space-3xl) auto;
  padding: 0 var(--space-md);
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.login-logo h1 {
  font-family: var(--font-primary);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

.required-field::after {
  content: "*";
  color: var(--color-primary);
  margin-left: var(--space-xs);
  font-weight: var(--font-bold);
}

/* ===== CARTES DE CONTENU ===== */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ===== ZONES DE CATÉGORIES (DRAG & DROP) ===== */
.category-box {
  min-height: 200px;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  background: var(--bg-card);
  margin-bottom: var(--space-xl);
  transition: var(--transition-elegant);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.category-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-subtle);
  opacity: 0;
  transition: var(--transition-elegant);
}

.category-box.highlight {
  border-color: var(--color-primary);
  background: var(--bg-card-elevated);
  transform: scale(1.02);
  box-shadow: var(--shadow-warm);
  border-style: solid;
}

.category-box.highlight::before {
  opacity: 1;
}

.category-title {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ===== CARTES THÉMATIQUES ===== */
.theme-card {
  background: var(--bg-card-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  overflow: hidden;
  transition: var(--transition-elegant);
  box-shadow: var(--shadow-soft);
}

.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-warm);
  border-color: var(--border-primary);
}

.theme-header {
  background: var(--gradient-subtle);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-xl);
  font-family: var(--font-primary);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-size: var(--text-lg);
}

.theme-body {
  padding: var(--space-xl);
  background: var(--bg-card-elevated);
}

.theme-actions {
  border-top: 1px solid var(--border-light);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* ===== CONTENEURS DE PHOTOS ===== */
.photo-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto var(--space-2xl);
  text-align: center;
  background: var(--bg-card-elevated);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-elegant);
  border: 1px solid var(--border-light);
}

.photo-container img {
  max-width: 100%;
  max-height: 500px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-elegant);
}

.photo-container img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.photo-navigation {
  margin: var(--space-xl) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-md);
}

.photo-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}

/* ===== THÉMATIQUES ET CONTENEURS ===== */
.theme-container {
  background: var(--bg-card-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  transition: var(--transition-elegant);
  box-shadow: var(--shadow-soft);
}

.theme-container:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-warm);
  transform: translateY(-2px);
}

.theme-container h4 {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--color-primary);
  display: inline-block;
  font-size: var(--text-xl);
}

.theme-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  min-height: 140px;
  padding: var(--space-lg);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: var(--transition-elegant);
}

.theme-photos.drag-over {
  border-color: var(--color-primary);
  background: var(--gradient-subtle);
  border-style: solid;
}

.theme-photo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-elegant);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.theme-photo:hover {
  transform: scale(1.08);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

/* ===== POOL DE PHOTOS ===== */
.photo-pool {
  margin-top: var(--space-2xl);
  border-top: 2px solid var(--border-light);
  padding-top: var(--space-xl);
}

.photo-pool h5 {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
}

.photo-pool h5::before {
  content: '📸';
  font-size: var(--text-2xl);
}

.pool-photos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}

/* ===== PHOTOS SÉLECTIONNABLES ===== */
.selectable-photo {
  position: relative;
  margin: var(--space-sm);
  cursor: pointer;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: var(--transition-elegant);
  border: 3px solid transparent;
  box-shadow: var(--shadow-sm);
}

.selectable-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-elegant);
}

.selectable-photo:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.selectable-photo.selected {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-warm);
}

.selectable-photo.selected img {
  filter: brightness(1.1);
}

.selectable-photo .selection-indicator {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-md);
  border: 3px solid white;
}

/* ===== SECTIONS D'ANALYSE ===== */
.analysis-section {
  background: var(--bg-card-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  box-shadow: var(--shadow-elegant);
}

.analysis-section h3 {
  color: var(--text-primary);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-2xl);
}

.analysis-section h3::before {
  content: '📊';
  font-size: var(--text-3xl);
}

.analysis-chart {
  height: 400px;
  margin-bottom: var(--space-2xl);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}

/* ===== AFFICHAGE DES THÈMES ===== */
.theme-display {
  background: var(--gradient-subtle);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.theme-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.theme-display h5 {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-lg);
  font-size: var(--text-xl);
}

.theme-images {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.theme-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-primary-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-elegant);
}

.theme-image:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* ===== INDICATEURS ET BADGES ===== */
.badge {
  font-family: var(--font-primary);
  font-weight: var(--font-medium);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  box-shadow: var(--shadow-sm);
}

.badge-primary {
  background: var(--gradient-primary);
  color: white;
}

.badge-secondary {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.badge-success {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

/* ===== ÉLÉMENTS INTERACTIFS ÉLÉGANTS ===== */
.elegant-button {
  background: var(--gradient-subtle);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  color: var(--text-primary);
  font-weight: var(--font-medium);
  transition: var(--transition-elegant);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-soft);
}

.elegant-button:hover {
  background: var(--bg-card-elevated);
  border-color: var(--color-primary);
  color: var(--text-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-warm);
}

.elegant-input-group {
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-soft);
}

.elegant-input-group label {
  display: block;
  color: var(--text-primary);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ÉLÉGANT ===== */
@media (max-width: 768px) {
  .card-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .selectable-photo {
    width: 120px;
    height: 120px;
  }
  
  .theme-photo {
    width: 80px;
    height: 80px;
  }
  
  .photo-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .theme-actions {
    flex-direction: column;
  }
  
  .form-card {
    padding: var(--space-xl);
  }
  
  .category-box {
    min-height: 160px;
    padding: var(--space-lg);
  }
  
  .analysis-chart {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: var(--text-2xl);
  }
  
  .pool-photos {
    gap: var(--space-sm);
    padding: var(--space-md);
  }
  
  .selectable-photo {
    width: 100px;
    height: 100px;
    margin: var(--space-xs);
  }
  
  .photo-container,
  .theme-container,
  .analysis-section {
    padding: var(--space-lg);
  }
  
  .theme-photos {
    padding: var(--space-md);
    min-height: 120px;
  }
}

/* ===== ANIMATIONS SPÉCIALES ===== */
.fade-in-elegant {
  animation: fadeInUp 0.8s var(--transition-elegant);
}

.hover-lift {
  transition: var(--transition-elegant);
}

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

/* ===== STYLES SPÉCIFIQUES POUR LA PAGE DE CONNEXION ===== */
.card-header.bg-primary.text-white {
  background-color: #1f2e42e6 !important;
}

.card-header.bg-primary.text-white h4 {
  color: white !important;
} 