/* ====================================
   FOOTER COMPLET - Design sur mesure avec animations
   wp-content/themes/custom-theme/src/assets/css/footer/footer.css
   ==================================== */

.site-footer {
    background: var(--white);
    margin-top: var(--space-sm);
}

/* ====================================
   🔒 MASQUAGE SUR PAGE CONTACT
   ==================================== */
body.page-template-contact .footer-main,
body.page-id-17 .footer-main {
    display: none !important;
}

/* ====================================
   📢 SECTION PRINCIPALE 60/40
   ==================================== */

.footer-main {
    padding: 170px 300px;
    margin-top: 50px;
}

.footer-main-wrapper {
    display: grid;
    grid-template-columns: 55% 32.5%;
    gap: var(--space-sm);
    align-items: end;
}

/* ====================================
   📝 COLONNE GAUCHE - MESSAGE 60%
   ==================================== */
.footer-left-content {
    padding: 0 35px 0 0;
}

.footer-message-wrapper {
    display: grid;
    grid-template-columns: 3% 95%;
    gap: var(--space-md);
    align-items: start;
}

/* ====================================
   🎬 CONTAINER ICÔNES ANIMÉES
   ==================================== */
.footer-icon-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 8px;
    width: 40px;
    height: 40px;
}

.footer-icon-item {
    position: absolute;
    top: 8px;
    left: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.footer-icon-item.active {
    opacity: 1;
    visibility: visible;
}

.footer-icon-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* ====================================
   🎬 CONTAINER TITRES ANIMÉS
   ==================================== */
.footer-message-content {
    display: flex;
    flex-direction: column;
}

.footer-titles-container {
    position: relative;
    min-height: 52px;
    margin-bottom: 0;
}

.footer-sub-title-fix {
    font-family: var(--font-primary);
    font-size: var(--h2-size);
    font-weight: 300;
    line-height: 45px;
    margin-bottom: 0;
    color: var(--dark);
}

.footer-title-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.footer-title-item.active {
    opacity: 1;
    visibility: visible;
}

.footer-main-title {
    font-family: var(--font-primary);
    font-size: var(--h2-size);
    font-weight: 900;
    line-height: 55px;
    margin-bottom: 0;
    color: var(--dark);
}

.footer-sous-titre {
    margin: 0;
    padding-top: 5px;
}

.footer-subtitle {
    font-family: var(--font-primary);
    font-size: var(--h4-size);
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    padding-top: 15px;
    text-transform: none;
}

/* ====================================
   📞 COLONNE DROITE - ACTIONS 40%
   ==================================== */
.footer-right-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
}

.footer-address {
    text-align: right;
    margin-bottom: var(--space-md);
}

.footer-address-line {
    font-family: var(--font-inter);
    font-size: var(--twenty-size);
    color: var(--dark);
    line-height:19px;
    font-weight: normal;
    margin-bottom: 4px;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-end;
}

/* ====================================
   🎯 BOUTONS FOOTER - Style identique au hero
   ==================================== */
.footer-button {
    /* Reset complet */
    all: unset;

    /* Affichage */
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center;
    position: relative;

    /* Typographie avec taille 25px */
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;

    /* Couleur état normal : coral */
    color: var(--coral);

    /* Pas de styles parasites */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-decoration: none;
    box-shadow: none;
    border-radius: 0;
    outline: none;

    /* Comportement */
    cursor: pointer;
    pointer-events: auto;

    /* Transitions pour animations */
    transition: all 0.4s ease;
    animation: none;
    transform: none;
}

/* Pseudo-élément pour la flèche - état initial en haut-droite */
.footer-button::after {
    content: "→";
    display: inline-block;
    margin-left: 8px;
    font-weight: 900;
    font-size: 0.8em;
    transition: all 0.4s ease;
    transform-origin: center;
    transform: rotate(-45deg);
}

/* ANIMATION HOVER : coral → primary + letter-spacing + flèche horizontal */
.footer-button:hover {
    color: var(--primary);
    letter-spacing: 2px;
    text-decoration: none;
    background: none;
    border: none;
    box-shadow: none;
    transform: none;
}

