/* Section last news */
main {
    width: 90%;
    margin: 0 auto;
    padding: 20px;   

}

h2 {
    font-size: 2.4rem;
    font-weight: bold;
    margin: 40px 0 20px 0;
    font-family: 'Baskerville', serif;
}


/* --------------------- */
/* Section Flash Brief */
.actu-flash-brief-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    gap: 1rem;
    scrollbar-width: 10px;
    scrollbar-color: #333 #222;
}

.section_index.light-mode .actu-flash-brief-container {
    scrollbar-color: #ccc #f0f0f0;
}

.actu-flash-brief-item {
    display: inline-block;
    background-color: #ffffff;
    color: #000;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    min-width: 300px;
    max-width: 350px;
    white-space: normal;
    flex-shrink: 0;
    border-left: 4px solid #0055a4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.section_index.dark-mode .actu-flash-brief-item {
    background-color: #333;
    color: #fff;
    border-left-color: #bb86fc;
    position: relative;
}

.actu-flash-brief-item h3 {
    margin: 0 0 0.7rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #1a1a1a;
}

.section_index.dark-mode .actu-flash-brief-item h3 {
    color: #ffffff;
}

.actu-flash-brief-item p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    line-height: 1.3;
    color: #333;
}

.section_index.dark-mode .actu-flash-brief-item p {
    color: #ffffff;
}

.date-time {
    font-size: 0.75rem;
    color: #666;
    text-align: right;
    margin-top: 0.5rem;
    font-style: italic;
    font-weight: 300;
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
}

.section_index.dark-mode .date-time {
    color: #999;
}

.actu-flash-brief-item.important, .section_index.dark-mode .actu-flash-brief-item.important {
    border-left-color: #d90429;
    background-color: #ffeaea;
    position: relative;
}


.actu-flash-brief-item.important .warning-icon {
    color: #d90429;
    margin-right: 0.5rem;
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

.actu-flash-brief-item.important h3 {
    padding-left: 1.5rem;
}

.actu-flash-brief-item.important h3, .actu-flash-brief-item.important p {
    color: #333 !important;
}


/* Ligne 1 : Article principal */

#actu-last-news{
    margin: 0 auto;
}

.actu-last-news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.actu-last-news-main {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 30px;
}

.last-news-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.last-news-content {
    display: flex;
    width: 100%;
    gap: 20px;
}

/* Image à gauche */
.last-news-content .article-image {
    flex: 0 0 50%;
    max-width: 50%;
}

.last-news-content .article-image img {
    width: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 5px;
}

/* Texte à droite */
.last-news-content .article-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.last-news-content .article-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.section_index.light-mode .article-title {
    color: #111;
}

.last-news-content .article-summary {
    font-size: 1rem;
    color: #cccccc;
}

.section_index.light-mode .last-news-content .article-summary {
    color: #666666;
}

/* Ligne 2 : Trois articles */
.actu-last-news-others {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 30px;
}

.actu-last-news-others a:hover, .last-news-link:hover .article-title {
    text-decoration: underline;
    text-decoration-color: #bb86fc;
}
.actu-last-news-others article {
    flex: 0 0 22%; /* Chaque article prend 32% de la largeur */
}

.actu-last-news-others .article-image {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px;
    max-height: 200px;
    overflow: hidden;
}

.actu-last-news-others .article-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.actu-last-news-others .article-title {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Responsive pour appareils <1124px */
@media (max-width: 1124px) {
    #actu-last-news {
        width: 90%;
    }

    .actu-last-news-main {
        flex-direction: column;
        align-items: center;
    }

    .last-news-content {
        flex-direction: column;
        gap: 0;
    }

    .last-news-content .article-image {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .actu-last-news-others {
        flex-wrap: wrap;
        gap: 15px;
    }

    .actu-last-news-others article {
        flex: 0 0 48%;
    }

    .actu-last-news-others .article-image {
        width: 100%;
        max-height: 500px;
    }

    .actu-last-news-others .article-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

}

/* Responsive pour appareils <768px */
@media (max-width: 768px) {
    #actu-last-news {
        width: 100%;
    }
    .actu-flash-brief-container {
        gap: 15px;
    }

    .actu-last-news-others article {
        flex: 0 0 100%;
    }

    .last-news-content .article-title {
        font-size: 1.6rem;
        margin-bottom: 0;
    }

}

/* Responsive pour appareils <480px */
@media (max-width: 480px) {
    main {
        width: 100%;
        padding: 0;
    }

    .last-news-content .article-info {
        width: 90%;
        margin: 0 auto;
    }

    .actu-flash-brief-container {
        gap: 10px;
    }

    .actu-flash-brief-item {
        width: 200px;
    }

    .actu-last-news-main {
        padding-bottom: 20px;
    }

    .last-news-content .article-title {
        font-size: 1.6rem;
    }

    .actu-last-news-others {
        gap: 10px;
        width: 90%;
        margin: 0 auto;
    }

    .actu-last-news-others article {
        flex: 0 0 100%;
    }
    
}


