/* ============================================================================
   MotorTax — website custom styles
   ============================================================================
   Tailwind handles 99% du styling via CDN play. Ce fichier ne contient que :
   - Smooth scrolling pour les ancres de nav
   - FAQ accordion (open/close avec <details>)
   - Petits ajustements de typographie pour Inter
   - Réduction du flash of unstyled content (FOUC) côté Tailwind CDN
   ============================================================================ */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* FAQ — <details> accordion */
details {
  border-bottom: 1px solid #e5e7eb;
}
details:last-child {
  border-bottom: none;
}
details > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: #0f172a;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: #0b5bd3;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
details[open] > summary::after {
  content: '−';
}
details > .faq-answer {
  padding: 0 0 1.25rem 0;
  color: #475569;
  line-height: 1.65;
}

/* Lang toggle — visual only for v1 */
.lang-toggle button {
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-toggle button.active {
  background-color: #eff4fe;
  color: #0b5bd3;
}
.lang-toggle button:hover:not(.active) {
  background-color: #f1f5f9;
}

/* Prose for Privacy + Terms pages */
.prose-mt {
  color: #334155;
  line-height: 1.75;
  font-size: 1rem;
}
.prose-mt h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 5rem;
}
.prose-mt h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}
.prose-mt p {
  margin-bottom: 1rem;
}
.prose-mt ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose-mt ul li {
  margin-bottom: 0.5rem;
}
.prose-mt strong {
  color: #0f172a;
  font-weight: 600;
}
.prose-mt a {
  color: #0b5bd3;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose-mt a:hover {
  color: #0a2e6e;
}

/* Phone mockup floating animation (Hero section) */
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.phone-float {
  animation: phoneFloat 6s ease-in-out infinite;
  will-change: transform;
}

/* Mobile-first refinements */
@media (max-width: 640px) {
  details > summary {
    padding: 1rem 0;
    font-size: 0.95rem;
  }
  /* Disable phone float on mobile to save battery */
  .phone-float {
    animation: none;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
