/* 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 {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    border-bottom: 2px solid rgba(217, 4, 41, 0.3);
    padding: 0 !important;
    height: 110px;
    position: relative;
    overflow: hidden;
}

#actu-flash-brief::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(217, 4, 41, 0.5), transparent);
}

.section_index.light-mode#actu-flash-brief {
    background: linear-gradient(135deg, #f8f9fa, #f0f2f5);
    border-bottom-color: rgba(0, 85, 164, 0.2);
}

/* Badge latéral gauche */
.flash-header {
    background: linear-gradient(135deg, #d90429, #ef4444);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 18px;
    font-weight: 800;
    font-size: 0.65rem;
    gap: 6px;
    text-align: center;
    box-shadow: 0 0 20px rgba(217, 4, 41, 0.4);
    border-right: 2px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.flash-header i {
    font-size: 1.3rem;
    animation: pulse-flash 2s ease-in-out infinite;
}

@keyframes pulse-flash {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Conteneur de défilement */
.actu-flash-brief-container {
    display: flex;
    overflow-x: auto;
    gap: 0;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(217, 4, 41, 0.5) transparent;
    scroll-behavior: smooth;
}

.actu-flash-brief-container::-webkit-scrollbar {
    height: 4px;
}

.actu-flash-brief-container::-webkit-scrollbar-track {
    background: transparent;
}

.actu-flash-brief-container::-webkit-scrollbar-thumb {
    background: rgba(217, 4, 41, 0.5);
    border-radius: 2px;
}

.actu-flash-brief-container::-webkit-scrollbar-thumb:hover {
    background: rgba(217, 4, 41, 0.8);
}

.actu-flash-brief-item {
    flex: 0 0 420px;
    display: flex;
    padding: 14px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.actu-flash-brief-item:hover {
    background: rgba(217, 4, 41, 0.08);
    padding: 14px 20px;
}

.actu-flash-brief-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: transparent;
    transition: background 0.3s ease;
}

.actu-flash-brief-item:hover::after {
    background: rgba(217, 4, 41, 0.6);
}

/* Partie Date/Heure */
.brief-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 55px;
    border-right: 2px solid rgba(187, 134, 252, 0.4);
    margin-right: 16px;
    padding-right: 12px;
    gap: 2px;
}

.brief-date {
    font-size: 0.7rem;
    opacity: 0.6;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.brief-time {
    font-size: 1.1rem;
    font-weight: 900;
    background: linear-gradient(135deg, #bb86fc, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Partie Texte */
.brief-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    flex: 1;
}

.brief-title {
    margin: 0 0 4px 0 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff !important;
    letter-spacing: 0.3px;
}

.brief-text {
    margin: 0 !important;
    font-size: 0.78rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #b0b0b0 !important;
    font-weight: 400;
}

/* État Important */
.actu-flash-brief-item.important {
    background: rgba(217, 4, 41, 0.12);
}

.actu-flash-brief-item.important .brief-meta {
    border-right-color: #d90429;
    animation: pulse-important 2s ease-in-out infinite;
}

.actu-flash-brief-item.important .brief-time {
    color: #d90429 !important;
    -webkit-text-fill-color: #d90429 !important;
}

.actu-flash-brief-item.important .brief-title {
    color: #ffcccc !important;
}

@keyframes pulse-important {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Light Mode */
.section_index.light-mode .flash-header {
    background: linear-gradient(135deg, #0055a4, #1d4ed8);
    box-shadow: 0 0 20px rgba(0, 85, 164, 0.3);
}

.section_index.light-mode .brief-title {
    color: #1a1a1a !important;
}

.section_index.light-mode .brief-text {
    color: #555 !important;
}

.section_index.light-mode .actu-flash-brief-item {
    border-right-color: #e0e0e0;
}

.section_index.light-mode .actu-flash-brief-item:hover {
    background: rgba(0, 85, 164, 0.08);
}

.section_index.light-mode .brief-meta {
    border-right-color: rgba(0, 85, 164, 0.3);
}

.section_index.light-mode .brief-time {
    background: linear-gradient(135deg, #0055a4, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive */
@media (max-width: 768px) {
    #actu-flash-brief {
        height: auto;
        min-height: 120px;
    }

    .flash-header {
        padding: 0 12px;
        font-size: 0.6rem;
        min-height: 120px;
    }

    .actu-flash-brief-item {
        flex: 0 0 320px;
        padding: 12px 16px;
    }

    .brief-meta {
        min-width: 45px;
        margin-right: 12px;
        padding-right: 8px;
    }

    .brief-title {
        font-size: 0.88rem !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .brief-text {
        font-size: 0.72rem !important;
    }
}

@media (max-width: 480px) {
    #actu-flash-brief {
        height: auto;
        min-height: 140px;
    }

    .flash-header {
        padding: 0 10px;
        font-size: 0.55rem;
        min-height: 140px;
    }

    .actu-flash-brief-item {
        flex: 0 0 280px;
        padding: 12px 14px;
    }

    .brief-meta {
        min-width: 40px;
        margin-right: 10px;
        padding-right: 8px;
    }

    .brief-time {
        font-size: 0.9rem;
    }

    .brief-title {
        font-size: 0.8rem !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .brief-text {
        font-size: 0.65rem !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;
    }
}

