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

/* masque  footer d'origine*/
#site-footer,
.site-footer:not(.jardin-footer) {
    display: none !important;
}

.jardin-footer {
    --s: 1;                          /* échelle des morceaux de journal */
    --zone: calc(152px * var(--s));  /* hauteur de la zone au dessus du papier */

    position: relative;
    z-index: 2;
    isolation: isolate;
    width: 100%;
    margin-top: 40px;
    color: #3b2a22;
    font-family: 'Source Sans Pro', 'Source Sans 3', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    overflow: hidden;
}

/* ---------- Morceaux de journal ---------- */
.jardin-footer__deco {
    position: relative;
    height: var(--zone);
}
.jardin-footer .jf-deco {
    position: absolute;
    display: block;
    height: auto;
    max-width: none;
    pointer-events: none;
}
.jardin-footer .jf-journal-incline {
    width: calc(240px * var(--s));
    left: 20%;
    top: calc(var(--zone) - 132px * var(--s));
}
.jardin-footer .jf-journal-milieu {
    width: calc(312px * var(--s));
    left: 61%;
    top: calc(var(--zone) - 37px * var(--s));
}
.jardin-footer .jf-journal-droite {
    width: calc(89px * var(--s));
    right: 0;
    top: calc(var(--zone) - 142px * var(--s));
}
/* Nouveaux morceaux, à gauche : ils dépassent peu, comme ceux de droite */
.jardin-footer .jf-papier-2 {               /* grand papier vierge, derrière l'article */
    width: calc(230px * var(--s));
    left: 3%;
    top: calc(var(--zone) - 38px * var(--s));
    transform: rotate(-4deg);
}
.jardin-footer .jf-journal-texte-1 {        /* grand article */
    width: calc(280px * var(--s));
    left: calc(3% + 120px * var(--s));
    top: calc(var(--zone) - 48px * var(--s));
    transform: rotate(2deg);
}

/* ---------- Le papier déchiré ---------- */
.jardin-footer__papier {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    padding: 100px 24px 22px;
    background:
        var(--jardin-footer-papier) center top / max(100%, 1280px) auto no-repeat,
        linear-gradient(to bottom, transparent 0, transparent 120px, #e6dccc 120px);
}

.jardin-footer a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.jardin-footer a:hover {
    color: #6b4228;
}
.jardin-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- Les 3 colonnes centrées sur 1200 px ---------- */
.jardin-footer__inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 40px;
}

/* Titres des colonnes en Arizonia */
.jardin-footer .jardin-footer__titre {
    margin: 0 0 12px;
    font-family: 'Arizonia', cursive !important;
    font-weight: 400 !important;
    font-size: 32px;
    line-height: 1.2;
    color: #1f1611;
}

/* Colonne gauche  contact */
.jardin-footer__gauche {
    padding-left: 30px;
}
.jardin-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 17px;
}
.jardin-footer__ico {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: #6b4228;
}
.jardin-footer__ico svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Colonne centrale Nous suivre */
.jardin-footer__suivre {
    text-align: center;
}
.jardin-footer__facebook {
    display: inline-block;
    width: 44px;
    height: 44px;
    color: #6b4228;
}
.jardin-footer__facebook:hover {
    color: #3b2a22;
}
.jardin-footer__facebook + .jardin-footer__facebook {
    margin-left: 14px;          /* espace entre Facebook et Instagram */
}
.jardin-footer__facebook svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Colonne droite  notre partenaire (titre et logo centrés l'un sous l'autre) */
.jardin-footer__droite {
    justify-self: end;
    padding-right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.jardin-footer__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 22px;                   /* espace entre les logos */
    width: 100%;
}
.jardin-footer__logos a {
    display: block;
}
.jardin-footer__logos img {
    display: block;
    height: 70px;
    width: auto;
    margin: 0 auto;
}

/* ---------- Bas : château, © et liens légaux ---------- */
.jardin-footer__bas {
    text-align: center;
}
.jardin-footer .jardin-footer__chateau {
    display: block;
    width: 329px;
    max-width: 80%;
    height: auto;
    margin: -70px auto 2px;    /* remonte sous  Nous suivre  */
    opacity: .9;
}
.jardin-footer .jardin-footer__copy {
    margin: 0;
    font-size: 13px;
    color: #3b2a22;
}
.jardin-footer .jardin-footer__liens {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
    font-size: 13px;
}
.jardin-footer__liens li + li::before {
    content: "·";
    margin: 0 10px;
    color: #806246;
}
.jardin-footer__liens a {
    text-decoration: underline;
    text-decoration-color: rgba(107, 66, 40, .35);
    text-underline-offset: 3px;
}

/* ---------- Tablette ---------- */
@media (max-width: 1024px) {
    .jardin-footer {
        --s: .8;
    }
    .jardin-footer .jf-deco {
        margin-top: 10px;       /* tablette et mobile tous les morceaux un peu plus bas */
    }
    .jardin-footer__inner {
        gap: 24px;
    }
    .jardin-footer__gauche {
        padding-left: 0;
    }
    .jardin-footer__contact li {
        font-size: 15px;
    }
    .jardin-footer__droite {
        padding-right: 0;
    }
    .jardin-footer__logos img {
        height: 54px;
    }
    .jardin-footer .jardin-footer__chateau {
        margin-top: 20px;
    }
}

/* ---------- Mobile  en colonne, centré ---------- */
@media (max-width: 767px) {
    .jardin-footer {
        --s: .6;
        margin-top: 20px;
    }
    .jardin-footer .jf-journal-milieu,
    .jardin-footer .jf-journal-droite {
        display: none;          /* on allège sur petit écran */
    }
    .jardin-footer__papier {
        padding-top: 90px;
    }
    .jardin-footer__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 38px;
    }
    .jardin-footer__suivre {
        order: -1;              /* « Nous suivre » en premier */
    }
    .jardin-footer__gauche {
        text-align: center;
    }
    .jardin-footer__gauche .jardin-footer__titre {
        text-align: center;
    }
    .jardin-footer__contact {
        display: inline-block;  /* bloc centré, icônes alignées en colonne */
        text-align: left;
    }
    .jardin-footer__contact li {
        justify-content: flex-start;
    }
    .jardin-footer__droite {
        justify-self: center;
    }
    .jardin-footer__bas {
        margin-top: 28px;
    }
    .jardin-footer .jardin-footer__chateau {
        width: 240px;
        margin: 0 auto 6px;
    }
}

/* Si la page a une section #avant-footer (ID) ou .avant-footer (classe) :
   le footer remonte par-dessus son fond, bord déchiré compris */
body:has(#avant-footer) .jardin-footer,
body:has(.avant-footer) .jardin-footer {
    margin-top: calc(-1 * var(--zone) - max(90px, 10vw)) !important;
}
