/* =====================================================
   LJ Top Categories — Styles + 6 effets hover
   LJ TechHub © 2025
   ===================================================== */

/* === WRAPPER === */
.lj-top-categories-widget {
    width: 100%;
}

/* === HEADER === */
.lj-top-categories-header {
    margin-bottom: 24px;
}

.lj-top-categories-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    line-height: 1.2;
}

.lj-top-categories-title-accent {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #e63946 30%, transparent 100%);
    border-radius: 2px;
}

/* === LIST === */
.lj-top-categories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* === CARTE === */
.lj-cat-card {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.35s ease;
    will-change: transform;
}

.lj-cat-card:hover {
    text-decoration: none;
}

/* === OVERLAY base === */
.lj-cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.35s ease, opacity 0.35s ease;
    z-index: 1;
}

/* === CONTENU TEXTE === */
.lj-cat-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.lj-cat-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    transition: color 0.3s ease, transform 0.3s ease;
    display: block;
}

.lj-cat-count {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 6px;
    display: block;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* =====================================================
   EFFET 1 — ZOOM (scale)
   ===================================================== */
.lj-hover-zoom .lj-cat-card {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.4s ease;
}
.lj-hover-zoom .lj-cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-image: inherit;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}
/* On anime le background via scale sur la carte elle-même */
.lj-hover-zoom .lj-cat-card .lj-cat-overlay {
    transition: background 0.4s ease;
}
.lj-hover-zoom .lj-cat-card:hover {
    transform: scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.lj-hover-zoom .lj-cat-card:hover {
    background-size: 110%;
}
.lj-hover-zoom .lj-cat-card {
    background-size: 100%;
    transition: background-size 0.5s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

/* =====================================================
   EFFET 2 — SLIDE UP (révélation du texte)
   ===================================================== */
.lj-hover-slide_up .lj-cat-card .lj-cat-content {
    transform: translateY(20px);
    opacity: 0.7;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.4s ease;
}
.lj-hover-slide_up .lj-cat-card:hover .lj-cat-content {
    transform: translateY(0);
    opacity: 1;
}
.lj-hover-slide_up .lj-cat-card .lj-cat-overlay {
    opacity: 0.5;
    transition: opacity 0.4s ease;
}
.lj-hover-slide_up .lj-cat-card:hover .lj-cat-overlay {
    opacity: 0.75;
}
.lj-hover-slide_up .lj-cat-card .lj-cat-count {
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.4s ease 0.05s, opacity 0.4s ease 0.05s;
}
.lj-hover-slide_up .lj-cat-card:hover .lj-cat-count {
    transform: translateY(0);
    opacity: 1;
}

/* =====================================================
   EFFET 3 — SHINE (reflet lumière traversant)
   ===================================================== */
.lj-cat-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 80%
    );
    transform: skewX(-15deg);
    z-index: 3;
    pointer-events: none;
    transition: left 0s;
}
.lj-hover-shine .lj-cat-card:hover .lj-cat-shine {
    left: 150%;
    transition: left 0.65s cubic-bezier(0.23, 1, 0.32, 1);
}
.lj-hover-shine .lj-cat-card:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

/* =====================================================
   EFFET 4 — BLUR + couleur
   ===================================================== */
.lj-hover-blur .lj-cat-card {
    transition: box-shadow 0.4s ease;
}
.lj-hover-blur .lj-cat-card .lj-cat-overlay {
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}
.lj-hover-blur .lj-cat-card:hover .lj-cat-overlay {
    background: var(--lj-blur-color, rgba(220, 53, 69, 0.55)) !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.lj-hover-blur .lj-cat-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.lj-hover-blur .lj-cat-card .lj-cat-name,
.lj-hover-blur .lj-cat-card .lj-cat-count {
    transition: transform 0.3s ease;
}
.lj-hover-blur .lj-cat-card:hover .lj-cat-name {
    transform: translateY(-3px);
}

/* =====================================================
   EFFET 5 — TILT 3D (géré en JS)
   ===================================================== */
.lj-hover-tilt .lj-cat-card {
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}
.lj-hover-tilt .lj-cat-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.lj-hover-tilt .lj-cat-card .lj-cat-content {
    transform: translateZ(20px);
}
.lj-hover-tilt .lj-cat-card:hover .lj-cat-overlay {
    background: rgba(0, 0, 0, 0.25) !important;
}

/* =====================================================
   EFFET 6 — PARALLAX flottant (géré en JS)
   ===================================================== */
.lj-hover-parallax .lj-cat-card {
    background-size: 110%;
    transition: box-shadow 0.3s ease;
}
.lj-hover-parallax .lj-cat-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.lj-hover-parallax .lj-cat-card .lj-cat-name {
    transition: transform 0.2s ease;
}
.lj-hover-parallax .lj-cat-card:hover .lj-cat-name {
    transform: scale(1.04);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 767px) {
    .lj-top-categories-title {
        font-size: 1.3rem;
    }
    .lj-cat-name {
        font-size: 1.1rem;
    }
    .lj-cat-count {
        font-size: 0.8rem;
    }
}
