/**
 * FOOTER.CSS
 * Utilise les design tokens de design-tokens.css
 */

/* Variables de couleurs basées sur votre palette actuelle */

/* Styles du footer principal */
.main-footer {
    background: linear-gradient(to bottom, var(--surface-ink), var(--surface-ink-soft));
    color: white;
    padding: 48px 0 20px;
    font-family: 'Signika', sans-serif;
    margin: 120px 0 0 0; /* Marge uniquement en haut */
    width: 100vw !important; /* Utilise la largeur de la fenêtre */
    max-width: 100vw !important; /* Empêche tout dépassement */
    position: relative;
    z-index: 10;
    left: 0;
    right: 0;
    margin-left: calc(-50vw + 50%); /* Centrer en compensant les contraintes du conteneur parent */
    margin-right: calc(-50vw + 50%);
    box-sizing: border-box;
    overflow-x: hidden; /* Évite les barres de défilement horizontales */
}

/* Fil dégradé îles en haut du footer (signature DA, écho de la navbar) */
.main-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-sunset);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Disposition des colonnes */
.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

/* Titres de sections */
.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white !important;
}

/* Styles explicites pour H3 et H4 dans le footer */
.main-footer h3,
.main-footer h4 {
    color: white !important;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
}

/* Liens du footer */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    font-size: 0.95rem;
    position: relative;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6bc9ff, #844fc0);
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: #6bc9ff;
    transform: translateX(5px);
}

.footer-links a:hover::before {
    width: 100%;
}

/* Section Contact */
.contact-info {
    margin-bottom: 20px;
}

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.contact-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #844fc0, #ff4365);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #6bc9ff;
}

/* Réseaux sociaux */
.social-media {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.social-icon:hover {
    background: linear-gradient(135deg, #844fc0, #ff4365);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(132, 79, 192, 0.4);
}

.social-icon i {
    font-size: 1.2rem;
}

/* Moyens de paiement */
.payment-methods {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.payment-title {
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #6bc9ff, #844fc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.payment-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.payment-icon {
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(132, 79, 192, 0.3);
    transition: all 0.3s ease;
}

.payment-icon:hover {
    background: rgba(132, 79, 192, 0.15);
    border-color: rgba(107, 201, 255, 0.5);
    transform: translateY(-2px);
}

.payment-icon i {
    color: #6bc9ff;
}

/* Copyright et bas de page */
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(132, 79, 192, 0.3);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom p:last-child {
    background: linear-gradient(90deg, #6bc9ff, #844fc0, #ff4365);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1023px) {

    .footer-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px; /* Espacement vertical et horizontal */
        justify-items: center; /* Centre chaque colonne dans sa cellule (tablette) */
    }

    .footer-column {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centre le contenu de la section */
        text-align: center;
    }

    .footer-title,
    .footer-links,
    .contact-info {
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%); /* Centre le trait sous le titre */
    }

    .contact-info p,
    .social-media {
        justify-content: center;
    }

    /* Assurer que les colonnes apparaissent dans le bon ordre */
    .footer-column:nth-child(1) {
        order: 1;
    }

    .footer-column:nth-child(2) {
        order: 2;
    }

    .footer-column:nth-child(3) {
        order: 3;
    }

    .footer-column:nth-child(4) {
        order: 4;
    }
}

@media (max-width: 767px) {
    /* Footer mobile : conserver le hack de margin original, juste ajuster l'overflow */
    .main-footer {
        overflow-x: hidden;
    }

    .footer-container {
        padding: 0 10px;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .footer-columns {
        /* Une seule colonne : les sections s'empilent sans espace vide
           (« Nous contacter » remonte juste après « Besoin d'aide »). */
        grid-template-columns: 1fr;
        gap: 24px;
        justify-items: center;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-width: 0; /* Permet le shrink du contenu */
        overflow: hidden;
    }

    .footer-links {
        text-align: center;
        width: 100%;
    }

    .footer-links a {
        word-break: break-word; /* Casse les longs mots si nécessaire */
        max-width: 100%;
    }

    .footer-title {
        text-align: center;
        font-size: 1rem;
        word-break: break-word;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .contact-info {
        text-align: center;
        width: 100%;
    }

    .contact-info p {
        justify-content: center;
        flex-wrap: wrap;
        word-break: break-word;
    }

    .contact-info a {
        word-break: break-all; /* Email/tel peuvent être longs */
    }

    .social-media {
        justify-content: center;
    }

    .payment-icons {
        flex-direction: column;
        align-items: center;
    }

    .payment-icon {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

/* Styles pour la page Modes de livraison - Tableau tarifs DOM-TOM */
.delivery-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.delivery-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.delivery-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.delivery-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
}

.delivery-table tbody tr:last-child td {
    border-bottom: none;
}

.delivery-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.price-highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.promo-amount {
    color: var(--accent-color);
    font-weight: 600;
}

@media (max-width: 767px) {
    .delivery-table {
        font-size: 0.85rem;
    }

    .delivery-table th,
    .delivery-table td {
        padding: 10px 8px;
    }

    .delivery-table th {
        font-size: 0.8rem;
    }
}