/*
 * flowbite-theme.css
 * Thème Flowbite personnalisé pour MaBelleCave
 * Applique les couleurs viticoles aux composants Flowbite
 */

/* ========================================
   VARIABLES CSS - PALETTE VITICOLE
   ======================================== */
:root {
  /* Couleurs primaires viticoles */
  --fb-wine-primary: #722F37;
  --fb-wine-dark: #5a252c;
  --fb-wine-light: #8B3A44;
  --fb-wine-accent: #8B0000;

  /* Couleurs secondaires */
  --fb-gold: #FFD700;
  --fb-gold-dark: #D4AF37;
  --fb-cream: #FFF8F0;
  --fb-warm-gray: #6B7280;

  /* Gradients */
  --fb-gradient-wine: linear-gradient(135deg, #722F37 0%, #8B0000 100%);
  --fb-gradient-gold: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
  --fb-gradient-premium: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Ombres modernes */
  --fb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --fb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --fb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --fb-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --fb-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --fb-transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --fb-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   CARTE DE CONNEXION MODERNE
   ======================================== */
.fb-login-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow var(--fb-transition-normal);
}

.fb-login-card:hover {
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15);
}

.fb-login-header {
  background: var(--fb-gradient-wine);
  color: white;
  padding: 2rem;
  text-align: center;
}

.fb-login-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.025em;
}

.fb-login-header .subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

.fb-login-body {
  padding: 2rem;
}

.fb-login-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

/* ========================================
   INPUTS FLOWBITE AMÉLIORÉS
   ======================================== */
.fb-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1f2937;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: all var(--fb-transition-fast);
}

.fb-input:focus {
  outline: none;
  border-color: var(--fb-wine-primary);
  box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.15);
  background-color: white;
}

.fb-input::placeholder {
  color: #9ca3af;
}

.fb-input-icon-wrapper {
  position: relative;
}

.fb-input-icon-wrapper .fb-input {
  padding-left: 2.75rem;
}

.fb-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  transition: color var(--fb-transition-fast);
}

.fb-input-icon-wrapper:focus-within .fb-input-icon {
  color: var(--fb-wine-primary);
}

/* Input avec bouton à droite (toggle password) */
.fb-input-group {
  position: relative;
  display: flex;
}

.fb-input-group .fb-input {
  padding-right: 3rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
}

.fb-input-group-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-left: none;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  cursor: pointer;
  color: #6b7280;
  transition: all var(--fb-transition-fast);
}

.fb-input-group-btn:hover {
  background: #e5e7eb;
  color: var(--fb-wine-primary);
}

/* ========================================
   LABELS FLOWBITE
   ======================================== */
.fb-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.fb-label-required::after {
  content: " *";
  color: #ef4444;
}

/* ========================================
   BOUTONS FLOWBITE VITICOLES
   ======================================== */
.fb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--fb-transition-fast);
  border: none;
  text-decoration: none;
}

.fb-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.3);
}

.fb-btn-primary {
  background: var(--fb-gradient-wine);
  color: white;
}

.fb-btn-primary:hover {
  background: linear-gradient(135deg, #5a252c 0%, #722F37 100%);
  transform: translateY(-1px);
  box-shadow: var(--fb-shadow-lg);
}

.fb-btn-primary:active {
  transform: translateY(0);
}

.fb-btn-outline {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.fb-btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.fb-btn-block {
  width: 100%;
}

/* ========================================
   ALERTES FLOWBITE AMÉLIORÉES
   ======================================== */
.fb-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.fb-alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

.fb-alert-content {
  flex: 1;
}

.fb-alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.fb-alert-close {
  flex-shrink: 0;
  padding: 0.25rem;
  margin: -0.25rem -0.25rem -0.25rem 0;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--fb-transition-fast);
}

.fb-alert-close:hover {
  opacity: 1;
}

/* Variantes d'alertes */
.fb-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

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

.fb-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.fb-alert-danger .fb-alert-icon {
  color: #ef4444;
}

.fb-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.fb-alert-warning .fb-alert-icon {
  color: #f59e0b;
}

.fb-alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

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

/* ========================================
   DIVIDERS ET SÉPARATEURS
   ======================================== */
.fb-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.875rem;
}

.fb-divider::before,
.fb-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.fb-divider span {
  padding: 0 1rem;
}

/* ========================================
   LIENS FLOWBITE
   ======================================== */
.fb-link {
  color: var(--fb-wine-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--fb-transition-fast);
}

.fb-link:hover {
  color: var(--fb-wine-dark);
  text-decoration: underline;
}

