/* ============================================================
   commerceslocaux.css
   ============================================================ */

.commerces-locaux-bloc .commerces-locaux-carousel {
    width: 100%;
    overflow: hidden;
}

#container-commerces-locaux-carousel {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

#container-commerces-locaux-carousel .commerces-locaux {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 2px;
    position: relative;
    overflow: hidden;
    width: 150px;
    height: 150px;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}

/* Image */
#container-commerces-locaux-carousel .commerces-locaux img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
    z-index: 0;
}

#container-commerces-locaux-carousel .commerces-locaux:hover img {
    transform: scale(1.1);
}

/* Nom — haut gauche */
#container-commerces-locaux-carousel .commerces-locaux h4 {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    padding: 2px 5px;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    max-width: 75%;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.32);
    border-radius: 5px 0 4px 0;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ville — bas droite */
#container-commerces-locaux-carousel .commerces-locaux p {
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    padding: 2px 5px;
    margin: 0;
    position: absolute;
    bottom: 0;
    right: 0;
    max-width: 75%;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.32);
    border-radius: 4px 0 5px 0;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Note — bas gauche */
#container-commerces-locaux-carousel .commerces-locaux .note {
    font-size: 11px;
    position: absolute;
    bottom: -1px;
    left: 1px;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#container-commerces-locaux-carousel .commerces-locaux:hover .note {
    opacity: 0;
}

/* Distance — haut droite */
#container-commerces-locaux-carousel .commerces-locaux .distance {
    font-size: 10px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    position: absolute;
    top: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.32);
    border-radius: 0 5px 0 4px;
    padding: 2px 5px;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#container-commerces-locaux-carousel .commerces-locaux:hover .distance {
    opacity: 0;
}

/* Favori — haut droite, apparaît au survol */
#container-commerces-locaux-carousel .commerces-locaux .favori-button {
    position: absolute;
    overflow: visible;
    top: 2px;
    right: 2px;
    z-index: 3;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
    line-height: 1;
}

#container-commerces-locaux-carousel .commerces-locaux:hover .favori-button {
    opacity: 1;
}

#container-commerces-locaux-carousel .commerces-locaux .favori-button i {
    font-size: 15px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    transition: color 0.2s ease;
}

#container-commerces-locaux-carousel .commerces-locaux .favori-button i.fas {
    color: #ff4500;
}

#container-commerces-locaux-carousel .commerces-locaux .favori-button:hover i {
    color: #dc143c;
}

#container-commerces-locaux-carousel .commerces-locaux .favori-button.active i {
    color: red;
    animation: popHeart .3s ease;
}

@keyframes popHeart {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.5); }
    100% { transform: scale(1); }
}

#container-commerces-locaux-carousel .commerces-locaux .mini-coeur {
    position: absolute;
    color: red;
    font-size: 16px;
    pointer-events: none;
    animation: envolCoeur .8s ease-out forwards;
}

@keyframes envolCoeur {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0.2);
        opacity: 0;
    }
}

/* Bouton site web — bas gauche, apparaît au survol */
#container-commerces-locaux-carousel .commerces-locaux .site-web-button {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 10px;
    background-color: rgba(0, 51, 204, 0.85);
    color: #fff;
    padding: 2px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    z-index: 3;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
}

#container-commerces-locaux-carousel .commerces-locaux:hover .site-web-button {
    opacity: 1;
}

#container-commerces-locaux-carousel .commerces-locaux .site-web-button:hover {
    background-color: rgba(0, 64, 128, 0.95);
}

/* ── Flèches de navigation ── */
#container-commerces-locaux-carousel .slick-commerces-locaux-prev,
#container-commerces-locaux-carousel .slick-commerces-locaux-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.2s ease, background 0.2s ease;
    padding: 0;
}


/* Fix conflit Slick float vs flex — à ajouter à la fin de commerceslocaux.css */
#container-commerces-locaux-carousel.slick-initialized { display: block;}

