/* ============================================================
   Footer principal – pleine largeur avec image et overlay
============================================================ */
#site-footer {
    width: 100%;
    position: relative;
    color: var(--color-white);
    background-image: url('../../img/fond-pied-de-page-bois.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Overlay marron clair */
#site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgb(100 68 39 / 80%);
    z-index: 0;
}

/* Contenu au-dessus de l'overlay */
#site-footer>.container,
#site-footer .footer-bottom {
    position: relative;
    z-index: 1;
}

/* Liens du footer */
#site-footer a {
    transition: transform 0.2s ease, color 0.2s ease;
}

#site-footer a:hover {
    transform: translateX(4px);
}

/* ============================================================
   Ligne 1 : Formations + Coordonnées + Carte
============================================================ */
.footer-grid {
    display: grid;
    grid-template-columns: 0.8fr 0.8fr 2.4fr;
    gap: 1.5rem;
    padding: 0.8rem 4rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.2rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0.8rem 1.2rem;
    }
}

/* Blocs et titres */
.footer-block h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-block h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 50%;
    height: 2px;
    background: var(--color-primary-green);
}

.footer-block p,
.footer-block li {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Coordonnées et réseaux sociaux */
.footer-contact li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    min-width: 20px;
    text-align: center;
    color: var(--color-primary-green);
}

/* Email footer UX */
.footer-email {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.footer-email-help {
    font-size: 0.9rem;
}

.footer-email-help a {
    position: relative;
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.footer-email-help a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: var(--color-white);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-white);
    border-radius: 50%;
    color: var(--color-white);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-social a:hover {
    border-color: var(--color-primary-green);
}

/* Menu formations */
.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-menu a::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 600;
    font-size: 0.8rem;
}

/* Carte et accès */
.footer-map-wrapper {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

#footer-map {
    margin-top: -50px;
    flex: 2;
    height: 280px;
    border-radius: 4px;
    overflow: hidden;
    min-height: 200px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#footer-map:hover {
    opacity: 0.9;
}

.footer-map-access {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.footer-map-access ul {
    padding: 0;
    margin: 0;
}

.footer-map-access li {
    margin-bottom: 6px;
}

.footer-map-access li i {
    margin-right: 10px;
    color: var(--color-primary-green);
}

/* Corrections responsives */
@media (max-width: 992px) {
    .footer-block:last-child {
        order: 1;
        /* Mettre la carte en premier sur 2 colonnes */
        grid-column: 1 / -1;
        /* Prendre toute la largeur */
    }
}

@media (max-width: 768px) {
    .footer-map-wrapper {
        flex-direction: column;
        gap: 15px;
    }

    #footer-map {
        height: 250px;
        /* Augmenter la hauteur en mobile */
        margin-top: 0;
        /* Supprimer le margin négatif */
        width: 100%;
    }

    .footer-map-access {
        order: -1;
        /* Mettre les accès avant la carte */
    }
}

@media (max-width: 600px) {
    #footer-map {
        height: 220px;
        margin-top: 10px;
    }
}

/* ============================================================
   Ligne 2 : Tuteurs + Partenaires + Certifications
============================================================ */
.footer-partners-certifications {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 3rem;
    background-color: var(--color-white);
    padding: 2rem 0;
}

/* Conteneurs des logos */
.footer-tuteurs,
.footer-partners,
.footer-certifications {
    display: flex;
    flex-wrap: wrap;
    column-gap: 2.5rem;
    row-gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Boîte des logos */
.footer-tuteur,
.footer-partner,
.footer-certification {
    width: auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-tuteur img,
.footer-partner img,
.footer-certification img {
    height: 100%;
    /* max-height: 80px; */
    max-width: 140px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
}

.footer-tuteur img:hover,
.footer-partner img:hover,
.footer-certification img:hover {
    transform: translateY(-3px);
}

/* Accessibilité : utilitaire pour éléments invisibles mais lus par lecteurs d'écran */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 992px) {
    .footer-partners-certifications {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================================
   Footer bottom
============================================================ */
.footer-bottom {
    width: 100%;
    text-align: center;
    padding: 1rem 4rem;
    color: var(--color-white);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom-right {
    display: flex;
}

.footer-bottom-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom-links li a {
    display: inline-block;
    /* indispensable */
    transition: transform 0.2s ease, color 0.2s ease;
}

.footer-bottom-links li a:hover {
    transform: translateX(4px);
}


@media (max-width: 600px) {
    .footer-bottom {
        padding: 15px 20px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        row-gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        row-gap: 1rem;
        align-items: center;
    }
}

/* Overlay sur la carte preview */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

#footer-map:hover .map-overlay {
    opacity: 1;
}

.map-overlay-content {
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--color-dark-grey, #333);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-overlay-content svg {
    color: var(--color-primary-green, #4CAF50);
}

/* Modale */
.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.map-modal.active {
    opacity: 1;
    visibility: visible;
}

.map-modal-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.map-modal.active .map-modal-content {
    transform: scale(1);
}

.map-modal-header {
    padding: 20px;
    background: var(--color-primary-green, #4CAF50);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.map-modal-close {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.map-modal-close:hover {
    opacity: 0.7;
}

.modal-map-container {
    flex: 1;
    min-height: 0;
    /* Important pour Flexbox */
}

.map-modal-info {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.location-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    gap: 20px;
}

.location-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.location-icon {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
    color: var(--color-orange);
}

.location-item div {
    text-align: left;
}

.location-item strong {
    color: var(--color-dark-grey, #333);
}

.map-directions-btn {
    display: block;
    margin: 0 auto;
    padding: 12px 24px;
    background: var(--color-primary-green);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    max-width: 200px;
    transition: background-color 0.2s ease;
}

.map-directions-btn:hover {
    background-color: var(--color-primary-green);
    color: var(--color-white);
    text-decoration: none;
}


/* Style pour l'icône train personnalisée */
.train-marker {
    background: transparent;
    border: 2px solid var(--color-orange);
    border-radius: 50%;
    color: var(--color-orange);

    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;

    font-size: 16px;
    line-height: 1;
}


/* Responsive */
@media (max-width: 768px) {
    .map-modal-content {
        width: 98%;
        height: 90vh;
    }

    .location-info {
        flex-direction: column;
        gap: 15px;
    }

    .location-item {
        justify-content: center;
        text-align: center;
    }

    .location-item div {
        text-align: center;
    }

    .map-modal-header {
        padding: 15px;
    }

    .map-modal-header h3 {
        font-size: 1.1rem;
    }

    .map-modal-info {
        padding: 15px;
    }
}