/**
 * Styles pour la section Annonces Légales Dynamiques
 * Préfixe : al- pour éviter les conflits
 * Version avec titres à hauteur fixe et texte complet
 */

/* ========== SECTION PRINCIPALE ========== */
.al-announcements-section {
    padding: 60px 0;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}



@keyframes al-border-move {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* ========== HEADER ========== */
.al-announcements-header {
    text-align: center;
    margin-bottom: 40px;
}

.al-announcements-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000091;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.al-pulse-icon {
    color: #ef4444;
    animation: al-pulse 2s infinite;
    font-size: 1.2rem;
}

@keyframes al-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.al-announcements-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1rem;
    color: #666;
    flex-wrap: wrap;
}

.al-live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #000091;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.al-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: al-live-pulse 2s infinite;
}

@keyframes al-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    50% { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
}

.al-separator {
    color: #ddd;
}

.al-counter strong {
    color: #000091;
    font-weight: 700;
    font-size: 1.2rem;
}

/* ========== TICKER DÉFILANT ========== */
.al-ticker-container {
    background: #000091;
    color: white;
    padding: 12px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.al-ticker-label {
    background: #ef4444;
    color: white;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    position: absolute;
    left: 0;
    z-index: 10;
    letter-spacing: 1px;
}

.al-ticker {
    display: flex;
    padding-left: 140px;
    animation: al-ticker-scroll 30s linear infinite;
}

@keyframes al-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.al-ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 30px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.al-ticker-item::after {
    content: '•';
    margin-left: 30px;
    color: rgba(255, 255, 255, 0.5);
}

/* ========== GRILLE D'ANNONCES ========== */
.al-announcements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

/* ========== CARTE D'ANNONCE ========== */
.al-announcement-card {
    background: white;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.al-announcement-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Header de la carte - HAUTEUR FIXE */
.al-card-header {
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border-bottom: 2px solid #000091;
    padding: 10px 12px;
    text-align: center;
    height: 50px; /* Hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
}

.al-announcement-type {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #000091;
    margin: 0;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.al-type-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.al-type-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dénomination - HAUTEUR FIXE */
.al-company-denomination {
    background: #000091;
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 65px; /* Hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
}

.al-legal-form {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Corps de l'annonce - SCROLLABLE SI TROP LONG */
.al-announcement-body {
    padding: 15px 12px;
    background: white;
    flex: 1;
    min-height: 250px;
    max-height: 350px;
    overflow-y: auto;
}

/* Scrollbar personnalisée */
.al-announcement-body::-webkit-scrollbar {
    width: 5px;
}

.al-announcement-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.al-announcement-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.al-announcement-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.al-announcement-text {
    font-size: 0.72rem;
    line-height: 1.35;
    color: #333;
    text-align: justify;
    font-family: Georgia, 'Times New Roman', serif;
    hyphens: auto;
}

/* Footer de la carte - HAUTEUR FIXE */
.al-card-footer {
    border-top: 1px solid #e5e5e5;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    font-size: 0.7rem;
    height: 35px; /* Hauteur fixe */
    margin-top: auto;
}

.al-location-info,
.al-time-info {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

.al-location-icon,
.al-time-icon {
    font-size: 0.85rem;
}

/* ========== FOOTER SECTION ========== */
.al-announcements-footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e5e5e5;
}

.al-load-more-btn {
    background: #000091;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.al-load-more-btn:hover {
    background: #1212ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 145, 0.3);
}

.al-btn-loader {
    animation: al-spin 1s linear infinite;
    font-size: 1.2rem;
}

@keyframes al-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.al-footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.al-view-all-link,
.al-publish-link {
    color: #000091;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 10px;
}

.al-view-all-link:hover,
.al-publish-link:hover {
    color: #1212ff;
    transform: translateX(5px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .al-announcements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .al-announcements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .al-announcements-title {
        font-size: 1.8rem;
    }
    
    .al-announcements-subtitle {
        flex-direction: column;
        gap: 10px;
    }
    
    .al-footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .al-announcement-text {
        font-size: 0.8rem;
    }
    
    .al-ticker-container {
        display: none;
    }
    
    .al-announcement-body {
        max-height: 280px;
    }
}

@media (max-width: 480px) {
    .al-announcements-title {
        font-size: 1.5rem;
    }
    
    .al-announcement-card {
        margin-bottom: 10px;
    }
    
    .al-company-denomination {
        font-size: 0.9rem;
        padding: 10px;
        height: 55px;
    }
    
    .al-announcement-body {
        padding: 12px;
        min-height: 200px;
        max-height: 250px;
    }
    
    .al-announcement-type {
        font-size: 0.75rem;
    }
}

/* ========== ANIMATIONS D'ENTRÉE ========== */
@keyframes al-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.al-announcement-card {
    animation: al-fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.al-announcement-card:nth-child(1) { animation-delay: 0.05s; }
.al-announcement-card:nth-child(2) { animation-delay: 0.1s; }
.al-announcement-card:nth-child(3) { animation-delay: 0.15s; }
.al-announcement-card:nth-child(4) { animation-delay: 0.2s; }
.al-announcement-card:nth-child(5) { animation-delay: 0.25s; }
.al-announcement-card:nth-child(6) { animation-delay: 0.3s; }
.al-announcement-card:nth-child(7) { animation-delay: 0.35s; }
.al-announcement-card:nth-child(8) { animation-delay: 0.4s; }
.al-announcement-card:nth-child(9) { animation-delay: 0.45s; }
.al-announcement-card:nth-child(10) { animation-delay: 0.5s; }
.al-announcement-card:nth-child(11) { animation-delay: 0.55s; }
.al-announcement-card:nth-child(12) { animation-delay: 0.6s; }
.al-announcement-card:nth-child(13) { animation-delay: 0.65s; }
.al-announcement-card:nth-child(14) { animation-delay: 0.7s; }
.al-announcement-card:nth-child(15) { animation-delay: 0.75s; }

/* ========== NOTIFICATIONS ========== */
.al-announcement-notification {
    position: fixed;
    bottom: 30px;
    right: -400px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #000091;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    max-width: 350px;
}

.al-announcement-notification.show {
    right: 30px;
}

/* ========== MODE IMPRESSION ========== */
@media print {
    .al-ticker-container,
    .al-load-more-btn,
    .al-footer-links {
        display: none !important;
    }
    
    .al-announcements-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .al-announcement-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .al-announcement-body {
        max-height: none;
        overflow: visible;
    }
}