/* Variables CSS inspirées des couleurs de l'app mobile */
:root {
  /* Couleurs principales de l'app mobile */
  --primary: #2C3E50; /* Bleu marine élégant */
  --primary-light: #34495E;
  --primary-dark: #1A252F;
  --accent: #e94560; /* Rouge/rose moderne */
  --accent-light: #ED6B85;
  --accent-dark: #D1334A;
  --secondary: #6B7280; /* Gris moderne */
  --premium: #D4AF37; /* Or premium */
  /* Couleurs d'arrière-plan */
  --background: #F8FAFC; /* Gris très clair avec pointe de bleu */
  --surface: #FFFFFF;
  --background-dark: #1A252F;
  /* Couleurs de texte */
  --text-primary: #2C3E50;
  --text-secondary: #5D6D7E;
  --text-tertiary: #85929E;
  --text-inverse: #FFFFFF;
  /* Dégradés modernes */
  --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #ED6B85 100%);
  --gradient-hero: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent-dark) 100%);
  --gradient-overlay: linear-gradient(rgba(28, 36, 47, 0.8), rgba(44, 62, 80, 0.6));
  /* Ombres */
  --shadow-light: 0 2px 15px rgba(44, 62, 80, 0.1);
  --shadow-medium: 0 8px 30px rgba(44, 62, 80, 0.15);
  --shadow-heavy: 0 15px 50px rgba(44, 62, 80, 0.25);
  /* Rayons de bordure */
  --radius-small: 8px;
  --radius-medium: 15px;
  --radius-large: 25px;
  --radius-phone: 30px;
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Animations et utilitaires */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pathDraw {
  from {
    stroke-dashoffset: 1000;
  }

  to {
    stroke-dashoffset: 0;
  }
}

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

  50% {
    transform: scale(1.05);
  }
}

/* Intersection Observer animations */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* === SECTION HERO === */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/hero-background.png'), radial-gradient(circle at 20% 80%, rgba(233, 69, 96, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(52, 73, 94, 0.1) 0%, transparent 50%);
  background-size: cover, cover, cover, cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(2px); /* ajuster l’intensité du flou */
}


.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 0;
}

.hero-text {
  color: var(--text-primary);
  animation: fadeInLeft 0.8s ease;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-medium);
  background-color: var(--text-inverse);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  background-clip: text;
  color: var(--text-primary);
  -webkit-background-clip: text;
  text-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.hero-slogan {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  font-weight: 500;
  line-height: 1.4;
}

.hero-community {
  margin: 1.5rem 0;
  display: flex;
  justify-content: flex-start;
}

.community-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition-smooth);
}

  .community-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }

  .community-badge i {
    color: var(--premium);
    font-size: 1.1rem;
  }

  .community-badge strong {
    color: var(--premium);
    font-weight: 700;
  }

.hero-social {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
  background: var(--text-tertiary);
  position: relative;
}

  .social-link:hover {
    background: var(--accent);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-medium);
  }

  .social-link.facebook:hover {
    background: #1877f2;
  }

  .social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  }

  .social-link.tiktok:hover {
    background: #000000;
  }

  .social-link::after {
    content: 'Bientôt';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--premium);
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.4);
    z-index: 10;
    transform: rotate(15deg);
  }

.hero-downloads h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.download-badges {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.store-badge {
  transition: var(--transition-smooth);
  display: block;
  position: relative;
}

  .store-badge:hover {
    transform: translateY(-3px) scale(1.05);
  }

  .store-badge::after {
    content: 'Prochainement';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
    z-index: 10;
    transform: rotate(10deg);
  }

  .store-badge img {
    height: 60px;
    width: auto;
    border-radius: var(--radius-small);
    box-shadow: var(--shadow-light);
  }

.premium-note {
  font-size: 0.7rem;
  opacity: 0.8;
  font-style: italic;
}

.hero-visual {
  display: flex;
  justify-content: center;
  animation: fadeInRight 0.8s ease 0.2s both;
}

.phone-showcase {
  position: relative;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: var(--radius-phone);
  padding: 15px;
  box-shadow: var(--shadow-heavy), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  animation: float 6s ease-in-out infinite;
  z-index: 10;
}

.main-phone {
  animation-delay: 0s;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: #333;
  border-radius: 3px;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: calc(var(--radius-phone) - 15px);
  overflow: hidden;
  position: relative;
}

.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-phone) - 15px);
}

