/* ===========================================
   RESET ET BASE - Optimisé pour écran 32"
   =========================================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #ffffff 0%, #fca2ff 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
    cursor: pointer;
    touch-action: manipulation;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

/* ===========================================
   CONTAINER PRINCIPAL
   =========================================== */
.fullscreen-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
}

/* ===========================================
   CARROUSEL 3D - Optimisé pour 32"
   =========================================== */
.slide {
    position: relative;
    width: 420px;
    height: 540px;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: perspective(1800px) rotateX(-16deg) rotateY(0deg);
    z-index: 10;
}

/* Animation de rotation automatique */
.slide.auto-rotating {
    animation: autoRotate 45s linear infinite;
}

.slide.paused {
    animation-play-state: paused;
}

@keyframes autoRotate {
    from {
        transform: perspective(1800px) rotateX(-16deg) rotateY(0deg);
    }
    to {
        transform: perspective(1800px) rotateX(-16deg) rotateY(-360deg);
    }
}

/* ===========================================
   ITEMS DU CARROUSEL
   =========================================== */
.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: 
        rotateY(calc(var(--position) * 36deg))
        translateZ(650px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(255,255,255,0.3);
    /*backface-visibility: hidden;*/
}

.slide-item:hover {
    transform: 
        rotateY(calc(var(--position) * 36deg))
        translateZ(750px);
    box-shadow: 0 35px 80px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.8);
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    backface-visibility: hidden;
}

.slide-item:hover img {
    transform: scale(1.08);
}

/* ===========================================
   OVERLAY ET TITRES
   =========================================== */
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    padding: 25px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide-item:hover .slide-overlay {
    opacity: 1;
}

.slide-overlay h5 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

/* ===========================================
   BOUTONS DE NAVIGATION - Optimisés pour 32"
   =========================================== */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 32px;
    color: #333;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    border-color: rgba(102, 126, 234, 0.7);
}

.nav-btn:active {
    transform: translateY(-50%) scale(1.05);
}

.nav-btn-prev {
    left: 80px;
}

.nav-btn-next {
    right: 80px;
}

/* ===========================================
   INDICATEURS DE SLIDE
   =========================================== */
/*.slide-indicators {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 1000;
}

.indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.4);
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
}*/

/* ===========================================
   INDICATEURS ET INFOS
   =========================================== */
.touch-indicator {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: 700;
    color: #333;
    animation: pulse 3s infinite;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.auto-slide-indicator {
    position: absolute;
    top: 60px;
    left: 60px;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    display: block;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: opacity 0.3s ease;
}

.inactivity-timer {
    position: absolute;
    top: 60px;
    right: 60px;
    background: rgba(255, 87, 51, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    display: none;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    animation: shake 0.5s ease-in-out infinite alternate;
}

@keyframes shake {
    0% { transform: translateX(0px); }
    100% { transform: translateX(3px); }
}

/* ===========================================
   IMAGES CENTRALES FLOTTANTES - Optimisé 32"
   =========================================== */
.center-floating-container {
    position: absolute;
    top: 20%;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translate(-50%, -50%);
    z-index: 500;
    pointer-events: none;
}

.center-floating-image {
    position: absolute;
    width: 300px;
    height: 200px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: all;
}

.center-floating-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /*box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 4px solid rgba(255,255,255,0.8);*/
    transition: all 0.3s ease;
}

.center-floating-image:hover {
    transform: scale(1.3) translateZ(30px);
    z-index: 1000;
}

/*.center-floating-image:hover img {
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,1);
}*/

/* Positionnement optimisé pour écran 32" */
.center-floating-image:nth-child(2) { /* Haut */
    top: 50px;
    left: 20%;
    transform: translateX(-50%);
    animation: float1 10s ease-in-out infinite;
}

.center-floating-image:nth-child(3) { /* Droite */
    top: 50%;
    right: -350px;
    transform: translateY(-50%);
    animation: float2 10s ease-in-out infinite -2.5s;
}

.center-floating-image:nth-child(4) { /* Bas */
    bottom: -45px;
    left: 80%;
    transform: translateX(-50%);
    animation: float3 10s ease-in-out infinite -5s;
}

.center-floating-image:nth-child(5) { /* Gauche */
    top: 80%;
    left: -350px;
    transform: translateY(-50%);
    animation: float4 10s ease-in-out infinite -7.5s;
}

/* Animations de flottement */
@keyframes float1 {
    0%, 100% { transform: translateX(-50%) translateY(0px) scale(1); }
    50% { transform: translateX(-50%) translateY(-20px) scale(1.1); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(-50%) translateX(0px) scale(1); }
    50% { transform: translateY(-50%) translateX(20px) scale(1.1); }
}

@keyframes float3 {
    0%, 100% { transform: translateX(-50%) translateY(0px) scale(1); }
    50% { transform: translateX(-50%) translateY(20px) scale(1.1); }
}

@keyframes float4 {
    0%, 100% { transform: translateY(-50%) translateX(0px) scale(1); }
    50% { transform: translateY(-50%) translateX(-20px) scale(1.1); }
}

/* ===========================================
   BULLES DE NOMS
   =========================================== */
.name-bubble {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    z-index: 1001;
    border: 2px solid rgba(255,255,255,0.3);
}

.name-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #667eea;
}

