/* ==========================================
   Construction Banner Styles
   Bandeau d'avertissement site en construction
   ========================================== */

.construction-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100; /* Au-dessus de la navbar (z-index: 1000) */
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    padding: 12px 24px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.construction-banner i {
    font-size: 1.1rem;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.construction-banner span {
    display: inline;
}

.construction-banner .construction-highlight {
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 4px;
}

/* Bouton pour fermer le bandeau (optionnel) */
.construction-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.construction-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Ajustement de la navbar quand le bandeau est présent */
body.has-construction-banner .navbar {
    top: 44px; /* Hauteur du bandeau */
}

/* Ajustement du padding du hero/première section */
body.has-construction-banner .hero,
body.has-construction-banner .work-hero,
body.has-construction-banner .association-hero,
body.has-construction-banner .formation-hero,
body.has-construction-banner .network-hero,
body.has-construction-banner .project-hero {
    padding-top: 184px; /* 140px + 44px du bandeau */
}

/* Ajustement du scroll-padding pour les ancres */
body.has-construction-banner {
    scroll-padding-top: 124px; /* 80px + 44px du bandeau */
}

/* ==========================================
   Variantes de couleur
   ========================================== */

/* Rouge - Attention */
.construction-banner.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.construction-banner.danger .construction-close {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.construction-banner.danger .construction-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.construction-banner.danger .construction-highlight {
    background: rgba(255, 255, 255, 0.2);
}

/* Bleu - Info */
.construction-banner.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.construction-banner.info .construction-close {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.construction-banner.info .construction-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.construction-banner.info .construction-highlight {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .construction-banner {
        padding: 10px 16px;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .construction-banner i {
        font-size: 1rem;
    }
    
    .construction-close {
        right: 8px;
        width: 24px;
        height: 24px;
    }
    
    body.has-construction-banner .navbar {
        top: 40px;
    }
    
    body.has-construction-banner .hero,
    body.has-construction-banner .work-hero,
    body.has-construction-banner .association-hero,
    body.has-construction-banner .formation-hero,
    body.has-construction-banner .network-hero,
    body.has-construction-banner .project-hero {
        padding-top: 160px;
    }
    
    body.has-construction-banner {
        scroll-padding-top: 110px;
    }
}

@media (max-width: 480px) {
    .construction-banner {
        flex-wrap: wrap;
        padding: 8px 40px 8px 12px;
    }
    
    .construction-highlight {
        display: none;
    }
}
