/* ==========================================
   Footer ANCESU — Fond bleu pâle, arc concave
   ========================================== */

.c-footer {
    margin-top: 0;
    position: relative;
    z-index: 10;
    font-family: var(--font-family);
}

/* ==========================================
   Body — fond bleu pâle, coins arrondis
   ========================================== */
.c-footer__body {
    background-color: #eef2f8;
    color: var(--color-text, #313131);
    padding: 4rem 0 2rem;
    position: relative;
    border-radius: 3rem 3rem 0 0;
    margin-top: 4rem;
}

/* ==========================================
   Header : logo + slogan | mission card
   ========================================== */
.c-footer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.c-footer__brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md, 1rem);
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.c-footer__brand:hover {
    opacity: 0.8;
    text-decoration: none;
}

.c-footer__logo {
    display: block;
    height: 8.125rem;
    width: auto;
}

.c-footer__slogan {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-navy, #344b8d);
    line-height: 1.25;
}

.c-footer__mission {
    margin: 0;
    font-size: var(--font-size-sm, 1.25rem);
    color: #fff;
    line-height: 1.55;
    max-width: 26rem;
    text-align: left;
    background: var(--section-ancesu, #aebd15);
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
}

/* ==========================================
   Navigation — 5 colonnes compactes
   ========================================== */
.c-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.c-footer__col {
    min-width: 0;
}

.c-footer__headline {
    font-weight: 700;
    font-size: var(--font-size-xs, 0.75rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 1rem;
    color: var(--color-navy, #344b8d);
}

.c-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.c-footer__col li + li {
    margin-top: 0.375rem;
}

.c-footer__col ul a {
    color: var(--color-text-light, #64748b) !important;
    text-decoration: none !important;
    font-size: var(--font-size-sm, 0.875rem);
    transition: color 0.15s ease !important;
}

.c-footer__col ul a:hover {
    color: var(--color-navy, #344b8d) !important;
    opacity: 1 !important;
}

/* ==========================================
   Bottom : Contact | Réseaux | Newsletter
   ========================================== */
.c-footer__bottom {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.5rem;
    padding-top: 2rem;
}

.c-footer__bottom-label {
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-navy, #344b8d);
    margin: 0 0 0.75rem;
}

/* Contact */
.c-footer__contact {
    flex: 1;
    min-width: 0;
}

.c-footer__address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-light, #64748b);
}

.c-footer__address a {
    color: var(--color-text-light, #64748b) !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.c-footer__address a:hover {
    color: var(--color-navy, #344b8d) !important;
    opacity: 1 !important;
}

/* Social */
.c-footer__social {
    flex-shrink: 0;
}

.c-footer__social-links {
    display: flex;
    gap: 0.5rem;
}

.c-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(52, 75, 141, 0.2);
    color: var(--color-navy, #344b8d) !important;
    background-color: rgba(52, 75, 141, 0.06);
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease !important;
}

.c-footer__social-link:hover {
    color: #fff !important;
    background-color: var(--section-ancesu, #aebd15);
    border-color: var(--section-ancesu, #aebd15);
    opacity: 1 !important;
}

/* Newsletter */
.c-footer__newsletter {
    flex-shrink: 0;
}

.c-footer__newsletter-form {
    display: flex;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid rgba(52, 75, 141, 0.2);
    background: #fff;
    transition: border-color 0.2s ease;
}

.c-footer__newsletter-form:focus-within {
    border-color: var(--color-navy, #344b8d);
}

.c-footer__newsletter-input {
    flex: 1;
    min-width: 0;
    width: 14rem;
    padding: 0.625rem 0.875rem;
    font-family: var(--font-family);
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text, #313131);
    background: transparent;
    border: none;
    outline: none;
}

.c-footer__newsletter-input::placeholder {
    color: var(--color-text-light, #64748b);
}

.c-footer__newsletter-btn {
    padding: 0.625rem 1.25rem;
    font-family: var(--font-family);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    color: #fff;
    background-color: var(--color-navy, #344b8d);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease !important;
}

.c-footer__newsletter-btn:hover {
    background-color: var(--section-ancesu, #aebd15);
}

/* ==========================================
   Barre légale
   ========================================== */
.c-footer__legal {
    background-color: var(--color-navy, #344b8d);
    font-size: var(--font-size-xs, 0.75rem);
    padding: 1rem 0;
}

.c-footer__legal .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.c-footer__legal p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

.c-footer__legal-links ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.c-footer__legal-links a {
    color: rgba(255, 255, 255, 0.6) !important;
    text-decoration: none !important;
    transition: color 0.15s ease !important;
}

.c-footer__legal-links a:hover {
    color: #fff !important;
    opacity: 1 !important;
}

/* ==========================================
   Back to Top button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background-color: var(--color-navy, #344b8d);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(52, 75, 141, 0.3);
    transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.15s linear, background-color 0.2s ease;
    opacity: 0;
    transform: translateY(1rem);
    pointer-events: none;
}

.back-to-top[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--section-ancesu, #aebd15);
    box-shadow: 0 2px 10px rgba(174, 189, 21, 0.35);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--color-navy, #344b8d);
    outline-offset: 3px;
}

/* Tooltip CSS */
.back-to-top::after {
    content: 'Haut de page';
    position: absolute;
    right: calc(100% + 0.625rem);
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-text, #313131);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-family);
    padding: 0.3rem 0.625rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.back-to-top:hover::after {
    opacity: 1;
}

/* ==========================================
   Responsive — Tablette (< 992px)
   ========================================== */
@media (max-width: 61.9375em) {
    .c-footer__body {
        border-radius: 2rem 2rem 0 0;
        margin-top: 3rem;
    }

    .c-footer__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .c-footer__mission {
        text-align: left;
        max-width: none;
    }

    .c-footer__nav {
        gap: 1.5rem;
    }

    .c-footer__bottom {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .c-footer__contact {
        flex-basis: 100%;
    }
}

/* ==========================================
   Responsive — Mobile (< 768px)
   ========================================== */
@media (max-width: 47.9375em) {
    .c-footer__body {
        padding: 2.5rem 0 1.5rem;
        border-radius: 1.5rem 1.5rem 0 0;
        margin-top: 2.5rem;
    }

    .c-footer__header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .c-footer__logo {
        height: 3.5rem;
    }

    .c-footer__nav {
        gap: 1.5rem;
    }

    .c-footer__col {
        width: calc(50% - 0.75rem);
    }

    .c-footer__bottom {
        flex-direction: column;
        gap: 1.5rem;
    }

    .c-footer__newsletter-form {
        flex-direction: column;
    }

    .c-footer__newsletter-input {
        width: auto;
    }

    .c-footer__newsletter-btn {
        text-align: center;
    }

    .back-to-top {
        width: 2.5rem;
        height: 2.5rem;
        right: 1rem;
    }

    .back-to-top::after {
        display: none;
    }
}

/* ==========================================
   Responsive — Petit mobile (< 576px)
   ========================================== */
@media (max-width: 35.9375em) {
    .c-footer__body {
        border-radius: 1rem 1rem 0 0;
    }

    .c-footer__col {
        width: 100%;
    }

    .c-footer__headline {
        margin-bottom: 0.5rem;
    }

    .c-footer__slogan {
        display: none;
    }

    .c-footer__legal .container {
        flex-direction: column;
        text-align: center;
    }

    .c-footer__legal-links ul {
        justify-content: center;
    }
}

/* ==========================================
   Print : masquer
   ========================================== */
@media print {
    .c-footer,
    .back-to-top {
        display: none !important;
    }
}