/* Animation de la flèche au hover : de haut-droite vers horizontal */
.footer-button:hover::after {
    transform: rotate(0deg);
}

/* Focus pour accessibilité */
.footer-button:focus {
    outline: 1px dotted var(--coral);
    outline-offset: 2px;
}

/* Active state */
.footer-button:active {
    color: var(--primary-dark);
}

/* ====================================
   🔒 MASQUAGE SUR PAGE CONTACT ET MENTIONS LÉGALES
   ==================================== */
body.page-template-contact .footer-main,
body.page-id-17 .footer-main,
body.page-id-633 .footer-main {
    display: none !important;
}

/* ====================================
   SÉPARATEUR
   ==================================== */
.footer-separator {
    height: 1px;
    background: var(--dark);
    max-width: var(--container-max);
    margin: auto;
    padding: 0 var(--container-padding);
}

/* ====================================
   SECTION NAVIGATION 20/60/20
   ==================================== */
.footer-bottom {
    padding: var(--space-lg) 0;
}

/* Version Desktop/Tablette - Visible par défaut */
.footer-bottom-desktop {
    display: block;
}

/* Version Mobile - Cachée par défaut */
.footer-bottom-mobile {
    display: none;
}

.footer-bottom-wrapper {
    display: grid;
    grid-template-columns: 20% 51% 20%;
    gap: var(--space-lg);
    align-items: center;
}

/* ====================================
   🅱️ COLONNE LOGO 20% - Version Desktop
   ==================================== */
.footer-logo-column {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.footer-logo {
    width: 30px;
    height: auto;
    object-fit: contain;
}

/* ====================================
   🧭 COLONNE NAVIGATION 60% - Version Desktop
   ==================================== */
.footer-nav-column {
    display: flex;
    justify-content: center;
}

.footer-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-lg);
    align-items: center;
}

.footer-menu li {
    margin: 0;
}

.footer-menu a {
    color: var(--dark);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
    display: block;
}

.footer-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.footer-menu a:hover {
    color: var(--primary);
}

.footer-menu a:hover::after,
.footer-menu .current-menu-item a::after,
.footer-menu .current_page_item a::after {
    width: 100%;
}

.footer-menu .current-menu-item a,
.footer-menu .current_page_item a {
    color: var(--primary);
}

/* ====================================
   ⚖️ COLONNE LÉGALE ET RÉSEAUX 20% - Version Desktop
   ==================================== */
.footer-legal-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.footer-legal-links {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-end;
}

.footer-legal-link {
    font-family: var(--font-inter);
    font-size: 15px;
    font-weight: 300;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-legal-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ====================================
   📱 RÉSEAUX SOCIAUX
   ==================================== */
.footer-social-links {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: var(--transition-fast);
    border-radius: 50%;
}

.footer-social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.footer-social-link:hover {
    transform: translateY(-2px);
    background: var(--gray-light);
}

/* ====================================
   📱 VERSION MOBILE SPÉCIFIQUE
   ==================================== */

/* Layout mobile - Stack vertical */
.footer-bottom-mobile-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
}