/* News française */
.french-news-container, .european-news-container, .international-news-container {
    display: flex;
    gap: 20px;
}

/* Section gauche : Articles français */
.french-news-left, .european-news-left {
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 30px;
}

.news-row {
    display: flex;
    gap: 20px;
}

.french-news-item, .european-news-item {
    flex: 0 0 32%;
}

.article-link {
    text-decoration: none;
    color: inherit;
}

.article-image {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.article-title {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: Brown, sans-serif;
    color: #ccc;
    margin-top: 5px;
}

.french-news-item a:hover {
    text-decoration: underline;
    text-decoration-color: #bb86fc;
}


/* Section droite : Articles préfaits */
.french-news-right, .european-news-right, .international-news-right {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid #ccc;
    overflow-y: auto;
    max-height: 600px;
    padding-left: 20px;

}

.prefab-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
    width: 90%;
    margin: 0 auto;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.prefab-link img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.prefab-link a {
    font-size: 1rem;
    color: #ccc;
    text-decoration: none;
    font-weight: bold;
}

.section_index.light-mode .prefab-link a {
    color: #111;
}

.prefab-link a:hover {
    text-decoration: underline;
    text-decoration-color: #bb86fc;
}

.prefab-link p {
    margin: 0 0 25px 0;
}

.international-news-left {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.international-news-item {
    flex: 0 0 23%;
}


@media (max-width: 1124px) {
    .article-image img {
        max-height: 300px;
    }
    /* Sections gauche et droite en empilement */
    .french-news-left, .european-news-left, .international-news-left,
    .french-news-right, .european-news-right, .international-news-right {
        max-height: none;
        padding-left: 0;
    }

    /* Articles : ajustement à deux par ligne */
    .news-row {
        flex-wrap: wrap;
        gap: 10px;
    }

    .french-news-item, .european-news-item, .international-news-item {
        flex: 0 0 48%; /* Deux articles par ligne */
    }
}

@media (max-width: 768px) {
    /* Articles en une seule colonne */
    .news-row {
        flex-wrap: wrap;
        gap: 15px;
    }

    .french-news-item, .european-news-item, .international-news-item {
        flex: 0 0 100%; /* Articles en pleine largeur */
    }

    /* Ajuster les images */
    .article-image img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    #french-news, #international-news, #european-news {
        width: 90%;
        margin: 0 auto;
    }

    .prefab-link .items {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .prefab-link .items article {
        flex: 0 0 48%;
    }

    .french-news-container, .european-news-container, .international-news-container {
        gap: 10px;
        flex-direction: column;
    }

    .french-news-left, .european-news-left, .international-news-left{
        width: 100%;
        border-bottom: none;
    }

    .french-news-right, .european-news-right, .international-news-right {
        width: 100%;
        border: 1px solid #ccc;
        padding-left: 0;
    }

    .news-row {
        gap: 10px;
    }

    /* Texte et image plus petits */
    .article-title {
        font-size: 1.2rem;
    }

    .prefab-link img {
        height: auto;
        max-height: 100px;
    }

    .prefab-link a {
        font-size: 1rem;
    }
}


/* Index France */
#french-index {
    width: 80%;
    margin: 0 auto;
}

.french-index-container {
    display: flex;
    gap: 20px;
}

.french-index-left {
    width: 70%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 30px;
}

.inter-index {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 30px;
    width: 70%;
    margin: 0 auto;
}

.french-index-right {
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid #ccc;
    padding-left: 20px;
}

.french-index-left .article-image{
    flex: 0 0 50%;
    max-width: 35%;
}

.inter-index .article-image{
    flex: 0 0 40%;
    max-width: 30%;
}

.french-index-left .article-info, .inter-index .article-info {
    justify-content: unset;
}

.french-index-left .article-title, .inter-index .article-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.french-index-left .article-summary, .inter-index .article-summary {
    font-size: 0.8rem;
    color: #cccccc;
}

.h1-index {
    font-weight: bold;
    margin: 20px 50px;
    font-family: 'Baskerville', serif;
    font-size: 2.6rem;
}

.pagination-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.pagination-container button {
    padding: 10px 15px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    cursor: pointer;
    border-radius: 5px;
}

.pagination-container button:hover,
.pagination-container button.active {
    background-color: #bb86fc;
    color: white;
    border-color: #bb86fc;
}

#filter-buttons {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    border-bottom: 1px solid #ccc;
    flex-wrap: wrap;
}

#filter-buttons button {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border: 2px solid #d9d9d9;;
    cursor: pointer;
    border-radius: 50px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

#filter-buttons button:hover,
#filter-buttons button.active {
    border : 2px solid #bb86fc;
}

