/* ===================================
   MA FITNESS — Feuille de styles
   =================================== */

/* Variables */
:root {
  --primary-dark: #121212;
  --secondary-dark: #1e1e1e;
  --accent-red: #ff2e2e;
  --accent-light: #f5f5f5;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --highlight: #ff4d4d;
  --section-padding: 6rem 10%;
  --transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ===================================
   Splash Screen
   =================================== */

#splashscreen {
  position: fixed;
  inset: 0;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#splashscreen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#lottie-container {
  width: clamp(140px, 40vmin, 253px);
  height: clamp(140px, 40vmin, 253px);
}

.splash-logo {
  font-size: clamp(1.1rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: clamp(2px, 1vw, 4px);
  text-transform: uppercase;
  margin-top: 0.5rem;
  color: var(--text-primary);
}

.splash-logo span {
  color: var(--accent-red);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--primary-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===================================
   Animations
   =================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.slide-in-left {
  transform: translateX(-100px);
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.slide-in-left.visible {
  transform: translateX(0);
  opacity: 1;
}

.slide-in-right {
  transform: translateX(100px);
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.slide-in-right.visible {
  transform: translateX(0);
  opacity: 1;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ===================================
   Navigation
   =================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent-red);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--accent-red);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-btn:hover {
  transform: rotate(90deg);
}

/* ===================================
   Hero Section
   =================================== */

.hero {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80')
    no-repeat center center / cover;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 2rem;
  max-width: 1200px;
}

.hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero h1 span {
  color: var(--accent-red);
  position: relative;
  display: inline-block;
  animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
  from { text-shadow: 0 0 10px rgba(255, 46, 46, 0.5); }
  to   { text-shadow: 0 0 20px rgba(255, 46, 46, 0.8), 0 0 30px rgba(255, 46, 46, 0.6); }
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--accent-red);
  opacity: 0.3;
  z-index: -1;
}

.hero p {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  max-width: 700px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
}

/* ===================================
   App Store Buttons
   =================================== */

.app-buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.app-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.8rem;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  min-width: 170px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(4px);
}

.app-btn:hover {
  transform: translateY(-4px);
  background: rgba(255, 46, 46, 0.1);
  border-color: var(--accent-red);
  box-shadow: 0 10px 28px rgba(255, 46, 46, 0.25);
}

.android-btn .icon { color: #3DDC84; }
.ios-btn .icon     { color: #ffffff; }

.app-btn .icon {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.app-btn:hover .icon {
  transform: scale(1.1);
}

.app-btn .text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.app-btn .text span:first-child {
  font-size: 0.65rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.app-btn .text span:last-child {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ===================================
   Sections générales
   =================================== */

section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-red);
  border-radius: 2px;
  animation: expandWidth 1.5s ease-out forwards;
}

@keyframes expandWidth {
  from { width: 0; }
  to   { width: 60px; }
}

.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin-bottom: 3rem;
  color: var(--text-secondary);
  max-width: 700px;
}

.highlight {
  color: var(--accent-red);
  font-weight: 600;
}

/* ===================================
   Cards & Grid
   =================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.card {
  background: var(--secondary-dark);
  border-radius: 12px;
  padding: 2.5rem;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 46, 46, 0.1) 0%, rgba(18, 18, 18, 0.8) 100%);
  z-index: -1;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-red);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.card h3 i {
  font-size: 1.8rem;
  transition: var(--transition);
}

.card:hover h3 i {
  transform: scale(1.2) rotate(10deg);
}

.card p {
  color: var(--text-secondary);
}

/* ===================================
   Feature List
   =================================== */

.feature-list {
  list-style: none;
  margin: 3rem 0;
}

.feature-list li {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--secondary-dark);
  border-left: 4px solid var(--accent-red);
  border-radius: 0 8px 8px 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  transform-origin: left;
}

.feature-list li:hover {
  transform: translateX(10px) scale(1.02);
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3);
}

.feature-list li i {
  color: var(--accent-red);
  font-size: 1.5rem;
  transition: var(--transition);
}

.feature-list li:hover i {
  transform: rotate(15deg) scale(1.2);
}

/* ===================================
   Pricing
   =================================== */

.pricing {
  background:
    linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)),
    url('https://images.unsplash.com/photo-1571902943202-507ec2618e8f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1975&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  text-align: center;
  padding: 5rem 10%;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.pricing-card {
  background: var(--secondary-dark);
  border-radius: 12px;
  padding: 3rem 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.pricing-card:hover {
  transform: translateY(-15px) rotateX(5deg);
}

.pricing-card.popular {
  border: 2px solid var(--accent-red);
}

.pricing-card.popular::before {
  content: 'POPULAIRE';
  position: absolute;
  top: 20px;
  right: -30px;
  background: var(--accent-red);
  color: white;
  padding: 0.3rem 3rem;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: 700;
}

.pricing-card h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.pricing-card .price {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 1.5rem;
  position: relative;
}

.pricing-card .price::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--accent-red);
  opacity: 0.5;
}

