/* ==========================================================================
   Section Nos Réalisations - SinusTic
   ========================================================================== */

.realisations {
    position: relative;
    z-index: 2;
    padding: 7rem 0;
    background: linear-gradient(180deg, #f8fbfd 0%, #edf5fa 100%);
    margin-top: -1px;
}

.realisations::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 91, 154, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(116, 194, 225, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.realisations .container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header de la section */
.realisations-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.realisations-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 91, 154, 0.08);
    color: var(--primary-color, #005b9a);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(0, 91, 154, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.realisations-header h2 {
    color: var(--primary-color, #005b9a);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.realisations-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #005b9a), var(--secondary-color, #74c2e1));
    border-radius: 2px;
}

.realisations-header p {
    color: var(--text-color, #333333);
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-top: 1rem;
}

/* Filtres de catégories */
.realisations-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3.5rem;
}

.filter-btn {
    padding: 0.65rem 1.4rem;
    border: 1px solid #d0e0ed;
    background: #ffffff;
    color: #4a5d6e;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.filter-btn i {
    font-size: 0.9rem;
    color: var(--primary-color, #005b9a);
    transition: color 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color, #005b9a);
    color: var(--primary-color, #005b9a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 154, 0.12);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color, #005b9a) 0%, #0077c8 100%);
    color: #ffffff;
    border-color: var(--primary-color, #005b9a);
    box-shadow: 0 6px 18px rgba(0, 91, 154, 0.25);
}

.filter-btn.active i {
    color: #ffffff;
}

.filter-count {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 20px;
    background: rgba(0, 91, 154, 0.1);
    color: var(--primary-color, #005b9a);
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Grille des Réalisations */
.realisations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* Carte de projet */
.realisation-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 91, 154, 0.1);
    box-shadow: 0 8px 25px rgba(0, 91, 154, 0.07);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.realisation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(0, 91, 154, 0.16);
    border-color: rgba(0, 91, 154, 0.3);
}

/* Bannière visuelle avec capture réelle */
.card-visual {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: #0b1d2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.realisation-card:hover .project-preview-img {
    transform: scale(1.08);
}

.card-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 20, 40, 0.4) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 20, 40, 0.65) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.realisation-card:hover .card-overlay-gradient {
    background: linear-gradient(180deg, rgba(0, 20, 40, 0.25) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 20, 40, 0.45) 100%);
}

/* Badges sur l'image */
.card-badges-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-transform: uppercase;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #005b9a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Corps de la carte */
.card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title-group {
    margin-bottom: 0.85rem;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color, #005b9a);
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 0.92rem;
    color: #5a6e82;
    font-weight: 600;
    margin: 0;
}

.card-description {
    font-size: 0.95rem;
    color: #4a5d6e;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Tags technologiques / fonctionnalités */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.65rem;
    background: #eef5fb;
    color: #005b9a;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #d4e5f3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.realisation-card:hover .tech-tag {
    background: #e1edf7;
    border-color: #b9d8ee;
}

/* Pied de la carte / CTA */
.card-footer {
    padding-top: 1.25rem;
    border-top: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    background: linear-gradient(135deg, var(--primary-color, #005b9a) 0%, #0077c8 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 91, 154, 0.2);
    width: 100%;
}

.project-link-btn:hover {
    background: linear-gradient(135deg, #004575 0%, #005b9a 100%);
    box-shadow: 0 6px 18px rgba(0, 91, 154, 0.35);
    transform: translateY(-2px);
}

.project-link-btn.btn-playstore {
    background: linear-gradient(135deg, #01875f 0%, #00a86b 100%);
    box-shadow: 0 4px 12px rgba(1, 135, 95, 0.25);
}

.project-link-btn.btn-playstore:hover {
    background: linear-gradient(135deg, #016b4b 0%, #01875f 100%);
    box-shadow: 0 6px 18px rgba(1, 135, 95, 0.4);
}

.project-link-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.project-link-btn:hover i {
    transform: translateX(3px);
}

/* Bannière d'appel à projet */
.realisations-cta {
    margin-top: 4.5rem;
    background: linear-gradient(135deg, #005b9a 0%, #003666 100%);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 91, 154, 0.2);
}

.realisations-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(116, 194, 225, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cta-text h3 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cta-text p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    max-width: 650px;
}

.cta-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 2rem;
    background: #ffffff;
    color: var(--primary-color, #005b9a) !important;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 50px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cta-action-btn:hover {
    background: #f0f7ff;
    color: #004270 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* Animations de filtrage */
.realisation-card.filter-hide {
    display: none !important;
}

.realisation-card.filter-show {
    animation: portfolioFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes portfolioFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive pour Réalisations */
@media (max-width: 1024px) {
    .realisations-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-text p {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .realisations {
        padding: 4rem 0;
    }

    .realisations-header h2 {
        font-size: 2rem !important;
    }

    .realisations-grid {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
    }

    .realisations-filters {
        gap: 0.5rem;
        margin-bottom: 2.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .card-visual {
        height: 190px;
    }

    .realisations-cta {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }

    .cta-text h3 {
        font-size: 1.5rem;
    }

    .cta-action-btn {
        width: 100%;
        justify-content: center;
    }
}