/* === ITINERAIRE GPS PRINCIPAL === */
.gps-itinerary {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* Masquer le GPS et les monuments sur mobile */
@media (max-width: 768px) {
  .gps-itinerary,
  .interest-point-html {
    display: none !important;
  }
}

.itinerary-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  overflow: visible;
}

.itinerary-path {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* === ANIMATIONS AU SCROLL === */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* État initial des éléments (sauf captures d'écran et hero) */
.section-title,
.section-description,
.feature-highlights,
.feature-item,
.game-feature,
.gamification-features,
.highlight-stats,
.stat-item {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Le hero reste visible dès le début - forcer l'état visible */
.hero .hero-brand,
.hero .hero-slogan,
.hero .hero-social,
.hero .hero-downloads,
.hero .hero-text,
.hero .hero-visual,
.hero .hero-content {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* === SECTIONS COMMUNES === */
section {
  padding: 6rem 0;
  position: relative;
}

  section:nth-child(even) {
    background: var(--surface);
  }

  section:nth-child(odd) {
    background: var(--background);
  }

.section-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

  .section-content.reverse {
    direction: rtl;
  }

    .section-content.reverse > * {
      direction: ltr;
    }

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  position: relative;
}

  .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
  }

.section-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

  .section-description p {
    margin-bottom: 1.5rem;
  }

/* === PHONES STACK === */
.phones-stack {
  position: relative;
  width: 380px;
  height: 650px;
  margin: 0 auto;
}

.phone-back {
  position: absolute;
  top: 60px;
  right: -20px;
  transform: rotate(8deg);
  z-index: 1;
  opacity: 1;
  animation: float 8s ease-in-out infinite;
  animation-delay: -2s;
}

.phone-front {
  position: absolute;
  top: 0;
  left: -10px;
  z-index: 2;
  transform: rotate(-3deg);
  animation: float 6s ease-in-out infinite;
}

.single-phone .phone-mockup {
  margin: 0 auto;
  animation: float 7s ease-in-out infinite;
}

/* === FEATURES & HIGHLIGHTS === */
.highlight-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.stat-item {
  text-align: center;
}

  .stat-item strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
  }

  .stat-item span {
    font-size: 0.9rem;
    color: var(--text-tertiary);
  }

.feature-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: rgba(44, 62, 80, 0.05);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(44, 62, 80, 0.1);
}

  .feature-item i {
    color: var(--accent);
    font-size: 1.1rem;
  }

  .feature-item span {
    font-weight: 500;
    color: var(--text-primary);
  }

/* === GAMIFICATION FEATURES === */
.gamification-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.game-feature {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-medium);
  border: 1px solid rgba(44, 62, 80, 0.1);
  transition: var(--transition-smooth);
}

  .game-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    background: rgba(255, 255, 255, 1);
  }

  .game-feature i {
    color: var(--accent);
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .game-feature h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
  }

  .game-feature p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
  }

/* === FOOTER === */
.footer {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

  .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(233, 69, 96, 0.1) 0%, transparent 40%), radial-gradient(circle at 70% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 40%);
  }

.footer-content {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-bottom: 3rem;
}

.footer-cta h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-inverse);
}

