/* SANA GROUPE - Custom Styles */

:root {
  --sana-gold: #D4AF37;
  --sana-gold-light: #F4D77A;
  --sana-gold-dark: #B8860B;
  --sana-navy: #0F1F3D;
  --sana-navy-dark: #091428;
  --sana-navy-deep: #050B1A;
  --sana-black: #050B1A;
  --sana-dark: #0F1F3D;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--sana-navy-deep);
  overflow-x: hidden;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--sana-navy-deep);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--sana-gold-dark), var(--sana-gold));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sana-gold);
}

/* Hero gradient overlay */
.hero-gradient {
  background:
    radial-gradient(ellipse at top right, rgba(212, 175, 55, 0.15), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(15, 31, 61, 0.6), transparent 60%),
    linear-gradient(180deg, #050B1A 0%, #0F1F3D 100%);
}

/* Gold gradient text */
.text-gold-gradient {
  background: linear-gradient(135deg, #F4D77A 0%, #D4AF37 50%, #B8860B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Animated background orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}
.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #D4AF37 0%, transparent 70%);
  top: -100px;
  right: -100px;
}
.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #B8860B 0%, transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: 2s;
}

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

/* Gold border glow */
.gold-border {
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
}
.gold-border:hover {
  border-color: rgba(212, 175, 55, 0.8);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

/* Card styles */
.sana-card {
  background: linear-gradient(135deg, rgba(15, 31, 61, 0.85) 0%, rgba(5, 11, 26, 0.9) 100%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.sana-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 20px 60px rgba(212, 175, 55, 0.15);
}

/* Premium button */
.btn-premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F4D77A 0%, #D4AF37 50%, #B8860B 100%);
  color: #0F1F3D;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}
.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}
.btn-premium:hover::before {
  left: 100%;
}
.btn-premium:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.5);
}

/* Outline button */
.btn-outline-gold {
  background: transparent;
  color: var(--sana-gold);
  border: 2px solid var(--sana-gold);
  transition: all 0.3s ease;
}
.btn-outline-gold:hover {
  background: var(--sana-gold);
  color: var(--sana-navy);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

/* Section dividers */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sana-gold), transparent);
}

/* Floating WhatsApp pulse */
.whatsapp-float {
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6), 0 10px 30px rgba(34, 197, 94, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0), 0 10px 30px rgba(34, 197, 94, 0.3); }
}

/* Marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Hero text shimmer */
.shimmer-text {
  background: linear-gradient(90deg, #F4D77A 0%, #FFFFFF 25%, #D4AF37 50%, #FFFFFF 75%, #B8860B 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* Number counter */
.stat-number {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  background: linear-gradient(135deg, #F4D77A 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Pricing card highlight */
.pricing-featured {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.05) 100%);
  border: 2px solid var(--sana-gold);
  position: relative;
  transform: scale(1.02);
}
.pricing-featured::before {
  content: 'POPULAIRE';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #F4D77A, #B8860B);
  color: #0A0A0A;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 12px;
  letter-spacing: 1px;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sana-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* Module accordion */
.module-item {
  transition: all 0.3s ease;
}
.module-item:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* FAQ */
details > summary {
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker {
  display: none;
}
details[open] summary i.fa-chevron-down {
  transform: rotate(180deg);
}
details summary i.fa-chevron-down {
  transition: transform 0.3s ease;
}

/* Hide scrollbar for marquee */
.marquee::-webkit-scrollbar { display: none; }

/* Ensure inputs are styled consistently */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--sana-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Page enter animation */
main {
  animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive helpers */
@media (max-width: 640px) {
  .orb-1 { width: 250px; height: 250px; }
  .orb-2 { width: 200px; height: 200px; }
}

/* Logo animations */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 30s linear infinite;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-float-badge {
  animation: float-badge 4s ease-in-out infinite;
}
.animate-float-badge-delayed {
  animation: float-badge 4s ease-in-out infinite;
  animation-delay: 2s;
}

/* Radial gradient utility */
.bg-gradient-radial {
  background-image: radial-gradient(circle, var(--tw-gradient-stops));
}

/* Hero avec image de fond */
.hero-with-bg {
  position: relative;
}
.hero-with-bg img {
  filter: saturate(1.05) contrast(1.05);
}

/* Touche dorée radiale par dessus le fond */
.bg-gradient-radial-gold {
  background:
    radial-gradient(ellipse at top right, rgba(212, 175, 55, 0.18), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(15, 31, 61, 0.4), transparent 60%);
}

/* Bounce lent pour l'indicateur scroll */
@keyframes bounce-slow {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
.animate-bounce-slow {
  animation: bounce-slow 2.5s ease-in-out infinite;
}

/* Drop shadow renforcé pour le texte sur l'image de fond */
.hero-with-bg h1,
.hero-with-bg p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESPONSIVE & MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Évite le zoom auto sur iOS lors du focus des inputs (font-size >= 16px) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="url"],
select,
textarea {
  font-size: 16px;
}

/* Suppression du highlight bleu sur tap mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Améliore la fluidité du scroll sur iOS */
body {
  -webkit-overflow-scrolling: touch;
}

/* Hauteur minimale tactile (44px Apple, 48px Material) sur tous les boutons et liens d'action */
button,
.btn-premium,
.btn-outline-gold,
[role="button"] {
  touch-action: manipulation;
}

/* Cache la scrollbar horizontale du filtre produits sur mobile */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Force les images responsives - JAMAIS de débordement */
img {
  max-width: 100%;
  height: auto;
}

/* Empêche tout débordement horizontal */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Liens de navigation mobile : feedback tactile */
.mobile-nav-link {
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.1);
}
.mobile-nav-link:active {
  background: rgba(212, 175, 55, 0.15);
}

/* Mobile : titres plus serrés pour rester lisibles sans zoom */
@media (max-width: 640px) {
  h1, h2, h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Marquee plus rapide et plus discret sur mobile */
  .marquee-track {
    animation-duration: 25s;
  }

  /* Cards : moins de hover (pas pertinent en tactile) */
  .sana-card:hover {
    transform: none;
  }

  /* Bouton WhatsApp flottant : pulse réduit pour préserver la batterie */
  .whatsapp-float {
    animation-duration: 3s;
  }

  /* Réduction des orbes sur très petits écrans */
  .orb-1 { width: 200px; height: 200px; opacity: 0.2; }
  .orb-2 { width: 150px; height: 150px; opacity: 0.2; }
}

/* Très petits écrans (< 380px - vieux smartphones) */
@media (max-width: 380px) {
  .font-display {
    letter-spacing: -0.02em;
  }
}

/* Tablettes en mode portrait */
@media (min-width: 641px) and (max-width: 1024px) {
  .marquee-track {
    animation-duration: 28s;
  }
}

/* Préfère les animations réduites pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Optimisation des performances : composition GPU pour les éléments animés */
.animate-float-badge,
.animate-float-badge-delayed,
.animate-bounce-slow,
.whatsapp-float,
.shimmer-text {
  will-change: transform;
  transform: translateZ(0);
}

/* Améliore le rendu des polices */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Empêche les images de "casser" la mise en page lors du chargement */
img {
  display: block;
}

/* Print : version imprimable lisible */
@media print {
  .whatsapp-float,
  #navbar,
  footer {
    display: none;
  }
}