/* ========================================
   TEXTES UTILITAIRES
   ======================================== */
.fb-text-muted {
  color: #6b7280;
  font-size: 0.875rem;
}

.fb-text-center {
  text-align: center;
}

/* ========================================
   ANIMATIONS D'ENTRÉE
   ======================================== */
@keyframes fb-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fb-animate-in {
  animation: fb-fadeInUp 0.4s ease-out;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
  .fb-login-card {
    margin: 1rem;
    border-radius: 0.75rem;
  }

  .fb-login-header {
    padding: 1.5rem;
  }

  .fb-login-body {
    padding: 1.5rem;
  }
}

/* ========================================
   SIDEBAR FLOWBITE MODERNE
   ======================================== */

/* Override sidebar existante avec style Flowbite */
.sidebar.fb-sidebar {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  box-shadow: var(--fb-shadow-xl);
}

.fb-sidebar .sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
}

.fb-sidebar .sidebar-brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.fb-sidebar .sidebar-brand .fa-wine-bottle {
  color: var(--fb-wine-light);
  font-size: 1.5rem;
}

/* Navigation Sections */
.fb-sidebar .nav-section {
  margin-bottom: 1.5rem;
}

.fb-sidebar .nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  padding: 0.75rem 1rem 0.5rem;
  font-weight: 600;
}

.fb-sidebar .nav-section-subtitle {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  padding: 0.5rem 1rem 0.25rem;
  margin-top: 0.4rem;
  border-top: 1px solid rgba(229, 231, 235, 0.15);
  font-weight: 600;
}

/* Navigation Links */
.fb-sidebar .nav-link {
  padding: 0.625rem 1rem;
  margin: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  border-left: none;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
}

.fb-sidebar .nav-link::before {
  display: none;
}

.fb-sidebar .nav-link i {
  width: 1.25rem;
  font-size: 1rem;
  opacity: 0.8;
}

.fb-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f3f4f6;
  border-left: none;
}

.fb-sidebar .nav-link.active {
  background: var(--fb-gradient-wine);
  color: white;
  border-left: none;
  box-shadow: 0 4px 12px rgba(114, 47, 55, 0.4);
}

.fb-sidebar .nav-link.active i {
  opacity: 1;
}

/* Tooltip pour sidebar collapsed */
.fb-sidebar.collapsed .nav-link {
  margin: 0.25rem;
  padding: 0.75rem;
  justify-content: center;
}

.fb-sidebar.collapsed .nav-link:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 100%;
  margin-left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #1f2937;
  color: white;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: var(--fb-shadow-lg);
}

/* ========================================
   DASHBOARD FLOWBITE
   ======================================== */

/* Header Dashboard */
.fb-dashboard-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.fb-dashboard-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fb-dashboard-title h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.025em;
}

.fb-dashboard-title p {
  color: #6b7280;
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
}

.fb-dashboard-title .icon {
  width: 3rem;
  height: 3rem;
  background: var(--fb-gradient-wine);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.fb-dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
}

.fb-dashboard-badge i {
  color: var(--fb-wine-primary);
}

/* Stats Cards */
.fb-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.fb-stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--fb-shadow-md);
  border: 1px solid #f3f4f6;
  transition: all var(--fb-transition-normal);
  position: relative;
  overflow: hidden;
}

.fb-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-accent, var(--fb-wine-primary));
  border-radius: 4px 0 0 4px;
}

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

.fb-stat-card.gradient {
  color: white;
  border: none;
}

.fb-stat-card.gradient::before {
  display: none;
}

.fb-stat-card.gradient-wine {
  background: var(--fb-gradient-wine);
  --card-accent: transparent;
}

.fb-stat-card.gradient-purple {
  background: var(--fb-gradient-premium);
  --card-accent: transparent;
}

.fb-stat-card.gradient-green {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --card-accent: transparent;
}

.fb-stat-card.gradient-orange {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --card-accent: transparent;
}

.fb-stat-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.fb-stat-card:not(.gradient) .fb-stat-icon {
  background: #f3f4f6;
  color: var(--card-accent, var(--fb-wine-primary));
}

.fb-stat-card.gradient .fb-stat-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.fb-stat-content {
  flex: 1;
  min-width: 0;
}

.fb-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.fb-stat-card:not(.gradient) .fb-stat-value {
  color: #111827;
}

.fb-stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.125rem;
}

.fb-stat-card:not(.gradient) .fb-stat-label {
  color: #6b7280;
}

.fb-stat-card.gradient .fb-stat-label {
  opacity: 0.9;
}

.fb-stat-sublabel {
  font-size: 0.75rem;
}

