/* ---- BASE ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: Verdana, Geneva, sans-serif;
    background-color: #1a2f4a;
    color: #00ffff;
    margin: 0;
    padding: 0;
}

/* ---- STRUCTURE PRINCIPALE ---- */
main, .news-container {
    max-width: 800px;
    background: linear-gradient(145deg, #264766, #1e3a57);
    border-radius: 15px;
    border: #00ffff44;
    box-shadow: 0 0 10px #00ffff, inset 0 0 15px #000;
}

h1, h2, h3 {
    text-align: center;
    color: #00ffff;
    margin-bottom: 10px;
}

h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; margin-top: 30px; }

/* ---- NEWS CARD ---- */
.news-card {
    background: #1c3656;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #00ffff;
    border-radius: 6px;
    box-shadow: 0 0 8px #00ffff44;
}

.news-card p, .news-meta {
    color: #aefeff;
}

/* ---- TITRE + CATÉGORIE ---- */
.title-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 12px 16px;
    background-color: #1f2a36;
    border-radius: 6px;
    color: #f0f0f0;
}

.title-category .left {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex: 1;
    min-width: 0; /* évite débordement */
}

.title-category h2 {
    margin: 0;
    font-size: 1.4em;
    font-weight: normal;
    color: #fff;
}

.title-category .category {
    font-size: 0.9em;
}

.title-category .separator {
    color: #bbb;
    user-select: none;
}

.title-category .right {
    white-space: nowrap;
    font-size: 0.9em;
    color: #666;
    flex-shrink: 0;
}

/* ---- EXCERPT ---- */
.news-excerpt {
    background-color: #1e2a38;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    color: #f0f0f0;
}

.news-excerpt p {
    margin: 0 0 10px;
}

.news-excerpt img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* centrer l'image si tu veux */
}

.read-more {
    display: inline-block;
    background-color: #3366cc;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-left: 200px;  /* Décale le lien "Lire plus" à gauche */
}

.read-more:hover {
    background-color: #274b8f;
    transform: scale(1.03);
}

/* ---- MÉTA ---- */
.news-meta {
    font-size: 0.9em;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.news-meta.bottom-meta {
    background-color: #273340;
    padding: 10px 15px;
    border-radius: 6px;
    color: #e0e0e0;
    margin-top: 15px;
    font-size: 0.95em;
}

/* ---- PAGINATION ---- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 12px;
    background: #173555;
    color: #00ffff;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

.pagination a.active {
    background: #00ffff;
    color: #0b1a2c;
    font-weight: bold;
}

.pagination a:hover {
    background: #00cccc;
}

/* ---- TABLEAU STYLE NEON ---- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
    box-shadow: 0 0 10px #00ffff44;
    border: 1px solid #00ffff33;
}

thead th, tbody td {
    padding: 10px 12px;
    text-align: center;
    color: #aefeff;
}

thead th {
    background-color: #173555;
    text-shadow: 0 0 3px #0ff;
    border-bottom: 1px solid #00ffff44;
}

tbody tr {
    background-color: #1c3656;
}

tbody tr:nth-child(even) {
    background-color: #2b4e6d;
}

tbody td {
    border: 1px solid #00ffff22;
}

tbody a {
    color: #00ccff;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 0 2px #00ffff;
}

tbody a:hover {
    color: #fff;
    text-shadow: 0 0 8px #00ffff;
}

/* ---- FORMULAIRES ---- */
.comment, .response {
    background-color: #264766;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px #00ffff22;
}

/* Meta info dans commentaires */
.comment .meta, .response .meta {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #aefeff;
}

/* Champs de formulaire */
textarea, input[type="text"], input[type="email"] {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #1c3656;
    border: 1px solid #00ffff33;
    color: #aefeff;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

/* Bouton */
button {
    padding: 10px 20px;
    background-color: #00ffff;
    border: none;
    color: #0b1a2c;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #00cccc;
}

/* ---- RESPONSIVE TABLE ---- */
@media screen and (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
    }

    td {
        padding-left: 50%;
        text-align: right;
        position: relative;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        color: #00ffffaa;
        font-weight: bold;
    }
}

/* ---- RESPONSIVE TITLE-CATEGORY ---- */
@media (max-width: 500px) {
    .title-category {
        flex-direction: column;
        align-items: flex-start;
    }

    .title-category .right {
        margin-top: 5px;
    }
}

/* ---- RUBRIQUE ---- */
.rubrique {
  list-style: none;
  margin-bottom: 1em;
}

body, #menu, #menu > ul, #menu > ul > li.rubrique > .rubrique-header {
  margin: 0;
  padding: 0;
}

.rubrique-header {
  /* conserve ce que tu as déjà */
  position: relative;
  line-height: 50px;
  padding-left: 230px; /* laisse l'espace pour l'image */
  font-weight: bold;
  font-size: 1.2em;
  color: #00ffff; /* couleur cyan clair */
  background-color: transparent;
  border: none;
  text-align: center; /* centre le texte */
  margin-bottom: 0px; /* réduit l'espace sous le header (avant le sous-menu) */
}

.rubrique-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 220px;
  height: 50px;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
}



.rubrique ul li {
  font-size: 0.95em;
  color: #aefeff; /* par exemple une couleur plus douce, si tu veux */
}
        /* CSS pour afficher l'image rubrique.png en fond des titres du menu */
        #menu > ul > li.rubrique {
            list-style: none;
            margin-bottom: 20px;
        }
        #menu > ul > li.rubrique > .rubrique-header {
            position: relative;
            background: url('/stylesheet/images/rubrique.png') no-repeat left center;
            min-height: 50px;
            line-height: 50px;
            font-weight: bold;
            font-size: 1.2em;
        }
        #menu > ul > li.rubrique ul {
            padding-left: 20px;
            margin-top: 0;
            list-style: disc inside;
        }
        #menu > ul > li.rubrique > strong {
            display: none;
        }
#menu > ul > li.rubrique {
    margin: 0px; /* réduit de 20px à 10px par ex. */
}

/* Animaation zoom et dézoom sur les photos dans le news */
#lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#lightbox-overlay.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px #000;
    transform: scale(0.8);
    animation: zoomIn 0.3s ease forwards;
}

#lightbox-overlay.fade-out #lightbox-image {
    animation: zoomOut 0.3s ease forwards;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes zoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.8); opacity: 0; }
}

section h1 {
    font-size: 2rem;    /* Taille cohérente pour un h1 */
    margin: 0 0 1rem 0; /* Marge en bas pour espacer le contenu */
}