/* CSS extrait du footer pour optimisation - Chargé avec defer pour non-blocking */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes youtubeGlow {
    0%, 100% { color: #FF0000; }
    50% { color: #ff4444; }
}

/* Padding de 5px entre les zones du footer et le bord de l'écran pour tous les viewports */
.modern-footer > .container-fluid {
    padding-left: 5px !important;
    padding-right: 5px !important;
}

/* Conditions complémentaires par badge (documents pas encore rédigés) : cartes grisées, non cliquables */
.legal-link-inline.legal-link-inline--disabled {
    opacity: 0.5;
    color: #8a8f98;
    cursor: not-allowed;
    user-select: none;
}

.legal-link-inline.legal-link-inline--disabled:hover {
    background: rgba(255,255,255,0.03);
    color: #8a8f98;
    border-color: rgba(255,255,255,0.1);
}


@keyframes footerVideoCardGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255,140,0,0.08), 0 10px 28px rgba(0,0,0,0.35); }
    50% { box-shadow: 0 0 0 1px rgba(255,140,0,0.4), 0 14px 34px rgba(0,0,0,0.45); }
}

@keyframes footerVideoCardSheen {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}


/* Assombrissement / désassombrissement en fondu doux des vignettes YouTube au survol — footer uniquement, CSS pur (aucun JS) */
/* Transition posée sur l'état de repos (et pas seulement au survol) pour que le fondu soit identique à l'entrée ET à la sortie du survol. */
/* !important nécessaire : remplace les transitions inline incohérentes entre les 2 zones (ex: 'background-color' seul, sans 'opacity', sur le bloc vidéo unique du footer). */
footer.modern-footer .youtube-video-container .youtube-dark-overlay {
    transition: opacity 0.45s ease-in-out !important;
}

footer.modern-footer .youtube-video-container:hover .youtube-dark-overlay {
    opacity: 0 !important;
}

/* Garder la vignette éclairée quand on survole les flèches précédent/suivant du carrousel,
   pas seulement la vignette elle-même (les flèches sont hors de .youtube-video-container). */
footer.modern-footer .footer-brand-video-carousel:hover .fbv-slide.active .youtube-dark-overlay {
    opacity: 0 !important;
}

