:root {
  --card-radius: 1rem;
}

body {
  background: var(--bs-body-bg);
}

/* HERO avec vidéo de fond optionnelle */
.hero {
  position: relative;
  overflow: clip;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(110%) contrast(105%);
  opacity: 0.35;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(1200px 600px at 90% 0%, rgba(16, 185, 129, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Désactiver la vidéo (optionnel) en ajoutant la classe .hero--no-video au header */
.hero.hero--no-video .hero-bg {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .hero-bg video {
    opacity: 0.28;
  }
}

/* Cartes style "glass" moderne */
.card-glass {
  background: rgba(var(--bs-body-bg-rgb), 0.6);
  backdrop-filter: saturate(130%) blur(6px);
  -webkit-backdrop-filter: saturate(130%) blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-radius: var(--card-radius);
}

/* Chips/KPIs */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--bs-body-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

/* Index matières sticky */
.index-sticky {
  position: sticky;
  top: 0.5rem;
  z-index: 2;
  background: linear-gradient(180deg, rgba(var(--bs-body-bg-rgb), 0.95) 0, rgba(var(--bs-body-bg-rgb), 0.85) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Tables */
.table thead th {
  position: sticky;
  top: 0;
  background: var(--bs-body-bg);
  z-index: 1;
}

.table-hover tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Thumbs */
.ratio-thumb {
  border-radius: 0.75rem;
  overflow: hidden;
}

/* Titres de section */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.section-title .subtitle {
  color: var(--bs-secondary-color);
  font-size: 0.95rem;
}

/* Bouton retour haut */
#toTop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1030;
  display: none;
}

/* FAQ Accordion */
.faq-question {
  cursor: pointer;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question:hover,
.faq-question.active {
  color: var(--bs-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  white-space: pre-wrap;
}

.faq-answer.show {
  max-height: 1000px;
  opacity: 1;
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.transition-icon {
  transition: transform 0.3s;
  opacity: 0.5;
}

.faq-question.active .transition-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

/* Warning Badge */
.warning-badge {
  background-color: #ffe4b2;
  color: #856404;
  border: 1px solid #ffd699;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  font-size: 0.7em;
  max-width: 700px;
  white-space: pre-wrap;
}

/* Product Image */
#prodImage {
  width: 100px;
  height: 100px;
  border-radius: 0.75rem;
  object-fit: cover;
}

/* Loading Overlay (couvre toute la page) */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  backdrop-filter: blur(2px);
}

.loading-content {
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Loading Spinner (pour la recherche) */
#searchLoading {
  display: inline-flex;
  align-items: center;
  color: var(--bs-primary);
  font-size: 0.875rem;
}

