/* ====================================================
   RÉALISATIONS — SCROLL STACK
   ==================================================== */

#les-realisations {
    padding: 120px 20px 0;
    position: relative;
}

/* ── Container — flux de sticky items ── */
.rl-stack-container {
    position: relative;
    margin-top: 80px;
    padding-bottom: 40vh;
}

/* ── Un wrapper sticky par card ── */
.rl-sticky-item {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ====================================================
   CARD BASE
   ==================================================== */

.rl-card {
    position: relative;
    top: calc(var(--i, 0) * 22px);
    width: min(860px, calc(100vw - 40px));
    height: 560px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    cursor: none;
    transform-origin: top center;
    will-change: transform;
    text-decoration: none;
    color: inherit;
    background: #111;
    pointer-events: auto;
    z-index: calc(var(--i, 0) + 1);
}

.rl-card:hover .rl-card__arrow {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* ====================================================
   SAFARI BROWSER BAR
   ==================================================== */

.rl-card__browser {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.rl-browser-bar {
    background: #1c1c1e;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.rl-browser-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    width: 46px;
}

.rl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.rl-dot--red    { background: #FF5F57; box-shadow: 0 0 0 0.5px rgba(255, 95, 87, 0.5); }
.rl-dot--yellow { background: #FFBD2E; box-shadow: 0 0 0 0.5px rgba(255, 189, 46, 0.5); }
.rl-dot--green  { background: #28CA41; box-shadow: 0 0 0 0.5px rgba(40, 202, 65, 0.5); }

.rl-browser-address {
    flex: 1;
    max-width: 340px;
    margin: 0 auto;
    height: 28px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
}

.rl-lock {
    width: 10px;
    height: 11px;
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.rl-url {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.rl-browser-spacer {
    width: 46px;
    flex-shrink: 0;
}

/* ====================================================
   SCREENSHOT + PLACEHOLDER
   ==================================================== */

.rl-card__screen {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    min-height: 0;
}

.realisation-screenshot {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    z-index: 2;
}

.rl-card__placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 80% 60% at 25% 35%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 65%),
        radial-gradient(ellipse 55% 75% at 75% 65%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 65%),
        #0c0c0c;
    overflow: hidden;
}

.rl-placeholder-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 40px 40px;
}

.rl-placeholder-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 30%,
        color-mix(in srgb, var(--accent) 5%, transparent) 50%,
        transparent 70%
    );
    animation: rl-shimmer 3s ease-in-out infinite;
}

@keyframes rl-shimmer {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1;   }
}

/* ====================================================
   CARD FOOTER
   ==================================================== */

.rl-card__footer {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.rl-card__info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
}

.rl-card__num {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.28);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.rl-card__name {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-card__tags {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.rl-tag {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    white-space: nowrap;
}

.rl-card__arrow {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.45);
    transition: border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
}

.rl-card__arrow svg {
    width: 13px;
    height: 13px;
}

/* ====================================================
   PROGRESS DOTS (latéral)
   ==================================================== */

.rl-progress {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.rl-progress.is-visible {
    opacity: 1;
}

.rl-progress-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.3s ease, transform 0.3s ease;
    cursor: default;
}

.rl-progress-dot.is-active {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.5);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

@media (max-width: 768px) {
    #les-realisations {
        padding: 80px 16px 0;
    }

    .rl-scroll-track {
        margin-top: 60px;
    }

    .rl-card {
        width: calc(100vw - 32px);
        height: 460px;
    }

    .rl-browser-bar {
        height: 38px;
    }

    .rl-browser-address {
        max-width: 200px;
    }

    .rl-card__name {
        font-size: 13px;
    }

    .rl-progress {
        display: none;
    }
}

@media (max-width: 480px) {
    .rl-card {
        height: 370px;
    }

    .rl-browser-address {
        max-width: 150px;
    }

    .rl-url {
        font-size: 10px;
    }

    .rl-card__footer {
        padding: 12px 14px;
        gap: 10px;
    }

    .rl-card__num {
        display: none;
    }
}
