/* ═══════════════════════════════════════════════
   A-T-E Conseil – Landing Page Styles
   Palette: Navy (#0F2240) & Gold (#C9A84C) — PAC Design System
   ═══════════════════════════════════════════════ */

/* ── Base ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: #FAF7F0;
  color: #0F2240;
}

/* ── Typography ── */
.serif {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144;
}

.display {
  font-family: 'Fraunces', serif;
  font-variation-settings: "opsz" 144;
  font-weight: 700;
  line-height: 1.1;
}

/* ── Gov Stripe (tricolor bar) ── */
.gov-stripe {
  height: 3px;
  background: linear-gradient(to right, #002395 33.33%, #fff 33.33%, #fff 66.66%, #ED2939 66.66%);
}

/* ── Animations ── */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; transform: translateX(0) rotate(var(--rotate, 0deg)); }
  50% { opacity: 0.6; transform: translateX(4px) rotate(var(--rotate, 0deg)); }
}

@keyframes scale-up {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes score-count {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes check-in {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(201, 168, 76, 0); }
}

.ring-pulse {
  animation: ring-pulse 2.4s ease-out infinite;
}

.animate-pulse-slow {
  --rotate: 90deg;
  animation: pulse-slow 2s ease-in-out infinite;
}

.animate-scale-up {
  animation: scale-up 0.4s ease-out;
}

.animate-fade-in-up {
  animation: fade-in-up 0.5s ease-out forwards;
}

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

/* ── Shimmer overlay for urgency banner ── */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

/* ── Processing Spinner ── */
.processing-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid #E5E7EB;
  border-top-color: #C9A84C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ── Processing Dots ── */
.processing-dots {
  display: inline-flex;
  gap: 6px;
}

.processing-dots span {
  width: 8px;
  height: 8px;
  background-color: #C9A84C;
  border-radius: 50%;
  animation: dot-pulse 1.4s ease-in-out infinite;
}

.processing-dots span:nth-child(2) { animation-delay: 0.2s; }
.processing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ── Hero Background ── */
.hero-bg {
  background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.08) 0%, transparent 60%), #FAF7F0;
}

/* ── CTA Button (legacy compatibility) ── */
.cta-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.cta-button:hover::after {
  left: 100%;
}

/* ── 3D Gold Button (PAC style) ── */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #D4B96A 0%, #C9A84C 100%);
  color: #0F2240;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  box-shadow: 0 6px 0 -1px #8f7027, 0 12px 24px -8px rgba(143, 112, 39, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 -1px #8f7027, 0 18px 30px -8px rgba(143, 112, 39, 0.55);
}

.btn-gold:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 -1px #8f7027, 0 6px 14px -8px rgba(143, 112, 39, 0.4);
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.5s;
}

.btn-gold:hover::after {
  left: 100%;
}

/* ── Quiz Option Buttons (PAC .opt style) ── */
.opt {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 56px;
  padding: 0.85rem 1.15rem;
  border: 2px solid rgba(15, 34, 64, 0.15);
  border-radius: 0.75rem;
  background: #FAF7F0;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0F2240;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(15, 34, 64, 0.06);
}

.opt:hover {
  border-color: #C9A84C;
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(15, 34, 64, 0.12);
}

.opt.selected {
  border-color: #0F2240;
  background-color: #0F2240;
  color: white;
  box-shadow: 0 4px 12px -2px rgba(15, 34, 64, 0.3);
}

.opt .bullet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(15, 34, 64, 0.25);
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.opt:hover .bullet {
  border-color: #C9A84C;
}

.opt.selected .bullet {
  border-color: #C9A84C;
  background-color: #C9A84C;
}

.opt.selected .bullet::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

/* Color-coded quiz options (still supported) */
.opt--green {
  border-color: #d1fae5 !important;
  background-color: rgba(58, 139, 92, 0.04);
}
.opt--green:hover {
  border-color: #3A8B5C !important;
  background-color: rgba(58, 139, 92, 0.08) !important;
}
.opt--green.selected {
  background-color: #3A8B5C !important;
  border-color: #3A8B5C !important;
  color: white;
}
.opt--red {
  border-color: #fecaca !important;
  background-color: rgba(239, 68, 68, 0.04);
}
.opt--red:hover {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
}
.opt--red.selected {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: white;
}

