/* =========================================================
 * Internal Footer — CSS "Scopé" & Responsive
 * ========================================================= */

/* Classe utilitaire pour l'accessibilité (Screen Reader only)
 *  Permet de cacher le texte visuellement mais le garder pour les lecteurs d'écran */
.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.internal-footer {
    /* Variables locales pour faciliter la maintenance */
    --footer-bg-light: #f8f9fa;
    --footer-bg-dark: #111827;
    --footer-text-light: #374151;
    --footer-text-dark: #d1d5db;
    --footer-border-light: #e5e7eb;
    --footer-border-dark: #374151;

    background-color: var(--footer-bg-dark); /* Défaut Dark (souvent plus classe en footer) */
    color: var(--footer-text-dark);
    border-top: 1px solid var(--footer-border-dark);
    padding: 3rem 0 2rem;
    font-family: var(--font-sans, system-ui, sans-serif);
    font-size: 0.9rem;
    margin-top: auto; /* Pousse le footer en bas si flex-column */
}

/* Support du Thème Clair si défini via data-theme sur html/body */
:root[data-theme="light"] .internal-footer {
    background-color: var(--footer-bg-light);
    color: var(--footer-text-light);
    border-color: var(--footer-border-light);
}

.internal-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.internal-footer-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 1. NAV (Liens du haut : Mentions, Contact...) */
.internal-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.internal-footer-nav a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.internal-footer-nav a:hover {
    color: var(--accent, #FF6233);
}

/* 2. SECONDARY (Identité + Réseaux Sociaux) */
.internal-footer-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Bloc Identité (Mascotte + Textes) */
.internal-footer-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.internal-footer-mascotte {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.internal-footer-identity-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.internal-footer-title {
    font-weight: 800;
    font-size: 1.1em;
    color: var(--accent, #FF6233);
}
.internal-footer-subtitle {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Bloc Réseaux Sociaux */
.internal-footer-socials {
    display: flex;
    gap: 0.8rem;
}
.internal-footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 10%, transparent);
    color: inherit;
    text-decoration: none;
    transition: all 0.2s;
}
.internal-footer-socials a:hover {
    background: var(--accent, #FF6233);
    color: #fff;
    transform: translateY(-2px);
}

/* 3. BOTTOM (Copyright + Cookies) */
.internal-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    opacity: 0.7;
    padding-top: 1rem;
    border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}
.internal-footer-bottom a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.internal-footer-bottom a:hover {
    color: var(--accent, #FF6233);
}

/* =========================================================
 * RESPONSIVE (Mobile < 680px)
 * RÈGLE : Cacher Nav & Identité. Garder Socials & Bottom.
 * ========================================================= */
@media (max-width: 680px) {

    .internal-footer {
        padding: 2rem 0 1.5rem;
    }

    /* 1. On cache la Navigation du haut */
    .internal-footer-nav {
        display: none;
    }

    /* 2. On modifie le bloc secondaire pour ne garder que les réseaux */
    .internal-footer-secondary {
        justify-content: center; /* Centre les réseaux sociaux */
        padding-bottom: 0;
    }

    /* On cache l'identité (Mascotte + Titre) */
    .internal-footer-identity {
        display: none;
    }

    /* On grossit un peu les icônes réseaux sur mobile pour le tactile */
    .internal-footer-socials {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .internal-footer-socials a {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    /* 3. Bottom Layout Mobile */
    .internal-footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        border-top: none; /* Plus joli sans la ligne sur mobile si c'est épuré */
        padding-top: 0;
    }

    /* On s'assure que Bottom Left (Copyright) est visible */
    .internal-footer-bottom-left {
        order: 2; /* On peut mettre le copyright en dernier si on veut */
    }
    .internal-footer-bottom-right {
        order: 1;
    }
}