.name-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Rotation orbitale */
.center-floating-container.orbital {
    animation: orbitalRotation 30s linear infinite;
}

/*@keyframes orbitalRotation {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}*/

/*.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 499;
    box-shadow: 0 0 20px rgba(255,255,255,0.8);
}*/

/* ===========================================
   LOGOS - Optimisés pour 32"
   =========================================== */
   
.logo-top-left {
    position: absolute;
    top: 20px;
    left: 40px;
    z-index: 1100;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.logo-top-left1 {
    position: absolute;
    top: 20px; /* Au-dessus du logo Hasnreziga */
    right: 50px;
    z-index: 1000;
    opacity: 0.95;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 50%;
    border: 2px solid rgba(73, 73, 73, 0.8);
}

.logo-bottom-right {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 1100;
    opacity: 0.9;
    transition: all 0.3s ease;
    background-color: white;
    border-radius: 50%;
    border: 2px solid rgba(73, 73, 73, 0.8);
}

.logo-top-left img {
    width: 200px;
    height: auto;
    object-fit: contain;
    background-color: transparent;
}

.logo-top-left1 img {
    width: 120px;
    height: auto;
    object-fit: contain;
    background-color: transparent;
}

.logo-bottom-right img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.logo-top-left:hover,
.logo-top-left1:hover,
.logo-bottom-right:hover {
    opacity: 1;
    transform: scale(1.05);
}


.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.popup-content.iframe-mode {
    max-width: 90%;
    width: 90%;
    height: 80%;
    padding: 0;
    overflow: hidden;
}

.popup-iframe {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
    border-radius: 0 0 10px 10px;
}

.popup-header {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-iframe {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.popup-content h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.popup-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.popup-btn.visit {
    background-color: #007bff;
    color: white;
}

.popup-btn.visit:hover {
    background-color: #0056b3;
}

.popup-btn.cancel {
    background-color: #6c757d;
    color: white;
}

.popup-btn.cancel:hover {
    background-color: #545b62;
}

.logo-image {
    cursor: pointer;
}




/* ===========================================
   MODAL - Optimisée pour 32"
   =========================================== */
.modal-content {
    border: none;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    max-width: 90vw;
    max-height: 90vh;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 30px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
}

.modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: 70vh;
}

.modal-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.modal-video {
    width: 100%;
    height: 600px;
    border: none;
}

.modal-description {
    padding: 40px;
    background: #f8f9fa;
    font-size: 18px;
    line-height: 1.6;
}

.btn-close {
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    opacity: 1;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

/* ===========================================
   ANIMATIONS GÉNÉRALES
   =========================================== */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoFadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.8);
    }
    to { 
        opacity: 0.9; 
        transform: scale(1);
    }
}

.logo-top-left,
.logo-top-left1,
.logo-bottom-right {
    animation: logoFadeIn 1.2s ease-out;
}

/* ===========================================
   RESPONSIVE - Adaptations pour différentes tailles
   =========================================== */
