/* css/footer.css — Pied de page 5 colonnes Studio Zarbix / AUBERON-EcoSYSTEM + Modales légales natives */

.site-footer {
    background-color: var(--brand-dark-deep);
    color: var(--brand-paper);
    border-top: 3px solid var(--brand-cobalt);
}

.site-footer__top {
    padding-block: clamp(2.5rem, 5vh, 3.75rem) clamp(1.75rem, 3.5vh, 2.5rem);
    border-bottom: 1px solid rgba(247, 248, 250, 0.12);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
}

.site-footer__brand {
    max-width: 580px;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 0.85rem;
}

.site-footer__logo img {
    height: 44px;
    width: auto;
}

.site-footer__tagline {
    font-size: 0.94rem;
    line-height: 1.55;
    color: rgba(247, 248, 250, 0.8);
    margin-bottom: 0.9rem;
}

.site-footer__division {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.68rem;
    border-radius: 4px;
    border: 1px solid rgba(117, 184, 255, 0.42);
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9dc4ff;
}

.site-footer__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(1.5rem, 2.8vw, 2.25rem);
    padding-block: clamp(2rem, 4vh, 3rem);
}

.site-footer__col h3 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9dc4ff;
    margin-bottom: 0.85rem;
}

.site-footer__col ul {
    display: grid;
    gap: 0.48rem;
}

.site-footer__col a,
.site-footer__modal-btn {
    font-size: 0.88rem;
    color: rgba(247, 248, 250, 0.84);
    transition: color 0.2s ease, transform 0.2s var(--ease-out);
    display: inline-block;
    text-align: left;
    padding: 0;
}

.site-footer__col a:hover,
.site-footer__modal-btn:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.site-footer__social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin-top: 0.25rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(247, 248, 250, 0.12);
}

.site-footer__social-row a {
    font-size: 0.82rem;
    color: #9dc4ff;
}

.site-footer__social-row a:hover {
    color: #ffffff;
    transform: none;
    text-decoration: underline;
}

.back-top-btn,
.motion-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(247, 248, 250, 0.28);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-paper);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out);
}

.back-top-btn:hover,
.motion-toggle-btn:hover,
.motion-toggle-btn[aria-pressed="true"] {
    background-color: var(--brand-cobalt);
    border-color: var(--brand-cobalt);
    color: #ffffff;
    transform: translateY(-2px);
}

.site-footer__bottom {
    border-top: 1px solid rgba(247, 248, 250, 0.14);
    padding-block: 1.2rem calc(1.2rem + env(safe-area-inset-bottom));
}

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.65rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(247, 248, 250, 0.68);
}

/* Fenêtres modales légales natives (<dialog>) */
.legal-modal {
    width: min(92vw, 680px);
    max-height: min(86dvh, 760px);
    padding: 0;
    border: 1.5px solid var(--brand-line);
    border-top: 4px solid var(--brand-cobalt);
    border-radius: var(--radius-md);
    background-color: var(--brand-surface);
    color: var(--brand-ink);
    box-shadow: 0 28px 60px rgba(10, 12, 18, 0.42);
    overflow: hidden;
}

.legal-modal::backdrop {
    background-color: rgba(16, 18, 23, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.legal-modal__inner {
    display: flex;
    flex-direction: column;
    max-height: min(86dvh, 760px);
}

.legal-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--brand-line);
    background-color: var(--brand-paper);
}

.legal-modal__title {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--brand-ink);
}

.legal-modal__close {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--brand-line);
    background-color: var(--brand-surface);
    color: var(--brand-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.legal-modal__close:hover {
    background-color: var(--brand-ink);
    border-color: var(--brand-ink);
    color: var(--brand-surface);
}

.legal-modal__body {
    padding: 1.35rem 1.4rem 1.5rem;
    overflow-y: auto;
    display: grid;
    gap: 0.95rem;
    font-size: 0.92rem;
    line-height: 1.62;
    color: var(--brand-ink-muted);
}

.legal-modal__body p strong {
    color: var(--brand-ink);
}

.legal-modal__body a {
    color: var(--brand-cobalt);
    font-weight: 600;
    text-decoration: underline;
}

.legal-modal__note {
    padding: 0.75rem 0.95rem;
    border-radius: 6px;
    background-color: var(--brand-paper);
    border: 1px solid var(--brand-line);
    font-size: 0.84rem;
    color: var(--brand-ink);
}

@media (max-width: 1120px) {
    .site-footer__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 460px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}