.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-secondary);
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 2.5rem;
}

.pricing-card ul li {
  padding: 0.8rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.pricing-card ul li:hover {
  color: var(--text-primary);
  transform: translateX(5px);
}

.pricing-card ul li i {
  color: var(--accent-red);
  margin-right: 0.5rem;
  transition: var(--transition);
}

.pricing-card ul li:hover i {
  transform: scale(1.3);
}

/* ===================================
   Testimonials
   =================================== */

.testimonials {
  background: var(--secondary-dark);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--primary-dark);
  padding: 2rem;
  border-radius: 12px;
  position: relative;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(255, 46, 46, 0.1);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 5rem;
  color: var(--accent-red);
  opacity: 0.2;
  font-family: serif;
  line-height: 1;
}

.testimonial-content {
  position: relative;
  z-index: 2;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  position: relative;
}

.testimonial-text::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30%;
  height: 1px;
  background: var(--accent-red);
  opacity: 0.5;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-red);
  transition: var(--transition);
}

.testimonial-card:hover .author-avatar {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 46, 46, 0.5);
}

.author-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.author-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===================================
   Boutons généraux
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: var(--accent-red);
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(255, 46, 46, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

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

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(255, 46, 46, 0.4);
  background: #ff3d3d;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--accent-red);
  color: var(--text-primary);
}

.btn i {
  font-size: 1.2rem;
  transition: var(--transition);
}

.btn:hover i {
  transform: translateX(5px);
}

/* ===================================
   Footer
   =================================== */

footer {
  background: var(--secondary-dark);
  padding: 4rem 10% 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: block;
}

.footer-logo span {
  color: var(--accent-red);
}

.footer-about p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-dark);
}

.social-links a:hover {
  color: var(--accent-red);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 46, 46, 0.3);
}

.footer-links h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  display: inline-block;
}

.footer-links a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-red);
  transition: var(--transition);
}

.footer-links a:hover::before {
  width: 100%;
}

.footer-links a:hover {
  color: var(--accent-red);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-secondary);
}

/* ===================================
   Formulaire
   =================================== */

input, select, textarea {
  font-family: 'Montserrat', sans-serif;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-red) !important;
  box-shadow: 0 0 0 2px rgba(255, 46, 46, 0.2);
  transform: translateY(-2px);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 992px) {
  :root {
    --section-padding: 5rem 8%;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .app-buttons {
    gap: 1.5rem;
  }

  .app-btn {
    min-width: 180px;
    padding: 1rem 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 4rem 5%;
  }

  .navbar {
    padding: 1.5rem 5%;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
    animation: slideInRight 0.5s ease-out;
  }

  @keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1000;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .app-buttons {
    flex-direction: column;
    align-items: center;
  }

  .app-btn {
    width: 100%;
    max-width: 300px;
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  :root {
    --section-padding: 3rem 5%;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    margin-bottom: 2.5rem;
  }

  .app-btn {
    padding: 1rem 1.5rem;
  }

  .app-btn .icon {
    font-size: 1.8rem;
  }

  .app-btn .text span:last-child {
    font-size: 1.1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}
