/* ===========================================
   ALL CATEGORIES PAGE — EPI Côte d'Ivoire
=========================================== */

/* ---- Hero ---- */
.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.hero-breadcrumb a {
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.hero-breadcrumb a:hover { color: var(--epi-red-light); }
.hero-breadcrumb .sep { color: rgba(255,255,255,0.25); font-size: 11px; }
.hero-breadcrumb .current { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 600; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(227,6,19,0.18);
    border: 1px solid rgba(227,6,19,0.35);
    color: var(--epi-red-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}
.hero-title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 14px;
}
.hero-title span { color: var(--epi-red-light); }
.hero-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.65);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* Barre de recherche hero */
.hero-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    max-width: 480px;
    transition: all 0.3s ease;
    overflow: hidden;
}
.hero-search-bar:focus-within {
    background: rgba(255,255,255,0.15);
    border-color: var(--epi-red);
    box-shadow: 0 0 0 4px rgba(227,6,19,0.15);
}
.hero-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 20px;
    color: #fff;
    font-size: 14px;
}
.hero-search-bar input::placeholder { color: rgba(255,255,255,0.45); }
.hero-search-bar button {
    background: var(--epi-red);
    border: none;
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    margin: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.hero-search-bar button:hover {
    background: var(--epi-red-dark);
    transform: scale(1.08);
}

/* Stats mini dans le hero */
.hero-stats {
    display: flex;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 600;
}
.hero-stat strong { color: #fff; font-size: 18px; font-weight: 900; }
.hero-stat i { color: var(--epi-red-light); font-size: 16px; }

/* Décoration grille hero */
.hero-deco-grid {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    opacity: 0.07;
    pointer-events: none;
}
.hero-deco-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
}
@media(max-width:768px) { .hero-deco-grid { display: none; } }

/* ---- Barre de navigation rapide ---- */
.cat-quick-nav {
    background: #fff;
    border-bottom: 1px solid var(--epi-gray-2);
    position: sticky;
    top: 74px;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.cat-quick-nav-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}
.cat-quick-nav-inner::-webkit-scrollbar { display: none; }
.qnav-pill {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 30px;
    border: 2px solid var(--epi-gray-2);
    background: #fff;
    color: var(--epi-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
}
.qnav-pill img {
    width: 20px; height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.qnav-pill:hover {
    border-color: var(--epi-red);
    color: var(--epi-red);
    background: var(--epi-red-pale);
    transform: translateY(-1px);
}
.qnav-pill.active {
    background: linear-gradient(135deg, var(--epi-red), var(--epi-red-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px var(--epi-red-20);
}

/* ---- Section principale ---- */
.all-cat-body {
    padding: 56px 0 72px;
}
.all-cat-section { margin-bottom: 72px; }
.all-cat-section:last-child { margin-bottom: 0; }

/* Section header */
.cat-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.csh-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--epi-red-pale);
    color: var(--epi-red);
    margin-bottom: 6px;
}
.csh-title {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 900;
    color: var(--epi-text);
    margin: 0;
    line-height: 1.2;
}
.csh-title span { color: var(--epi-red); }
.csh-count {
    font-size: 13px;
    color: var(--epi-text-muted);
    margin-top: 4px;
    font-weight: 500;
}
.csh-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--epi-red);
    text-decoration: none;
    padding: 9px 20px;
    border: 2px solid var(--epi-red);
    border-radius: 30px;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.csh-link:hover {
    background: var(--epi-red);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--epi-red-20);
}

/* ---- Cartes de catégories — Grille principale ---- */
.main-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media(max-width:1100px) { .main-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:576px)  { .main-cat-grid { grid-template-columns: 1fr; } }

/* Card catégorie principale */
.main-cat-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--epi-dark);
    aspect-ratio: 4/3;
    display: block;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}
.main-cat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}
.main-cat-card-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
    opacity: 0.65;
}
.main-cat-card:hover .main-cat-card-img { transform: scale(1.08); opacity: 0.55; }

.main-cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
    transition: all 0.35s ease;
}
.main-cat-card:hover .main-cat-card-overlay {
    background: linear-gradient(to top, rgba(184,0,15,0.85) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}

.main-cat-card-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px;
    z-index: 2;
    transition: transform 0.35s ease;
}
.main-cat-card:hover .main-cat-card-content { transform: translateY(-4px); }

