/* ==========================================================================
   Page Réalisations — style profil Instagram
   ========================================================================== */
.ig-page {
    --ig-text: #0f172a;
    --ig-muted: #64748b;
    --ig-border: #e2e8f0;
    --ig-bg: #ffffff;
    --ig-navy: #08224e;
    --ig-orange: #ff5e14;
    --ig-gradient: linear-gradient(45deg, #f9a825 0%, #ff5e14 35%, #e1306c 65%, #833ab4 100%);
    position: relative;
    padding: 0 0 5rem;
    background: var(--ig-bg);
    color: var(--ig-text);
    min-height: 100vh;
}

/* Bannière */
.ig-banner {
    position: relative;
    padding: 170px 20px 70px;
    background:
        linear-gradient(135deg, rgba(5, 18, 42, 0.92) 0%, rgba(8, 34, 78, 0.82) 55%, rgba(8, 34, 78, 0.55) 100%),
        var(--ig-banner-img) center / cover no-repeat;
    color: #fff;
    text-align: center;
    margin-bottom: 3rem;
}

.ig-banner__inner {
    max-width: 820px;
    margin: 0 auto;
}

.ig-banner__crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
}

.ig-banner__crumb a {
    color: #fff;
}

.ig-banner__crumb > i {
    font-size: 0.6rem;
    opacity: 0.6;
}

.ig-banner__crumb span {
    color: var(--ig-orange);
    font-weight: 600;
}

.ig-banner__kicker {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--ig-orange);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ig-banner__title {
    margin: 0 0 1.1rem;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

.ig-banner__title span {
    color: var(--ig-orange);
}

.ig-banner__desc {
    margin: 0 auto 2rem;
    max-width: 700px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    line-height: 1.7;
}

.ig-banner__stats {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ig-banner__stats li {
    padding: 0.55rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.ig-banner__stats strong {
    margin-right: 0.25rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
}

.ig-shell {
    position: relative;
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

.ig-verified {
    margin-left: 0.25rem;
    font-size: 0.85em;
    color: #0095f6;
}

.ig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 8px;
    background: #efefef;
    color: var(--ig-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.ig-btn:hover {
    background: #dbdbdb;
    color: var(--ig-text);
}

.ig-btn--primary {
    background: var(--ig-orange);
    color: #fff;
}

.ig-btn--primary:hover {
    background: #e64f0b;
    color: #fff;
}

/* Introduction de la galerie */
.ig-intro {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.ig-intro__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    color: var(--ig-orange);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ig-intro__kicker span {
    width: 28px;
    height: 2px;
    background: var(--ig-orange);
}

.ig-intro__title {
    margin: 0 0 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ig-navy);
}

.ig-intro__title em {
    font-style: normal;
    color: var(--ig-orange);
}

.ig-intro__text {
    margin: 0;
    color: var(--ig-muted);
    font-size: 1rem;
    line-height: 1.75;
}

/* Grille */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.ig-post {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    padding: 0;
    border: none;
    background: #f1f5f9;
    overflow: hidden;
    cursor: pointer;
}

.ig-post[hidden] {
    display: none;
}

.ig-post img,
.ig-post video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-post__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    color: #fff;
    font-size: 1rem;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.ig-post--video:hover .ig-post__overlay {
    opacity: 0;
}

.ig-post__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 34, 78, 0.35);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ig-post__overlay i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ig-navy);
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: scale(0.7);
    transition: transform 0.25s ease;
}

.ig-post:hover .ig-post__overlay i,
.ig-post:focus-visible .ig-post__overlay i {
    transform: scale(1);
}

.ig-post:hover .ig-post__overlay,
.ig-post:focus-visible .ig-post__overlay {
    opacity: 1;
}

/* 5. Fenêtre publication */
body.ig-lock {
    overflow: hidden;
}

body.ig-lock #avenir-chat-widget,
body.ig-lock .whatsapp-float,
body.ig-lock .back-to-top {
    display: none !important;
}

.ig-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 4.5rem;
}

.ig-modal[hidden] {
    display: none;
}

.ig-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.ig-modal__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 2;
    border: none;
    background: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

.ig-modal__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--ig-text);
    cursor: pointer;
}

.ig-modal__nav--prev { left: 1.25rem; }
.ig-modal__nav--next { right: 1.25rem; }

.ig-modal__card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    width: min(1100px, 100%);
    height: min(86vh, 760px);
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.ig-modal__media {
    position: relative;
    background: #000;
    overflow: hidden;
}

.ig-slider {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
}

.ig-slider__item {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ig-slider__item img,
.ig-slider__item video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ig-slider__btn {
    position: absolute;
    top: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--ig-text);
    font-size: 0.8rem;
    cursor: pointer;
}

.ig-slider__btn[hidden] { display: none; }
.ig-slider__btn--prev { left: 12px; }
.ig-slider__btn--next { right: 12px; }

.ig-slider__dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
}

.ig-slider__dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.ig-slider__dots span.is-active {
    background: #fff;
}

.ig-modal__side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--ig-border);
}

.ig-modal__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--ig-border);
    font-size: 0.85rem;
}

.ig-modal__head img {
    width: 34px;
    height: 34px;
    padding: 2px;
    border-radius: 50%;
    background: var(--ig-gradient);
}

.ig-modal__head strong,
.ig-modal__head span {
    display: block;
}

.ig-modal__head span {
    color: var(--ig-muted);
    font-size: 0.78rem;
}

.ig-modal__body {
    flex: 1;
    padding: 1.1rem 1rem;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.55;
}

.ig-modal__body h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ig-text);
}

.ig-modal__body p {
    margin: 0 0 0.75rem;
    color: var(--ig-text);
}

.ig-modal__tags {
    color: #00376b !important;
}

.ig-modal__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--ig-border);
}

.ig-modal__count {
    flex-basis: 100%;
    margin-bottom: 0.25rem;
    color: var(--ig-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 860px) {
    .ig-modal {
        padding: 0;
    }

    .ig-modal__card {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .ig-modal__side {
        border-left: none;
        max-height: 45vh;
    }

    .ig-modal__nav {
        display: none;
    }

    .ig-modal__close {
        top: 0.6rem;
        right: 0.8rem;
        color: #fff;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    }
}

@media (max-width: 735px) {
    .ig-banner {
        padding: 130px 16px 48px;
        margin-bottom: 1.5rem;
    }

    .ig-banner__desc {
        font-size: 0.92rem;
    }

    .ig-shell {
        padding: 0;
    }

    .ig-intro {
        margin-bottom: 1.75rem;
        padding: 0 16px;
    }

    .ig-intro__text {
        font-size: 0.92rem;
    }

    .ig-grid {
        gap: 2px;
    }

    .ig-post__overlay {
        display: none;
    }
}
