/* Custom styles - complementary to Tailwind CSS */
/* Les valeurs variables (couleurs, formes) sont injectees
   via les variables CSS :root definies dans base.html */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Anti-aliasing global */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hero section gradient overlay (couleur injectee par theme) */
.hero-overlay {
  background: var(--hero-gradient, linear-gradient(135deg, rgba(30,58,95,0.9) 0%, rgba(37,99,235,0.7) 100%));
}

/* Trust bar subtle animation */
.trust-badge {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.trust-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Service cards */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Pricing cards */
.pricing-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card.featured {
  transform: scale(1.05);
  border-color: var(--color-primary, #2563EB);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}
.pricing-card.featured:hover {
  transform: scale(1.05) translateY(-4px);
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid #E5E7EB;
}
.faq-question {
  cursor: pointer;
  user-select: none;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.active .faq-answer {
  max-height: 500px;
}
.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}
.faq-chevron {
  transition: transform 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}

/* Navigation dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.nav-dropdown.show,
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Testimonial cards */
.testimonial-card {
  transition: transform 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-2px);
}

/* Blog post cards */
.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Form styles */
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  border-color: var(--color-primary, #2563EB);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 37, 99, 235), 0.1);
}
.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* CTA button pulse animation */
.btn-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb, 37, 99, 235), 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(var(--color-primary-rgb, 37, 99, 235), 0); }
}

/* Breadcrumb separator */
.breadcrumb-sep::before {
  content: '/';
  margin: 0 0.5rem;
  color: #9CA3AF;
}

/* Step process line */
.step-line {
  position: absolute;
  top: 20px;
  left: 50%;
  width: calc(100% - 40px);
  height: 2px;
  background: #E5E7EB;
  z-index: 0;
}

/* Formes dynamiques par theme */
/* Boutons principaux */
a[href="/devis.html"].bg-primary,
a[href="/devis.html"].bg-white,
a[href^="tel:"].bg-white\/10,
button[type="submit"],
.btn {
  border-radius: var(--btn-radius, 0.5rem) !important;
}

/* Cartes services, temoignages, pricing */
.service-card,
.testimonial-card,
.pricing-card,
.trust-badge {
  border-radius: var(--card-radius, 0.75rem) !important;
}

/* Back to top button */
.back-to-top {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Star rating */
.star-rating {
  color: #F59E0B;
}
