/* ============================================================
   FOOTER.CSS — VERSION NETTOYÉE & RESPONSIVE
   ============================================================ */

/* ── Variables footer ── */
:root {
    --footer-ink:       #f4fbff;
    --footer-ink-soft:  rgba(244,251,255,0.72);
    --footer-accent:    #7ae8d2;
    --footer-bg-start:  #061c2c;
    --footer-bg-end:    #0a3d55;
}

/* ============================================================
   SÉPARATEUR AU-DESSUS DU FOOTER
   ============================================================ */
.footer-separator {
    width: min(1200px, calc(100% - 32px));
    height: 2px;
    margin: 44px auto 0;
    border: none;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--footer-accent), transparent);
    opacity: 0.7;
}

/* ============================================================
   FOOTER PRINCIPAL
   ============================================================ */
.site-footer {
    position: relative;
    color: var(--footer-ink);
    font-family: "Poppins", sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(255,255,255,0.18), transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(122,232,210,0.25), transparent 45%),
        linear-gradient(160deg, var(--footer-bg-start), var(--footer-bg-end));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
    overflow: hidden;
}

.site-footer *,
.site-footer *::before,
.site-footer *::after {
    box-sizing: border-box;
}

/* Ligne décorative en haut */
.site-footer::after {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--footer-accent), transparent);
    opacity: 0.5;
    pointer-events: none;
}

/* ============================================================
   CONTENEUR PRINCIPAL
   ============================================================ */
.footer-container {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 0;
    display: grid;
    grid-template-columns: 1.2fr 2.8fr;
    gap: 60px;
    animation: footerFade 0.8s ease forwards;
}

@keyframes footerFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   BRAND (colonne gauche)
   ============================================================ */
.footer-brand { display: flex; flex-direction: column; }

.footer-eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    color: var(--footer-ink-soft);
}

.footer-logo { text-decoration: none; display: inline-block; }