/* ── Progress Pips (PAC .pip style) ── */
.pip {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #E5E7EB;
  transition: all 0.3s ease;
}

.pip.done {
  background-color: #C9A84C;
}

.pip.active {
  width: 24px;
  background-color: #0F2240;
}

/* ── Legacy quiz-option (kept for compatibility) ── */
.quiz-option {
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px 20px;
  background: white;
  text-align: left;
  width: 100%;
  font-size: 0.95rem;
  color: #374151;
}

.quiz-option:hover {
  border-color: #0F2240;
  background-color: rgba(15, 34, 64, 0.04);
  transform: translateY(-1px);
}

.quiz-option.selected {
  border-color: #0F2240;
  background-color: rgba(15, 34, 64, 0.06);
  font-weight: 600;
}

.quiz-option .option-check {
  display: none;
}

.quiz-option.selected .option-check {
  display: flex;
}

/* ── Commitment Options ── */
.commitment-option {
  cursor: pointer;
  transition: all 0.2s ease;
}

.commitment-option.selected {
  border-color: #0F2240 !important;
  background-color: rgba(15, 34, 64, 0.06) !important;
}

/* ── FAQ ── */
.faq-item {
  transition: all 0.2s ease;
}

.faq-item.faq-open {
  border-left: 3px solid #C9A84C;
}

.faq-arrow {
  transition: transform 0.3s ease;
}

.faq-arrow.rotated {
  transform: rotate(180deg);
}

/* ── Score Ring ── */
.score-ring circle {
  transition: stroke-dashoffset 1.5s ease-out;
}

/* ── Form Inputs ── */
.form-input {
  font-size: 16px; /* ≥16px prevents iOS Safari auto-zoom on focus */
}
.form-input:focus {
  border-color: #0F2240;
  box-shadow: 0 0 0 3px rgba(15, 34, 64, 0.12);
}

/* ── Feedback Messages ── */
.feedback-msg {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-in-up 0.5s ease-out forwards;
}

.feedback-msg:nth-child(1) { animation-delay: 0s; }
.feedback-msg:nth-child(2) { animation-delay: 0.5s; }
.feedback-msg:nth-child(3) { animation-delay: 1.0s; }
.feedback-msg:nth-child(4) { animation-delay: 1.5s; }

/* ── Sticky CTA ── */
#sticky-cta.visible {
  transform: translateY(0);
}

/* Mobile: white bar */
@media (max-width: 767px) {
  #sticky-cta {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid #E5E7EB;
  }
}

/* Desktop: navy gradient with gold border-top */
@media (min-width: 768px) {
  #sticky-cta {
    background: linear-gradient(180deg, #0F2240 0%, #1a3355 100%);
    border-top: 2px solid #C9A84C;
  }
  #sticky-cta button {
    background: linear-gradient(180deg, #D4B96A 0%, #C9A84C 100%);
    color: #0F2240;
  }
  #sticky-cta p {
    color: rgba(255, 255, 255, 0.6) !important;
  }
}

/* ── Intersection Observer animations ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Staggered reveal items ── */
.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Card hover lift ── */
.card-lift {
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -12px rgba(15, 34, 64, 0.18);
}

/* ── Smooth FAQ accordion (grid-rows technique) ── */
.faq-answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-answer-wrap.open {
  grid-template-rows: 1fr;
}

.faq-answer-wrap > div {
  overflow: hidden;
}

/* ── 3D press CTA button (legacy) ── */
.cta-3d {
  box-shadow: 0 6px 0 -1px #8f7027, 0 12px 24px -8px rgba(143, 112, 39, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.cta-3d:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 -1px #8f7027, 0 18px 30px -8px rgba(143, 112, 39, 0.55);
}

