/* Base styles for larger screens */
.actualite {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px;
    padding: 20px;
}

.actualite h2 {
    margin: 0 10px;
    font-size: 40px;
}

.icon {
    font-size: 40px;
    color: #1900b8;
}

.actualite-page {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

.news-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.news-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative; /* Ensure footer stays at bottom */
}

.news-long-card {
    flex-basis: 24%;
    height: 1000px;
    margin-bottom: -50rem;
    z-index: 0;
}

.news-short-card {
    flex-basis: 24%;
    height: 500px;
}

.news-large-card {
    flex-basis: 50%;
    margin-left: calc(21% + 4%);
    z-index: 1;
    height: 760px;
}

.news-large-card img {
    width: 100%;
    height: 30rem;
}


.news-short-card img,
.news-long-card img {
    width: 100%;
    height: 13rem;
}

.news-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-content h3 {
    margin-top: 0;
    color: #1900b8;
    
}

/* Limiter le texte pour les cartes courtes */
.news-short-card .news-card-content p {
    max-height: none; /* Ajustez selon la hauteur souhaitée */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Ajustez le nombre de lignes visibles */
    -webkit-box-orient: vertical;
}

/* Limiter le texte pour les cartes longues */
.news-long-card .news-card-content p {
    max-height: none; /* Ajustez selon la hauteur souhaitée */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 25; /* Ajustez le nombre de lignes visibles */
    -webkit-box-orient: vertical;
}

/* Limiter le texte pour les grandes cartes */
.news-large-card .news-card-content p {
    max-height: none; /* Ajustez selon la hauteur souhaitée */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Ajustez le nombre de lignes visibles */
    -webkit-box-orient: vertical;
}




.news-card-content a {
    text-decoration: none;
    color: #4CAF50;
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

.news-card-content a:hover {
    text-decoration: underline;
}

.btn-see-more {
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
}

.news-card-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute; /* Position at the bottom */
    bottom: 0; /* Stick to the bottom */
    width: 100%;
}

.news-date {
    color: blue;
    font-size: 14px;
    margin: 0;
}

.news-card-footer i {
    margin-right: 5px;
}

/* Media queries for responsiveness */

/* Small tablets and larger phones */
@media (max-width: 768px) {
    .actualite {
        flex-direction: column;
        margin: 20px;
        padding: 10px;
    }

    .actualite h2 {
        font-size: 30px;
    }

    .news-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .news-long-card, .news-short-card {
        flex-basis: 48%;
        height: auto;
        margin-bottom: 15px;
    }

    .news-large-card {
        flex-basis: 100%;
        margin-left: 0;
        height: auto;
        margin-bottom: 15px;
    }

    .news-large-card img {
        height: auto;
    }

    .news-short-card img, .news-long-card img {
        height: auto;
    }

    .btn-see-more {
        margin: 20px auto;
        padding: 10px 20px;
        font-size: 16px;
        display: block;
        position: relative;
        float: none;
    }
}

/* Phones */
@media (max-width: 480px) {
    .actualite {
        margin: 10px;
        padding: 5px;
    }

    .actualite h2 {
        font-size: 24px;
    }

    .news-container {
        flex-direction: column;
    }

    .news-long-card, .news-short-card, .news-large-card {
        flex-basis: 100%;
        margin-bottom: 10px;
    }

    .news-long-card img, .news-short-card img, .news-large-card img {
        height: auto;
    }

    .btn-see-more {
        position: static;
        display: block;
        margin: 20px auto;
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Main container with CSS Grid for Masonry Layout */
.actualites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: auto;
    gap: 20px;
    position: relative;
    padding: 20px;
}

/* Main container with CSS Grid for Masonry Layout */
.actualites-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: auto;
    gap: 20px;
    position: relative;
    padding: 20px;
}

/* Styles for each card */
.actualite-card {
    background-color: #ffffff;
    border-radius: 12px;
    display: none;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 500px;
    justify-content: space-between;
}

.actualite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
}

/* Dropdown effect for additional content */
.actualite-card.expanded {
    max-height: none;
    transition: all 0.5s ease;
}

/* Button to show additional text with icon */
.actualite-card .dropdown-btn-actualite {
    background-color: #4caf50;
    color: #ffffff;
    border: none;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.actualite-card .dropdown-btn-actualite:hover {
    background-color: #388e3c;
}

.actualite-card .dropdown-btn-actualite i {
    margin-left: 8px;
}

/* Image styles */
.actualite-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Card content */
.actualite-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.actualite-card.expanded {
    justify-content: flex-start;
    max-height: none;
    transition: all 0.5s ease;
}

/* Card footer */
.actualite-card-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background-color: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.actualite-date {
    margin: 0;
    color: #757575;
    font-size: 0.9rem;
}

/* Text styling */
.actualite-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #333;
}

.actualite-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .actualite-card {
        max-height: 400px;
    }

    .actualite-card h3 {
        font-size: 1.2rem;
    }

    .actualite-card p {
        font-size: 0.9rem;
    }

    .actualite-card-footer {
        padding: 15px;
    }

        .actualite-card-footer {
            padding: 15px;
        }

        .actualite-card .dropdown-btn-actualite {
            padding: 10px;
            font-size: 0.9rem;
        }
    }


    .news-summary {
        max-height: 5rem; /* Limite de hauteur initiale */
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .news-summary.expanded {
        max-height: none; /* Retirer la limite de hauteur */
    }
    
    .read-more-btn {
        color: #4CAF50;
        font-weight: bold;
        cursor: pointer;
    } 