#container-commerces-locaux-carousel .slick-list {overflow: hidden;}

#container-commerces-locaux-carousel .slick-track {
    display: flex !important;
    align-items: center;
    flex-direction: row !important;
}

#container-commerces-locaux-carousel .slick-commerces-locaux-prev { left: 4px; }
#container-commerces-locaux-carousel .slick-commerces-locaux-next { right: 4px; }

#container-commerces-locaux-carousel .slick-commerces-locaux-prev:hover,
#container-commerces-locaux-carousel .slick-commerces-locaux-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.72);
}

#container-commerces-locaux-carousel .slick-commerces-locaux-prev i,
#container-commerces-locaux-carousel .slick-commerces-locaux-next i {
    font-size: 12px;
    color: #fff;
}

#container-commerces-locaux-carousel .slick-commerces-locaux-prev::before,
#container-commerces-locaux-carousel .slick-commerces-locaux-next::before {
    content: none;
}

/* ── Message vide ── */
#container-commerces-locaux-carousel p.message-vide {
    font-size: 13px;
    color: #888;
    padding: 20px;
    text-align: center;
}


/* Filtres par catégorie */
.commerces-locaux-filtres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.commerces-locaux-filtres button {
    font-size: 11px;
    padding: 2px 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #555;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.commerces-locaux-filtres button.actif,
.commerces-locaux-filtres button:hover {
    background-color: #0033cc;
    color: #fff;
    border-color: #0033cc;
}

/* ─────────────────────────────────────────────────────
   Carte publicitaire + carte "Voir plus"

   ⚠️ IMPORTANT sur la taille : ces deux cartes portent aussi
   la classe .commerces-locaux (voir commerceslocaux.js), donc
   elles héritent déjà de width:150px / height:130px définis
   plus haut. On ne redéfinit JAMAIS ici de width/height/
   min-height qui s'écarterait de ces valeurs — c'est ce qui
   provoquait l'écrasement de toute la rangée du carousel
   (Slick aligne la hauteur de tous les slides sur le plus
   grand contenu) quand ces cartes apparaissaient, en particulier
   quand une catégorie était filtrée.
   ───────────────────────────────────────────────────── */

/* ── Carte pub ─────────────────────────────────────── */
#container-commerces-locaux-carousel .commerce-pub-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
    box-sizing: border-box;
}

#container-commerces-locaux-carousel .commerce-pub-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

#container-commerces-locaux-carousel .commerce-pub-card:active {
    transform: scale(0.98);
}

.pub-badge {
    pointer-events: none;
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 2px 7px;
    color: #fff;
}

.pub-deco {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    top: -14px;
    right: -14px;
    pointer-events: none;
}

.pub-contenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 1;
    max-width: 100%;
}

.pub-titre {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.pub-sous-titre {
    font-size: 10px;
    opacity: .88;
}

.pub-btn {
    margin-top: 3px;
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* ── Carte "Voir plus" ──────────────────────────────── */
#container-commerces-locaux-carousel .commerce-voir-plus-card {
    border: 2px dashed rgba(var(--a-rgb, 37, 99, 235), 0.35);
    background: rgba(var(--a-rgb, 37, 99, 235), 0.04);
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

#container-commerces-locaux-carousel .commerce-voir-plus-card:hover {
    border-color: rgba(var(--a-rgb, 37, 99, 235), 0.7);
    background: rgba(var(--a-rgb, 37, 99, 235), 0.09);
    transform: translateY(-2px);
}

.commerce-voir-plus-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 6px;
    padding: 8px;
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
}

.voir-plus-icone {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.commerce-voir-plus-card:hover .voir-plus-icone {
    transform: scale(1.1);
}

.voir-plus-titre {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
}

.voir-plus-sous-titre {
    font-size: 9px;
    opacity: .6;
    text-align: center;
    line-height: 1.1;
}