.fb-stat-card:not(.gradient) .fb-stat-sublabel {
  color: #9ca3af;
}

.fb-stat-card.gradient .fb-stat-sublabel {
  opacity: 0.75;
}

/* Section Cards */
.fb-section-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  border: 1px solid #f3f4f6;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.fb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

.fb-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.fb-section-title i {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.fb-section-title.wine i {
  background: rgba(114, 47, 55, 0.1);
  color: var(--fb-wine-primary);
}

.fb-section-title.purple i {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.fb-section-title.green i {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.fb-section-title.orange i {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.fb-section-title.red i {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.fb-section-title.dark i {
  background: rgba(17, 24, 39, 0.1);
  color: #111827;
}

.fb-section-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.fb-section-body {
  padding: 1.5rem;
}

/* Producer Cards */
.fb-producer-card {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all var(--fb-transition-normal);
  height: 100%;
}

.fb-producer-card:hover {
  border-color: var(--fb-wine-primary);
  box-shadow: var(--fb-shadow-md);
  transform: translateY(-2px);
}

.fb-producer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.fb-producer-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

.fb-producer-quality {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fb-quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.fb-producer-total {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Location Cards */
.fb-location-card {
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all var(--fb-transition-normal);
}

.fb-location-card:hover {
  background: white;
  border-color: #667eea;
  box-shadow: var(--fb-shadow-sm);
}

.fb-location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.fb-location-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.fb-location-count {
  background: var(--fb-gradient-premium);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.fb-progress {
  height: 0.5rem;
  background: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.fb-progress-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width var(--fb-transition-slow);
}

.fb-progress-bar.success {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.fb-progress-bar.warning {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.fb-progress-bar.danger {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

/* Alert Wine Cards */
.fb-wine-alert {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.fb-wine-alert:last-child {
  border-bottom: none;
}

.fb-wine-info {
  flex: 1;
}

.fb-wine-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.fb-wine-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Table moderne */
.fb-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.fb-table thead th {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.fb-table tbody td {
  padding: 1rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.fb-table tbody tr:hover {
  background: #f9fafb;
}

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

/* Empty states */
.fb-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #9ca3af;
}

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

.fb-empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Badges */
.fb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.fb-badge-success {
  background: #ecfdf5;
  color: #059669;
}

.fb-badge-danger {
  background: #fef2f2;
  color: #dc2626;
}

.fb-badge-warning {
  background: #fffbeb;
  color: #d97706;
}

.fb-badge-info {
  background: #eff6ff;
  color: #2563eb;
}

.fb-badge-wine {
  background: rgba(114, 47, 55, 0.1);
  color: var(--fb-wine-primary);
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .fb-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fb-stats-grid {
    grid-template-columns: 1fr;
  }

  .fb-stat-card {
    padding: 1.25rem;
  }

  .fb-stat-value {
    font-size: 1.5rem;
  }

  .fb-section-body {
    padding: 1rem;
  }
}

/* ========================================
   COMPOSANTS D'AUTHENTIFICATION
   ======================================== */

/* Password Requirements List */
.fb-password-requirements {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
}

.fb-requirements-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.fb-requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fb-req-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  font-size: 0.8rem;
  color: #9ca3af;
  transition: color var(--fb-transition-fast);
}

.fb-req-item i {
  font-size: 0.7rem;
}

.fb-req-item.fb-req-valid {
  color: #10b981;
}

.fb-req-item.fb-req-valid i {
  color: #10b981;
}

/* Password Strength Bar */
.fb-strength-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.fb-strength-progress {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.fb-strength-progress.fb-strength-danger {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.fb-strength-progress.fb-strength-warning {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.fb-strength-progress.fb-strength-info {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.fb-strength-progress.fb-strength-primary {
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
}

.fb-strength-progress.fb-strength-success {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

.fb-strength-text {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.375rem;
  font-weight: 500;
}

/* Invalid Feedback */
.fb-invalid-feedback {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.fb-invalid-feedback::before {
  content: '⚠';
  font-size: 0.7rem;
}

.fb-input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Checkbox Flowbite */
.fb-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.fb-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--fb-wine-primary);
  cursor: pointer;
  border-radius: 0.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.fb-checkbox-label {
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  line-height: 1.4;
}

/* Form hints */
.fb-form-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.375rem;
  margin-bottom: 0;
}

.fb-form-hint-warning {
  color: #d97706;
}

/* Input code (pour 2FA) */
.fb-input-code {
  text-align: center;
  font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  font-weight: 600;
}

.fb-input-lg {
  padding: 1rem 1.25rem;
  font-size: 1.25rem;
}

/* ========================================
   CARTES ADMIN MODERNES
   ======================================== */
.fb-admin-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all var(--fb-transition-normal);
}

.fb-admin-card:hover {
  box-shadow: var(--fb-shadow-lg);
  transform: translateY(-2px);
}

.fb-admin-card-header {
  background: var(--fb-gradient-wine);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-admin-card-header h2,
.fb-admin-card-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.fb-admin-card-body {
  padding: 1.5rem;
}

.fb-admin-card-footer {
  padding: 1rem 1.5rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

/* Tool Card (pour maintenance) */
.fb-tool-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  text-align: center;
  transition: all var(--fb-transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.fb-tool-card:hover {
  border-color: var(--fb-wine-primary);
  box-shadow: var(--fb-shadow-md);
  transform: translateY(-2px);
}

.fb-tool-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(114, 47, 55, 0.1);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: var(--fb-wine-primary);
  transition: all var(--fb-transition-normal);
}

.fb-tool-card:hover .fb-tool-icon {
  background: var(--fb-wine-primary);
  color: white;
  transform: scale(1.1);
}

.fb-tool-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.5rem;
}

.fb-tool-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem;
  flex-grow: 1;
}

/* User Table Row */
.fb-user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fb-user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--fb-gradient-wine);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.fb-user-info {
  flex: 1;
  min-width: 0;
}

.fb-user-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fb-user-email {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action Buttons Group */
.fb-action-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.fb-action-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--fb-transition-fast);
  background: #f3f4f6;
  color: #6b7280;
}

.fb-action-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.fb-action-btn.fb-action-edit:hover {
  background: #dbeafe;
  color: #2563eb;
}

.fb-action-btn.fb-action-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.fb-action-btn.fb-action-view:hover {
  background: #d1fae5;
  color: #059669;
}

/* ========================================
   CONSEILS CARDS
   ======================================== */
.fb-conseil-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--fb-shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all var(--fb-transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.fb-conseil-image {
  height: 180px;
  background: var(--fb-gradient-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.fb-conseil-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.fb-conseil-image i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.8);
  z-index: 1;
}

.fb-conseil-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.fb-conseil-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.75rem;
}

.fb-conseil-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem;
  flex-grow: 1;
  line-height: 1.6;
}

.fb-conseil-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fb-wine-primary);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--fb-transition-fast);
}

.fb-conseil-link:hover {
  gap: 0.75rem;
  color: var(--fb-wine-dark);
}

/* Collapsible Sections */
.fb-collapse-section {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
  overflow: hidden;
}

.fb-collapse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #f9fafb;
  cursor: pointer;
  transition: all var(--fb-transition-fast);
  border: none;
  width: 100%;
  text-align: left;
}

.fb-collapse-header:hover {
  background: #f3f4f6;
}

.fb-collapse-title {
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fb-collapse-title i {
  color: var(--fb-wine-primary);
}

.fb-collapse-icon {
  transition: transform var(--fb-transition-normal);
  color: #6b7280;
}

.fb-collapse-header[aria-expanded="true"] .fb-collapse-icon {
  transform: rotate(180deg);
}

.fb-collapse-body {
  padding: 1.25rem;
  border-top: 1px solid #e5e7eb;
}

/* Wine List Item (pour conseils) */
.fb-wine-list-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  margin-bottom: 0.5rem;
  transition: all var(--fb-transition-fast);
}

.fb-wine-list-item:hover {
  background: #f3f4f6;
}

.fb-wine-list-item:last-child {
  margin-bottom: 0;
}

.fb-wine-color-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.fb-wine-list-info {
  flex: 1;
  min-width: 0;
}

.fb-wine-list-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.fb-wine-list-meta {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.fb-wine-list-action {
  margin-left: 1rem;
}

/* ========================================
   PAGE HEADER
   ======================================== */
.fb-page-header {
  margin-bottom: 1.5rem;
}

.fb-page-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.fb-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fb-page-title i {
  color: var(--fb-wine-primary);
}

.fb-page-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0 0 0;
}

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

/* ========================================
   BOUTONS ADDITIONNELS
   ======================================== */
.fb-btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.fb-btn-outline {
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.fb-btn-outline:hover {
  background: #f3f4f6;
  color: var(--fb-wine-primary);
  border-color: var(--fb-wine-primary);
}

.fb-btn-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  color: white;
  border: none;
}

.fb-btn-secondary:hover {
  background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
  color: white;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .fb-page-header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .fb-page-actions {
    width: 100%;
  }

  .fb-page-actions .fb-btn {
    flex: 1;
  }
}

/* ========================================
   MODULE CONSEILS - STYLES SPÉCIFIQUES
   ======================================== */

/* Headers colorés des pages conseils */
.fb-conseil-header {
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

.fb-conseil-header h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fb-conseil-header p {
  opacity: 0.9;
  margin-bottom: 0;
}

/* Variantes de gradients pour les headers */
.fb-conseil-header.purple { background: var(--fb-gradient-premium); }
.fb-conseil-header.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.fb-conseil-header.pink { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.fb-conseil-header.blue { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.fb-conseil-header.coral { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.fb-conseil-header.pastel { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }

/* Cartes conseils (hub) */
.fb-conseil-card {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  transition: all var(--fb-transition-slow);
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.fb-conseil-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--fb-shadow-xl);
  text-decoration: none;
  color: inherit;
}

.fb-conseil-card-header {
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.fb-conseil-card-header.recherche { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.fb-conseil-card-header.racheter { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.fb-conseil-card-header.boire { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.fb-conseil-card-header.accords { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.fb-conseil-card-header.stats { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }

.fb-conseil-card-header i {
  font-size: 3rem;
  color: white;
  margin-bottom: 0.5rem;
}

.fb-conseil-card-header h3 {
  color: white;
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1.25rem;
}

.fb-conseil-card-body {
  padding: 1.5rem;
}

.fb-conseil-card-body p {
  color: #6b7280;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.fb-conseil-card-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fb-conseil-card-body ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  color: #4b5563;
  font-size: 0.9rem;
}

.fb-conseil-card-body ul li:last-child {
  border-bottom: none;
}

.fb-conseil-card-body ul li i {
  width: 20px;
  color: #9ca3af;
  margin-right: 0.5rem;
}

/* Badge d'alerte sur les cartes conseils */
.fb-conseil-badge-alert {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* Quick stats (conseils index) */
.fb-quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.fb-quick-stat {
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: var(--fb-shadow-sm);
}

.fb-quick-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--fb-wine-primary);
}

.fb-quick-stat-label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.fb-quick-stat.alert .fb-quick-stat-value { color: #dc3545; }
.fb-quick-stat.warning .fb-quick-stat-value { color: #f59e0b; }
.fb-quick-stat.success .fb-quick-stat-value { color: #10b981; }

/* Navigation onglets conseils */
.fb-conseils-tabs {
  margin-bottom: 1.5rem;
  border-bottom: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fb-conseils-tab {
  border: none;
  color: #6b7280;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all var(--fb-transition-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.fb-conseils-tab:hover {
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
}

.fb-conseils-tab.active {
  background: var(--fb-gradient-wine);
  color: white;
}

.fb-conseils-tab.green.active { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.fb-conseils-tab.pink.active { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

/* Formulaire de recherche conseils */
.fb-search-form {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  margin-bottom: 2rem;
}

/* Carte résultat recherche */
.fb-result-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: var(--fb-shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all var(--fb-transition-normal);
}

.fb-result-card:hover {
  box-shadow: var(--fb-shadow-md);
}

.fb-result-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.fb-result-header .color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 0.75rem;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.fb-result-header .vin-name {
  font-weight: 600;
  color: #111827;
  flex-grow: 1;
}

.fb-result-header .vin-name a {
  color: inherit;
  text-decoration: none;
}

.fb-result-header .vin-name a:hover {
  color: var(--fb-wine-primary);
}

.fb-result-header .vin-millesime {
  color: #9ca3af;
  font-size: 0.9rem;
}

.fb-result-header .note-badge {
  background: var(--fb-gradient-premium);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 1rem;
}

.fb-result-body {
  padding: 1rem 1.25rem;
}

.fb-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.fb-result-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fb-result-meta i {
  color: #9ca3af;
}

.fb-result-content p {
  margin-bottom: 0.5rem;
  color: #4b5563;
}

.fb-result-content .label {
  font-weight: 600;
  color: #111827;
  margin-right: 0.5rem;
}

.fb-highlight {
  background: #fef3c7;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

/* Grille convives */
.fb-convive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.fb-convive-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: var(--fb-shadow-sm);
  transition: all var(--fb-transition-normal);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fb-convive-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--fb-shadow-md);
  text-decoration: none;
  color: inherit;
}

.fb-convive-card.active {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.fb-convive-card .name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fb-convive-card .count {
  background: rgba(0,0,0,0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.fb-convive-card.active .count {
  background: rgba(255,255,255,0.2);
}

/* Sélecteur de période */
.fb-periode-selector {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--fb-shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.fb-periode-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 2rem;
  color: #6b7280;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--fb-transition-normal);
}

.fb-periode-btn:hover {
  border-color: var(--fb-wine-primary);
  color: var(--fb-wine-primary);
  text-decoration: none;
}

.fb-periode-btn.active {
  background: var(--fb-gradient-wine);
  border-color: transparent;
  color: white;
}

/* Stats cartes compactes (timeline) */
.fb-stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.fb-stat-card-compact {
  background: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--fb-shadow-sm);
  text-align: center;
}

.fb-stat-card-compact .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fb-wine-primary);
  line-height: 1;
}

.fb-stat-card-compact .label {
  color: #9ca3af;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Top vins liste */
.fb-top-vins-list {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  overflow: hidden;
  margin-bottom: 2rem;
}

.fb-top-vin-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--fb-transition-fast);
}

.fb-top-vin-item:last-child {
  border-bottom: none;
}

.fb-top-vin-item:hover {
  background: #f9fafb;
}

.fb-top-vin-rank {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 1rem;
  font-size: 1rem;
}

.fb-top-vin-rank.rank-1 { background: linear-gradient(135deg, #FFD700, #FFA500); color: white; }
.fb-top-vin-rank.rank-2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: white; }
.fb-top-vin-rank.rank-3 { background: linear-gradient(135deg, #CD7F32, #8B4513); color: white; }
.fb-top-vin-rank.rank-other { background: #e5e7eb; color: #6b7280; }

.fb-top-vin-info {
  flex-grow: 1;
}

.fb-top-vin-info .vin-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.fb-top-vin-info .vin-name a {
  color: inherit;
  text-decoration: none;
}

.fb-top-vin-info .vin-name a:hover {
  color: var(--fb-wine-primary);
}

.fb-top-vin-info .vin-meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

.fb-top-vin-stats {
  display: flex;
  gap: 1.5rem;
  text-align: center;
}

.fb-top-vin-stats .stat {
  min-width: 60px;
}

.fb-top-vin-stats .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fb-wine-primary);
}

.fb-top-vin-stats .stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Graphique simple en barres CSS */
.fb-chart-container {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--fb-shadow-md);
}

.fb-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 200px;
  padding-top: 1rem;
}

.fb-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.fb-bar {
  width: 100%;
  max-width: 40px;
  background: var(--fb-gradient-wine);
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  position: relative;
}

.fb-bar:hover {
  opacity: 0.8;
}

.fb-bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
}

.fb-bar-label {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  max-height: 60px;
  overflow: hidden;
}

/* Sélection plats (accords mets-vins) */
.fb-plat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.fb-plat-option {
  position: relative;
}

.fb-plat-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.fb-plat-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--fb-transition-normal);
  text-align: center;
}

.fb-plat-option label:hover {
  border-color: var(--fb-wine-primary);
  background: #fff5f7;
}

.fb-plat-option input:checked + label {
  background: var(--fb-gradient-wine);
  border-color: transparent;
  color: white;
}

.fb-plat-option label i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.fb-plat-option label span {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Menu selector (accords) */
.fb-menu-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.fb-menu-item {
  flex: 1;
  min-width: 250px;
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: var(--fb-shadow-sm);
}

.fb-menu-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fb-menu-item h4 .numero {
  width: 24px;
  height: 24px;
  background: var(--fb-gradient-wine);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* Suggestions vins (accords) */
.fb-suggestion-section {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.fb-suggestion-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(90deg, rgba(114, 47, 55, 0.1), transparent);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fb-suggestion-header i {
  font-size: 1.5rem;
  color: var(--fb-wine-primary);
}

.fb-suggestion-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
}

.fb-suggestion-body {
  padding: 1rem;
}

.fb-vin-suggestion {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: all var(--fb-transition-fast);
}

.fb-vin-suggestion:hover {
  background: #f3f4f6;
}

.fb-vin-suggestion:last-child {
  margin-bottom: 0;
}

.fb-vin-rank {
  width: 30px;
  height: 30px;
  background: var(--fb-gradient-wine);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.fb-vin-info {
  flex-grow: 1;
}

.fb-vin-info .vin-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.fb-vin-info .vin-name a {
  color: inherit;
  text-decoration: none;
}

.fb-vin-info .vin-name a:hover {
  color: var(--fb-wine-primary);
}

.fb-vin-info .vin-meta {
  font-size: 0.85rem;
  color: #9ca3af;
}

.fb-vin-info .vin-accord {
  font-size: 0.8rem;
  color: #10b981;
  margin-top: 0.25rem;
}

.fb-vin-info .vin-accord i {
  margin-right: 0.25rem;
}

.fb-vin-badges {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.fb-badge-apogee {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.fb-badge-apogee.optimal { background: #10b981; color: white; }
.fb-badge-apogee.pret { background: #0ea5e9; color: white; }

.fb-badge-note {
  padding: 0.25rem 0.5rem;
  background: #fbbf24;
  color: #111827;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.fb-badge-stock {
  padding: 0.25rem 0.5rem;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 0.5rem;
  font-size: 0.75rem;
}

/* Statistiques bars horizontales */
.fb-bar-chart-horizontal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fb-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fb-bar-row .bar-label {
  width: 120px;
  font-size: 0.9rem;
  color: #4b5563;
  text-align: right;
  flex-shrink: 0;
}

.fb-bar-row .bar-container {
  flex-grow: 1;
  height: 24px;
  background: #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
}

.fb-bar-row .bar-fill {
  height: 100%;
  border-radius: 0.5rem;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
}

.fb-bar-row .bar-fill span {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.2);
}

.fb-bar-row .bar-value {
  width: 60px;
  text-align: right;
  font-size: 0.85rem;
  color: #6b7280;
  flex-shrink: 0;
}

/* Liste régions top */
.fb-region-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fb-region-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  transition: background var(--fb-transition-fast);
}

.fb-region-item:hover {
  background: #f3f4f6;
}

.fb-region-rank {
  width: 28px;
  height: 28px;
  background: var(--fb-gradient-premium);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.fb-region-info {
  flex-grow: 1;
}

.fb-region-name {
  font-weight: 600;
  color: #111827;
}

.fb-region-stats {
  font-size: 0.8rem;
  color: #9ca3af;
}

.fb-region-note {
  text-align: center;
  min-width: 50px;
}

.fb-region-note .value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fb-wine-primary);
}

.fb-region-note .label {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* Grille tendances */
.fb-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.fb-trend-cell {
  padding: 0.5rem;
  text-align: center;
  border-radius: 0.5rem;
  font-size: 0.75rem;
}

.fb-trend-cell .month {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.fb-trend-cell .count {
  font-size: 1rem;
  font-weight: 700;
}

/* Vins à racheter - items */
.fb-vin-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #f9fafb;
  margin-bottom: 0.75rem;
  transition: all var(--fb-transition-fast);
}

.fb-vin-item:hover {
  background: #f3f4f6;
}

.fb-vin-item:last-child {
  margin-bottom: 0;
}

.fb-vin-note {
  text-align: center;
  min-width: 60px;
}

.fb-vin-note .note-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fb-wine-primary);
}

.fb-vin-note .note-label {
  font-size: 0.75rem;
  color: #9ca3af;
}

.fb-vin-actions {
  margin-left: 1rem;
}

/* Badges priorité */
.fb-priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.fb-priority-haute { background: #dc3545; color: white; }
.fb-priority-moyenne { background: #f59e0b; color: #111827; }
.fb-priority-basse { background: #6b7280; color: white; }

/* Alerte stock */
.fb-stock-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fef3c7;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: #92400e;
}

/* Carte millésime */
.fb-millesime-card {
  background: var(--fb-gradient-premium);
  color: white;
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
  margin-bottom: 0.75rem;
}

.fb-millesime-card .year {
  font-size: 1.5rem;
  font-weight: 700;
}

.fb-millesime-card .note {
  font-size: 0.9rem;
  opacity: 0.9;
}

.fb-millesime-card .count {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Item souhait */
.fb-souhait-item {
  background: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.fb-souhait-item .souhait-name {
  font-weight: 600;
  color: #111827;
}

.fb-souhait-item .souhait-desc {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Vins à boire - stats row */
.fb-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.fb-stat-card-status {
  background: white;
  padding: 1.25rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: var(--fb-shadow-sm);
  transition: transform var(--fb-transition-normal);
}

.fb-stat-card-status:hover {
  transform: translateY(-3px);
}

.fb-stat-card-status .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.fb-stat-card-status .value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.fb-stat-card-status .label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

.fb-stat-card-status.urgent { border-left: 4px solid #dc3545; }
.fb-stat-card-status.urgent .icon, .fb-stat-card-status.urgent .value { color: #dc3545; }

.fb-stat-card-status.apogee { border-left: 4px solid #f59e0b; }
.fb-stat-card-status.apogee .icon, .fb-stat-card-status.apogee .value { color: #d97706; }

.fb-stat-card-status.pret { border-left: 4px solid #10b981; }
.fb-stat-card-status.pret .icon, .fb-stat-card-status.pret .value { color: #10b981; }

.fb-stat-card-status.fin-garde { border-left: 4px solid #f97316; }
.fb-stat-card-status.fin-garde .icon, .fb-stat-card-status.fin-garde .value { color: #f97316; }

.fb-stat-card-status.jeune { border-left: 4px solid #0ea5e9; }
.fb-stat-card-status.jeune .icon, .fb-stat-card-status.jeune .value { color: #0ea5e9; }

/* Section collapsible colorée (a-boire) */
.fb-section-collapsible {
  background: white;
  border-radius: 1rem;
  box-shadow: var(--fb-shadow-md);
  margin-bottom: 2rem;
  overflow: hidden;
}

.fb-section-collapsible-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: opacity var(--fb-transition-fast);
}

.fb-section-collapsible-header:hover {
  opacity: 0.95;
}

.fb-section-collapsible-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.fb-section-collapsible-header h3 i {
  color: white;
}

.fb-section-collapsible-header .toggle-icon {
  transition: transform var(--fb-transition-normal);
}

.fb-section-collapsible-header.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

.fb-section-collapsible-header.urgent { background: linear-gradient(90deg, #dc3545 0%, #fecaca 100%); }
.fb-section-collapsible-header.urgent .toggle-icon { color: #7f1d1d; }
.fb-section-collapsible-header.urgent .fb-badge { background: white !important; color: #dc3545 !important; }

.fb-section-collapsible-header.apogee { background: linear-gradient(90deg, #d97706 0%, #fef3c7 100%); }
.fb-section-collapsible-header.apogee .toggle-icon { color: #78350f; }
.fb-section-collapsible-header.apogee .fb-badge { background: white !important; color: #d97706 !important; }

.fb-section-collapsible-header.pret { background: linear-gradient(90deg, #10b981 0%, #d1fae5 100%); }
.fb-section-collapsible-header.pret .toggle-icon { color: #064e3b; }
.fb-section-collapsible-header.pret .fb-badge { background: white !important; color: #10b981 !important; }

.fb-section-collapsible-header.fin-garde { background: linear-gradient(90deg, #f97316 0%, #ffedd5 100%); }
.fb-section-collapsible-header.fin-garde .toggle-icon { color: #7c2d12; }
.fb-section-collapsible-header.fin-garde .fb-badge { background: white !important; color: #f97316 !important; }

.fb-section-collapsible-header.jeune { background: linear-gradient(90deg, #0ea5e9 0%, #e0f2fe 100%); }
.fb-section-collapsible-header.jeune .toggle-icon { color: #0c4a6e; }
.fb-section-collapsible-header.jeune .fb-badge { background: white !important; color: #0ea5e9 !important; }

.fb-section-collapsible-body {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

/* Table vins apogée */
.fb-vin-table {
  width: 100%;
}

.fb-vin-table th {
  font-size: 0.8rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.fb-vin-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.fb-vin-table tr:last-child td {
  border-bottom: none;
}

.fb-vin-table tr:hover {
  background: #f9fafb;
}

.fb-vin-name {
  font-weight: 600;
  color: #111827;
}

.fb-vin-name a {
  color: inherit;
  text-decoration: none;
}

.fb-vin-name a:hover {
  color: var(--fb-wine-primary);
}

.fb-apogee-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.fb-apogee-badge.urgent { background: #dc3545; color: white; }
.fb-apogee-badge.apogee { background: #f59e0b; color: #111827; }
.fb-apogee-badge.pret { background: #10b981; color: white; }
.fb-apogee-badge.fin-garde { background: #f97316; color: white; }
.fb-apogee-badge.jeune { background: #0ea5e9; color: white; }

.fb-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.85rem;
}

.fb-note-stars {
  color: #f59e0b;
}

.fb-fenetre-garde {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Color dot générique */
.fb-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Info box */
.fb-info-box {
  background: #eff6ff;
  border-left: 4px solid #0ea5e9;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.fb-info-box i {
  color: #0ea5e9;
  margin-right: 0.5rem;
}

/* Responsive conseils */
@media (max-width: 768px) {
  .fb-conseil-header {
    padding: 1.5rem;
  }

  .fb-conseil-header h1 {
    font-size: 1.5rem;
  }

  .fb-conseils-tabs {
    flex-direction: column;
  }

  .fb-conseils-tab {
    width: 100%;
    justify-content: center;
  }

  .fb-menu-selector {
    flex-direction: column;
  }

  .fb-menu-item {
    min-width: auto;
  }

  .fb-top-vin-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .fb-vin-badges {
    flex-wrap: wrap;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
