/* =========================================
   STYLE DU FOOTER CUSTOM (OPTIMISÉ & STICKY)
   ========================================= */

/* 1. L'astuce magique pour que le footer ne remonte JAMAIS sur une page courte */
html, body {
    height: 100%;
}

#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content {
    flex: 1 0 auto; /* Permet au contenu de s'étirer et de pousser le footer vers le bas */
}

/* 2. On casse les limites de Storefront PROPREMENT (sans doublons) */
.site-footer {
    background-color: var(--bg-dark) !important;
    color: var(--text-dim);
    font-family: var(--font-main);
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.site-footer a {
    text-decoration: none !important;
}

.site-footer .col-full {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Wrapper principal de ton footer */
.nm-footer-wrapper {
    width: 100% !important;
    background-color: var(--bg-dark) !important;
    /* Plus de position: fixed ici ! Le flexbox au-dessus fait le job tout seul */
}

/* --- Section Top Features --- */
.nm-footer-features {
    width: 100%;
    margin: 0 0 60px 0;
    padding: 25px 15%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-bottom: 1px solid var(--secondary-border-color);
    border-top: 1px solid var(--secondary-border-color);
}

.nm-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nm-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.nm-feature-icon svg {
    width: 20px;
    height: 20px;
}

/* Couleurs des icônes */
.nm-feature-item:nth-child(1) .nm-feature-icon { background: var(--bg-green); color: var(--accent-green); }
.nm-feature-item:nth-child(2) .nm-feature-icon { background: var(--bg-yellow); color: var(--accent-yellow); }
.nm-feature-item:nth-child(3) .nm-feature-icon { background: var(--bg-purple); color: var(--accent-purple); }
.nm-feature-item:nth-child(4) .nm-feature-icon { background: var(--bg-blue); color: var(--accent-blue); }

.nm-feature-text strong {
    color: var(--text-main);
    font-size: 0.9rem;
    display: block;
    margin-bottom: -3px;
}

.nm-feature-text span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Layout des colonnes --- */
.nm-footer-container {
    padding: 0 15%;
    width: 100%;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

/* Colonne Logo & Discord */
.nm-footer-logo {
    margin-top: -7%;
}

.nm-footer-logo img {
    height: auto;
    width: 70%;
    margin-bottom: 20px;
}

.nm-footer-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 280px;
}

.nm-discord-btn {
    background-color: var(--bg-discord);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nm-discord-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* --- Navigation & Liens --- */
.nm-footer-col h4 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.nm-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nm-footer-col ul li {
    margin-bottom: 5px;
}

.nm-footer-col ul li a {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nm-footer-col ul li a:hover {
    color: var(--text-main) !important;
}

/* --- Bottom Bar --- */
.nm-footer-bottom {
    width: 100%;
    margin: 60px 0 0 0;
    padding: 25px 18% 25px 15%;
    border-top: 1px solid var(--secondary-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nm-copyright {
    font-size: 0.8rem;
}

.nm-payment-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nm-payment-icons i,
.nm-payment-icons svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 1.5px;
    color: var(--text-muted);
    display: inline-block;
    vertical-align: middle;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .nm-footer-features,
    .nm-footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .nm-footer-col.info {
        grid-column: 1 / -1;
        margin-bottom: 20px;
    }
}

@media (max-width: 500px) {
    .nm-footer-features,
    .nm-footer-container {
        grid-template-columns: 1fr;
    }
    .nm-footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 25px 15%;
    }
}