/* ============================================================
   CBATP — Lot 2 : Services & Réalisations
   ============================================================ */

/* ============================================================
   SERVICES INDEX — Layout sidebar gauche + contenu droit
   ============================================================ */

.cbatp-services-page {
    padding: 80px 0;
    background: #fff;
}

.cbatp-services-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: flex-start;
}
@media (max-width: 992px) {
    .cbatp-services-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* Sidebar services */
.cbatp-services-sidebar {
    background: var(--cbatp-slate-50);
    border-radius: var(--cbatp-radius-xl);
    padding: 24px;
    position: sticky;
    top: 100px;
}
@media (max-width: 992px) {
    .cbatp-services-sidebar { position: static; }
}

.cbatp-services-sidebar-title {
    font-family: var(--cbatp-font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--cbatp-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cbatp-orange);
    display: inline-block;
}

.cbatp-service-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: var(--cbatp-radius);
    color: var(--cbatp-slate-700);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.cbatp-service-nav-item:hover {
    background: #fff;
    color: var(--cbatp-orange);
    border-color: var(--cbatp-slate-100);
}
.cbatp-service-nav-item.active {
    background: var(--cbatp-orange);
    color: #fff;
    box-shadow: 0 6px 14px rgba(247, 123, 1, 0.3);
}
.cbatp-service-nav-item .count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.cbatp-service-nav-item.active .count {
    background: rgba(255, 255, 255, 0.2);
}

/* Contenu service actif */
.cbatp-service-detail {
    background: #fff;
}

.cbatp-service-detail-header {
    border-bottom: 1px solid var(--cbatp-slate-100);
    padding-bottom: 32px;
    margin-bottom: 32px;
}

.cbatp-service-detail-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(247, 123, 1, 0.1);
    color: var(--cbatp-orange);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.cbatp-service-detail h1 {
    font-size: clamp(28px, 4vw, 40px);
    color: var(--cbatp-ink);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cbatp-service-detail-desc {
    font-size: 16px;
    color: var(--cbatp-slate-700);
    line-height: 1.8;
}

.cbatp-service-detail-meta {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--cbatp-slate-100);
}
.cbatp-service-detail-meta-item {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 14px;
    color: var(--cbatp-slate-500);
}
.cbatp-service-detail-meta-item i { color: var(--cbatp-orange); }
.cbatp-service-detail-meta-item strong { color: var(--cbatp-ink); }

/* ============================================================
   GRILLE PROJETS (réutilisable)
   ============================================================ */

.cbatp-projets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 992px) { .cbatp-projets-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cbatp-projets-grid { grid-template-columns: 1fr; } }

.cbatp-projet-card {
    background: #fff;
    border-radius: var(--cbatp-radius-xl);
    overflow: hidden;
    border: 1px solid var(--cbatp-slate-100);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.cbatp-projet-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.1);
    border-color: var(--cbatp-orange);
    color: inherit;
}

.cbatp-projet-card-img {
    aspect-ratio: 4/3;
    background-color: var(--cbatp-slate-100);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.cbatp-projet-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,31,64,0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}
.cbatp-projet-card:hover .cbatp-projet-card-img::after { opacity: 1; }

.cbatp-projet-card-tag {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--cbatp-orange);
    color: #fff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
}
.cbatp-projet-card-tag.done { background: var(--cbatp-success); }
.cbatp-projet-card-tag.in-progress { background: var(--cbatp-orange); }

.cbatp-projet-card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cbatp-projet-card h3 {
    font-size: 17px;
    color: var(--cbatp-ink);
    margin-bottom: 10px;
    line-height: 1.35;
    font-weight: 700;
}

.cbatp-projet-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--cbatp-slate-500);
}
.cbatp-projet-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cbatp-projet-card-meta i { color: var(--cbatp-orange); }