.brand-name {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ffffff, var(--footer-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-description {
    margin: 14px 0 0;
    max-width: 32ch;
    color: var(--footer-ink-soft);
    line-height: 1.65;
    font-size: 0.92rem;
}

/* ── Réseaux sociaux ── */
.footer-socials {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    color: var(--footer-ink);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
    transform: translateY(-3px);
    background: rgba(122,232,210,0.22);
    border-color: rgba(122,232,210,0.5);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.footer-socials svg {
    width: 16px; height: 16px;
    display: block;
    fill: currentColor;
    flex-shrink: 0;
}

/* ============================================================
   NAVIGATION (colonne droite)
   ============================================================ */
.footer-nav {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-content: start;
}

.footer-section {
    padding: 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.25s ease;
}

.footer-section:hover { transform: translateY(-4px); }

.footer-section h3 {
    margin: 0 0 14px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    color: rgba(244,251,255,0.55);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    margin: 0; padding: 0;
}

.footer-section li { margin-bottom: 9px; }

.footer-section a {
    position: relative;
    color: rgba(255,255,255,0.82);
    font-size: 0.92rem;
    line-height: 1.5;
    transition: color 0.2s ease;
    overflow-wrap: anywhere;
}

.footer-section a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 1px;
    background: var(--footer-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.footer-section a:hover,
.footer-section a:focus-visible {
    color: #d9fff4;
}

.footer-section a:hover::after,
.footer-section a:focus-visible::after {
    transform: scaleX(1);
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.footer-newsletter p {
    margin: 0 0 12px;
    color: var(--footer-ink-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: stretch;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(4px);
    color: var(--footer-ink);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form input::placeholder {
    color: rgba(244,251,255,0.5);
}

.newsletter-form input:focus {
    border-color: rgba(122,232,210,0.8);
    box-shadow: 0 0 0 3px rgba(122,232,210,0.15);
}

.newsletter-form button {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7ae8d2, #3fd6b8);
    color: #082b39;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(122,232,210,0.25);
    transition: all 0.2s ease;
}

.newsletter-form button:hover,
.newsletter-form button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(122,232,210,0.4);
    filter: brightness(1.05);
}

.newsletter-feedback {
    display: block;
    margin-top: 8px;
    min-height: 18px;
    font-size: 0.82rem;
    color: rgba(150,255,231,0.9);
}

/* ============================================================
   DIVIDER & BOTTOM
   ============================================================ */
.footer-divider {
    grid-column: 1 / -1;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 32px 0 0;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    padding: 16px 16px 20px;
    text-align: center;
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
    color: rgba(244,251,255,0.75);
    font-size: 0.84rem;
}

.footer-bottom p { margin: 0; }

/* ============================================================
   BOUTON RETOUR EN HAUT
   ============================================================ */
#back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px; height: 44px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ecfffa;
    background: linear-gradient(135deg, #0f766e, #0e5e75);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* ============================================================
   ACCESSIBILITÉ — FOCUS
   ============================================================ */
.site-footer a:focus-visible,
#back-to-top:focus-visible,
.newsletter-form input:focus-visible,
.newsletter-form button:focus-visible {
    outline: 3px solid rgba(122,232,210,0.9);
    outline-offset: 3px;
}

/* ============================================================
   RESPONSIVE — TABLETTE (≤ 1080px)
   ============================================================ */
@media (max-width: 1080px) {

    .footer-container {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 56px 0 0;
    }

    .brand-description { max-width: 100%; }

    .footer-nav {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 740px)
   ============================================================ */
@media (max-width: 740px) {

    .footer-separator { margin-top: 30px; }

    .footer-container {
        width: calc(100% - 24px);
        padding: 44px 0 0;
        gap: 24px;
        text-align: center;
    }

    .footer-brand { align-items: center; }

    .brand-description {
        max-width: 40ch;
        text-align: center;
    }

    .footer-socials { justify-content: center; }

    .footer-nav {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* Masquer l'underline sur mobile (trop serré) */
    .footer-section a::after { display: none; }

    .footer-section { padding: 14px; }

    .newsletter-form { flex-direction: column; gap: 10px; }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        min-height: 44px;
    }

    .footer-bottom { padding: 14px 16px 16px; }

    #back-to-top {
        width: 40px; height: 40px;
        right: 14px; bottom: 14px;
        font-size: 1rem;
    }
}

/* ============================================================
   RESPONSIVE — PETIT MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {

    .footer-container { width: calc(100% - 16px); }

    .footer-nav { grid-template-columns: 1fr; }

    .footer-section { text-align: left; }

    .brand-name { font-size: 1.5rem; }

    .footer-bottom { font-size: 0.78rem; }
}

/* ============================================================
   UX AMÉLIORÉE — NOUVEAUX EFFETS JS
   ============================================================ */

/* ── Back to top avec anneau de progression ── */
#back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
}

.progress-ring {
    position: absolute;
    inset: 0;
    width: 44px; height: 44px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.progress-ring__track {
    fill: none;
    stroke: rgba(255,255,255,0.12);
    stroke-width: 2.5;
}

.progress-ring__fill {
    fill: none;
    stroke: var(--footer-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s ease;
}

.btt-arrow {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

#back-to-top:hover .btt-arrow { transform: translateY(-2px); }

/* ── Newsletter — états input ── */
.newsletter-form input.input-valid {
    border-color: rgba(122,232,210,0.8);
    box-shadow: 0 0 0 2px rgba(122,232,210,0.15);
}

.newsletter-form input.input-invalid {
    border-color: rgba(255,120,120,0.7);
    box-shadow: 0 0 0 2px rgba(255,100,100,0.12);
}

/* ── Feedback couleurs ── */
.newsletter-feedback.feedback-success {
    color: rgba(150,255,231,0.95);
}

.newsletter-feedback.feedback-error {
    color: rgba(255,160,160,0.95);
}

/* ── Animation shake ── */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.newsletter-feedback.shake {
    animation: shake 0.4s ease;
}

/* ── Ripple sur les liens footer ── */
.footer-section a { overflow: hidden; }

.footer-link-ripple {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(122,232,210,0.4);
    transform: scale(0);
    animation: rippleOut 0.5s ease forwards;
    pointer-events: none;
}

@keyframes rippleOut {
    to { transform: scale(12); opacity: 0; }
}

/* ── Tooltips sociaux ── */
.footer-socials a[data-tooltip] {
    position: relative;
}

.footer-socials a[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(6,28,44,0.92);
    color: var(--footer-ink);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(122,232,210,0.2);
}

.footer-socials a[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Reveal animation sections ── */
.footer-hidden {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.footer-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Séparateur glow animé ── */
.footer-separator.visible {
    animation: separatorGlow 2.5s ease-in-out infinite alternate;
}

@keyframes separatorGlow {
    from { opacity: 0.4; box-shadow: none; }
    to   { opacity: 0.9; box-shadow: 0 0 12px rgba(122,232,210,0.5); }
}
