/* ============================================
   PAGE DE CHARGEMENT - COULEURS CMT
   ============================================ */

/* Couleurs du logo CMT */
:root {
    --cmt-navy: #1B3A5F;
    --cmt-turquoise: #1FA9A9;
}

.loading-screen-cmt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cmt-navy) 0%, #2A4A70 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-logo-container {
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.loading-logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(31, 169, 169, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 2s ease-in-out infinite;
    z-index: -1;
}

.loading-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(31, 169, 169, 0.5));
    animation: pulse-logo 2s ease-in-out infinite;
}

/* Animation du logo */
@keyframes pulse-logo {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 10px 30px rgba(31, 169, 169, 0.4));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 15px 40px rgba(31, 169, 169, 0.7));
    }
}

/* Animation du glow */
@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.15);
    }
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.loading-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.loading-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Spinner personnalisé avec les couleurs CMT */
.spinner-cmt {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto;
}

.spinner-cmt::before,
.spinner-cmt::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: pulse-cmt 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.spinner-cmt::before {
    width: 60px;
    height: 60px;
    border: 4px solid var(--cmt-turquoise);
    border-top-color: transparent;
    animation: spin-cmt 1s linear infinite;
}

.spinner-cmt::after {
    width: 40px;
    height: 40px;
    top: 10px;
    left: 10px;
    border: 4px solid rgba(31, 169, 169, 0.3);
    border-top-color: var(--cmt-turquoise);
    animation: spin-cmt 1.5s linear infinite reverse;
}

/* Barre de progression */
.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 2rem;
}

.progress-bar-cmt {
    height: 100%;
    background: linear-gradient(90deg, var(--cmt-turquoise) 0%, #40C4C4 100%);
    border-radius: 9999px;
    animation: loading-progress 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--cmt-turquoise);
}

/* Texte de chargement animé */
.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-weight: 500;
}

.loading-dots::after {
    content: '.';
    animation: dots 1.5s steps(3, end) infinite;
}

/* Particules décoratives */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--cmt-turquoise);
    opacity: 0.1;
    animation: float 6s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    right: 15%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    bottom: 20%;
    animation-delay: 4s;
}

/* Animations */
@keyframes spin-cmt {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-cmt {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

@keyframes loading-progress {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.3;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .loading-title {
        font-size: 1.5rem;
    }
    
    .loading-logo {
        width: 90px;
        height: 90px;
    }
    
    .loading-logo-container::before {
        width: 140px;
        height: 140px;
    }
    
    .progress-container {
        width: 240px;
    }
}
