/* ============================================
   VARIABLES CSS - Palette de couleurs
   ============================================ */
:root {
    /* Couleurs principales - Thème frais et moderne */
    --primary-color: #00b4d8;
    --secondary-color: #0077b6;
    --accent-color: #90e0ef;
    --dark-color: #03045e;
    --light-color: #caf0f8;
    --white: #ffffff;
    --text-dark: #1a1a2e;
    --text-light: #4a5568;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Typographie */
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Outfit', 'Inter', sans-serif;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 180, 216, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 180, 216, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 180, 216, 0.2);
    
    /* Animations */
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   IMPORT DES POLICES - Google Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Outfit:wght@400;500;600&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #caf0f8 0%, #90e0ef 50%, #00b4d8 100%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   ARRIÈRE-PLAN ANIMÉ - Bulles flottantes
   ============================================ */
.background-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: rise 15s infinite ease-in;
}

/* Tailles et positions variées pour les bulles */
.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 120px;
    height: 120px;
    left: 25%;
    animation-duration: 16s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 50%;
    animation-duration: 14s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 70%;
    animation-duration: 13s;
    animation-delay: 1s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 85%;
    animation-duration: 15s;
    animation-delay: 3s;
}

.bubble:nth-child(6) {
    width: 70px;
    height: 70px;
    left: 40%;
    animation-duration: 11s;
    animation-delay: 5s;
}

/* Animation de montée des bulles */
@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 110vh;
        transform: translateX(100px) scale(1.2);
        opacity: 0;
    }
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: var(--spacing-xl) var(--spacing-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInUp 1s var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Animation d'apparition du conteneur */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGO
   ============================================ */
.logo-container {
    margin-bottom: var(--spacing-md);
    animation: logoFloat 3s ease-in-out infinite;
}

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 180, 216, 0.3));
    transition: transform 0.3s var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Animation de flottement du logo */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ============================================
   TITRE PRINCIPAL
   ============================================ */
.main-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.title-word {
    display: inline-block;
    animation: fadeInWord 0.8s var(--transition-smooth) backwards;
}

.title-word:nth-child(1) {
    animation-delay: 0.2s;
    color: var(--primary-color);
}

.title-word:nth-child(2) {
    animation-delay: 0.4s;
    color: var(--secondary-color);
}

.title-word:nth-child(3) {
    animation-delay: 0.6s;
    color: var(--dark-color);
}

/* Animation d'apparition des mots */
@keyframes fadeInWord {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(-90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* ============================================
   MESSAGE
   ============================================ */
.message {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-secondary);
    animation: fadeIn 1.2s var(--transition-smooth) 0.8s backwards;
}

.message strong {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   LOADER ANIMÉ - Éponge stylisée
   ============================================ */
.loader-container {
    margin: var(--spacing-lg) 0;
    animation: fadeIn 1.4s var(--transition-smooth) 1s backwards;
}

.loader {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.sponge-loader {
    display: flex;
    gap: 8px;
}

.sponge-part {
    width: 16px;
    height: 50px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    animation: spongeWave 1.2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(0, 180, 216, 0.3);
}

.sponge-part:nth-child(1) {
    animation-delay: 0s;
}

.sponge-part:nth-child(2) {
    animation-delay: 0.2s;
}

.sponge-part:nth-child(3) {
    animation-delay: 0.4s;
}

/* Animation vague de l'éponge */
@keyframes spongeWave {
    0%, 100% {
        transform: scaleY(1);
        opacity: 1;
    }
    50% {
        transform: scaleY(1.5);
        opacity: 0.7;
    }
}

.loader-text {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 500;
    font-family: var(--font-secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ============================================
   BOX D'INFORMATIONS
   ============================================ */
.info-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    animation: fadeIn 1.6s var(--transition-smooth) 1.2s backwards;
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(144, 224, 239, 0.1));
    border-radius: 15px;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-family: var(--font-secondary);
    transition: all 0.3s var(--transition-smooth);
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(144, 224, 239, 0.15));
}

.icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 180, 216, 0.2);
    animation: fadeIn 1.8s var(--transition-smooth) 1.4s backwards;
}

.footer p {
    font-size: 0.875rem;
    color: var(--text-light);
    font-family: var(--font-secondary);
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-lg: 2rem;
        --spacing-md: 1.5rem;
    }
    
    .container {
        padding: var(--spacing-lg) var(--spacing-md);
        border-radius: 20px;
        width: 95%;
    }
    
    .logo {
        max-width: 140px;
    }
    
    .main-title {
        margin-bottom: var(--spacing-md);
    }
    
    .message {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .info-box {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .info-item {
        width: 100%;
        justify-content: center;
    }
    
    .loader-container {
        margin: var(--spacing-md) 0;
    }
    
    .bubble {
        display: none; /* Cache les bulles sur mobile pour meilleures performances */
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .logo {
        max-width: 120px;
    }
    
    .footer p {
        font-size: 0.75rem;
    }
}

/* ============================================
   ANIMATIONS SUPPLÉMENTAIRES
   ============================================ */

/* Animation subtile de fond */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Animation d'entrée pour les éléments au scroll (si nécessaire) */
.fade-in-element {
    opacity: 0;
    animation: fadeIn 1s forwards;
}