/* Logo à gauche + Réseaux à droite avec space-between */
.footer-logo-social-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.footer-logo-social-mobile .footer-logo {
    width: 30px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Réseaux sociaux à droite en version mobile */
.footer-logo-social-mobile .footer-social-links {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

/* Liens légaux centrés en dessous */
.footer-legal-links-mobile {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

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

/* 1440px */
@media (max-width: 2200px) {
    .footer-main {
        padding: var(--container-padding);
        margin-top: 50px;
    }

    .footer-icon-item img {
        width: 35px;
        height: 35px;
        object-fit: contain;
    }

    .footer-icon-container {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 1800px) {
    .footer-main-title {
        font-family: var(--font-primary);
        font-size: var(--h2-size);
        font-weight: 900;
        line-height: 45px;
        margin-bottom: 0;
        color: var(--dark);
    }

    .footer-sub-title-fix {
        font-family: var(--font-primary);
        font-size: var(--h2-size);
        font-weight: 300;
        line-height: 45px;
        margin-bottom: 0;
        color: var(--dark);
    }

    .footer-main {
        padding: 5em 0;
        margin-top: 50px;
    }

    .footer-icon-item img {
        width: 35px;
        height: 35px;
        object-fit: contain;
        position: relative;
        top: -3px;
    }

    .footer-icon-container {
        width: 35px;
        height: 35px;
    }

    .footer-titles-container {
        min-height: 45px;
    }
}

@media (max-width: 968px) {
    .footer-main-wrapper {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .footer-left-content {
        padding-right: 0;
        order: 1;
    }

    .footer-message-wrapper {
        grid-template-columns: 8% 92%;
        gap: var(--space-sm);
    }

    .footer-right-content {
        order: 2;
        align-items: flex-start;
        margin-top: -20px;
        margin-left: 55px;
    }

    .footer-address {
        text-align: left;
    }

    .footer-actions {
        align-items: flex-start;
    }

    .footer-titles-container {
        min-height: 90px;
    }

    /* Basculement vers la version mobile pour le footer bottom */
    .footer-bottom-desktop {
        display: none;
    }

    .footer-bottom-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .footer-main {
        padding: var(--space-xl) 0;
    }

    .footer-bottom {
        padding: var(--space-sm) 0;
    }

    .footer-button {
        font-size: 20px;
    }

    .footer-menu a {
        font-size: 14px;
    }

    .footer-menu {
        gap: var(--space-sm);
    }

    .footer-titles-container {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .footer-main {
        padding: var(--space-lg) 0;
    }

    .footer-bottom {
        padding: var(--space-md) 0;
    }

    /* GARDER LE GRID EN 2 COLONNES - icône + titre côte à côte */
    .footer-message-wrapper {
        grid-template-columns: 40px 1fr;
        gap: 15px;
        align-items: flex-start;
    }

    .footer-icon-container {
        justify-content: flex-start;
        width: 35px;
        height: 35px;
        padding-top: 8px;
        flex-shrink: 0;
    }

    /* Garder l'icône en position absolute pour l'animation */
    .footer-icon-item {
        position: absolute;
        top: 3px;
        left: 0;
    }

    .footer-icon-item img {
        width: 35px;
        height: 35px;
    }

    /* Container des titres avec hauteur fixe pour animation */
    .footer-titles-container {
        min-height: 72px;
        position: relative;
    }

    /* Limiter la largeur du titre pour forcer 2 lignes */
    .footer-main-title {
        line-height: 35px !important;
        max-width: 100%;
        word-wrap: break-word;
    }

    .footer-sub-title-fix {
        line-height: 35px !important;
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Garder les titres en absolute pour l'animation */
    .footer-title-item {
        position: absolute;
        top: 0;
        left: 0;
        width: 185px;
        max-width: 100%;
    }

    .footer-button {
        font-size: var(--p-size);
    }

    .footer-separator {
        width: 90%;
    }

    .footer-legal-link {
        font-family: var(--font-inter);
        font-size: 12px;
        font-weight: 400;
        color: var(--gray-medium);
        text-decoration: none;
        transition: var(--transition-fast);
        line-height: 0;
    }
}

/* ====================================
   ⚡ OPTIMISATIONS PERFORMANCE
   ==================================== */
.footer-button {
    will-change: color, letter-spacing;
    backface-visibility: hidden;
}

.footer-social-link {
    will-change: transform;
}

.footer-menu a {
    will-change: color;
}

.footer-icon-item,
.footer-title-item {
    will-change: opacity, visibility;
    backface-visibility: hidden;
}

/* ====================================
   📝 SCROLL TO TOP FUNCTIONALITY
   ==================================== */
.scroll-to-top {
    scroll-behavior: smooth;
}

/* Smooth scroll global */
html {
    scroll-behavior: smooth;
}