/**
 * Styles pour le logo 3D ServiGo
 */

#servigo-3d-logo {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    cursor: grab;
    overflow: hidden;
}

#servigo-3d-logo:active {
    cursor: grabbing;
}

#servigo-3d-logo canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Container pour le logo dans la bannière */
.banner-3d-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation de fond subtile */
.banner-3d-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(46, 196, 182, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Cercles décoratifs animés */
.banner-3d-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border: 2px solid rgba(46, 196, 182, 0.1);
    border-radius: 50%;
    animation: rotate-ring 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotate-ring {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Badge "3D" décoratif */
.logo-3d-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2EC4B6, #FF6B35);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(46, 196, 182, 0.3);
    z-index: 10;
    animation: badge-float 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes badge-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Loader pendant le chargement de Three.js */
.logo-3d-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
}

.logo-3d-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(46, 196, 182, 0.2);
    border-top: 4px solid #2EC4B6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.logo-3d-loader p {
    color: #2EC4B6;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Fallback si Three.js ne charge pas */
.logo-3d-fallback {
    display: none;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2EC4B6 0%, #FF6B35 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(46, 196, 182, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-3d-fallback.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-3d-fallback svg {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

/* Responsive */
@media (max-width: 768px) {
    .banner-3d-container {
        max-width: 100%;
        height: 300px;
        margin: 20px auto;
    }
    
    #servigo-3d-logo {
        min-height: 300px;
    }
    
    .logo-3d-badge {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .banner-3d-container::before {
        width: 200px;
        height: 200px;
    }
    
    .banner-3d-container::after {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .banner-3d-container {
        height: 250px;
    }
    
    #servigo-3d-logo {
        min-height: 250px;
    }
}

/* Animation d'entrée */
@keyframes fade-in-logo {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.banner-3d-container {
    animation: fade-in-logo 1s ease-out;
}

/* Effet de brillance au survol */
.banner-3d-container:hover::before {
    animation-duration: 2s;
}
