/* IziCard Ouaga - Styles Personnalisés */

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

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

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

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #00AEEF;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0088CC;
}

/* Button Hover Effects */
.btn-primary {
  background: linear-gradient(135deg, #00AEEF 0%, #0088CC 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 174, 239, 0.3);
}

/* Card Hover Effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* NFC Wave Animation */
.nfc-wave {
  position: relative;
  display: inline-block;
}

.nfc-wave::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(0, 174, 239, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: nfc-pulse 2s infinite;
}

@keyframes nfc-pulse {
  0% {
    width: 100%;
    height: 100%;
    opacity: 1;
  }
  100% {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

/* Form Styling */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #00AEEF;
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

/* Loading Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #00AEEF;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #00AEEF 0%, #0088CC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Section */
.hero-gradient {
  background: linear-gradient(135deg, #00AEEF 0%, #0088CC 50%, #006699 100%);
}

/* Price Badge */
.price-badge {
  position: relative;
  display: inline-block;
  padding: 8px 20px;
  background: #00AEEF;
  color: white;
  font-weight: bold;
  border-radius: 20px;
}

.price-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-gradient {
    padding: 60px 20px;
  }
  
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
}

.toast.success {
  border-left: 4px solid #10B981;
}

.toast.error {
  border-left: 4px solid #EF4444;
}

.toast.info {
  border-left: 4px solid #00AEEF;
}

/* ============================================
   FIX HERO SECTIONS - ESPACEMENT IMAGES
   ============================================ */

/* Hero sections - espacement général */
.hero-gradient {
  position: relative;
  overflow: hidden;
}

/* Images dans hero sections - espacement mobile */
.hero-gradient img,
section img[class*="rounded"] {
  margin: 1.5rem 0;
}

/* Sur mobile - plus d'espacement */
@media (max-width: 768px) {
  .hero-gradient img,
  section img[class*="rounded"] {
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
  }
  
  /* Espacement entre texte et image */
  .hero-gradient .grid > div {
    margin-bottom: 2rem;
  }
  
  /* Images ne doivent pas toucher le header */
  section:first-of-type {
    margin-top: 1rem;
  }
}

/* Desktop - espacement normal */
@media (min-width: 769px) {
  .hero-gradient img {
    margin: 0;
  }
}

/* ============================================
   AMÉLIORATION ACCESSIBILITÉ MOBILE
   ============================================ */

/* Taille minimale des zones cliquables (44x44px) */
button, a, input, select, textarea {
  min-height: 44px;
  min-width: 44px;
}

/* Contraste amélioré pour les liens */
a {
  text-decoration-skip-ink: auto;
}

/* Focus visible pour navigation clavier */
*:focus-visible {
  outline: 3px solid #0072C6;
  outline-offset: 2px;
}

/* Labels associés aux inputs */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Amélioration des formulaires mobile */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px; /* Évite le zoom automatique sur iOS */
    padding: 0.75rem;
  }
}

/* ============================================
   OPTIMISATIONS PERFORMANCES MOBILE
   ============================================ */

/* Optimisation des images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading natif pour images */
img[loading="lazy"] {
  content-visibility: auto;
}

/* Réduction des animations sur mobile (économie de batterie) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimisation scroll sur mobile */
@media (max-width: 768px) {
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* Optimisation des fonts - préchargement */
@font-face {
  font-display: swap;
}

/* ================================================
   MOBILE HERO IMAGE FIX - CORRECTION FINALE
   ================================================ */

/* Hero section adjustments for mobile */
@media (max-width: 768px) {
  .hero-gradient {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .hero-gradient .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-gradient .grid {
    gap: 2rem;
  }

  /* Hero image container - fix positioning */
  .hero-gradient .relative.animate-fade-in {
    margin-top: 2rem;
    margin-bottom: 0;
    padding: 0;
  }

  /* Hero image - prevent overflow and center */
  .hero-gradient img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 1.5rem;
  }

  /* Hide decorative circles on mobile for cleaner look */
  .hero-gradient .absolute.animate-pulse-slow {
    display: none;
  }

  /* Fix hero content alignment */
  .hero-gradient h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }

  .hero-gradient p {
    font-size: 1.125rem !important;
  }

  /* Fix button stacking */
  .hero-gradient .flex-wrap {
    flex-direction: column;
  }

  .hero-gradient .flex-wrap a {
    width: 100%;
    text-align: center;
  }
}

/* Desktop - restore normal spacing */
@media (min-width: 769px) {
  .hero-gradient .absolute.animate-pulse-slow {
    display: block;
  }
}

/* ================================================
   ACCESSIBILITY IMPROVEMENTS - Mobile 68 → 80+
   ================================================ */

/* Minimum touch target size (44x44px) */
a, button, input[type="submit"], input[type="button"] {
  min-height: 44px;
  min-width: 44px;
}

/* Better focus indicators */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
  outline: 3px solid #0072C6;
  outline-offset: 2px;
}

/* Form accessibility on mobile */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important; /* Prevent iOS zoom */
    padding: 0.75rem;
  }

  label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
  }
}

/* Improved color contrast for links */
a {
  color: #0072C6;
  text-decoration: underline;
}

a:hover {
  color: #005a9e;
}

/* Better error messages visibility */
.error {
  color: #dc2626;
  font-weight: 600;
  background-color: #fee2e2;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
}

/* Skip to content link for screen readers */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0072C6;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* ================================================
   PERFORMANCE OPTIMIZATIONS - Mobile
   ================================================ */

/* Lazy loading images (native browser support) */
img[loading="lazy"] {
  content-visibility: auto;
}

/* Reduce motion for users who prefer it */
@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;
  }
}

/* Font display optimization */
@font-face {
  font-family: 'Poppins';
  font-display: swap; /* Prevents FOIT (Flash of Invisible Text) */
}

@font-face {
  font-family: 'Montserrat';
  font-display: swap;
}

/* Will-change optimization for animations */
.animate-fade-in,
.animate-fade-in-up,
.animate-slide-in-right,
.animate-pulse-slow {
  will-change: transform, opacity;
}

/* After animation completes, remove will-change */
.animation-complete {
  will-change: auto;
}

/* Optimize scrolling performance */
.container {
  contain: layout style paint;
}

/* GPU acceleration for transforms */
.transform,
.hover\:scale-105:hover {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Reduce paint areas */
.shadow-xl,
.shadow-2xl {
  will-change: box-shadow;
}
