/* ==========================================================================
   BANDEAU DE NOTIFICATIONS - Updates Banner
   Fichier: css/update-banner.css
   ========================================================================== */

.update-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: bannerSlideDown 0.5s ease-out;
}

/* Animation d'apparition — nom unique pour éviter conflit avec @keyframes slideDown des formulaires */
@keyframes bannerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Effet de gradient animé en arrière-plan */
.update-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

/* ==========================================================================
   INDICATEUR DE MISE À JOUR
   ========================================================================== */
.update-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.update-pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
    }
}

.update-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
}

.update-text strong {
    font-weight: 600;
    color: white;
}

/* ==========================================================================
   NOTIFICATIONS
   ========================================================================== */
.update-notifications {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.update-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.update-item:hover::before {
    left: 100%;
}

.update-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Priorités */
.update-item.priority-high {
    border-left: 3px solid #fbbf24;
}

.update-item.priority-medium {
    border-left: 3px solid #60a5fa;
}

.update-item.priority-low {
    border-left: 3px solid #a78bfa;
}

.update-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.update-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.update-content strong {
    font-weight: 600;
    margin-right: 5px;
}

.update-arrow {
    font-size: 1rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.update-item:hover .update-arrow {
    transform: translateX(5px);
}

.update-date {
    font-size: 0.75rem;
    opacity: 0.8;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-left: auto;
}

/* ==========================================================================
   BOUTONS TOGGLE ET FERMER
   ========================================================================== */
.update-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.update-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.update-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.update-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Section "Voir plus" */
.update-more {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tablette */
@media (max-width: 992px) {
    .update-banner {
        padding: 10px 0;
    }
    
    .update-banner-content {
        gap: 15px;
    }
    
    .update-indicator {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .update-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .update-icon {
        font-size: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .update-banner {
        padding: 8px 0;
    }
    
    .update-banner-content {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .update-indicator {
        justify-content: center;
        width: 100%;
    }
    
    .update-notifications {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    
    .update-item {
        width: 100%;
        padding: 10px;
    }
    
    .update-content {
        font-size: 0.85rem;
        flex: 1;
    }
    
    .update-arrow {
        display: none;
    }
    
    .update-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .update-indicator {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .update-text {
        font-size: 0.8rem;
    }
    
    .update-item {
        padding: 8px;
        gap: 8px;
    }
    
    .update-icon {
        font-size: 0.9rem;
    }
    
    .update-content {
        font-size: 0.8rem;
    }
    
    .update-content strong {
        display: block;
        margin-bottom: 2px;
    }
}

/* ==========================================================================
   VARIANTES DE COULEURS (optionnel)
   ========================================================================== */

/* Variante bleue */
.update-banner.theme-blue {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

/* Variante verte */
.update-banner.theme-green {
    background: linear-gradient(135deg, #34a853 0%, #1b5e20 100%);
}

/* Variante orange */
.update-banner.theme-orange {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

/* ==========================================================================
   MODE SOMBRE (si nécessaire)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    .update-banner {
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    }
    
    .update-item {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(255, 255, 255, 0.15);
    }
    
    .update-item:hover {
        background: rgba(0, 0, 0, 0.3);
    }
}

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

/* Animation pour les nouveaux éléments */
@keyframes newItem {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.update-item.new-animation {
    animation: newItem 0.5s ease-out;
}

/* Badge "Nouveau" */
.update-item.has-badge::after {
    content: 'NEW';
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fbbf24;
    color: #1f2937;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}