/* ==========================================================================
   CSS POUR LA PAGE D'ACCUEIL - MOTIFS ET ANIMATIONS
   ========================================================================== */

/* S'assurer que le contenu reste au-dessus du motif */
.hero-bg > * {
    position: relative;
    z-index: 10;
}

/* Particules au-dessus du motif */
.particles {
    z-index: 5 !important;
}

/* Photo year au-dessus de tout */
.photo-year {
    z-index: 15 !important;
}

/* Styles pour page accueil */
.hero-bg {
    background: transparent;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Suppression de l'effet de lumière pour montrer le background global */
.hero-bg::before {
    display: none;
}

/* Suppression de l'effet de brillance pour montrer le background global */
.hero-bg::after {
    display: none;
}

/* Styles spécifiques pour le carrousel */
.carousel {
    background: transparent !important;
    position: relative;
    z-index: 10;
}

.carousel-item {
    background: transparent !important;
}

/* Styles pour la vidéo YouTube */
.youtube-container {
    background: transparent !important;
    position: relative;
    z-index: 10;
}

.youtube-container iframe {
    background: transparent !important;
}

/* Navigation cards pour rediriger vers les autres pages */
.navigation-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.navigation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.navigation-card .nav-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.navigation-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.navigation-card p {
    color: var(--gray-600);
    margin: 0;
    font-size: 1rem;
}

/* Styles pour les boutons heros */
.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--primary);
    border: 2px solid rgba(26, 84, 144, 0.1);
}

.hero-btn-secondary {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--primary);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.hero-btn:hover .btn-shine {
    left: 100%;
}

/* Style moderne pour les sections */
.modern-section {
    background: transparent;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Suppression des motifs pour laisser apparaître le background global */
.modern-section::before {
    display: none;
}

@keyframes patternSlowFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(60px, 60px) rotate(360deg); }
}

/* S'assurer que le contenu reste au-dessus */
.modern-section > .container {
    position: relative;
    z-index: 2;
}

/* Style pour affichage annee */
.photo-year {
    position: absolute;
    top: 120px;
    right: 30px;
    background: rgba(26, 84, 144, 0.95);
    color: #ffd700;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: slideInRight 1s ease;
    z-index: 5;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Styles pour le diaporama des photos annuelles */
.hero-bg .photo-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    /* PAS de background-color pour laisser voir le motif */
    background-color: transparent;
    opacity: 0;
    transform: scale(1) translateX(0) translateY(0) rotate(0deg);
    filter: blur(0px);
}

/* Effets de transition varies */
/* 1. Fade classique */
.hero-bg .photo-slide.fade-in {
    animation: fadeIn 1.5s ease-in-out forwards;
}
.hero-bg .photo-slide.fade-out {
    animation: fadeOut 1.5s ease-in-out forwards;
}

/* 2. Zoom */
.hero-bg .photo-slide.zoom-in {
    animation: zoomIn 1.5s ease-in-out forwards;
}
.hero-bg .photo-slide.zoom-out {
    animation: zoomOut 1.5s ease-in-out forwards;
}

/* 3. Slide */
.hero-bg .photo-slide.slide-in {
    animation: slideIn 1.5s ease-in-out forwards;
}
.hero-bg .photo-slide.slide-out {
    animation: slideOut 1.5s ease-in-out forwards;
}

/* 4. Blur */
.hero-bg .photo-slide.blur-in {
    animation: blurIn 1.5s ease-in-out forwards;
}
.hero-bg .photo-slide.blur-out {
    animation: blurOut 1.5s ease-in-out forwards;
}

