/* ========================================
   FOOTER — structure type Aramco
======================================== */

.site-footer {
    --footer-text: #1a1a1a;
    --footer-text-muted: #64748b;
    --footer-border: rgba(15, 23, 42, 0.14);

    width: 100%;
    background: #f2f4f6;
    color: var(--footer-text);
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
}

.footer-container {
    width: min(1240px, calc(100% - 80px));
    margin: 0 auto;
    padding: 88px 0 48px;
}

/* ========================================
   COLONNES PRINCIPALES
======================================== */

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 1.2fr) auto;
    column-gap: clamp(40px, 6vw, 88px);
    row-gap: 40px;
    align-items: start;
    padding-bottom: 72px;
}

.footer-column h3 {
    margin: 0 0 28px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--footer-text);
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column li {
    margin: 0 0 14px;
}

.footer-column li:last-child {
    margin-bottom: 0;
}

.footer-column a {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--footer-text);
}

.footer-group-note {
    margin: 22px 0 0;
    max-width: 28ch;
    font-size: 12px;
    line-height: 1.55;
    color: #94a3b8;
}

/* ========================================
   RÉSEAUX SOCIAUX — grille à droite
======================================== */

.footer-social-block {
    justify-self: end;
    padding-top: 2px;
}

.footer-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 44px);
    gap: 14px 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-social-grid li:nth-child(3) {
    grid-column: 2;
}

.footer-social-grid a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--footer-border);
    border-radius: 50%;
    color: var(--footer-text);
    text-decoration: none;
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.footer-social-grid a:hover {
    border-color: #f06408;
    color: #f06408;
    background: rgba(240, 100, 8, 0.08);
}

/* ========================================
   BARRE BASSE
======================================== */

.footer-bottom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding-top: 8px;
}

.footer-copy {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--footer-text-muted);
}

.footer-scroll-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid var(--footer-border);
    border-radius: 50%;
    background: transparent;
    color: var(--footer-text);
    font-size: 14px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.footer-scroll-top:hover {
    border-color: #f06408;
    color: #f06408;
    background: rgba(240, 100, 8, 0.08);
}

.footer-logo {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.footer-logo img {
    display: block;
    width: auto;
    height: 42px;
    max-width: 160px;
    object-fit: contain;
}

/* ========================================
   RESPONSIVE TABLET
======================================== */

@media (max-width: 980px) {

    .footer-container {
        width: calc(100% - 56px);
        padding: 72px 0 40px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        padding-bottom: 56px;
    }

    .footer-social-block {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .footer-bottom {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "copy logo"
            "top top";
    }

    .footer-copy {
        grid-area: copy;
    }

    .footer-logo {
        grid-area: logo;
    }

    .footer-scroll-top {
        grid-area: top;
        justify-self: center;
        margin-top: 20px;
    }
}

/* ========================================
   RESPONSIVE MOBILE
======================================== */

@media (max-width: 640px) {

    .footer-container {
        width: calc(100% - 40px);
        padding: 56px 0 32px;
    }

    .footer-main {
        grid-template-columns: 1fr;
        row-gap: 36px;
        padding-bottom: 40px;
    }

    .footer-column h3 {
        margin-bottom: 18px;
    }

    .footer-column li {
        margin-bottom: 12px;
    }

    .footer-bottom {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 20px;
    }

    .footer-copy,
    .footer-logo {
        justify-self: center;
    }
}
