/* ============================================
   FOOTER PERSONNALISÉ — PENSEZ SAUVAGE KRAFT
   ============================================ */

/* Supprimer footer natif GP (colophon + site-info) + tout espace residuel */
#colophon,
.site-info,
footer.site-info {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
/* Tuer le padding-bottom du conteneur de page GP */
#page,
.site-content,
#content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Footer pleine largeur, sort de tout conteneur parent */
.ps-footer-custom {
    background-image: url('../images/kraft-long.jpg');
    background-color: var(--ps-kraft-couleur);
    background-attachment: fixed;
    background-size: 6%;
    border-top: 3px solid var(--ps-texte);
    /* Ligne orange fine au-dessus du trait noir + ombre chaude portee vers le haut */
    box-shadow:
        0 -1px 0 0 var(--ps-orange),
        0 -6px 18px rgba(44, 24, 16, 0.55),
        0 -5px 22px rgba(212, 96, 10, 0.4);
    padding: 3.25rem 7% 2rem;
    font-family: var(--ps-police-titre);
    color: var(--ps-texte);
    letter-spacing: -0.02em;
    /* Pleine largeur meme si parent contraint */
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    box-sizing: border-box;
    z-index: var(--ps-z-footer);
}
/* Voile blanc tres leger sur le kraft : texture visible, ton plus clair */
.ps-footer-custom::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.20);
    pointer-events: none;
    z-index: 0;
}
/* Tous les blocs contenu au-dessus du voile */
.ps-footer-pinson,
.ps-footer-colonnes,
.ps-footer-logos,
.ps-footer-mentions {
    position: relative;
    z-index: 1;
}

/* --- Pinson centre --- */
.ps-footer-pinson {
    text-align: center;
    margin-bottom: 2.625rem;
}
.ps-footer-pinson img {
    width: 152px;
    height: auto;
    opacity: 0.85;
}

/* --- 3 colonnes --- */
.ps-footer-colonnes {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 5%;
    max-width: 1300px;
    margin: 0 auto 3.25rem;
    flex-wrap: wrap;
}
.ps-footer-col {
    flex: 1;
    min-width: 240px;
    max-width: 360px;
}

/* --- Titres colonnes : couleur texte sombre, pas orange, sans trait --- */
.ps-footer-titre {
    font-family: var(--ps-police-titre) !important;
    color: var(--ps-texte) !important;
    font-size: 1.85rem !important;
    font-weight: 400 !important;
    margin: 0 0 1.125rem !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    letter-spacing: -0.03em !important;
}

/* --- Adresse avec filet gauche orange --- */
.ps-footer-adresse {
    font-style: normal;
    border-left: 2px solid var(--ps-texte);
    padding-left: 0.6875rem;
    margin: 0 0 1rem;
    line-height: 1.6;
    font-size: 1.28rem;
}
.ps-footer-adresse span {
    display: block;
}

/* --- "Contactez nous" : lien sobre --- */
.ps-footer-mail {
    font-size: 1.28rem;
    margin: 0 0 1rem;
}
.ps-footer-mail a {
    color: var(--ps-bordure-fonce);
    text-decoration: none;
}
.ps-footer-mail a:hover {
    color: var(--ps-orange);
    text-decoration-color: var(--ps-orange);
}

/* --- Instagram : sous le mail, aligne a gauche sur desktop (recentre en mobile via le parent) --- */
.ps-footer-instagram {
    display: block;
    margin-top: 1.125rem;
    text-align: left;
    padding-left: 0.875rem;
}
.ps-footer-instagram img {
    opacity: 0.6;
    transition: opacity 0.2s;
    display: inline-block;
    width: 62px;
    height: 62px;
}
.ps-footer-instagram:hover img {
    opacity: 0.95;
}

/* --- Colonne A propos --- */
/* Colonne plus large pour que les lignes tiennent sans retour */
.ps-footer-apropos {
    min-width: 320px;
    max-width: 440px;
    flex: 1.6;
}
.ps-footer-apropos ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ps-footer-apropos ul li {
    margin-bottom: 0.5625rem;
    font-size: 1.28rem;
    line-height: 1.25;
    padding-left: 1.125rem;
    position: relative;
}
.ps-footer-apropos ul li::before {
    content: '•';
    position: absolute;
    left: 0.1875rem;
    font-size: 1em;
    color: var(--ps-texte);
    line-height: 1.25;
}
.ps-footer-apropos ul li a {
    color: var(--ps-texte);
    text-decoration: none;
}
.ps-footer-apropos ul li a:hover {
    color: var(--ps-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- Infolettre --- */
.ps-footer-label {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.625rem;
    color: var(--ps-bordure-fonce);
    font-family: var(--ps-police-titre);
}
.ps-footer-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    container-type: inline-size;
}
.ps-footer-form input[type="email"] {
    font-family: Georgia, 'Times New Roman', serif;
    background: #eed9c5;
    border: 3px solid var(--ps-texte);
    color: var(--ps-texte);
    padding: 0.5625rem 0.875rem;
    font-size: 1.35rem;
    border-radius: 7px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.ps-footer-form input[type="email"]:focus {
    border-color: var(--ps-orange);
}
.ps-footer-form input[type="email"]::placeholder {
    color: rgba(44, 24, 16, 0.45);
    font-style: italic;
}
.ps-footer-form button {
    font-family: Georgia, 'Times New Roman', serif;
    background: #f7a034;
    color: var(--ps-texte);
    border: 1px solid #5f5f69;
    padding: 0.5rem 1.25rem;
    font-size: clamp(0.95rem, 6.6cqi, 1.35rem);
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 3px 4px 0 rgba(60, 40, 20, 0.32);
    transition: background 0.2s, box-shadow 0.2s;
    width: auto;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}
.ps-footer-form button:hover {
    background: #e8901f;
    box-shadow: 1px 2px 0 rgba(60, 40, 20, 0.2);
}

/* --- État chargement : ombre translucide qui balaye le texte pendant l'envoi AJAX --- */
.ps-footer-form-btn--chargement::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 70%;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(74, 27, 12, 0.45) 50%,
        transparent 100%
    );
    animation: ps-footer-btn-ombre 1.5s ease-in-out infinite;
}
@keyframes ps-footer-btn-ombre {
    from { transform: translateX(-120%); }
    to   { transform: translateX(240%); }
}