.cbatp-projet-card-services {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--cbatp-slate-100);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cbatp-projet-card-service-chip {
    background: var(--cbatp-slate-50);
    color: var(--cbatp-slate-700);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

/* ============================================================
   FILTRES (réalisations index)
   ============================================================ */

.cbatp-filters-bar {
    background: #fff;
    border-radius: var(--cbatp-radius-xl);
    padding: 20px 24px;
    border: 1px solid var(--cbatp-slate-100);
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.04);
}

.cbatp-filters-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
@media (max-width: 992px) { .cbatp-filters-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cbatp-filters-form { grid-template-columns: 1fr; } }

.cbatp-filter-field { min-width: 0; }
.cbatp-filter-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--cbatp-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.cbatp-filter-field input,
.cbatp-filter-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--cbatp-slate-200);
    border-radius: var(--cbatp-radius);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--cbatp-ink);
    outline: none;
    transition: all 0.2s;
}
.cbatp-filter-field input:focus,
.cbatp-filter-field select:focus {
    border-color: var(--cbatp-orange);
    box-shadow: 0 0 0 3px rgba(247, 123, 1, 0.1);
}

.cbatp-filter-search {
    position: relative;
}
.cbatp-filter-search input { padding-left: 40px; }
.cbatp-filter-search::before {
    content: '\f52a';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 14px;
    bottom: 11px;
    color: var(--cbatp-slate-400);
    font-size: 16px;
}

.cbatp-filter-submit {
    padding: 10px 22px;
    background: var(--cbatp-orange);
    color: #fff;
    border: none;
    border-radius: var(--cbatp-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cbatp-filter-submit:hover {
    background: var(--cbatp-orange-dark);
    transform: translateY(-1px);
}

/* Filtres actifs (chips) */
.cbatp-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--cbatp-slate-500);
}
.cbatp-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--cbatp-info-bg);
    color: var(--cbatp-info);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}
.cbatp-filter-chip:hover { background: var(--cbatp-danger-bg); color: var(--cbatp-danger); }

.cbatp-filter-clear {
    color: var(--cbatp-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

/* ============================================================
   PAGINATION (custom Laravel)
   ============================================================ */

.cbatp-pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    gap: 8px;
}
.cbatp-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid var(--cbatp-slate-200);
    border-radius: var(--cbatp-radius);
    color: var(--cbatp-slate-700);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: #fff;
}
.cbatp-pagination .page-link:hover {
    border-color: var(--cbatp-orange);
    color: var(--cbatp-orange);
}
.cbatp-pagination .active .page-link {
    background: var(--cbatp-orange);
    color: #fff;
    border-color: var(--cbatp-orange);
}
.cbatp-pagination .disabled .page-link {
    color: var(--cbatp-slate-300);
    pointer-events: none;
}

/* ============================================================
   PROJET SHOW — Page détail
   ============================================================ */

.cbatp-projet-hero {
    position: relative;
    height: 65vh;
    min-height: 480px;
    background-color: var(--cbatp-navy);
    background-size: cover;
    background-position: center;
    color: #fff;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.cbatp-projet-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 15, 30, 0.95) 0%, rgba(0, 31, 64, 0.6) 50%, rgba(0, 31, 64, 0.3) 100%);
}
.cbatp-projet-hero > .container { position: relative; z-index: 2; padding-bottom: 56px; }

.cbatp-projet-hero-tag {
    display: inline-block;
    background: var(--cbatp-orange);
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.cbatp-projet-hero h1 {
    color: #fff;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 900px;
    font-weight: 800;
}

.cbatp-projet-hero-meta {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}
.cbatp-projet-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cbatp-projet-hero-meta i { color: var(--cbatp-orange); }

/* Contenu détail projet */
.cbatp-projet-detail {
    padding: 80px 0;
    background: #fff;
}

.cbatp-projet-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 56px;
    align-items: flex-start;
}
@media (max-width: 992px) {
    .cbatp-projet-layout { grid-template-columns: 1fr; gap: 40px; }
}

