/* =============================================================
   CATEGORY.CSS — DESIGN BRAND IDENTITÉ (Bleu & Vert)
   Cible : annuaire/category.php
   ============================================================= */

:root {
    --brand-blue: #0B132B;
    --brand-green: #39FF14;
    --magz-red: #F73F52; /* Fallback for some Magz elements */
    --bg-light: #fbfbfb;
    --border-lite: #eee;
}

/* ── Header Dynamique (Style Institutionnel) ────────────────── */
.dir-header {
    background: var(--brand-blue);
    color: #fff;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}
.dir-header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--brand-green);
}

.dir-breadcrumb {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dir-breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.dir-breadcrumb a:hover { color: var(--brand-green); }
.dir-breadcrumb span { color: rgba(255,255,255,0.3); }

.dir-h1 {
    font-size: clamp(24px, 5vw, 38px);
    font-weight: 900;
    margin: 0 0 15px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.dir-intro {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 25px;
}
.dir-intro strong { color: var(--brand-green); }

.result-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(57, 255, 20, 0.1);
    color: var(--brand-green);
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

/* ── Horizontal Cards (Sortlist-style) ──────────────────────── */
.companies-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sortlist-card {
    background: #fff;
    border: 1px solid var(--border-lite);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.sortlist-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--brand-green);
    transform: translateY(-2px);
}

.sortlist-card .badge-top {
    position: absolute;
    top: -10px;
    right: 20px;
}

.sortlist-card .logo-container {
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    flex-shrink: 0;
}
.sortlist-card .logo-container img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sortlist-card .co-info {
    flex-grow: 1;
}

.sortlist-card h3 { 
    font-size: 20px; 
    font-weight: 900; 
    margin: 0 0 5px; 
    color: var(--brand-blue); 
}

.sortlist-card .stars {
    color: #FFD700; /* Gold */
    font-size: 14px;
    margin-bottom: 10px;
}
.sortlist-card .stars span {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
    font-weight: 600;
}

.sortlist-card .services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.sortlist-card .services-list li {
    font-size: 13px;
    color: #555;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sortlist-card .services-list li i {
    color: var(--brand-green);
    font-size: 16px;
}

.sortlist-card .actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    flex-shrink: 0;
    min-width: 150px;
}

.sortlist-card .location { 
    color: #999; 
    font-size: 12px;
    font-weight: 700;
}

.sortlist-card .view-btn { 
    background: var(--brand-blue);
    color: #fff;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 12px;
    text-align: center;
    width: 100%;
    transition: 0.3s;
}

.sortlist-card .view-btn:hover {
    background: var(--brand-green);
    color: var(--brand-blue);
}

/* SEO Content Section */
.seo-content-section {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-top: 50px;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.seo-content-section h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--brand-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-green);
}

.seo-content-section h3 {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    margin: 25px 0 15px;
}

@media (max-width: 768px) {
    .sortlist-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .sortlist-card .services-list {
        justify-content: center;
    }
    .sortlist-card .actions {
        align-items: center;
        width: 100%;
    }
    .seo-content-section {
        padding: 25px;
    }
}

/* ── Sidebar (Style Magz) ────────────────────────────────────── */
.sidebar-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 25px;
    margin-bottom: 30px;
}
.sidebar-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--brand-blue);
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-title i { color: var(--brand-green); font-size: 18px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
}
.sidebar-link i { font-size: 10px; color: #ccc; }
.sidebar-link:hover { color: var(--brand-green); padding-left: 5px; }

/* ── No Result ──────────────────────────────────────────────── */
.no-result {
    text-align: center;
    padding: 80px 40px;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 4px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dir-header { padding: 40px 0; }
    .companies-grid { grid-template-columns: 1fr; }
}