﻿/* ===== Footer ===== */
.site-footer {
  width: 100%;
  color: var(--white);
  margin-top: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(211, 211, 211, 0.25);
}

.footer-top {
    max-width: 1280px;
    margin: 2.25rem auto;
    padding: 0 4rem;
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: .75rem;
    justify-content: space-between;
}

.footer-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.footer-feature-icon {
    flex-shrink: 0;
    color: var(--green);
    width: 50px;
    height: 50px;
}

.footer-feature-icon svg {
    width: 100%;
    height: 100%;
}

.footer-feature-text {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.footer-feature-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--orange);
    line-height: 1.2;
}

.footer-feature-subtitle {
    font-size: .75rem;
    font-weight: 300;
    color: var(--orange);
    line-height: 1.2;
}

/* DeuxiÃ¨me ligne : Newsletter */
.footer-middle {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 1.25rem;
    justify-content: center;
}

.footer-middle-text p {
    font-size: 1.125rem;
    color: var(--green);
    line-height: 1.2;
    font-weight: bold;
    font-style: italic;
    margin: 0;
}

.footer-middle-text p strong {
    color: var(--orange);
    font-family: var(--font-head);
    font-size: 2rem;
    font-style: normal;
    font-weight: normal;
}

.footer-middle-newsletter {
    display: flex;
    justify-content: flex-end;
}

.newsletter-form {
    width: 100%;
}

.newsletter-input-group {
    display: flex;
    gap: .5rem;
    margin-bottom: .5rem;
}

.newsletter-input {
    flex: 1;
    padding: 4px 55px 4px 20px;
    border: 2px solid var(--green);
    border-radius: 100px;
    background: transparent;
    color: var(--white);
    font-size: 1rem;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--green);
}

.newsletter-input::placeholder {
    color: var(--green);
    font-style: italic;
}

.newsletter-button {
    font-family: var(--font-head);
    padding: .25rem 1.75rem;
    background-color: var(--green);
    color: var(--purple);
    border: none;
    border-radius: 100px;
    font-size: var(--header-nav-size);
    cursor: pointer;
}

.newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: .5rem;
}

.checkbox-input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    cursor: pointer;
    background: transparent;
    border: 2px solid var(--orange);
    border-radius: 7px;
    position: relative;
}

/* Ã‰tat cochÃ©e */
.checkbox-input:checked {
    background: var(--orange);
    border-color: var(--orange);
}

/* Coche blanche */
.checkbox-input:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Focus pour accessibilitÃ© */
.checkbox-input:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.newsletter-checkbox label {
    font-size: .88rem;
    color: #b0b0b0;
    cursor: pointer;
    user-select: none;
}

.newsletter-checkbox label a:hover {
    color: var(--green);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 0 2.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 2.5rem;
    border-top: none;
    position: relative;
    text-align: center;
}

/* Flou dÃ©gradÃ© inversÃ© (vers le haut) */
.footer-bottom::before {
    content: '';
    position: absolute;
    top: -85px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.125) 0%,
            rgba(0, 0, 0, 0.09) 6%,
            rgba(0, 0, 0, 0.06) 13%,
            rgba(0, 0, 0, 0.035) 22%,
            rgba(0, 0, 0, 0.02) 35%,
            rgba(0, 0, 0, 0.01) 55%,
            rgba(0, 0, 0, 0.003) 75%,
            transparent 100%
        );
    pointer-events: none;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

/* Verrouille la taille (etait h3 = 2.5rem). Le passage en h2 est purement semantique. */
.footer-column-title {
    font-size: 2.5rem;
}

.footer-logo {
    gap: 1rem;
    justify-content: center;
}

.footer-logo a {
  display: block;
  cursor: pointer;
  width: 70%;
  max-width: 160px; /* cap : evite le logo geant quand la colonne passe pleine largeur (md/sm) */
  margin: 0 auto;
}

.footer-logo a img {
  pointer-events: none;
  display: block;
  width: 100%;
  height: auto;
}

.footer-tagline {
    font-size: .88rem;
    color: #b0b0b0;
    line-height: 1.4;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.footer-links li a {
    color: var(--lightgrey);
    text-decoration: none;
    font-weight: 500;
    transition: color .25s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--green);
}

