@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.75rem;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 224.3 76.3% 94.1%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    font-feature-settings: "rlig" 1, "calt" 1;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-outfit), system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
  }

  .font-heading {
    font-family: var(--font-outfit), system-ui, sans-serif;
  }

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

@layer components {
  .text-gradient {
    @apply bg-gradient-to-r from-[#2E8C83] to-[#FFBDBA] bg-clip-text text-transparent;
  }

  /* Animation du logo hero */
  .hero-section {
    position: relative;
  }

  .hero-content {
    opacity: 0;
    animation: fadeInPage 0.5s ease-out 0.2s forwards;
  }

  .logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    font-weight: 900;
    position: relative;
    font-family: var(--font-outfit), system-ui, sans-serif;
  }

  .logo-s {
    color: #2e8c83;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInS 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
  }

  .logo-boost {
    color: #1a1a1a;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInBoost 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s forwards;
    margin-left: 2px;
  }

  .boost-spark {
    position: absolute;
    width: 10px;
    height: 30px;
    background-color: #ffbdba;
    border-radius: 50%;
    opacity: 0;
    right: -15px;
    bottom: 15px;
    animation: spark-animation 0.7s ease-out 1.5s forwards;
  }

  .main-title {
    font-size: 2.5rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInText 0.8s ease-out 2s forwards;
  }

  .subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInText 0.8s ease-out 2.2s forwards;
  }

  .cta-button {
    background-color: #ffbdba;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInText 0.8s ease-out 2.4s forwards;
  }

  .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInText 0.8s ease-out 3s forwards, bounce 2s infinite 3s;
  }

  /* Animations Keyframes */
  @keyframes fadeInPage {
    to {
      opacity: 1;
    }
  }

  @keyframes fadeInS {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes fadeInBoost {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes spark-animation {
    0% {
      opacity: 0.7;
      transform: translateY(0) scaleY(0.5) scaleX(0.8);
    }
    50% {
      opacity: 1;
      transform: translateY(-40px) scaleY(1.2) scaleX(1);
    }
    100% {
      opacity: 0;
      transform: translateY(-80px) scaleY(1) scaleX(0.5);
    }
  }

  @keyframes fadeInText {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
      transform: translateX(-50%) translateY(0);
    }
    40% {
      transform: translateX(-50%) translateY(-10px);
    }
    60% {
      transform: translateX(-50%) translateY(-5px);
    }
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .logo-container {
      font-size: 3rem;
    }
    .main-title {
      font-size: 2rem;
    }
    .subtitle {
      font-size: 1rem;
    }
  }
}
