/* ==========================================================
   footer-modern.css : à charger APRÈS footer.css
   Aucun changement dans le Blade. Même charte (bleu nuit, rouge
   institutionnel), mêmes marges latérales que le header.
   ========================================================== */

/* ---------- Base ---------- */
.footer {
    background: #0f1b2d;
    color: #fff;
}
.footer::before { height: 3px; }

/* Mêmes marges que le header : 2rem | portable : --gutter | tablette : 2rem | mobile : 1.25rem */
.footer__container {
    box-sizing: border-box; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 2rem;
}
@media (min-width: 1025px) and (max-width: 1700px) {
    :root { --gutter: clamp(2rem, 6vw, 6rem); }
    .footer__container { padding: 0 var(--gutter); }
}

/* ---------- Grille principale ---------- */
.footer__main {
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: clamp(2rem, 4vw, 4rem);
    padding: 4rem 0 3rem;
    border-bottom: 0;
}

/* Marque */
.footer__brand-column { gap: 1.25rem; }
.footer .footer__brand img {
    width: 48px; height: 48px; padding: 5px; flex-shrink: 0;
    object-fit: contain; border-radius: 50%; background: #fff;
    border: 2px solid rgba(255, 255, 255, .25); box-shadow: none; display: block;
}
.footer__brand span { font-size: 1.3rem; line-height: 1.2; }
.footer__description { max-width: 38ch; line-height: 1.7; color: rgba(255, 255, 255, .68); }

.footer__social { gap: .6rem; }
.footer__social-link { width: 40px; height: 40px; }
.footer__social-link:hover { transform: none; box-shadow: none; }

/* Titres de colonnes : sobres, sans trait décoratif */
.footer__column h3.footer__title {
    font-size: 1rem; letter-spacing: .01em; margin-bottom: 1.1rem; padding-bottom: 0;
}
.footer__column h3.footer__title::after { display: none; }

/* Liens : plus de flèche parasite ni de décalage au survol */
.footer__links { gap: .65rem; }
.footer__link { color: rgba(255, 255, 255, .68); text-decoration: underline; text-decoration-color: transparent;
    text-underline-offset: 4px; transition: color .2s ease, text-decoration-color .2s ease; }
.footer__link::before { display: none; }
.footer__link:hover { color: #fff; padding-left: 0; text-decoration-color: var(--institutional-red); }

/* Contact : icônes dans une pastille */
.footer__contact-list { gap: .85rem; }
.footer__contact-item { align-items: center; color: rgba(255, 255, 255, .78); overflow-wrap: anywhere; }
.footer__contact-item svg {
    box-sizing: content-box; width: 18px; height: 18px; padding: 8px; margin: 0;
    background: rgba(201, 37, 37, .14); border-radius: 10px; color: #ff6b6b;
}

/* ---------- Newsletter : bandeau net, texte à gauche, formulaire à droite ---------- */
.footer__newsletter {
    margin: 0 0 3rem; padding: 2rem 2.25rem;
    background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 18px;
}
.footer__newsletter::before { display: none; }

.footer__newsletter-content {
    display: grid; align-items: center; column-gap: 2.5rem; row-gap: .35rem;
    grid-template-columns: 1fr minmax(320px, 480px);
    grid-template-areas: "title form" "text form" "msg msg";
}
.footer__newsletter-title { grid-area: title; font-size: 1.35rem; }
.footer__newsletter-text { grid-area: text; font-size: .95rem; }
.footer__newsletter-form { grid-area: form; max-width: none; }
.newsletter-success { grid-area: msg; margin: 1rem 0 0; }

.footer__newsletter-input { min-width: 0; padding: .85rem 1.25rem; }
.footer__newsletter-btn { padding: .85rem 1.5rem; }
.footer__newsletter-btn:hover { transform: none; box-shadow: none; }

/* ---------- Barre du bas ---------- */
.footer__bottom { padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px)); border-top-color: rgba(255, 255, 255, .09); }
.footer__bottom-links { gap: .5rem 1.75rem; flex-wrap: wrap; }

/* ---------- Tablette (<= 1024 px) ---------- */
@media (max-width: 1024px) {
    .footer__container { padding: 0 2rem; }
    .footer__main { grid-template-columns: repeat(3, 1fr); padding: 3.25rem 0 2.5rem; }
    .footer__brand-column { grid-column: 1 / -1; }
    .footer__newsletter-content { grid-template-columns: 1fr; grid-template-areas: "title" "text" "form" "msg"; row-gap: .5rem; }
    .footer__newsletter-content { text-align: left; align-items: stretch; }
    .footer__newsletter-form { margin-top: .75rem; }
}

/* ---------- Téléphone (<= 768 px) : alignement à gauche, liens en 2 colonnes ---------- */
@media (max-width: 768px) {
    .footer__container { padding: 0 1.25rem; }
    .footer__main { grid-template-columns: 1fr 1fr; gap: 2rem 1.25rem; padding: 2.75rem 0 2rem; }
    .footer__column:last-child { grid-column: 1 / -1; }

    .footer__brand { flex-direction: row; text-align: left; }
    .footer__description { max-width: 100%; text-align: left; }
    .footer__social { justify-content: flex-start; }
    .footer__links, .footer__contact-list { align-items: flex-start; }

    .footer__newsletter { padding: 1.5rem 1.25rem; margin-bottom: 2rem; border-radius: 16px; }
    .footer__newsletter-form { flex-direction: column; gap: .6rem; }
    .footer__newsletter-btn { justify-content: center; }

    .footer__bottom-content { flex-direction: column; align-items: flex-start; text-align: left; gap: .9rem; }
    .footer__bottom-links { flex-direction: row; }
}

@media (max-width: 380px) {
    .footer__main { grid-template-columns: 1fr; }
}

/* ---------- Mode sombre ---------- */
[data-theme="dark"] .footer { background: #0a0a0a; }
    .footer__brand img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: contain;
        background-color: #ffffff;
        padding: 4px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        display: block;
    }
    
    /* Style pour le message de succès de la newsletter */
    .newsletter-success {
        background-color: rgba(16, 185, 129, 0.1);
        color: #10b981;
        padding: 0.75rem;
        border-radius: 6px;
        margin-bottom: 1rem;
        font-size: 0.9rem;
        text-align: center;
    }