@media (max-width: 1124px) {
    .french-index-left, .inter-index {
        max-height: none;
        padding-left: 0;
    }

    .french-index-left .article-image, .inter-index .article-image {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .inter-index {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        border-bottom: 1px solid #ccc;
        padding-bottom: 30px;
        width: 90%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .french-index-container {
        flex-direction: column;
        gap: 20px;
    }

    .french-index-left {
        width: 80%;
        margin: 0 auto;
    }

    .inter-index {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .inter-index .article-summary {
        display: none;
    }

    .french-index-right {
        width: 100%;
        border-left: none;
        padding-left: 0;
    }
    
    .french-index-right .prefab-link .items {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        /* diviser en deux colonnes */
        width: 100%;

    }

    .french-index-left .article-image {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .french-index-left .article-title {
        font-size: 1.6rem;
    }

    .french-index-left .article-summary {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #french-index {
        width: 90%;
    }

    .french-index-right {
        width: 100%;
        border-left: none;
        padding-left: 0;
    }

    .french-index-left, .inter-index {
        width: 100%;
        border-bottom: none;
    }

    .french-index-left .article-image, .inter-index .article-image {
        max-height: 200px;
    }

    .french-index-left .article-title, .inter-index .article-title {
        font-size: 1.2rem;
    }

    .french-index-left .article-summary, .inter-index .article-summary {
        display: none;
    }

    .pagination-container {
        margin: 20px 0 40px 0;
    }

    .h1-index {
        margin: 20px 0;
    }
}

.calendar-aside {
    flex: 1;
    background: #232323;
    border-radius: 12px;
    padding: 10px 10px;
    min-width: 320px;
    box-shadow: 0 2px 8px #0002;
    max-height: 330px;
    overflow-y: auto;
}
.calendar-aside h3 {
    text-align: center;
    font-size: 1.5em;
    margin: 0 0 5px 0;
    font-family: 'Baskerville', serif;
    color: #bb86fc;
    letter-spacing: 1px;
}
.calendar-aside #calendar-controls {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-evenly;
    margin-bottom:12px;
}
.calendar-aside ul {
    margin: 0;
    padding: 0;
}
.calendar-aside li {
    margin-bottom: 18px;
    padding: 14px 12px 10px 12px;
    background: #292929;
    border-radius: 8px;
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 1px 4px #0001;
}
.calendar-aside form select {
    background: #292929;
    color: #fff;
    border-radius: 5px;
    border: 1px solid #444;
    padding: 4px 8px;
    font-weight: bold;
}
.calendar-aside input, .calendar-aside textarea {
    background: #292929;
    color: #fff;
    border-radius: 4px;
    border: 1px solid #444;
    padding: 4px 8px;
}
.calendar-aside .month-exist {
    background: none;
    border: none;
    color: #bb86fc;
    font-size: 1.3em;
    cursor: pointer;
    padding: 8px 18px;
}
.calendar-aside .month-not-exist {
    background:#292929;
    color:#fff;
    border-radius: 5px;
    border: 1px solid #444;
    padding: 4px 8px;
    font-weight: bold;
}
.calendar-aside .event-item {
    margin-bottom:18px;
    padding:14px 12px 10px 12px;
    background:#292929;
    border-radius:8px;
    display:flex;
    align-items:flex-start;
    gap:12px;
    box-shadow:0 1px 4px #0001;
}
.calendar-aside .event-icon {
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    background:#232323;
    border-radius:50%;
    border:2px solid #bb86fc;
    font-size:1.1em;
}

/* Light mode for calendar */
.section_index.light-mode .calendar-aside {
    background: #f9f9f9;
    box-shadow: 0 2px 8px #0001;
}
.section_index.light-mode .calendar-aside h3 {
    color: #0055a4;
}
.section_index.light-mode .calendar-aside li {
    background: #fff;
    box-shadow: 0 1px 4px #0001;
}
.section_index.light-mode .calendar-aside form select,
.section_index.light-mode .calendar-aside input,
.section_index.light-mode .calendar-aside textarea {
    background: #f0f0f0;
    color: #222;
    border: 1px solid #bbb;
}
.section_index.light-mode .calendar-aside .month-exist {
    color: #0055a4;
}
.section_index.light-mode .calendar-aside .month-not-exist {
    background: #f0f0f0;
    color: #222;
    border: 1px solid #bbb;
}
.section_index.light-mode .calendar-aside .event-item {
    background: #fff;
    box-shadow: 0 1px 4px #0001;
}
.section_index.light-mode .calendar-aside .event-icon {
    background: #f9f9f9;
    border: 2px solid #0055a4;
    color: #0055a4;
}
@media (max-width: 1440px) {
    .article-summary {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 10; /* Nombre de lignes à afficher */
    }
}

@media (max-width: 1124px) {
    .calendar-aside {
        min-width: 100%;
    }
    .actu-last-news-main {
        flex-direction: column-reverse;
    }
}