.mcc-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    width: fit-content;
    text-transform: uppercase;
}
.mcc-name {
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 10px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.mcc-sub-count {
    font-size: 12px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mcc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.main-cat-card:hover .mcc-btn {
    opacity: 1;
    transform: translateY(0);
    background: var(--epi-red);
    border-color: transparent;
}

/* Numéro décoratif */
.mcc-number {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 64px;
    font-weight: 900;
    color: rgba(255,255,255,0.06);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    z-index: 1;
    transition: all 0.35s ease;
}
.main-cat-card:hover .mcc-number {
    color: rgba(255,255,255,0.1);
    transform: scale(1.1);
}

/* ---- Sous-catégories (chips grid) ---- */
.sub-cat-group {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--epi-gray-2);
    margin-bottom: 16px;
    transition: all 0.35s ease;
}
.sub-cat-group:hover {
    box-shadow: 0 8px 32px rgba(227,6,19,0.1);
    border-color: rgba(227,6,19,0.12);
}

.scg-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--epi-gray-2);
}
.scg-header.no-border {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.scg-thumb {
    width: 52px; height: 52px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--epi-red-pale);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(227,6,19,0.1);
}
.scg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.scg-thumb i { color: var(--epi-red); font-size: 1.5rem; }
.scg-info { flex: 1; min-width: 0; }
.scg-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--epi-text);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
    transition: color 0.2s;
}
.scg-name:hover { color: var(--epi-red); }
.scg-meta { font-size: 12px; color: var(--epi-text-muted); font-weight: 500; }
.scg-browse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--epi-red-pale);
    border: 1px solid rgba(227,6,19,0.15);
    border-radius: 30px;
    color: var(--epi-red);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.scg-browse:hover {
    background: var(--epi-red);
    color: #fff;
    border-color: transparent;
}

/* Grid sous-catégories chips */
.sub-chips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
@media(max-width:576px) { .sub-chips-grid { grid-template-columns: repeat(2, 1fr); } }

.sub-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    border-radius: 14px;
    border: 2px solid var(--epi-gray-2);
    background: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}
.sub-chip:hover {
    border-color: var(--epi-red);
    background: var(--epi-red-pale);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--epi-red-10);
}
.sub-chip-img {
    width: 56px; height: 56px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--epi-gray);
    border: 1px solid var(--epi-gray-2);
    transition: all 0.3s ease;
}
.sub-chip-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.sub-chip:hover .sub-chip-img { border-color: rgba(227,6,19,0.3); }
.sub-chip:hover .sub-chip-img img { transform: scale(1.1); }
.sub-chip-no-img {
    width: 56px; height: 56px;
    border-radius: 12px;
    background: var(--epi-red-pale);
    display: flex; align-items: center; justify-content: center;
    color: var(--epi-red);
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.sub-chip:hover .sub-chip-no-img { background: var(--epi-red); color: #fff; }
.sub-chip-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--epi-text);
    line-height: 1.3;
    transition: color 0.2s;
}
.sub-chip:hover .sub-chip-name { color: var(--epi-red); }
.sub-chip-count {
    font-size: 11px;
    color: var(--epi-text-muted);
    font-weight: 600;
    background: var(--epi-gray);
    padding: 2px 8px;
    border-radius: 20px;
    transition: all 0.2s;
}
.sub-chip:hover .sub-chip-count { background: rgba(227,6,19,0.1); color: var(--epi-red); }

/* ---- Section CTA bas de page ---- */
.all-cat-cta {
    background: linear-gradient(135deg, var(--epi-dark) 0%, var(--epi-dark-3) 100%);
    border-radius: 24px;
    padding: 56px 48px;
    position: relative;
    overflow: hidden;
    margin-top: 16px;
}
.all-cat-cta::before {
    content: '';
    position: absolute;
    top: -30%; right: -5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(227,6,19,0.1) 0%, transparent 65%);
    border-radius: 50%;
}
.all-cat-cta::after {
    content: '';
    position: absolute;
    bottom: -20%; left: 5%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 65%);
    border-radius: 50%;
}
@media(max-width:768px) { .all-cat-cta { padding: 36px 24px; } }

/* CTA inline buttons */
.all-cat-cta .slide-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--epi-red), var(--epi-red-dark));
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}
.all-cat-cta .slide-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    width: fit-content;
    font-size: 14px;
}
.all-cat-cta .slide-btn-outline:hover {
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

/* ---- État vide ---- */
.empty-categories {
    text-align: center;
    padding: 80px 20px;
    color: var(--epi-text-muted);
}
.empty-categories i {
    font-size: 4rem;
    color: var(--epi-red);
    opacity: 0.3;
    display: block;
    margin-bottom: 16px;
}
.empty-categories h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--epi-text);
    margin-bottom: 8px;
}

/* Animation d'apparition au scroll */
.reveal-card {
    animation: revealFadeIn 0.55s ease both;
}
@keyframes revealFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* Classe ajoutée par JS pour rejouer l'animation sur les éléments hors viewport */
.reveal-card.will-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    animation: none;
}
.reveal-card.will-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nombre total flottant (hero déco) */
.hero-total-badge {
    position: absolute;
    right: 10%;
    bottom: 28px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 16px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 2;
}
.hero-total-badge .num {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.hero-total-badge .lbl {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
@media(max-width:768px) { .hero-total-badge { display: none; } }

/* ---- Classes utilitaires categories ---- */
.hero-container { z-index: 2; }

.qnav-count {
    font-size: 10px;
    opacity: 0.6;
    font-weight: 600;
}

.cta-inner { z-index: 1; }

.cta-cat-badge {
    background: rgba(227,6,19,0.2);
    color: var(--epi-red-light);
    font-size: 11px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 20px;
    display: inline-block;
    padding: 4px 12px;
    margin-bottom: 12px;
}

.cta-cat-title {
    font-size: clamp(20px, 2.5vw, 30px);
}

.cta-cat-desc {
    color: rgba(255,255,255,0.65);
    font-size: 15px;
    margin-bottom: 0;
    line-height: 1.7;
}