.footer-downloads {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

  .footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-small);
  }

  .footer-logo span {
    font-size: 1.3rem;
    font-weight: 700;
  }

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
  .hero-content,
  .section-content {
    gap: 3rem;
  }

  .phones-stack {
    width: 340px;
    height: 580px;
  }

  .phone-mockup {
    width: 250px;
    height: 500px;
  }

  .path-journey {
    width: 100px;
    height: 150px;
  }

  .gamification-section .path-journey {
    height: 170px;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 2rem 0;
  }

  .hero-content,
  .section-content {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

    .section-content.reverse {
      direction: ltr;
    }

  /* Inverser spécifiquement les sections parcours et gamification sur mobile */
  .guided-tours-section .section-content,
  .gamification-section .section-content {
    display: flex;
    flex-direction: column;
  }

  .guided-tours-section .section-visual,
  .gamification-section .section-visual {
    order: 1;
  }

  .guided-tours-section .section-text,
  .gamification-section .section-text {
    order: 2;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-slogan {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .hero-brand {
    justify-content: center;
    margin-bottom: 1.5rem;
  }

  .hero-logo {
    width: 70px;
    height: 70px;
  }

  .hero-social {
    justify-content: center;
    margin-bottom: 2rem;
  }

  .hero-downloads {
    text-align: center;
  }

  .section-title {
    font-size: 2rem;
    text-align: center;
  }

    .section-title::after {
      left: 50%;
      transform: translateX(-50%);
    }

  .download-badges,
  .footer-downloads {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .phones-stack {
    width: 280px;
    height: 480px;
  }

  .phone-mockup {
    width: 200px;
    height: 400px;
  }

  .phone-back {
    top: 40px;
    right: -15px;
  }

  .phone-front {
    top: 0;
    left: -8px;
  }

  .highlight-stats {
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    border-top: none;
    padding-top: 1rem;
    margin-top: 1rem;
  }

  .feature-highlights {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .gamification-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-info {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  /* Optimisations des sections */
  section {
    padding: 4rem 0;
  }

  .section-description {
    font-size: 1rem;
    line-height: 1.6;
  }

  .community-badge {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  /* Store badges plus petits sur mobile */
  .store-badge img {
    height: 50px;
  }

  .store-badge::after {
    font-size: 0.6rem;
    padding: 1px 4px;
    top: -6px;
    right: -6px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  section {
    padding: 3rem 0;
  }

  .hero {
    padding: 1rem 0;
  }

  .hero-content {
    gap: 2rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-slogan {
    font-size: 1.1rem;
  }

  .hero-brand {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-logo {
    width: 60px;
    height: 60px;
  }

  .hero-social {
    justify-content: center;
    gap: 0.8rem;
  }

  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .social-link::after {
    font-size: 0.5rem;
    padding: 1px 3px;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .phones-stack {
    width: 260px;
    height: 450px;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
  }

  .feature-highlights {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
  }

  .feature-item {
    padding: 0.6rem 1rem;
    text-align: center;
    justify-content: center;
    flex: 1;
    min-width: calc(50% - 0.4rem);
  }

  .highlight-stats {
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-around;
  }

  .gamification-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .game-feature {
    padding: 1rem;
    text-align: center;
  }

  .community-badge {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    gap: 0.6rem;
  }

  .store-badge img {
    height: 45px;
  }

  .premium-note {
    font-size: 0.65rem;
  }
}

/* Styles pour les états de chargement des images */
.screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-phone) - 15px);
  transition: var(--transition-smooth);
}

  .screenshot:not([src]),
  .screenshot[src=""],
  .screenshot[src$="hero-screenshot.png"]:not([complete]),
  .screenshot[src$="discovery-screenshot-1.png"]:not([complete]),
  .screenshot[src$="discovery-screenshot-2.png"]:not([complete]),
  .screenshot[src$="tours-screenshot-1.png"]:not([complete]),
  .screenshot[src$="tours-screenshot-2.png"]:not([complete]),
  .screenshot[src$="quiz-screenshot.png"]:not([complete]),
  .screenshot[src$="gamification-screenshot-1.png"]:not([complete]),
  .screenshot[src$="gamification-screenshot-2.png"]:not([complete]) {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100% );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

    .screenshot:not([src]):after,
    .screenshot[src=""]:after,
    .screenshot[src$="hero-screenshot.png"]:not([complete]):after,
    .screenshot[src$="discovery-screenshot-1.png"]:not([complete]):after,
    .screenshot[src$="discovery-screenshot-2.png"]:not([complete]):after,
    .screenshot[src$="tours-screenshot-1.png"]:not([complete]):after,
    .screenshot[src$="tours-screenshot-2.png"]:not([complete]):after,
    .screenshot[src$="quiz-screenshot.png"]:not([complete]):after,
    .screenshot[src$="gamification-screenshot-1.png"]:not([complete]):after,
    .screenshot[src$="gamification-screenshot-2.png"]:not([complete]):after {
      content: "📱 Mysthory";
      color: white;
      font-size: 1.2rem;
      font-weight: 600;
      text-align: center;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

/* Placeholder spécifiques par section */
.hero .screenshot:after {
  content: "📍 Découvrez l'histoire";
}

.discovery-section .screenshot:after {
  content: "🏰 Patrimoine français";
}

.guided-tours-section .screenshot:after {
  content: "🗺️ Parcours guidés";
}

.quiz-section .screenshot:after {
  content: "🧠 Quiz historiques";
}

.gamification-section .screenshot:after {
  content: "🏆 Badges & défis";
}

/* Animation d'apparition au scroll */
@media (prefers-reduced-motion: no-preference) {
  .animate-in {
    animation: fadeInUp 0.8s ease forwards;
  }

    .animate-in:nth-child(2) {
      animation-delay: 0.1s;
    }

    .animate-in:nth-child(3) {
      animation-delay: 0.2s;
    }

    .animate-in:nth-child(4) {
      animation-delay: 0.3s;
    }
}
