/* Globe 3D Styles for Ora */
.globe-section {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    position: relative;
    overflow: hidden;
}

/* ========================================
   FIX RTL - Isolation complète du globe
======================================== */

/* Force le globe à rester en LTR même si le body est en RTL */
.globe-section,
.globe-section *,
#globeViz,
#globeViz * {
    direction: ltr !important;
    text-align: left !important;
    unicode-bidi: embed !important;
}

/* Les images des drapeaux ne doivent pas être inversées */
.globe-section img,
.flag-tooltip img {
    transform: none !important;
    direction: ltr !important;
}

/* Le conteneur canvas du globe */
.globe-section canvas {
    direction: ltr !important;
}

.globe-container {
    max-width: 80rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.globe-header {
    text-align: center;
    margin-bottom: 4rem;
}

.globe-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.globe-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    max-width: 36rem;
    margin: 0 auto;
}

#globeViz {
    width: 100%;
    height: 500px;  /* 👈 Réduit le vide */
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.globe-info {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.language-count, .coverage-info {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.count-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.count-label {
    display: block;
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.coverage-text {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Globe Canvas Styling */
.globe-canvas {
    border-radius: 1rem;
}

/* Tooltip Styling */
.globe-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transform: translate(-50%, -100%);
    white-space: nowrap;
}

.globe-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Floating Elements for Background */
.globe-bg-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.globe-bg-1 {
    width: 10rem;
    height: 10rem;
    background: #3b82f6;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.globe-bg-2 {
    width: 8rem;
    height: 8rem;
    background: #8b5cf6;
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.globe-bg-3 {
    width: 6rem;
    height: 6rem;
    background: #ec4899;
    top: 60%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .globe-section {
        padding: 4rem 1rem;
    }
    
    .globe-title {
        font-size: 2rem;
    }
    
    .globe-subtitle {
        font-size: 1rem;
    }
    
    #globeViz {
        height: 400px;
    }
    
    .globe-info {
        gap: 2rem;
        flex-direction: column;
        align-items: center;
    }
    
    .language-count, .coverage-info {
        padding: 1rem;
    }
    
    .count-number {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .globe-title {
        font-size: 2.5rem;
    }
    
    #globeViz {
        height: 500px;
    }
}

/* Loading State */
.globe-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 1.125rem;
}

.globe-loading::after {
    content: '';
    width: 2rem;
    height: 2rem;
    border: 2px solid #94a3b8;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

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

/* Additional styles for exact Globe.gl example */
.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 500;
}

.language-count .count-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.language-count .count-label {
    display: block;
    color: #94a3b8;
    font-size: 1rem;
}

.coverage-info .coverage-text {
    color: #94a3b8;
    font-size: 1.125rem;
}

.globe-bg-element {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    pointer-events: none;
}

.globe-bg-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    animation: float 20s ease-in-out infinite;
}

.globe-bg-2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 10%;
    animation: float 15s ease-in-out infinite reverse;
}

.globe-bg-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 5%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.05);
    }
}
/* Force text alignment to center for specific globe elements */
.globe-header,
.globe-title,
.globe-subtitle,
.coverage-text,
.coverage-info {
    text-align: center !important;
}
/* Center the global coverage text */
[data-i18n="globe.coverage"] {
    text-align: center !important;
}
