/* Custom CSS for additional styling */

/* Barre tricolore décorative */
.tricolor-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00873E 0%, #00873E 33.33%, #FDD835 33.33%, #FDD835 66.66%, #D72638 66.66%, #D72638 100%);
  z-index: 100;
  animation: slideInFromTop 0.6s ease-out;
}

/* Animation du fond dégradé */
.gradient-bg {
  background: linear-gradient(135deg, #00873E 0%, #00873E 20%, #FDD835 40%, #D72638 60%, #00873E 80%, #00873E 100%);
  background-size: 300% 300%;
  animation: gradientShift 8s ease-in-out infinite;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 768px) {
  .gradient-bg {
    background: linear-gradient(135deg, #00873E 0%, #00873E 25%, #FDD835 45%, #D72638 65%, #00873E 85%, #00873E 100%);
    background-size: 250% 250%;
    animation: gradientShift 10s ease-in-out infinite;
  }
}

/* Animated gradient background */
.animated-gradient {
    background: linear-gradient(135deg, #00873E, #FDD835, #D72638);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.pattern-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Smooth scrolling with mobile optimization */
html {
    scroll-behavior: smooth;
}

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

    body {
        overscroll-behavior-y: contain;
    }
}

/* Star fill effect */
.star-filled {
    fill: currentColor;
}

/* FAQ Animation */
.faq-content.open {
    max-height: 24rem;
    opacity: 1;
}

/* Header scroll effect */
.header-scrolled {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 135, 62, 0.15), 0 4px 6px -2px rgba(0, 135, 62, 0.1);
}

.header-scrolled .nav-link,
.header-scrolled #logo-text {
    color: #374151;
}

.header-scrolled #download-btn {
    color: #00873E;
    background-color: rgba(0, 135, 62, 0.1);
}
.header-scrolled #download-btn i {
    color: #00873E;
}

.header-scrolled .nav-link:hover {
    color: #00873E;
}

.header-scrolled #download-btn:hover {
    background-color: #00873E;
    color: white;
}

/* Mobile menu drawer animations */
#mobile-menu-overlay {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#mobile-menu-overlay.opacity-100 {
    opacity: 1;
}

/* Smooth transition for mobile menu */
#mobile-menu {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Button hover effects */
.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #FDD835, #00873E, #D72638);
    background-size: 200% 200%;
    animation: textGradientShift 4s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes textGradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Hero animations */
.hero-title-animated {
    animation: slideInFromTop 1.2s ease-out;
}

.hero-subtitle-animated {
    animation: slideInFromBottom 1.2s ease-out 0.3s both;
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button animations */
.pulse-button {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 135, 62, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(253, 216, 53, 0.5), 0 0 40px rgba(215, 38, 56, 0.3);
    }
}

.bounce-button {
    animation: gentleBounce 3s ease-in-out infinite;
}

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

