/* ============================================================
   Easter egg de la bougie — styles volontairement isolés
============================================================ */

.jp-footer-copy .ee-candle-slot {
    position: relative;
    display: inline-flex;
    width: 23px;
    height: 30px;
    flex: 0 0 23px;
    align-items: flex-end;
    justify-content: center;
    margin: -12px 0 0 1px;
    overflow: visible;
    vertical-align: middle;
}

.ee-candle {
    position: relative;
    width: 23px;
    height: 30px;
    padding: 0;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
    cursor: default !important;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

[data-ee-candle],
[data-ee-candle] *,
[data-ee-candle]::before,
[data-ee-candle]::after,
.ee-candle-slot,
.ee-candle-slot *,
.ee-candle-slot::before,
.ee-candle-slot::after {
    cursor: default !important;
}

.ee-candle:focus:not(:focus-visible) {
    outline: none;
}

.ee-candle:focus-visible {
    border-radius: 8px;
    outline: 1px solid rgba(226, 76, 255, .7);
    outline-offset: 3px;
}

.jp-footer .ee-wax {
    position: absolute;
    z-index: 2;
    left: 7px;
    bottom: 0;
    width: 9px;
    height: 15px;
    overflow: hidden;
    border: 1px solid rgba(226, 76, 255, .28);
    border-radius: 3px 3px 2px 2px;
    background: linear-gradient(90deg, #5f267c 0%, #d58be7 43%, #7b3499 100%);
    box-shadow: 0 0 8px rgba(164, 44, 255, .25), inset -2px 0 3px rgba(20, 4, 30, .5);
}

.jp-footer .ee-wax::after {
    content: "";
    position: absolute;
    inset: 2px 2px auto;
    height: 1px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
}

.jp-footer .ee-wax-drip {
    position: absolute;
    top: -1px;
    right: 1px;
    width: 2px;
    height: 6px;
    border-radius: 0 0 2px 2px;
    background: #d58be7;
}

.jp-footer .ee-wick {
    position: absolute;
    z-index: 1;
    left: 11px;
    bottom: 14px;
    width: 1px;
    height: 4px;
    border-radius: 2px;
    background: #211724;
}

.jp-footer .ee-flame {
    position: absolute;
    z-index: 3;
    left: 8px;
    top: 1px;
    width: 7px;
    height: 11px;
    border-radius: 55% 45% 58% 42% / 68% 62% 38% 32%;
    opacity: 1;
    transform: rotate(2deg) scale(1);
    transform-origin: 50% 100%;
    background:
        radial-gradient(ellipse at 52% 72%, #ffffff 0 13%, #f1b2ff 22%, transparent 42%),
        linear-gradient(180deg, #fff3ff 0%, #e24cff 44%, #8122d8 100%);
    box-shadow: 0 0 5px rgba(255, 255, 255, .7), 0 0 11px rgba(226, 76, 255, .8);
    animation: eeFlameIdle 2.35s ease-in-out infinite alternate;
    will-change: transform, opacity, filter;
}

.jp-footer .ee-candle-glow {
    position: absolute;
    z-index: 0;
    top: -3px;
    left: 2px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    opacity: .45;
    background: radial-gradient(circle, rgba(226, 76, 255, .48), rgba(164, 44, 255, .12) 48%, transparent 72%);
    filter: blur(3px);
    animation: eeGlowIdle 2.35s ease-in-out infinite alternate;
}

.ee-candle:hover .ee-flame {
    animation: eeFlameHover .75s ease-in-out infinite alternate;
}

.ee-candle.is-flaring .ee-flame {
    animation: eeFlameFlaring .22s ease-in-out infinite alternate;
}

.ee-candle.is-frantic .ee-flame {
    animation: eeFlameFrantic .12s steps(2, end) infinite alternate;
}

.ee-candle.is-blowing .ee-flame {
    animation: eeFlameBlow .2s cubic-bezier(.2, .8, .3, 1) forwards;
}

.ee-candle.is-out .ee-flame,
.ee-candle.is-out .ee-candle-glow {
    animation: none;
    opacity: 0;
    transform: translateX(5px) rotate(76deg) scale(.15, .05);
}

.ee-candle.is-relighting-fast .ee-flame {
    animation: eeRelightFast .58s ease-out both;
}

.ee-candle.is-relighting-slow .ee-flame {
    animation: eeRelightSlow 1.05s ease-out both;
}

.jp-footer-copy .ee-smoke {
    position: absolute;
    z-index: 4;
    left: 9px;
    top: 1px;
    width: 8px;
    height: 18px;
    opacity: 0;
    pointer-events: none;
}

.jp-footer .ee-smoke i {
    position: absolute;
    bottom: 2px;
    width: 3px;
    height: 8px;
    border: 1px solid rgba(205, 192, 219, .42);
    border-color: rgba(205, 192, 219, .42) transparent transparent rgba(205, 192, 219, .2);
    border-radius: 50%;
    filter: blur(.35px);
}

.jp-footer .ee-smoke i:nth-child(2) { left: 2px; animation-delay: .28s; }
.jp-footer .ee-smoke i:nth-child(3) { left: -1px; animation-delay: .56s; }

.ee-candle-slot.is-smoking .ee-smoke {
    opacity: 1;
}

.ee-candle-slot.is-smoking .ee-smoke i {
    animation: eeSmoke 1.25s ease-out infinite;
}

.jp-footer.ee-footer-dim {
    filter: brightness(.72);
    opacity: .78;
    transition: filter .35s ease, opacity .35s ease;
}

.jp-footer {
    transition: filter .35s ease, opacity .35s ease;
}

/* Séquence plein écran */
html.ee-scroll-locked,
body.ee-scroll-locked {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
}

.ee-overlay {
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    display: grid;
    place-items: center;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    color: var(--text, #fff);
    background: #000;
    isolation: isolate;
    contain: strict;
    transition: opacity .18s ease, visibility 0s linear .18s;
}

.ee-overlay.is-active {
    visibility: visible;
    opacity: 1;
    background: #000;
    transition-delay: 0s;
}

.ee-video-stage {
    position: absolute;
    z-index: 4;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100dvh;
    display: grid;
    place-items: center;
    overflow: hidden;
    opacity: 0;
    background: #000;
    pointer-events: none;
    transition: opacity .18s ease;
}

.ee-overlay.is-video .ee-video-stage {
    opacity: 1;
    pointer-events: auto;
}

.ee-overlay.is-ending .ee-video-stage {
    opacity: 0;
    pointer-events: none;
    transition-duration: .35s;
}

.ee-video-stage video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100dvh;
    object-fit: contain;
    object-position: center;
    overflow: hidden;
    background: #000;
}

.ee-video-stage video::-webkit-media-controls {
    display: none !important;
}

.ee-exit,
.ee-video-fallback button {
    border: 1px solid rgba(226, 76, 255, .28);
    border-radius: 7px;
    color: rgba(255, 255, 255, .68);
    background: rgba(4, 3, 10, .66);
    font: 600 11px/1 Inter, system-ui, sans-serif;
    letter-spacing: .08em;
    cursor: pointer;
    touch-action: manipulation;
    backdrop-filter: blur(8px);
}

.ee-exit {
    position: absolute;
    z-index: 12;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    padding: 9px 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.ee-overlay.is-video .ee-exit {
    opacity: .44;
    pointer-events: auto;
}

.ee-exit:hover,
.ee-exit:focus-visible {
    opacity: 1;
    color: #fff;
    border-color: rgba(226, 76, 255, .75);
}

.ee-video-fallback {
    position: absolute;
    z-index: 6;
    display: none;
    max-width: min(86vw, 420px);
    padding: 24px;
    color: #c7bcd6;
    text-align: center;
}

.ee-video-fallback.is-visible {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.ee-video-fallback p { margin: 0; line-height: 1.6; }
.ee-video-fallback button { padding: 11px 14px; color: #fff; }

.ee-video-fallback[data-missing="true"] button {
    display: none;
}

@keyframes eeFlameIdle {
    0% { transform: translateX(-.4px) rotate(-3deg) scale(.96, 1.02); }
    50% { filter: brightness(1.06); }
    100% { transform: translateX(.5px) rotate(4deg) scale(1.04, .95); }
}

@keyframes eeGlowIdle { from { opacity: .32; transform: scale(.92); } to { opacity: .5; transform: scale(1.05); } }
@keyframes eeFlameHover { from { transform: translateX(-.6px) rotate(-5deg) scale(.97, 1.03); } to { transform: translateX(.6px) rotate(6deg) scale(1.03, .96); } }
@keyframes eeFlameFlaring { from { transform: translateX(-1.4px) rotate(-15deg) scale(.88, 1.12); } to { transform: translateX(1.3px) rotate(17deg) scale(1.12, .88); } }
@keyframes eeFlameFrantic { from { transform: translateX(-2px) rotate(-24deg) scale(.84, 1.18); filter: brightness(1); } to { transform: translateX(2px) rotate(28deg) scale(1.16, .82); filter: brightness(1.28); } }
@keyframes eeFlameBlow { 0% { opacity: 1; } 72% { opacity: .85; transform: translateX(4px) rotate(68deg) scale(.7, .5); } 100% { opacity: 0; transform: translateX(7px) rotate(84deg) scale(.15, .04); } }
@keyframes eeRelightFast { 0% { opacity: 0; transform: scale(.08); } 52% { opacity: 1; transform: scale(.6, .72); } 76% { transform: scale(1.15, 1.12); } 100% { opacity: 1; transform: rotate(1deg) scale(1); } }
@keyframes eeRelightSlow { 0%, 22% { opacity: 0; transform: scale(.04); } 55% { opacity: .55; transform: scale(.42, .55); } 82% { opacity: .9; transform: scale(.82, .9); } 100% { opacity: 1; transform: rotate(1deg) scale(1); } }
@keyframes eeSmoke { 0% { opacity: 0; transform: translate(0, 2px) scale(.7); } 28% { opacity: .55; } 100% { opacity: 0; transform: translate(3px, -13px) scale(1.25); } }
@media (max-width: 520px) {
    .jp-footer-copy {
        max-width: 100%;
        padding: 0 12px;
        flex-wrap: wrap;
        row-gap: 5px;
        white-space: normal;
    }

    .jp-footer-copy > span:first-child {
        flex: 0 0 100%;
    }

    .ee-exit { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .ee-flame,
    .ee-candle-glow,
    .ee-smoke i {
        animation: none !important;
    }

    .ee-overlay,
    .ee-video-stage,
    .jp-footer.ee-footer-dim {
        transition-duration: .01ms !important;
    }
}
