/* ============================================================
   STN - Page Projets (grille filtrable + détail + lightbox)
   ============================================================ */

:root {
    --stn-primary: #1E5A96;
    --stn-secondary: #4A8BC2;
    --stn-navy: #1B2050;
    --stn-dark: #1A3A52;
    --stn-tint: #EBF4FB;
    --stn-text: #2C3E50;
    --stn-muted: #6C757D;
}

/* ---------------- Hero ---------------- */
.stn-projects-hero {
    background: linear-gradient(135deg, var(--stn-navy), var(--stn-primary));
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.stn-projects-hero-inner h1 {
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
    margin: 16px 0 12px;
}

.stn-projects-hero-inner p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto;
}

.stn-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 7px 22px;
    border-radius: 50px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ---------------- Section ---------------- */
.stn-projects-section {
    padding: 70px 20px 90px;
    background: #F8FAFB;
}

.stn-projects-container {
    max-width: 1300px;
    margin: 0 auto;
}

/* ---------------- Filtre ---------------- */
.stn-projects-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 45px;
}

.stn-filter-btn {
    padding: 10px 26px;
    border: 2px solid var(--stn-primary);
    border-radius: 50px;
    background: #fff;
    color: var(--stn-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stn-filter-btn:hover {
    background: var(--stn-tint);
}

.stn-filter-btn.active {
    background: linear-gradient(135deg, var(--stn-primary), var(--stn-secondary));
    color: #fff;
    border-color: transparent;
}

/* ---------------- Grille projets ---------------- */
.stn-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.stn-project-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(27, 32, 80, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.stn-project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 35px rgba(27, 32, 80, 0.16);
}

.stn-project-image {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: var(--stn-tint);
}

.stn-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.stn-project-card:hover .stn-project-image img {
    transform: scale(1.06);
}

.stn-project-no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    color: #B0C4D8;
}

.stn-project-tags {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stn-project-tag {
    padding: 4px 12px;
    background: rgba(27, 32, 80, 0.85);
    color: #fff;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    backdrop-filter: blur(3px);
}

.stn-project-info {
    padding: 20px 22px 24px;
    flex: 1;
}

.stn-project-info h3 {
    font-size: 17.5px;
    color: var(--stn-navy);
    margin-bottom: 8px;
    line-height: 1.35;
}

.stn-project-info p {
    font-size: 14px;
    color: var(--stn-muted);
    line-height: 1.6;
}

/* ---------------- État vide ---------------- */
.stn-projects-empty {
    text-align: center;
    padding: 80px 20px;
}

.stn-projects-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.stn-projects-empty h2 {
    color: var(--stn-navy);
    margin-bottom: 8px;
}

.stn-projects-empty p {
    color: var(--stn-muted);
}

/* ---------------- Détail projet ---------------- */
.stn-project-detail-hero {
    background: linear-gradient(135deg, var(--stn-navy), var(--stn-primary));
    color: #fff;
    padding: 60px 20px 55px;
}

.stn-project-detail-hero h1 {
    font-size: clamp(26px, 4.5vw, 40px);
    font-weight: 700;
    margin: 18px 0 14px;
    max-width: 900px;
}

.stn-back-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.25s ease;
}

.stn-back-link:hover {
    color: #fff;
    text-decoration: underline;
}

.stn-project-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.stn-project-detail-tags .stn-project-tag {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 12.5px;
    padding: 5px 14px;
}

.stn-project-detail-desc {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
    max-width: 860px;
    white-space: pre-line;
}

/* ---------------- Galerie ---------------- */
.stn-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stn-gallery-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--stn-tint);
    box-shadow: 0 3px 14px rgba(27, 32, 80, 0.08);
}

.stn-gallery-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.stn-gallery-item:hover img {
    transform: scale(1.05);
}

/* ---------------- Lightbox ---------------- */
.stn-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 40, 0.94);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.stn-lightbox.open {
    display: flex;
}

.stn-lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.stn-lightbox-close,
.stn-lightbox-prev,
.stn-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    transition: background 0.25s ease;
}

.stn-lightbox-close:hover,
.stn-lightbox-prev:hover,
.stn-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.stn-lightbox-close {
    top: 24px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
}

.stn-lightbox-prev,
.stn-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    padding-bottom: 4px;
}

.stn-lightbox-prev { left: 26px; }
.stn-lightbox-next { right: 26px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .stn-projects-grid,
    .stn-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stn-projects-grid,
    .stn-gallery-grid {
        grid-template-columns: 1fr;
    }

    .stn-projects-filter {
        gap: 8px;
    }

    .stn-filter-btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .stn-lightbox-prev { left: 10px; }
    .stn-lightbox-next { right: 10px; }
}