/* Phone animations */
.floating-phone {
    animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.phone-glow {
    animation: phoneGlow 4s ease-in-out infinite;
}

@keyframes phoneGlow {
    0%, 100% {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 25px 50px -12px rgba(0, 135, 62, 0.3), 0 0 30px rgba(253, 216, 53, 0.2);
    }
}

/* Step cards animation */
.step-card {
    animation: slideInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.step-card[data-step="1"] { animation-delay: 0.1s; }
.step-card[data-step="2"] { animation-delay: 0.2s; }
.step-card[data-step="3"] { animation-delay: 0.3s; }
.step-card[data-step="4"] { animation-delay: 0.4s; }

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-icon {
    animation: rotateIn 1s ease-out;
    animation-fill-mode: both;
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Advantage cards */
.advantage-card {
    animation: fadeInScale 0.8s ease-out;
    animation-fill-mode: both;
}

.advantage-card:nth-child(1) { animation-delay: 0.1s; }
.advantage-card:nth-child(2) { animation-delay: 0.2s; }
.advantage-card:nth-child(3) { animation-delay: 0.3s; }
.advantage-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.advantage-icon {
    animation: iconPop 1.2s ease-out;
    animation-fill-mode: both;
}

@keyframes iconPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Testimonial cards */
.testimonial-card {
    animation: slideInFromSide 1s ease-out;
    animation-fill-mode: both;
}

.testimonial-card:nth-child(1) { 
    animation-delay: 0.1s;
    animation-name: slideInFromLeft;
}
.testimonial-card:nth-child(2) { 
    animation-delay: 0.2s;
    animation-name: slideInFromBottom;
}
.testimonial-card:nth-child(3) { 
    animation-delay: 0.3s;
    animation-name: slideInFromRight;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* FAQ animations */
.faq-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact section animations */
.contact-form-card {
    animation: slideInFromLeft 1s ease-out;
}

.contact-info {
    animation: slideInFromRight 1s ease-out;
}

.contact-item {
    animation: iconBounce 2s ease-in-out infinite;
}

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

/* Title animations */
.slide-in-title {
    animation: slideInTitle 1s ease-out;
}

@keyframes slideInTitle {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Fade in up animation */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Submit button animation */
.submit-button {
    position: relative;
    overflow: hidden;
}

.submit-button::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: left 0.5s;
}

.submit-button:hover::before {
    left: 100%;
}

/* Loading animation for buttons */
.btn-loading {
    position: relative;
    overflow: hidden;
}

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

.btn-loading:hover::after {
    left: 100%;
}

/* Custom scrollbar - Couleurs du drapeau */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00873E, #FDD835);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00873E, #D72638);
}


/* Form focus effects - Ring jaune et bordure verte */
input:focus,
textarea:focus {
    outline: none;
    border-color: #00873E;
    box-shadow: 0 0 0 3px rgba(253, 216, 53, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    /* Adjust header on mobile 
    #header {
        padding: 0.75rem 0;
    }
*/
    /* Improve text alignment on mobile */
    h1, p {
        text-align: center !important;
    }

    /* Better spacing for mobile hero */
    #accueil {
        padding-top: 5rem;
        min-height: 100dvh;
    }
}

/* Animation delays for staggered effects */
.animate-delay-100 {
    animation-delay: 0.1s;
}

.animate-delay-200 {
    animation-delay: 0.2s;
}

.animate-delay-300 {
    animation-delay: 0.3s;
}

/* Pulse animation for floating elements */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Hover effects enhancement */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid transparent;
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
    border-left-color: #FDD835;
    box-shadow: 0 15px 40px rgba(0, 135, 62, 0.2);
}

/* Loading states */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .hero-title-animated {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .floating-phone {
        animation-duration: 4s;
    }
    
    .step-card,
    .advantage-card,
    .testimonial-card {
        animation-duration: 0.6s;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Animations d'apparition */
@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

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

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

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

/* Délais d'animation */
.delay-200 { animation-delay: 0.2s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* Elements initialement invisibles */
.animate-on-load {
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Pattern décoratif avec étoile */
.pattern-star-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23FDD835' fill-opacity='0.05'%3E%3Cpath d='M40 25l3.09 9.51h10l-8.09 5.88 3.09 9.51L40 44.02l-8.09 5.88 3.09-9.51-8.09-5.88h10z'/%3E%3C/g%3E%3C/svg%3E");
}

/* Effet shine existant */
@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine 3s ease-in-out infinite;
}

/* Effet de scroll subtil */
@keyframes autoScroll {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3%); }
  100% { transform: translateY(0); }
}

.scroll-effect {
  animation: autoScroll 5s ease-in-out infinite;
}

/* Pulsation douce */
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.0); }
}

.pulse-effect {
  animation: subtlePulse 4s ease-in-out infinite;
}

/* Animation sur hover */
.mockup-hover {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.mockup-hover:hover {
  transform: scale(1.02) rotateZ(-1deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

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

.animate-bounce-smooth {
  animation: bounceCustom 1.5s ease-in-out infinite;
}

/* Ombres harmonisées avec la palette */
.shadow-soft-strong {
  box-shadow: 0 8px 20px rgba(0, 135, 62, 0.25);
  transition: box-shadow 0.3s ease;
}

.shadow-soft-strong:hover {
  box-shadow: 0 12px 30px rgba(0, 135, 62, 0.35), 0 0 20px rgba(253, 216, 53, 0.2);
}

.shadow-green {
  box-shadow: 0 10px 30px rgba(0, 135, 62, 0.15);
}

.shadow-yellow {
  box-shadow: 0 10px 30px rgba(253, 216, 53, 0.20);
}

.shadow-red {
  box-shadow: 0 10px 30px rgba(215, 38, 56, 0.10);
}

/* Effet de brillance sur les boutons au hover */
@keyframes shineButton {
  0% {
    left: -150%;
  }
  100% {
    left: 150%;
  }
}

.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
}

.btn-shine:hover::before {
  animation: shineButton 0.8s;
}

/* Pulse doux pour les icônes */
@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.icon-pulse:hover {
  animation: iconPulse 1s ease-in-out infinite;
}

/* Premium Section Title Styles */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-gradient {
  background-size: 200% auto;
  animation: gradient-shift 4s ease infinite;
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #00873E, #FDD835, #D72638);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.section-title:hover::before {
  opacity: 1;
}

/* Animated underline on scroll */
@keyframes underline-grow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.section-title.active .absolute {
  animation: underline-grow 1s ease-out forwards;
  width: 100% !important;
}

/* Decorative lines animation */
@keyframes line-pulse {
  0%, 100% {
    opacity: 0.5;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1);
  }
}

.fade-in-up > div:first-child > div {
  animation: line-pulse 3s ease-in-out infinite;
}

/* Active state for navigation links */
.nav-link.active {
  color: #00873E !important;
}

.nav-link.active span {
  width: 100% !important;
  background-color: #00873E !important;
}

.mobile-nav-link.active {
  background-color: rgba(0, 135, 62, 0.1);
}

.mobile-nav-link.active > div:last-child {
  height: 70% !important;
}

/* Typing subtitle animation */
.typing-subtitle .typed-content {
  display: inline;
}

.typing-subtitle .typing-cursor {
  display: none;
  animation: cursorBlink 1s step-end infinite;
  color: #00873E;
  font-weight: bold;
}

.typing-subtitle.typing .typing-cursor {
  display: inline;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}