/* 5. Rotation */
.hero-bg .photo-slide.rotate-in {
    animation: rotateIn 1.5s ease-in-out forwards;
}
.hero-bg .photo-slide.rotate-out {
    animation: rotateOut 1.5s ease-in-out forwards;
}

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

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes zoomOut {
    from { 
        opacity: 1;
        transform: scale(1);
    }
    to { 
        opacity: 0;
        transform: scale(1.2);
    }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(100%);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideOut {
    from { 
        opacity: 1;
        transform: translateX(0);
    }
    to { 
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes blurIn {
    from { 
        opacity: 0;
        filter: blur(20px);
    }
    to { 
        opacity: 1;
        filter: blur(0px);
    }
}
@keyframes blurOut {
    from { 
        opacity: 1;
        filter: blur(0px);
    }
    to { 
        opacity: 0;
        filter: blur(20px);
    }
}

@keyframes rotateIn {
    from { 
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    to { 
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}
@keyframes rotateOut {
    from { 
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
    to { 
        opacity: 0;
        transform: rotate(180deg) scale(0.5);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation pour particules flottantes */
@keyframes floatEnhanced {
    0% { 
        opacity: 0; 
        transform: translateY(100vh) translateX(0) scale(0) rotate(0deg); 
    }
    10% { 
        opacity: 0.8; 
        transform: translateY(90vh) translateX(10px) scale(1) rotate(45deg); 
    }
    90% { 
        opacity: 0.8; 
        transform: translateY(10vh) translateX(-10px) scale(1) rotate(315deg); 
    }
    100% { 
        opacity: 0; 
        transform: translateY(-5vh) translateX(0) scale(0) rotate(360deg); 
    }
}

.hero-info-box {
    transition: all 0.3s ease;
}

.hero-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Section YouTube avec motifs */
.youtube-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.youtube-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 70% 70%, rgba(255, 215, 0, 0.06) 1px, transparent 1px);
    background-size: 70px 70px, 120px 120px;
    animation: patternFloat 35s linear infinite reverse;
    z-index: 1;
}

.youtube-section .container {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .hero-bg {
        background-size: contain;
        background-position: center center;
        background-repeat: no-repeat;
        min-height: 80vh;
    }
    
    .hero-bg .photo-slide {
        background-size: contain;
        background-position: center center;
        background-repeat: no-repeat;
    }
    
    .hero-info-box {
        max-width: 90% !important;
        margin-bottom: 1rem;
        padding: 1.5rem !important;
        background: linear-gradient(135deg, rgba(26, 84, 144, 0.98) 0%, rgba(43, 112, 184, 0.95) 100%) !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    /* Container des boites sur mobile */
    div[style*="top: 100px"][style*="display: flex"] {
        flex-direction: column !important;
        top: 80px !important;
        gap: 1rem;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 1rem !important;
    }
    
    /* Ajustement des tailles de texte sur mobile */
    .hero-info-box span[style*="font-size: 2.2rem"] {
        font-size: 1.6rem !important;
    }
    
    .hero-info-box span[style*="font-size: 2.4rem"] {
        font-size: 1.8rem !important;
    }
    
    .hero-info-box span[style*="font-size: 1.1rem"] {
        font-size: 0.9rem !important;
    }
    
    /* Ajustement affichage annee sur mobile */
    .photo-year {
        top: 80px !important;
        right: 15px !important;
        padding: 6px 12px !important;
        font-size: 1rem !important;
    }
    
    /* Reduction taille cartes navigation */
    .navigation-card {
        padding: 1.5rem !important;
    }
    
    .navigation-card h3 {
        font-size: 1.2rem !important;
    }
    
    .navigation-card p {
        font-size: 0.9rem !important;
    }
    
    .nav-icon {
        font-size: 2rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-buttons {
        bottom: 20px !important;
        left: 10px !important;
        right: 10px !important;
        transform: none !important;
        flex-direction: column;
        gap: 0.5rem;
    }
}

.hero-buttons {
    gap: 0.8rem;
}

/* ===== BOUTONS D'ACTION FLOTTANTS (EFFET FUMÉE/DÉSINTÉGRATION) ===== */
.floating-buttons-container {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
    pointer-events: none !important;
    opacity: 1 !important;
    transition: opacity 1.5s ease-out !important;
}

.floating-buttons-container .buttons-wrapper {
    display: flex !important;
    justify-content: center !important;
    gap: 1.2rem !important;
    padding: 0 20px !important;
}

.floating-buttons-container .hero-btn {
    pointer-events: auto !important;
    position: relative !important;
    white-space: nowrap !important;
    overflow: visible !important;
    border-radius: 50px !important;
    transform: scale(1) !important;
    transition: transform 1.5s ease-out,
                opacity 1.5s ease-out,
                filter 1.5s ease-out !important;
}

.floating-buttons-container .hero-btn .btn-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* --- EFFET DE DÉSINTÉGRATION EN FUMÉE --- */
.floating-buttons-container.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

.floating-buttons-container.hidden .hero-btn {
    transform: scale(0) !important;
    opacity: 0 !important;
    filter: blur(15px) brightness(0.3) !important;
    animation: smokeDisintegration 1.5s ease-out forwards !important;
}

/* --- Animation de désintégration --- */
@keyframes smokeDisintegration {
    0% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0px) brightness(1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
    20% {
        transform: scale(1.1);
        opacity: 0.9;
        filter: blur(1px) brightness(1.2);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                    0 0 40px rgba(255, 255, 255, 0.3);
    }
    40% {
        transform: scale(1.05);
        opacity: 0.7;
        filter: blur(3px) brightness(1.5);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.7),
                    0 0 60px rgba(200, 200, 200, 0.5),
                    inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
    60% {
        transform: scale(0.8);
        opacity: 0.4;
        filter: blur(6px) brightness(1.8);
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                    0 0 80px rgba(180, 180, 180, 0.6),
                    0 0 120px rgba(160, 160, 160, 0.4);
    }
    80% {
        transform: scale(0.3);
        opacity: 0.1;
        filter: blur(10px) brightness(2);
        box-shadow: 0 0 60px rgba(255, 255, 255, 0.9),
                    0 0 120px rgba(150, 150, 150, 0.7),
                    0 0 180px rgba(120, 120, 120, 0.5);
    }
    100% {
        transform: scale(0);
        opacity: 0;
        filter: blur(15px) brightness(0.3);
        box-shadow: 0 0 80px rgba(255, 255, 255, 0.2),
                    0 0 160px rgba(100, 100, 100, 0.1);
    }
}

/* --- Animation de reconstruction depuis la fumée --- */
.floating-buttons-container:not(.hidden) .hero-btn {
    animation: smokeReintegration 1.8s ease-out forwards !important;
}

@keyframes smokeReintegration {
    0% {
        transform: scale(0);
        opacity: 0;
        filter: blur(15px) brightness(0.3);
        box-shadow: 0 0 80px rgba(255, 255, 255, 0.2),
                    0 0 160px rgba(100, 100, 100, 0.1);
    }
    15% {
        transform: scale(0.1);
        opacity: 0.1;
        filter: blur(12px) brightness(0.5);
        box-shadow: 0 0 60px rgba(255, 255, 255, 0.3),
                    0 0 120px rgba(120, 120, 120, 0.2);
    }
    30% {
        transform: scale(0.4);
        opacity: 0.3;
        filter: blur(8px) brightness(1);
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.5),
                    0 0 80px rgba(150, 150, 150, 0.4),
                    0 0 120px rgba(180, 180, 180, 0.3);
    }
    50% {
        transform: scale(0.7);
        opacity: 0.6;
        filter: blur(5px) brightness(1.3);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.7),
                    0 0 60px rgba(200, 200, 200, 0.5),
                    inset 0 0 15px rgba(255, 255, 255, 0.2);
    }
    70% {
        transform: scale(0.9);
        opacity: 0.8;
        filter: blur(2px) brightness(1.1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                    0 0 40px rgba(255, 255, 255, 0.4);
    }
    85% {
        transform: scale(1.05);
        opacity: 0.95;
        filter: blur(1px) brightness(1.05);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0px) brightness(1);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

/* --- Particules de fumée (pseudo-éléments) --- */
.floating-buttons-container.hidden .hero-btn::before,
.floating-buttons-container.hidden .hero-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0;
    animation: smokeParticles 1.5s ease-out forwards;
}

.floating-buttons-container.hidden .hero-btn::before {
    animation-delay: 0.3s;
    transform: translate(-50%, -50%);
}

.floating-buttons-container.hidden .hero-btn::after {
    animation-delay: 0.6s;
    transform: translate(-50%, -50%);
}

@keyframes smokeParticles {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    20% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(3) translate(50px, -100px);
    }
}

/* --- Effets au survol --- */
.floating-buttons-container .hero-btn:hover {
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.floating-buttons-container .hero-btn-primary:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%) !important;
    box-shadow: 0 10px 30px rgba(26, 84, 144, 0.3) !important;
}

.floating-buttons-container .hero-btn-secondary:hover {
    background: linear-gradient(135deg, #ffe066 0%, #ffd700 100%) !important;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4) !important;
}

/* --- Masquage sur petit écran --- */
@media (max-width: 900px) {
    .floating-buttons-container {
        display: none !important;
    }
}