/* ==========================================================
   Scribe Solutions — Services.php
   Design moderne, cards par pôle, cohérent avec --catalogue-color
   A inclure via : <link rel="stylesheet" href="<?= BASE_URL ?>assets/css/services.css">
   ========================================================== */

.services-page {
    padding: 3rem 0;
}

.services-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.services-intro h1 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.services-intro p {
    color: #6b7280;
    font-size: 1.05rem;
}

/* ---------- Pôle (groupe) ---------- */

.services-pole {
    --pole-color: #0755A5;
    margin-bottom: 3.5rem;
}

.pole-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.9rem;
    border-bottom: 3px solid var(--pole-color);
}

.pole-header .pole-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--pole-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.pole-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    color: #1f2937;
}

/* ---------- Grille de cards service ---------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid var(--pole-color);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.10);
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
    color: #111827;
}

/* ---------- Liste des prestations (cliquables) ---------- */

.prestations-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.prestation-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #f9fafb;
    transition: background 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.prestation-link:hover {
    background: #fff;
    border-color: var(--pole-color);
}

.prestation-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.prestation-name {
    font-weight: 600;
    font-size: 0.92rem;
    color: #1f2937;
}

.prestation-desc {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.prestation-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.prestation-price {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--pole-color);
    white-space: nowrap;
}

/* ---------- Badges de type ---------- */

.badge-type {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25em 0.6em;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-type-fixe {
    background: #e6f4ea;
    color: #1a7f37;
}

.badge-type-calculable {
    background: #fff4e5;
    color: #b26a00;
}

.badge-type-sur_etude {
    background: #eef0ff;
    color: #4338ca;
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
/* ==========================================================
   Refonte tab-nav (remplace l'empilement vertical des pôles) —
   un seul pôle affiché à la fois, sélection via onglets.
   ========================================================== */

.services-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.services-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.6rem;
    border-bottom: 2px solid #eef0f3;
    padding-bottom: 0;
    min-width: max-content;
}

.services-tab {
    --pole-color: #0755A5;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
    padding: 0.75rem 1.1rem;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 12px 12px 0 0;
    background: transparent;
    color: #6b7280;
    font-weight: 700;
    font-size: 0.92rem;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.services-tab i {
    font-size: 1.05rem;
    color: var(--pole-color);
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.services-tab:hover {
    background: #f9fafb;
    color: #1f2937;
}

.services-tab.active {
    color: var(--pole-color);
    background: color-mix(in srgb, var(--pole-color) 8%, transparent);
    border-bottom-color: var(--pole-color);
}

.services-tab.active i {
    opacity: 1;
}

.services-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    height: 1.4em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: #eef0f3;
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 800;
}

.services-tab.active .services-tab-count {
    background: var(--pole-color);
    color: #fff;
}

.services-tab-content > .tab-pane .services-grid {
    animation: services-fade-in 0.25s ease;
}

@keyframes services-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .services-tab span:not(.services-tab-count) {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* =========================================================
   RECHERCHE — catalogue détaillé
   ========================================================= */

.services-search-wrap {
    position: relative;
    max-width: 460px;
    margin: 1.25rem auto 0;
}

.services-search-wrap i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.services-search-input {
    padding-left: 38px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
}

.services-search-input:focus {
    border-color: #0755A5;
    box-shadow: 0 0 0 .15rem rgba(7, 85, 165, .15);
}

/* En recherche : tous les pôles s'affichent en même temps (pas
   seulement l'onglet actif), pour chercher dans tout le catalogue. */
.services-tab-content.is-searching .tab-pane {
    display: block !important;
    opacity: 1 !important;
}

.services-tab-content.is-searching .tab-pane + .tab-pane {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #eef0f3;
}
