/* ===============================================
   Presentation Video Loading Overlay
   =============================================== */
.presentation-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.presentation-loading-overlay[style*="display: flex"] {
    opacity: 1;
}

/* Progress Ring (like intro loader) */
.presentation-progress-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.presentation-progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.presentation-progress-ring-circle {
    stroke: rgba(255, 255, 255, 0.1);
    fill: none;
    stroke-width: 8;
}

.presentation-progress-ring-fill {
    stroke: url(#presentation-gradient);
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(224, 195, 252, 0.5));
}

.presentation-progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(224, 195, 252, 0.8);
}

.presentation-loading-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #e0c3fc;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(224, 195, 252, 0.5);
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .presentation-progress-ring {
        width: 100px;
        height: 100px;
    }

    .presentation-progress-percentage {
        font-size: 1.5rem;
    }

    .presentation-loading-text {
        font-size: 1rem;
    }
}

/* ===============================================
   3D Background Canvas
   =============================================== */

/* ===============================================
   Écran de chargement avec vidéo intro
   =============================================== */

#intro-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0015 0%, #1a0033 50%, #2d0052 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1s ease, transform 1s ease;
}

/* Canvas Three.js pour la timeline */
#timeline-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Container de la vidéo intro */
.intro-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    mix-blend-mode: screen;
}

.timeline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
            transparent 0%,
            rgba(10, 0, 21, 0.3) 50%,
            rgba(10, 0, 21, 0.7) 100%);
    pointer-events: none;
}

/* Contenu du loader (texte et symbole) */
.loader-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    animation: fadeInScale 1.5s ease-in-out;
}

.loading-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: #e0c3fc;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 2px;
}

/* Circular Progress Indicator */
.loading-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.progress-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-ring-circle {
    stroke: rgba(255, 255, 255, 0.1);
    fill: none;
    stroke-width: 8;
}

.progress-ring-fill {
    stroke: url(#gradient);
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(224, 195, 252, 0.5));
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(224, 195, 252, 0.8);
}

.progress-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #e0c3fc;
    opacity: 0.8;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Bouton Skip Intro */
.skip-intro-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.skip-intro-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.skip-intro-btn:active {
    transform: translateY(0);
}

.skip-intro-btn i {
    font-size: 16px;
}

.skip-intro-btn span {
    font-size: 14px;
}

/* ===== Animations ===== */

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    .loading-text {
        font-size: 1.2rem;
    }

    /* Progress ring optimisé pour tablette */
    .progress-ring {
        width: 120px;
        height: 120px;
    }

    .progress-percentage {
        font-size: 1.75rem;
    }

    .progress-label {
        font-size: 0.9rem;
    }

    /* Skip button optimisé pour tablette */
    .skip-intro-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 18px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .loading-text {
        font-size: 1.1rem;
        letter-spacing: 1.5px;
    }

    /* Progress ring optimisé pour mobile */
    .progress-ring {
        width: 100px;
        height: 100px;
    }

    .progress-percentage {
        font-size: 1.5rem;
    }

    .progress-label {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }

    /* Skip button optimisé pour mobile - MINIMUM 48x48px tactile */
    .skip-intro-btn {
        bottom: 10px;
        right: 10px;
        padding: 12px 16px;
        min-width: 48px;
        min-height: 48px;
        font-size: 12px;
        border-radius: 24px;
        /* Shadow plus prononcé pour visibilité */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .skip-intro-btn i {
        font-size: 14px;
    }

    .skip-intro-btn span {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .loading-text {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    /* Skip button très visible sur petit mobile */
    .skip-intro-btn {
        bottom: 8px;
        right: 8px;
        padding: 14px;
        /* Toujours minimum 48x48px */
        min-width: 50px;
        min-height: 50px;
        gap: 6px;
        background: rgba(255, 255, 255, 0.15);
        border-width: 2px;
    }
}

/* Téléphones très étroits (ex: iPhone SE, petits Android) */
@media (max-width: 375px) {
    #intro-loader {
        /* S'assure que tout s'affiche correctement */
        min-width: 100vw;
    }

    .loading-text {
        font-size: 0.95rem;
        padding: 0 20px;
        /* Évite le débordement */
    }

    .skip-intro-btn {
        bottom: 6px;
        right: 6px;
        /* Garde toujours la zone tactile minimum */
        min-width: 48px;
        min-height: 48px;
        padding: 12px;
        font-size: 11px;
    }

    .skip-intro-btn span {
        /* Cache le texte sur très petit écran, garde juste l'icône */
        display: none;
    }

    .skip-intro-btn i {
        font-size: 16px;
        margin: 0;
    }
}

/* Téléphones ultra-étroits (320px et moins) */
@media (max-width: 320px) {
    .loading-text {
        font-size: 0.85rem;
        padding: 0 15px;
    }

    .skip-intro-btn {
        bottom: 5px;
        right: 5px;
        /* Garde minimum tactile même sur ultra-petit écran */
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .skip-intro-btn i {
        font-size: 18px;
    }
}

/* Orientation paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .loading-text {
        font-size: 0.9rem;
    }

    .skip-intro-btn {
        bottom: 5px;
        right: 5px;
        padding: 10px 14px;
        min-height: 44px;
    }
}