/* --- Newsletter footer : honeypot off-screen + messages AJAX --- */
.ps-newsletter-footer-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.ps-footer-form-message {
    font-family: var(--ps-police-titre);
    font-style: italic;
    color: var(--ps-texte);
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: center;
}
.ps-footer-form-message:empty {
    display: none;
}
.ps-footer-form-message img {
    display: block;
    width: 125px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 0.6rem;
}
.ps-footer-form-message--ok {
    color: var(--ps-vert-bio);
}
.ps-footer-form-message--erreur {
    color: var(--ps-orange);
}
.ps-footer-newsletter-rgpd {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--ps-bordure-fonce);
}
.ps-footer-newsletter-rgpd a {
    color: var(--ps-orange);
    text-decoration: underline;
}
.ps-footer-newsletter-rgpd a:hover {
    color: var(--ps-texte);
}
.ps-newsletter-footer-form--ok .ps-footer-label,
.ps-newsletter-footer-form--ok input[type="email"],
.ps-newsletter-footer-form--ok button[type="submit"],
.ps-newsletter-footer-form--ok .ps-footer-newsletter-rgpd {
    display: none;
}
.ps-footer-form-message button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--ps-titre);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    font-style: inherit;
}
.ps-footer-form-message button:hover,
.ps-footer-form-message button:focus {
    color: var(--ps-orange);
}
.ps-footer-form-message button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* --- Logos : sans traits, espacement genereux --- */
.ps-footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.75rem;
    padding: 1.25rem 0 1rem;
    margin: 0 auto 0.875rem;
    max-width: 700px;
    flex-wrap: wrap;
}
.ps-footer-logos img {
    height: 99px;
    width: auto;
    opacity: 0.72;
    transition: opacity 0.2s;
}
/* Ajustements de hauteur par logo (optique : les logos n'ont pas les memes proportions) */
.ps-footer-logos img.ps-logo-eurofeuille {
    height: 84px;
}
.ps-footer-logos img.ps-logo-reproduc {
    height: 109px;
}
.ps-footer-logos img.ps-logo-paiement {
    height: 109px;
}
.ps-footer-logos img:hover {
    opacity: 0.88;
}

/* --- Mentions legales --- */
.ps-footer-mentions {
    text-align: center;
    font-size: 1.15rem;
    color: rgba(44, 24, 16, 0.55);
    padding-top: 0.375rem;
}
.ps-footer-mentions a {
    color: rgba(44, 24, 16, 0.55);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ps-footer-mentions a:hover {
    color: var(--ps-orange);
}

/* ============================================
   RESPONSIVE FOOTER
   ============================================ */

@media (max-width: 820px) {
    .ps-footer-custom {
        /* fixed casse ou rame sur iOS/Android : on repasse en scroll sur petit ecran */
        background-attachment: scroll;
    }
    .ps-footer-colonnes {
        flex-direction: column;
        align-items: center;
        gap: 2.25rem;
    }
    .ps-footer-col {
        width: 100%;
        max-width: 380px;
        text-align: center;
    }
    .ps-footer-adresse {
        border-left: none;
        border-top: 2px solid var(--ps-orange);
        padding-left: 0;
        padding-top: 0.5rem;
        display: inline-block;
        text-align: left;
    }
    .ps-footer-apropos ul li {
        text-align: left;
        display: inline-block;
        width: 100%;
    }
    .ps-footer-logos {
        gap: 1.25rem;
    }
    .ps-footer-instagram {
        display: inline-block;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    /* Eurofeuille masque (AB porte deja la mention bio) : on gagne de la place */
    .ps-footer-logos img.ps-logo-eurofeuille {
        display: none;
    }
    /* Les 3 logos restants restent sur une seule ligne et retrecissent avec l'ecran */
    .ps-footer-logos {
        flex-wrap: nowrap;
        gap: clamp(0.6rem, 3vw, 1.25rem);
    }
    /* AB : 99px a 600px -> ~62px a 360px */
    .ps-footer-logos img {
        height: clamp(62px, 16.5vw, 99px);
    }
    /* semences + paiement : 109px a 600px -> ~68px a 360px */
    .ps-footer-logos img.ps-logo-reproduc,
    .ps-footer-logos img.ps-logo-paiement {
        height: clamp(68px, 18.2vw, 109px);
    }
}
