:root {

    /* Couleurs principales */
    --accent-color: #4CAF50;

    /* Couleurs de texte */
    --text-white: #ffffff;

    /* Loader styles */
    --loader-primary: var(--accent-color);
    --loader-secondary: rgba(76, 175, 80, 0.2);
    --loader-background: rgba(0, 0, 0, 0.7);

}

/* Loader styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loader-background);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.loader-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.poker-loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.poker-chip {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed var(--loader-primary);
    animation: rotate 2s linear infinite;
}

.poker-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84%;
    height: 84%;
    border-radius: 50%;
    border: 3px dashed var(--loader-primary);
    animation: rotate-reverse 3s linear infinite;
}

.poker-chip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68%;
    height: 68%;
    border-radius: 50%;
    background: var(--loader-primary);
    opacity: 0.15;
}

.loader-text {
    margin-top: 30px;
    color: var(--text-white);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.9;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    0% {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}


/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.cdnfonts.com/css/spongition');

/* Base body styles */
body {
    font-family: 'Spongition', sans-serif;
    overflow: hidden;
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Main panorama container */
.panorama-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    transition: filter 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);
}

/* Blur effect when modal is active */
.panorama-container.blurred {
    filter: blur(8px);
    pointer-events: none;
}

/* Dark overlay for modal background */
.dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: background 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);
    z-index: 999;
}

.dark-overlay.active {
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

/* Main panoramic image */
.panorama-image {
    position: absolute;
    height: 100%;
    transform: translateX(calc((100% - 100vw) / -2));
    will-change: transform;
    transition: transform 0.3s ease-out;
}

/* Interactive group container */
.interactive-group {
    position: absolute;
    opacity: 0;
    /* Masquer initialement le conteneur */
    transition: opacity 0.3s ease-in;
}

.interactive-group.loaded {
    opacity: 1;
}

/* Hover area for interactions */
.hover-area {
    position: absolute;
    opacity: 1;
    transition: opacity 0s;
    cursor: pointer;
}

/* Light effect image */
.light-image {
    position: absolute;
    display: none;
    pointer-events: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    transition: all 0.3s ease;
    /* Transition pour toutes les propriétés */
    will-change: transform;
    /* Optimisation des performances */
}

/* Show/hide interactions for hover effects */
.hover-area:hover,
.light-image.active~.hover-area,
.hover-area:has(+ .light-image.active) {
    opacity: 0;
}


.hover-area:hover+.light-image,
.light-image.active {
    display: block;
}

/* Mobile swipe hint */
.mobile-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 1rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    width: calc(100% - 2rem);
    max-width: 400px;
    border: 4px dashed rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
    justify-content: center;
    animation: pulse 2s infinite;
    pointer-events: none;
}

.mobile-hint * {
    pointer-events: none;
}

/* Modal styles */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal content container */
.modal-content {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 1rem;
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);
    display: flex;
    flex-direction: column;
}

/* Modal header */
.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 1rem 1rem 0 0;
    z-index: 1;
}

/* Modal text content */
.modal-text {
    padding: 1rem 2rem 2rem 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Custom scrollbar styles */
.modal-text::-webkit-scrollbar {
    width: 8px;
}

.modal-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.modal-text::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}


.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}



/* Close button styles */
.close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 2;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.3);
}




/* Video style */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);

}

.video-container.active {
    display: flex;
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
}

/* Bouton son avec position centrale par défaut */
.video-sound-btn {
    position: absolute;
    transition: all 0.5s ease;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

/* Position initiale (centrée) */
.video-sound-btn.centered {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

/* Position finale (coin) */
.video-sound-btn.corner {
    bottom: 40px;
    right: 20px;
    opacity: 0.8;
}


.video-sound-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.video-sound-btn:active {
    transform: scale(0.95);
}

.video-sound-btn .sound-on {
    display: none;
}

.video-sound-btn.unmuted .sound-on {
    display: block;
}

.video-sound-btn.unmuted .sound-off {
    display: none;
}

/* SVG styles */
.video-sound-btn svg {
    width: 50%;
    height: 50%;
}

.video-sound-btn.centered svg {
    width: 60%;
    height: 60%;
}

/* Animation des ondes sonores */
.sound-wave {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-sound-btn.centered .sound-wave {
    opacity: 1;
}

.video-sound-btn.unmuted .sound-wave {
    animation: soundWave 2s ease-out infinite;
}

@keyframes soundWave {
    0% {
        opacity: 0;
        stroke-width: 2;
    }

    50% {
        opacity: 1;
        stroke-width: 1;
    }

    100% {
        opacity: 0;
        stroke-width: 2;
    }
}

.fullscreen-video {
    max-width: 80%;
    /* Réduit de 100% à 80% */
    max-height: 80vh;
    margin: auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
    transition-delay: var(--modal-delay, 0ms);
}

.video-container.active .fullscreen-video {
    opacity: 1;
    transform: scale(1);
}

.video-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}


/* Mobile styles */
@media (max-width: 768px) {

    .modal-text {
        padding: 1rem 1rem 1rem 1rem;

    }

    .mobile-hint {
        display: flex;
    }

    .fullscreen-video {
        max-width: 100%;
        max-height: 100%;
        margin: auto;
    }
}

/* Animation for swipe hint */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Card specific styles */
.card-flat,
.card-standing {
    will-change: transform;
    pointer-events: auto;
    transform-origin: bottom center;
    position: absolute;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-flat {
    opacity: 1;
    cursor: pointer;
    transform: rotateX(20deg) translateZ(0);
    backface-visibility: hidden;
    transform-style: preserve-3d;

}

.card-standing {
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    transform: rotateX(30deg);
    transition-delay: 0.2s;
}

.card-flat.animate {
    transform: rotateX(0deg);
    opacity: 1;
}

.card-standing.animate {
    transform: rotateX(0deg) translateZ(0) scale(1);
    opacity: 1;

}



/* Smoother return animation */
.card-flat:not(.animate) {
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateX(20deg) translateZ(0);
}

.card-standing:not(.animate) {
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateX(30deg);
    opacity: 0;
}

.card-flat:hover {
    transform: translateY(-5px) translateZ(0);
}