/* Wrapper qui contient .footer-bottom + .footer-copyright â€” sert d'ancrage pour le SVG de fond.
   - margin-top: -15px â†’ le wrapper remonte de 15px (chevauche le bottom-padding du .footer-middle)
     pour englober la zone du gradient .footer-bottom::before (-15px Ã  +15px)
   - padding-top: 15px â†’ compense en interne, .footer-bottom reste Ã  sa position d'origine
   - overflow: hidden â†’ crop net en haut (au dÃ©but du gradient = nouvelle limite haute du wrapper)
     et en bas (limite basse du .footer-copyright) */
.footer-bottom-wrapper {
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
    flex: 1;
}

/* Image de fond "hash" â€” Calque_2 du forme-fond.svg
   - top: 15px â†’ dÃ©marre 15px sous le top du wrapper, c.Ã .d. juste sous le gradient
     .footer-bottom::before (qui s'Ã©tend de -15px Ã  +15px du top du .footer-bottom).
     Le hash ne dÃ©passe donc jamais sur le gradient, ne le recouvre pas
   - bottom: 0 â†’ au bottom du wrapper (= bas du .footer-copyright)
   - width: 430px â†’ image large, dÃ©borde sur la colonne avis Google
   - preserveAspectRatio="xMaxYMax slice" â†’ ancre le contenu en bas, crop tout sur le haut */
.footer-bg-shape {
    position: absolute;
    top: 15px;
    right: 75px;
    bottom: 0;
    width: 430px;
    color: var(--white);
    pointer-events: none;
    z-index: 0;
    opacity: 0.08;
    transform: translateY(-90px);
    clip-path: inset(90px 0 0 0);
}

/* Tout ce qui est dans le wrapper passe au-dessus du fond */
.footer-bottom-wrapper > .footer-bottom,
.footer-bottom-wrapper > .footer-copyright {
    position: relative;
    z-index: 1;
}

/* RÃ©seaux sociaux â€” 2 colonnes, 2 rangÃ©es (responsive : reste 2x2 toujours) */
.social-icons {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 1rem;
    justify-content: center;
    justify-items: center;
    align-items: center;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity .3s ease, transform .2s ease;
}

.social-icons a:hover {
    opacity: .8;
    transform: scale(1.1);
}

.social-icons a svg,
.social-icons a img {
    pointer-events: none;
}

.social-icon {
    width: 50px;
    height: 50px;
}


/* Copyright */
.footer-copyright {
    padding: 1rem;
    text-align: center;
}

.footer-copyright p {
    font-size: .8rem;
    color: var(--lightgrey);
}

.footer-copyright a:hover {
    color: var(--green);
}

/* Ã‰tats interactifs */
.footer-links li a:active {
    color: #45a049;
}

.newsletter-button:active {
    transform: translateY(1px);
}

.newsletter-button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: .6;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0px 4rem;
    }

    /* Alternance icÃ´ne gauche/droite (effet zigzag) */
    .footer-feature:nth-child(even) {
        flex-direction: row-reverse;
    }

    .footer-feature:nth-child(even) .footer-feature-text {
        text-align: right;
    }

    .footer-middle {
        gap: 2rem;
    }

    .footer-bottom {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 2.5rem 0 2rem 0;
    }

    .footer-logo {
        grid-column: 1 / -1;
    }

    .footer-bg-shape {
        right: 0;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding: 1.5rem 1rem;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;
        width: fit-content;
        max-width: calc(100% - 2rem);
    }

    .footer-feature {
        flex-direction: row;
        gap: 1rem;
        width: auto;
        align-items: flex-start;
    }

    .footer-feature-icon {
        width: 40px;
        height: 40px;
    }

    .footer-feature-text {
        flex: 0 1 auto;
        text-align: left;
        white-space: nowrap;
    }

    /* Annule l'effet zigzag */
    .footer-feature:nth-child(even) {
        flex-direction: row;
    }

    .footer-feature:nth-child(even) .footer-feature-text {
        text-align: left;
    }

    .footer-middle {
        padding: 2rem 2rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-middle-newsletter {
        justify-content: flex-start;
    }

    .newsletter-form {
        max-width: 100%;
    }

    .footer-bottom {
        padding: 2rem 1rem 1.5rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-logo {
        grid-column: 1;
        text-align: center;
    }
}