.cta-3d:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 -1px #8f7027, 0 6px 14px -8px rgba(143, 112, 39, 0.4);
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .animate-pulse-slow {
    --rotate: 0deg;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── Selection ── */
::selection {
  background-color: rgba(15, 34, 64, 0.2);
  color: #0F2240;
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FAF7F0;
}

::-webkit-scrollbar-thumb {
  background: #C4CDD5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9AA5B4;
}

/* ── Lightbox ── */
#lightbox {
  animation: fade-in-up 0.2s ease-out;
}

#lightbox img {
  animation: scale-up 0.3s ease-out;
}

/* ── WhatsApp Floating Button ── */
#whatsapp-btn:not(.hidden) {
  animation: whatsapp-appear 0.5s ease-out, whatsapp-pulse 3s ease-in-out 0.5s infinite;
}

@keyframes whatsapp-appear {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.7); }
}

/* ── Cookie Banner entrance ── */
#cookie-banner {
  animation: slide-up 0.4s ease-out;
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── CTA Glow Pulse ── */
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 6px 0 -1px #8f7027, 0 12px 24px -8px rgba(143, 112, 39, 0.45); }
  50% { box-shadow: 0 6px 0 -1px #8f7027, 0 12px 32px -4px rgba(201, 168, 76, 0.6), 0 0 8px rgba(201, 168, 76, 0.2); }
}

.cta-glow {
  animation: cta-glow 3s ease-in-out infinite;
}

/* ── Live Score Bar in Quiz ── */
.live-score-bar {
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-score-bump {
  animation: score-bump 0.4s ease-out;
}

@keyframes score-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ── Blurred Score Preview ── */
.blurred-score {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

/* ── Progress bar pulse on answer ── */
@keyframes progress-pulse {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
  100% { transform: scaleY(1); }
}

.progress-pulse {
  animation: progress-pulse 0.3s ease-out;
}

/* ── Counter animation ── */
.counter-animate {
  display: inline-block;
}

/* ── Color-coded Quiz Options (legacy) ── */
.quiz-option--green {
  border-color: #d1fae5 !important;
  background-color: rgba(58, 139, 92, 0.04);
}
.quiz-option--green:hover {
  border-color: #3A8B5C !important;
  background-color: rgba(58, 139, 92, 0.08) !important;
}
.quiz-option--red {
  border-color: #fecaca !important;
  background-color: rgba(239, 68, 68, 0.04);
}
.quiz-option--red:hover {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
}

/* ── Step Dots (legacy) ── */
#step-dots > div {
  transition: all 0.3s ease;
}

/* ── Quiz back button ── */
.quiz-back-btn {
  transition: all 0.2s ease;
}

.quiz-back-btn:hover {
  background-color: rgba(15, 34, 64, 0.08);
}

/* ── Social Proof Toast ── */
#social-toast.visible {
  transform: translateY(0);
}

/* ── Exit Popup (PAC style) ── */
@keyframes exit-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes exit-pop-in {
  0% { opacity: 0; transform: scale(0.92) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Confetti ── */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg) scale(0.5); }
}

/* ── Michelle Online Indicator ── */
@keyframes online-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(58, 139, 92, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(58, 139, 92, 0); }
}

.online-dot {
  animation: online-pulse 2.5s ease-in-out infinite;
}

/* ── Scarcity badge ── */
@keyframes scarcity-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.scarcity-badge {
  animation: scarcity-flash 3s ease-in-out infinite;
}

/* ── Quiz resume banner ── */
.quiz-resume-banner {
  animation: fade-in-up 0.4s ease-out;
}

/* ── Reviews carousel (mobile) ── */
.snap-x::-webkit-scrollbar {
  display: none;
}
.snap-x {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ── WhatsApp button mobile fix ── */
@media (max-width: 767px) {
  #whatsapp-btn:not(.hidden) {
    bottom: 76px !important;
  }

  #social-toast {
    bottom: 68px;
    left: 8px;
    right: 8px;
    max-width: none;
  }
}

/* ── Pulse dot (for header) ── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}
