/* ==========================================================================
   AlloPieceDetachee.com – Footer moderne (v1.0)
   Fichier : assets/css/footer-modern.css
   Balisage : includes/footer.php  (classes préfixées ft-)
   À charger APRÈS styles.css / produits-core.css dans le <head>.
   ========================================================================== */

footer.ft {
    --ft-bg: #1A1A2E;
    --ft-text: #cbd5e1;
    --ft-muted: #94a3b8;
    --ft-line: rgba(255, 255, 255, .09);
    --ft-gold: #F7B801;
    --ft-orange: #FF6B35;
    --ft-blue: #004E89;

    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2.5rem 0 0 !important;
    padding: 0 !important;
    overflow: hidden;
    text-align: left;
    color: var(--ft-text) !important;
    font-family: 'Montserrat', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background:
        radial-gradient(900px 320px at 88% 0%, rgba(247, 184, 1, .09), transparent 60%),
        radial-gradient(760px 340px at 0% 100%, rgba(0, 78, 137, .38), transparent 60%),
        var(--ft-bg) !important;
}

/* Liseré de couleur en haut */
footer.ft::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--ft-blue) 0%, var(--ft-gold) 50%, var(--ft-orange) 100%);
}

footer.ft *, footer.ft *::before, footer.ft *::after { box-sizing: border-box; }
footer.ft ul { list-style: none; margin: 0; padding: 0; }
footer.ft li { margin: 0; }
footer.ft p { margin: 0; }
footer.ft a { text-decoration: none; }

.ft-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

.ft-grid {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    align-items: start;
    gap: 2.5rem 3rem;
    padding: 3.5rem 0 2.75rem;
}

/* ---------- Titres de colonnes ---------- */
footer.ft h2.ft-title {
    display: flex; align-items: center; gap: .65rem;
    margin: 0 0 1.15rem; padding: 0;
    font-family: inherit; font-size: .78rem; font-weight: 800; line-height: 1.3;
    letter-spacing: .14em; text-transform: uppercase;
    color: #fff;
}
footer.ft h2.ft-title::before {
    content: ''; flex: 0 0 18px; height: 3px; border-radius: 3px; background: var(--ft-gold);
}

/* ---------- Réseaux sociaux ---------- */
.ft-social { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .65rem; }
.ft-social a {
    display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--ft-line);
    color: #fff !important;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.ft-social a:hover { transform: translateY(-3px); border-color: transparent; }
