@import url('theme-vars.css');

/* Isolation forte : même rendu partout (index, quiz, vidéos…) */
footer.site-footer.footer,
.site-footer.footer,
footer.site-footer {
    display: block !important;
    background-color: var(--tcf-footer-bg, #141622) !important;
    color: var(--tcf-text-on-dark, #f8fafc) !important;
    padding: 4rem 0 0 !important;
    position: relative !important;
    margin-top: 4rem !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    float: none !important;
    clear: both !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
    text-align: left !important;
    overflow: visible !important;
    z-index: 1 !important;
}

.site-footer {
    background-color: var(--tcf-footer-bg);
    color: var(--tcf-text-on-dark);
    padding: 4rem 0 0;
    position: relative;
    margin-top: 4rem;
}

.site-footer .footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.15rem;
}

.site-footer .footer-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 2.5rem;
    margin-bottom: 3rem;
}

.site-footer .footer-col {
    min-width: 0;
}

.site-footer .footer-col.footer-about {
    overflow: visible;
}

@media (max-width: 991px) {
    .site-footer .footer-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .site-footer .footer-bottom {
        padding: 1.5rem 0 calc(1.5rem + var(--tcf-mobile-nav-h, 4.6rem) + env(safe-area-inset-bottom, 0px));
    }

    .site-footer .scroll-top-footer,
    .site-footer .scroll-top-footer.show {
        bottom: calc(var(--tcf-mobile-nav-h, 4.6rem) + 1rem + env(safe-area-inset-bottom, 0px)) !important;
        right: 0.85rem !important;
        left: auto !important;
        width: 46px;
        height: 46px;
        z-index: 1185 !important;
    }
}

.site-footer .footer-col h5 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.site-footer .footer-col h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--tcf-gradient);
    border-radius: 3px;
}

/* Logo + nom toujours côte à côte, rapprochés */
.site-footer .footer-logo {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.3rem;
    width: auto;
    max-width: 100%;
    margin-bottom: 1.2rem;
}

.site-footer .footer-logo .footer-logo-text {
    display: inline-block;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.82rem, 2.2vw, 0.98rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: #ffffff;
}

.site-footer .footer-logo .tcf-brand-logo,
.site-footer .footer-logo .tcf-brand-logo--footer {
    margin-right: 0 !important;
    flex-shrink: 0;
}

.site-footer .footer-description {
    margin-bottom: 1.8rem;
    line-height: 1.7;
    color: #ced4da;
    font-size: 1.05rem;
}

.site-footer .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 0.9375rem;
    line-height: 1.5;
    min-width: 0;
}

.site-footer .footer-contact .contact-item span,
.site-footer .footer-contact .contact-item a,
.site-footer .footer-contact .contact-item a:any-link,
.site-footer .footer-contact .contact-item a:link,
.site-footer .footer-contact .contact-item a:visited,
.site-footer .footer-contact .contact-item a:hover,
.site-footer .footer-contact .contact-item a:active,
.site-footer .footer-contact .contact-item a:focus,
.site-footer .footer-contact a[href^="tel"],
.site-footer .footer-contact a[href^="mailto"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
    word-break: break-word;
}

.site-footer .footer-contact .contact-item a:hover,
.site-footer .footer-contact .contact-item a:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.55) !important;
}

.site-footer .contact-item i {
    background: var(--tcf-gradient);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
}

.site-footer .footer-links {
    list-style: none;
}

.site-footer .footer-links li { margin-bottom: 0.9rem; }

.site-footer .footer-links a {
    color: #ced4da;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.site-footer .footer-links a:hover {
    color: var(--tcf-primary);
    padding-left: 6px;
}

.site-footer .footer-links i {
    margin-right: 0.7rem;
    font-size: 0.9rem;
    color: var(--tcf-primary);
}

.site-footer .newsletter-desc {
    margin-bottom: 1.8rem;
    color: #ced4da;
    line-height: 1.7;
}

.site-footer .newsletter-form input {
    padding: 1rem 1.2rem;
    margin-bottom: 1.2rem;
    border: none;
    border-radius: 6px;
    width: 100%;
    font-size: 1rem;
}

.site-footer .newsletter-form button {
    background: var(--tcf-gradient);
    color: var(--tcf-white);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

.site-footer .footer-bottom {
    background: rgba(0, 0, 0, 0.25);
    padding: 1.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer .copyright p {
    margin: 0;
    color: #ced4da;
}

.site-footer .copyright span {
    color: var(--tcf-primary);
    font-weight: 600;
}

.site-footer .social-links {
    display: flex;
    gap: 1rem;
}

.site-footer .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--tcf-text-on-dark);
}

.site-footer .social-links a:hover {
    background: var(--tcf-primary);
}

.site-footer .scroll-top-footer {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 50px;
    height: 50px;
    background: var(--tcf-gradient);
    color: var(--tcf-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.site-footer .scroll-top-footer.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .site-footer .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    footer.site-footer.footer,
    .site-footer.footer,
    footer.site-footer {
        padding-top: 3rem !important;
        margin-top: 2.5rem !important;
    }

    .site-footer .footer-container {
        padding: 0 1rem;
    }

    .site-footer .footer-col h5 {
        font-size: 1.2rem;
        margin-bottom: 1.1rem;
    }

    .site-footer .footer-description,
    .site-footer .newsletter-desc {
        font-size: 0.95rem;
    }
}

/* Quiz / pages à fond gris : le footer garde son fond sombre */
body.tcf-quiz-with-site-nav > footer.site-footer,
body.tcf-page-abonnement > footer.site-footer,
body.tcf-posts-page > footer.site-footer {
    background-color: var(--tcf-footer-bg, #141622) !important;
    color: var(--tcf-text-on-dark, #f8fafc) !important;
}
