<footer class="footer_style_2">
  <div class="container-fluid">
      <div class="footer">
        <div class="row no-gutters">
          <div class="col-md-3 col-sm-6 col-xs-12" style="padding-top: 20px;">
            <div class="main-heading left_text">
              <h2>SERVICES-AE</h2>
            </div>
            <ul class="footer-menu">
              <li><a href="index.php"><i class="fa fa-angle-right"></i> Accueil</a></li>
              <li><a href="services.php"><i class="fa fa-angle-right"></i> Nos Services</a></li>
              <li><a href="contact-ae.php"><i class="fa fa-angle-right"></i> Contact</a></li>
              <li><a href="services.php#maintenance"><i class="fa fa-angle-right"></i> Maintenance PC</a></li>
              <li><a href="services.php#reseaux"><i class="fa fa-angle-right"></i> Réseaux & Sécurité</a></li>
            </ul>
          </div>
          <div class="col-md-3 col-sm-6 col-xs-12" style="padding-top: 20px;">
            <div class="main-heading left_text">
              <h2>Nos Services</h2>
            </div>
            <ul class="footer-menu">
              <li><a href="services.php#maintenance"><i class="fa fa-angle-right"></i> Maintenance & Réparation</a></li>
              <li><a href="services.php#reseaux"><i class="fa fa-angle-right"></i> Réseaux & Sécurité</a></li>
              <li><a href="services.php#surveillance"><i class="fa fa-angle-right"></i> Vidéo Surveillance</a></li>
              <li><a href="services.php#web"><i class="fa fa-angle-right"></i> Développement Web</a></li>
              <li><a href="services.php#support"><i class="fa fa-angle-right"></i> Support Technique</a></li>
            </ul>
          </div>
          <div class="col-md-3 col-sm-6 col-xs-12" style="padding-top: 20px;">
            <div class="main-heading left_text">
              <h2>Contactez-nous</h2>
            </div>
            <p>Marrakech et région<br>
              Intervention à domicile<br>
              <span style="font-size:18px;"><strong>Youssef:</strong> <a href="tel:+212665446585">+212 665 446 585</a></span><br>
              <span style="font-size:18px;"><strong>Rachid:</strong> <a href="tel:+212663690212">+212 663 690 212</a></span></p>
          </div>
           <div class="col-md-3 col-sm-6 col-xs-12" style="padding-top: 20px;">
            <div class="main-heading left_text">
              <img src="images/logos/logo-ae-w.png" alt="SERVICES-AE" style="padding-top: 50px; max-width: 300px; height: auto;">
            </div>
        </div>
      </div>
      <div class="cprt">
        <div class="container">
          <p>SERVICES-AE © <?php echo date('Y'); ?> - Solutions Informatiques Professionnelles</p>
        </div>
      </div>
  </div>
</footer>

<!-- Back to Top Button -->
<div id="back-to-top" onclick="scrollToTop()">
    <i class="fa fa-arrow-up"></i>
</div>

<!-- Back to Top CSS -->
<style>
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #011f3e 0%, #1a365d 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(1, 31, 62, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

#back-to-top:hover {
    background: linear-gradient(135deg, #1a365d 0%, #2d5a87 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(1, 31, 62, 0.4);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}
</style>

<!-- Back to Top JavaScript -->
<script>
// Afficher/masquer le bouton selon la position de scroll
window.addEventListener('scroll', function() {
    const backToTopBtn = document.getElementById('back-to-top');
    
    if (window.scrollY > 300) {
        backToTopBtn.classList.add('show');
    } else {
        backToTopBtn.classList.remove('show');
    }
});

// Fonction de scroll vers le haut
function scrollToTop() {
    window.scrollTo({
        top: 0,
        behavior: 'smooth'
    });
}
</script>

<!-- Cookies Consent Popup -->
<div id="cookie-consent-popup" class="cookie-consent-popup" style="display: none;">
    <div class="cookie-consent-content">
        <div class="cookie-consent-text">
            <i class="fa fa-cookie-bite" style="font-size: 24px; margin-right: 10px;"></i>
            <strong>Politique de Cookies</strong><br>
            Nous utilisons des cookies pour améliorer votre expérience sur notre site. 
            En continuant à naviguer, vous acceptez notre utilisation des cookies.
            <a href="cookies.php" target="_blank" style="color: #007bff; text-decoration: underline;">En savoir plus</a>
        </div>
        <div class="cookie-consent-buttons">
            <button id="accept-cookies" class="btn btn-primary btn-sm">Accepter</button>
            <button id="decline-cookies" class="btn btn-secondary btn-sm">Refuser</button>
        </div>
    </div>
</div>

<style>
.cookie-consent-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.cookie-consent-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.cookie-consent-buttons {
    margin-left: 20px;
}

.cookie-consent-buttons .btn {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-buttons {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .cookie-consent-buttons .btn {
        margin-left: 5px;
        margin-right: 5px;
    }
}
</style>

<script>
document.addEventListener('DOMContentLoaded', function() {
    const popup = document.getElementById('cookie-consent-popup');
    const acceptBtn = document.getElementById('accept-cookies');
    const declineBtn = document.getElementById('decline-cookies');
    
    // Check if user has already made a choice
    const cookieChoice = localStorage.getItem('cookie-consent');
    
    if (!cookieChoice) {
        // Show popup if no choice made
        popup.style.display = 'block';
    }
    
    // Accept cookies
    acceptBtn.addEventListener('click', function() {
        localStorage.setItem('cookie-consent', 'accepted');
        popup.style.display = 'none';
        // Here you can enable analytics or other cookie-dependent features
        console.log('Cookies accepted');
    });
    
    // Decline cookies
    declineBtn.addEventListener('click', function() {
        localStorage.setItem('cookie-consent', 'declined');
        popup.style.display = 'none';
        // Here you can disable non-essential cookies
        console.log('Cookies declined');
    });
});
</script>