/* ==================== CONTENT TABS (AFTER HEADER) ==================== */
/* CRITICAL FOR SAFARI: États gérés par classes CSS uniquement */

/* Fixed Header Section (toujours visible) */
.content-header-fixed {
  flex-shrink: 0;
  text-align: right;
  padding: 1.75rem 2rem 0.5rem 0;
  background: #DFE9F1;
  border-bottom: 1px solid #e2e8f0;
}

.content-header-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.875rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.125rem 0;
  letter-spacing: -0.02em;
}

.content-header-title .greeting-text {
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  color: #555555;
}

.content-header-title .name-highlight {
  color: #BC7F40;
  font-weight: 700;
}

.content-header-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  color: #6392B9;
  margin: 0;
  font-weight: 700;
}

/* Tabs Container */
.content-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  margin: 0;
  padding: 0.375rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
  border-radius: 0;
  border-bottom: 1px solid #e2e8f0;
  -webkit-overflow-scrolling: touch;
}

.content-tabs::-webkit-scrollbar {
  height: 6px;
}

.content-tabs::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.content-tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.content-tabs::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.content-tab {
  flex: 0 0 auto;
  min-width: fit-content;
  padding: 0.625rem 1rem;
  text-align: center;
  background: #ffffff;
  color: #5494BD;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
}

.content-tab:hover {
  background: #eff6ff;
  color: #5BACDE;
  border-color: #D4E2EC;
  transform: translateY(-1px);
}

.content-tab.active {
  background: #6FC0F2;
  color: #ffffff;
  border-color: #6FC0F2;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

/* Dynamic Content Area */
.tab-dynamic-content {
  /* CRITICAL FOR SAFARI: Pas de manipulation flex inline */
  padding: 0;
  background: transparent;
}

.tab-panel {
  /* CRITICAL FOR SAFARI: Display géré par classes uniquement */
  display: none !important;
  /* Prevent browser hash scroll from hiding header */
  scroll-margin-top: 250px;
}

.tab-panel.active {
  display: block !important;
  animation: fadeInContent 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
  .content-header-fixed {
    padding: 2rem 1rem 1.25rem 1rem;
  }

  .content-header-title {
    font-size: 2rem;
  }

  .content-header-subtitle {
    font-size: 0.9375rem;
  }

  .content-tabs {
    gap: 0.375rem;
    padding: 0.375rem;
    overflow-x: scroll;
  }

  .content-tab {
    padding: 0.75rem 1.125rem;
    font-size: 0.875rem;
    min-width: auto;
    flex: 0 0 auto;
    font-weight: 500;
  }

  .tab-dynamic-content {
    padding: 1.5rem 0;
  }
}

/* NEW Badge */
.new-badge {
  display: inline-block;
  background: linear-gradient(135deg, #C9714B 0%, #B5633F 100%);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  margin-left: 0.375rem;
  vertical-align: middle;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(201, 113, 75, 0.3);
  animation: pulse-new 2s ease-in-out infinite;
}

.content-tab.active .new-badge {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  color: #C9714B;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-new {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 4px rgba(201, 113, 75, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(201, 113, 75, 0.5);
  }
}