@media (max-width: 1600px) {
    .slide {
        width: 380px;
        height: 490px;
    }
    
    .slide-item {
        transform: 
            rotateY(calc(var(--position) * 36deg))
            translateZ(600px);
    }
    
    .nav-btn {
        width: 90px;
        height: 90px;
        font-size: 28px;
    }
}

@media (max-width: 1400px) {
    .slide {
        width: 350px;
        height: 450px;
    }
    
    .slide-item {
        transform: 
            rotateY(calc(var(--position) * 36deg))
            translateZ(550px);
    }
    
    .touch-indicator {
        font-size: 20px;
        padding: 18px 35px;
    }
    
    .center-floating-container {
        width: 350px;
        height: 350px;
    }
    
    .center-floating-image {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 1024px) {
    .slide {
        width: 300px;
        height: 380px;
    }
    
    .slide-item {
        transform: 
            rotateY(calc(var(--position) * 36deg))
            translateZ(480px);
    }
    
    .nav-btn {
        width: 80px;
        height: 80px;
        font-size: 24px;
    }
    
    .center-floating-container {
        width: 300px;
        height: 300px;
    }
    
    .center-floating-image {
        width: 90px;
        height: 90px;
    }
    
    .logo-top-left img {
        width: 160px;
    }
    
    .logo-bottom-right img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .slide {
        width: 250px;
        height: 320px;
    }
    
    .slide-item {
        transform: 
            rotateY(calc(var(--position) * 36deg))
            translateZ(400px);
    }
    
    .nav-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    .nav-btn-prev {
        left: 40px;
    }
    
    .nav-btn-next {
        right: 40px;
    }
    
    .touch-indicator {
        font-size: 16px;
        padding: 15px 25px;
    }
    
    .slide-indicators {
        bottom: 80px;
        gap: 15px;
    }
    
    .indicator {
        width: 12px;
        height: 12px;
    }
    
    .center-floating-container {
        width: 250px;
        height: 250px;
    }
    
    .center-floating-image {
        width: 70px;
        height: 70px;
    }
    
    .logo-top-left img {
        width: 140px;
    }
    
    .logo-bottom-right img {
        width: 100px;
        height: 100px;
    }
    
    .modal-image,
    .modal-video {
        height: 400px;
    }
    
    .modal-description {
        padding: 25px;
        font-size: 16px;
    }
}

/* ===========================================
   OPTIMISATIONS PERFORMANCE
   =========================================== */
.slide-item,
.center-floating-image,
.nav-btn {
    will-change: transform;
}

.slide.auto-rotating {
    will-change: transform;
}

/* Préchargement des animations */
@media (prefers-reduced-motion: no-preference) {
    .slide-item {
        transform-origin: center;
    }
}

/* Mode sombre pour les écrans */
@media (prefers-color-scheme: dark) {
    .modal-description {
        background: #2c2c2c;
        color: #ffffff;
    }
    
    .touch-indicator {
        background: rgba(40, 40, 40, 0.95);
        color: white;
    }
}
/* Responsive pour différentes tailles d'écran */
@media (max-width: 1920px) {
    .center-floating-image {
        width: 220px;
        height: 220px;
    }
    
    .center-floating-image:nth-child(2) { top: -60px; }
    .center-floating-image:nth-child(3) { right: -60px; }
    .center-floating-image:nth-child(4) { bottom: -60px; }
    .center-floating-image:nth-child(5) { left: -60px; }
}

@media (max-width: 1440px) {
    .center-floating-image {
        width: 180px;
        height: 180px;
    }
    
    .center-floating-image:nth-child(2) { top: -40px; }
    .center-floating-image:nth-child(3) { right: -40px; }
    .center-floating-image:nth-child(4) { bottom: -40px; }
    .center-floating-image:nth-child(5) { left: -40px; }
}

/* Animation au chargement */
.center-floating-image {
    animation-fill-mode: both;
}

.center-floating-image:nth-child(2) {
    animation-delay: 0.2s;
}

.center-floating-image:nth-child(3) {
    animation-delay: 0.4s;
}

.center-floating-image:nth-child(4) {
    animation-delay: 0.6s;
}

.center-floating-image:nth-child(5) {
    animation-delay: 0.8s;
}