.cbatp-projet-content h2 {
    font-size: 26px;
    color: var(--cbatp-ink);
    margin-bottom: 16px;
    margin-top: 40px;
    letter-spacing: -0.02em;
}
.cbatp-projet-content h2:first-child { margin-top: 0; }

.cbatp-projet-content p {
    font-size: 16px;
    color: var(--cbatp-slate-700);
    line-height: 1.8;
    margin-bottom: 18px;
}

/* Galerie photos (grille) */
.cbatp-projet-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 32px 0;
}
@media (max-width: 600px) { .cbatp-projet-gallery { grid-template-columns: repeat(2, 1fr); } }

.cbatp-projet-gallery-item {
    aspect-ratio: 1/1;
    background-size: cover;
    background-position: center;
    border-radius: var(--cbatp-radius);
    cursor: pointer;
    transition: transform 0.3s;
}
.cbatp-projet-gallery-item:hover { transform: scale(1.03); }

/* Vidéo embed */
.cbatp-projet-video {
    aspect-ratio: 16/9;
    border-radius: var(--cbatp-radius-lg);
    overflow: hidden;
    margin: 32px 0;
    background: var(--cbatp-slate-900, #000);
}
.cbatp-projet-video iframe,
.cbatp-projet-video video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Sidebar projet (infos) */
.cbatp-projet-sidebar {
    background: var(--cbatp-slate-50);
    border-radius: var(--cbatp-radius-xl);
    padding: 28px;
    position: sticky;
    top: 100px;
}
@media (max-width: 992px) { .cbatp-projet-sidebar { position: static; } }

.cbatp-projet-sidebar h3 {
    font-size: 18px;
    color: var(--cbatp-ink);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--cbatp-orange);
}

.cbatp-projet-info-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--cbatp-slate-200);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cbatp-projet-info-item:last-child { border-bottom: none; }
.cbatp-projet-info-item-label {
    font-size: 11px;
    color: var(--cbatp-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}
.cbatp-projet-info-item-value {
    font-size: 15px;
    color: var(--cbatp-ink);
    font-weight: 600;
}

/* Navigation projet précédent/suivant */
.cbatp-projet-nav {
    background: var(--cbatp-slate-50);
    padding: 32px 0;
    border-top: 1px solid var(--cbatp-slate-100);
    border-bottom: 1px solid var(--cbatp-slate-100);
}

.cbatp-projet-nav-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}
@media (max-width: 768px) {
    .cbatp-projet-nav-grid { grid-template-columns: 1fr; gap: 16px; }
}

.cbatp-projet-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border-radius: var(--cbatp-radius-lg);
    border: 1px solid var(--cbatp-slate-100);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.cbatp-projet-nav-link:hover {
    border-color: var(--cbatp-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.06);
}
.cbatp-projet-nav-link.next { justify-content: flex-end; text-align: right; }
.cbatp-projet-nav-link.next .cbatp-projet-nav-text { order: 1; }
.cbatp-projet-nav-link.next i { order: 2; }

.cbatp-projet-nav-link i {
    font-size: 24px;
    color: var(--cbatp-orange);
    flex-shrink: 0;
}

.cbatp-projet-nav-text small {
    font-size: 11px;
    color: var(--cbatp-slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: block;
}
.cbatp-projet-nav-text strong {
    font-size: 14px;
    color: var(--cbatp-ink);
    font-weight: 600;
    display: block;
    line-height: 1.3;
}

.cbatp-projet-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--cbatp-navy);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.cbatp-projet-nav-back:hover {
    background: var(--cbatp-navy-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* Empty state */
.cbatp-empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--cbatp-slate-500);
}
.cbatp-empty-state i {
    font-size: 64px;
    color: var(--cbatp-slate-300);
    margin-bottom: 20px;
    display: block;
}
.cbatp-empty-state h3 {
    font-size: 22px;
    color: var(--cbatp-ink);
    margin-bottom: 8px;
}
.cbatp-empty-state p {
    font-size: 15px;
    margin-bottom: 24px;
}
