@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
}

/* Couleurs personnalisées (au cas où Tailwind config n'est pas chargée) */
.bg-tes-yellow { background-color: #FACC15; }
.text-tes-yellow { color: #FACC15; }
.border-tes-yellow { border-color: #FACC15; }

/* Animations personnalisées utilisées dans les composants */
@keyframes bounce-slow {
  0%, 100% {
    transform: translateY(-5%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

.animate-bounce-slow {
  animation: bounce-slow 3s infinite;
}

/* Polyfill pour les animations tailwindcss-animate si le plugin n'est pas chargé via CDN */
@keyframes enter {
  from {
    opacity: var(--tw-enter-opacity, 1);
    transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), 1) rotate(var(--tw-enter-rotate, 0));
  }
}

.animate-in {
  animation-name: enter;
  animation-duration: 300ms;
  --tw-enter-opacity: initial;
  --tw-enter-scale: initial;
  --tw-enter-rotate: initial;
  --tw-enter-translate-x: initial;
  --tw-enter-translate-y: initial;
}

.fade-in {
  --tw-enter-opacity: 0;
}

.slide-in-from-bottom-4 {
  --tw-enter-translate-y: 1rem;
}

.zoom-in {
  --tw-enter-scale: 0.95;
}

.slide-in-from-top-2 {
  --tw-enter-translate-y: -0.5rem;
}

.slide-in-from-top-4 {
  --tw-enter-translate-y: -1rem;
}

/* Lucide icons sizing helper (the lucide UMD CDN sizes by class size only when explicit) */
[data-lucide] {
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

/* ===================================================================
   Finitions « pro » : apparitions au défilement, survols, progression
   =================================================================== */
html { scroll-behavior: smooth; }
::selection { background: #FACC15; color: #0f172a; }

/* Apparition au défilement (classes posées par app.js, seulement si JS actif) */
.js-reveal .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js-reveal .reveal.reveal-left  { transform: translate3d(-36px, 0, 0); }
.js-reveal .reveal.reveal-right { transform: translate3d(36px, 0, 0); }
.js-reveal .reveal.reveal-zoom  { transform: scale(.94); }
.js-reveal .reveal.is-visible   { opacity: 1; transform: none; }

/* Cartes : légère élévation au survol */
.card-lift { transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .35s ease; }
.card-lift:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -16px rgba(15,23,42,.25); }

/* Images : zoom doux dans leur cadre */
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.img-zoom:hover img { transform: scale(1.06); }

/* Reflet qui balaie les boutons d'appel à l'action */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: btn-shine 4.5s ease-in-out infinite;
}
@keyframes btn-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* Titre du haut de page : entrée en douceur */
@keyframes hero-in { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
.js-reveal .hero-in { animation: hero-in 1s cubic-bezier(.22,1,.36,1) both; animation-delay: var(--reveal-delay, 0ms); }

/* Barre de progression de lecture */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  background: linear-gradient(90deg, #FACC15, #f59e0b);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* Bouton retour en haut visible */
#back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-reveal .reveal, .js-reveal .hero-in { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn-shine::after, .animate-bounce-slow { animation: none !important; }
  .card-lift:hover, .img-zoom:hover img { transform: none; }
}
