.footer {
    width: 100%;
    background-color: var(--bg-secondary);
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    position: relative;
}

.footer-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
}

.footer-logo {
    height: 90px;
    object-fit: contain;
}

.footer-description {
    max-width: 360px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--txt-main);
}

.footer-center,
.footer-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* Position the middle footer block absolutely so it's centered relative to the footer */
.footer-center { position: absolute; left: 50%; transform: translateX(-50%); }

/* Stack items in the right column: phone above email, aligned to the right */
.footer-right { flex-direction: column; align-items: flex-end; gap: 6px; }

.footer-phone,
.footer-mail {
    text-decoration: none;
    color: var(--txt-main);
    font-weight: 600;
}

.footer-phone {
    font-size: 18px;
}

/* Visually shift the phone link slightly left to appear centered within the footer */
.footer-phone { display: inline-flex; align-items: center; }
.footer-mail { display: inline-flex; align-items: center; }

.footer-mail {
    font-size: 16px;
}

.footer-icon,
.footer-icon-mail {
    height: 28px;
    width: 28px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .footer {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        text-align: center;
    }

    .footer-center,
    .footer-right {
        flex-direction: column;
    }
    .footer-center { position: static; transform: none; margin: 0; }
    .footer-phone { transform: none; }
    .footer-mail { transform: none; }
}

@media (max-width: 480px) {
    .footer { padding: 30px 20px; }
    .footer-description { max-width: 100%; }
}

/* Footer bottom copyright block */
.footer-bottom {
    width: 100%;
    background-color: var(--bg-secondary);
    text-align: center;
    padding: 12px 60px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--txt-main);
}
.footer-bottom p {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

@media (max-width: 480px) {
    .footer-bottom { padding: 12px 20px; }
}

.scroll-to-top {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 1000;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    /* Masqué tant que la page n'est pas défilée */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.scroll-to-top:hover {
    filter: brightness(1.15);
}

.scroll-to-top:focus-visible {
    outline: 3px solid var(--txt-main);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .scroll-to-top {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
    }
}