/* Encart vidéo YouTube dans le bloc branding */
.footer-brand-video-carousel {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-brand-video-carousel .fbv-slides {
    flex: 1;
    position: relative;
}

.footer-brand-video-carousel .fbv-slide {
    display: none;
}

.footer-brand-video-carousel .fbv-slide.active {
    display: block;
}

.footer-brand-video-carousel .fbv-arrow {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    width: 38px;
    height: 60px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-brand-video-carousel .fbv-arrow:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

.footer-brand-video-carousel .fbv-arrow:disabled {
    opacity: 0.4;
    cursor: default;
    transform: none;
}

@media (max-width: 768px) {
    .footer-brand-video-carousel .fbv-arrow {
        width: 30px;
        height: 50px;
        font-size: 1.2rem;
    }
}

.social-links-container {
    margin-top: 1.5rem;
}

/* Séparateur vertical entre catalogues Commercify et catalogues par pays */
@media (min-width: 576px) {
    .catalogues-countries-separator {
        border-left: 1px solid rgba(255,255,255,0.2);
        padding-left: 1.5rem;
    }
    html[dir="rtl"] .catalogues-countries-separator {
        border-left: none;
        padding-left: 0;
        border-right: 1px solid rgba(255,255,255,0.2);
        padding-right: 1.5rem;
    }
}

/* MODE PERFORMANCE: Désactiver les effets gourmands GPU */
body.performance-mode .modern-footer * {
    backdrop-filter: none !important;
    filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

/* Préserver les animations essentielles seulement */
body.performance-mode .footer-shine,
body.performance-mode .footer-youtube-icon,
body.performance-mode .footer-heart-icon {
    animation: none !important;
}

/* Responsive pour tablettes */
@media (min-width: 768px) and (max-width: 991.98px) {
    .footer-content {
        padding: 2rem 10px 1.5rem !important;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    .modern-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    .footer-brand-section,
    .footer-nav-section,
    .footer-community-section {
        padding: 1.2rem 0 !important;
    }
    .stat-card {
        padding: 1.3rem !important;
    }
    .stat-value {
        font-size: 1.6rem !important;
    }
    .footer-tagline {
        font-size: 1.2rem !important;
    }
    .footer-section-title {
        font-size: 1rem !important;
        margin-bottom: 1.2rem !important;
    }
    .footer-wordmark {
        font-size: 1.4rem !important;
    }
    .social-icon {
        font-size: 2rem !important;
        width: 45px !important;
        height: 45px !important;
    }
    .donation-btn {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
    }
    .footer-stats-section {
        padding: 2rem 0 !important;
    }
}

/* Viewport footer : 1 col smartphone, 2 cols tablette/HD vertical, 3 cols HD paysage/FHD, 4 cols 2K/4K */
@media (max-width: 767.98px) {
    .footer-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .modern-stats-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
}
@media (min-width: 768px) and (max-width: 1279.98px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .modern-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (min-width: 1280px) and (max-width: 1919.98px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .modern-stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 1920px) and (max-width: 2559.98px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .modern-stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 2560px) and (max-width: 3839.98px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .modern-stats-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (min-width: 3840px) {
    .footer-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .modern-stats-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Responsive pour mobile - Titres */
@media (max-width: 767.98px) {
    .desktop-title { display: none !important; }
    .mobile-title { display: inline !important; }
    .footer-content { padding: 2rem 10px 1.5rem !important; }
    .footer-grid { gap: 1rem !important; }
    .footer-brand-section,
    .footer-nav-section,
    .footer-community-section { padding: 1rem 0 !important; }
    .footer-stats-section { padding: 1.5rem 0 !important; }
    .footer-tagline { font-size: 1.1rem !important; }
    .footer-wordmark { font-size: 1.3rem !important; }
    .stat-card { padding: 1.2rem !important; }
    .stat-value { font-size: 1.5rem !important; }
    .social-icons-group { gap: 0.8rem !important; }
    .social-icon { font-size: 1.8rem !important; width: 40px !important; height: 40px !important; }
}

@media (max-width: 480px) {
    .footer-tagline { font-size: 1rem !important; }
    .footer-wordmark { font-size: 1.1rem !important; }
    .stat-value { font-size: 1.3rem !important; }
    .donation-btn { padding: 0.8rem 1.5rem !important; font-size: 0.9rem !important; }
    .donation-btn .ni-heart-fill { font-size: 1rem !important; }
    .donation-btn .ni-arrow-right { font-size: 0.8rem !important; }
    .donation-btn span { gap: 0.5rem !important; }
}

@media (max-width: 360px) {
    .donation-btn { padding: 0.6rem 1.2rem !important; font-size: 0.8rem !important; }
    .donation-btn .ni-heart-fill { font-size: 0.9rem !important; }
    .donation-btn .ni-arrow-right { font-size: 0.7rem !important; }
    .donation-section { margin-top: 1.5rem !important; }
}

.donation-btn:hover .ni-arrow-right {
    transform: translateX(5px);
}

.donation-btn:hover div {
    left: 100%;
}

@media (max-width: 767.98px) {
    .footer-content {
        padding: 2rem 10px 1.5rem !important;
    }
    .footer-grid {
        gap: 1rem !important;
    }
    .footer-brand-section,
    .footer-nav-section,
    .footer-community-section {
        padding: 1rem 0 !important;
    }
    .footer-stats-section {
        padding: 1.5rem 0 !important;
        margin-top: 0 !important;
    }
    .copyright-section {
        flex-direction: column !important;
        text-align: center !important;
    }
    .donation-btn {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
    }
    /* Séparateur visible uniquement sur mobile */
    .footer-section-separator-mobile {
        display: block !important;
        margin: 1.5rem 0 2rem 0 !important;
    }
    /* Espacement supplémentaire pour la section stats sur mobile */
    .footer-stats-section {
        margin-top: 1.5rem !important;
    }
    /* Espaceur mobile visible */
    .footer-mobile-spacer {
        display: block !important;
        margin: 1rem 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ISOLATION FOOTER - Namespace titres de section (bleu modèle INFORMATIONS PLATEFORME)
   Ces variables et règles sont scopées au footer pour qu'aucune page ne puisse
   écraser la couleur des titres. Bleu #1DA1F2 garanti sur toutes les pages.
   ═══════════════════════════════════════════════════════════════════════════════ */
footer.modern-footer {
    --cf-footer-section-title-color: #1DA1F2;
}
/* Titres de section bleus : PAGES DE NAVIGATION, LES CATALOGUES OFFICIELS, PLATEFORME EXPÉRIMENTALE, Avatars Demo, LES AUTRES CATALOGUES, INFORMATIONS PLATEFORME (exclut "Petites annonces mondiales" qui reste orange) */
footer.modern-footer .footer-section-title--blue,
footer.modern-footer .footer-section-subtitle,
footer.modern-footer .stats-header h3 {
    color: var(--cf-footer-section-title-color) !important;
}

/* Styles spécifiques pour smartphones uniquement */
@media (max-width: 576px) {
    .footer-section-separator-mobile {
        display: block !important;
        margin: 2rem 0 2.5rem 0 !important;
        height: 2px !important;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent) !important;
    }
    .footer-stats-section {
        margin-top: 2rem !important;
        padding-top: 2.5rem !important;
    }
    /* Espaceur mobile plus grand sur smartphone */
    .footer-mobile-spacer {
        display: block !important;
        margin: 1.5rem 0 !important;
    }
}