.ft-social a[data-net="facebook"]:hover { background: #1877F2; }
.ft-social a[data-net="tiktok"]:hover   { background: #000; }
.ft-social a[data-net="whatsapp"]:hover { background: #15803d; }

/* ---------- Contact ---------- */
.ft-contact { display: grid; gap: .95rem; }
.ft-contact li { display: flex; align-items: center; gap: .85rem; min-height: 40px; }
.ft-ico {
    display: grid; place-items: center; flex: 0 0 40px; height: 40px;
    border-radius: 11px; background: rgba(255, 255, 255, .07); border: 1px solid var(--ft-line); color: #fff;
}
.ft-label {
    display: block;
    font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--ft-muted);
}
.ft-value {
    display: block; margin-top: .05rem;
    font-size: .93rem; font-weight: 600; line-height: 1.4; word-break: break-word;
    color: #fff !important;
}
a.ft-value { transition: color .2s ease; }
a.ft-value:hover { color: var(--ft-gold) !important; }
.ft-contact .ft-value { white-space: nowrap; }
.ft-phones a { color: #fff !important; transition: color .2s ease; }
.ft-phones a:hover { color: var(--ft-gold) !important; }
.ft-sep { margin: 0 .6rem; font-weight: 400; color: var(--ft-muted); }

/* Lien "Localisation GPS" + effet shimmer */
.ft-geo {
    display: inline-block; margin-top: .3rem; padding: .3rem 0;
    font-size: .85rem; font-weight: 700; letter-spacing: .02em;
    color: var(--ft-gold) !important;
    text-decoration: underline dotted var(--ft-gold) !important;
    text-underline-offset: 4px;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .ft-geo {
        background: linear-gradient(110deg, #F7B801 0%, #F7B801 38%, #ffffff 50%, #F7B801 62%, #F7B801 100%);
        background-size: 250% 100%;
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: ft-shimmer 5s linear infinite;
    }
}
@keyframes ft-shimmer {
    0%   { background-position: 150% 0; }
    100% { background-position: -150% 0; }
}


/* ---------- Horaires ---------- */
.ft-status {
    display: inline-flex; align-items: center; gap: .55rem;
    margin: 0 0 1rem !important; padding: .42rem .85rem;
    border-radius: 999px; border: 1px solid transparent;
    font-size: .78rem; font-weight: 700; line-height: 1.3;
}
.ft-status[hidden] { display: none; }
.ft-status::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; }
.ft-status[data-state="open"]   { background: rgba(34, 197, 94, .12);  border-color: rgba(34, 197, 94, .35);  color: #86efac; }
.ft-status[data-state="open"]::before   { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.ft-status[data-state="closed"] { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: #fca5a5; }
.ft-status[data-state="closed"]::before { background: #f87171; }

/* Mobile : le statut reste sur UNE seule ligne fixe (jamais de retour à la ligne) */
@media (max-width: 640px) {
    .ft-status {
        display: flex; width: fit-content; max-width: 100%;
        white-space: nowrap; flex-wrap: nowrap;
        gap: .45rem; padding: .4rem .7rem;
        font-size: clamp(.66rem, 3.3vw, .78rem);
    }
}

.ft-hours li {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .65rem 0; border-bottom: 1px dashed var(--ft-line);
    font-size: .9rem;
}
.ft-hours li:last-child { border-bottom: 0; }
.ft-hours li span:first-child { color: #fff; }
.ft-hours li span:last-child { font-weight: 700; color: #fff; white-space: nowrap; }

/* ---------- Barre du bas (centrée) ---------- */
.ft-bottom { border-top: 1px solid var(--ft-line); background: rgba(0, 0, 0, .2); }
.ft-bottom-in {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 62px;
    max-width: 1200px; margin: 0 auto; padding: 1rem 5rem;
    font-size: .82rem; text-align: center; color: var(--ft-muted);
}
.ft-copy { margin: 0; }

.ft-top {
    position: absolute; top: 0; bottom: 0; right: 1.25rem; margin: auto 0;
    display: grid; place-items: center;
    width: 44px; height: 44px; padding: 0; cursor: pointer;
    border-radius: 12px; border: 1px solid var(--ft-line);
    background: rgba(255, 255, 255, .07); color: #fff;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.ft-top:hover { background: var(--ft-gold); color: #1A1A2E; transform: translateY(-2px); }

/* ---------- Focus clavier ---------- */
footer.ft a:focus-visible, footer.ft button:focus-visible {
    outline: 3px solid var(--ft-gold);
    outline-offset: 3px;
    border-radius: 8px;
}

/* ---------- Responsive ---------- */
@media (min-width: 1025px) {
    footer.ft h2.ft-title { white-space: nowrap; }
}

@media (max-width: 1024px) {
    .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 2.25rem 2rem; padding: 3rem 0 2.25rem; }
    .ft-col-contact { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 640px) {
    footer.ft { margin-top: 2rem !important; }
    .ft-wrap { padding: 0 1rem; }
    .ft-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 0 1.75rem; }
    .ft-col-contact { grid-column: auto; order: 0; }
    .ft-contact .ft-value { white-space: normal; overflow-wrap: anywhere; }
    /* Les 2 numéros restent sur UNE seule ligne : la police s'adapte à la largeur de l'écran */
    .ft-contact .ft-phones { white-space: nowrap; overflow-wrap: normal; font-size: clamp(.58rem, calc((100vw - 92px) / 24), .93rem); }
    .ft-sep { margin: 0 .3em; }
    /* E-mail sur une seule ligne, même principe */
    .ft-contact a.ft-value { white-space: nowrap; overflow-wrap: normal; font-size: clamp(.6rem, calc((100vw - 92px) / 20), .93rem); }
    .ft-bottom-in { flex-direction: column; gap: .85rem; min-height: 0; padding: 1.1rem 1rem 1.25rem; }
    .ft-top { position: static; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ft-geo { animation: none !important; }
    footer.ft *, footer.ft *::before, footer.ft *::after { transition: none !important; }
    .ft-social a:hover, .ft-top:hover { transform: none; }
}

@media print {
    footer.ft { background: #fff !important; color: #000 !important; }
    .ft-social, .ft-top { display: none !important; }
}
