/* =====================================================
   1. GLOBAL
===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;

    margin: 0;
    background: #f4f6f8;
    color: #333;

    text-align: justify;
    hyphens: auto;
    overflow-x: hidden; /* évite les débordements horizontaux sur mobile */
}

img,
iframe {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   PAGES ÉDITORIALES (À PROPOS, COMITÉ, SOUMISSION, ETC.)
===================================================== */
.page-content {
    max-width: 1100px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.page-content h1 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 1.6rem;
}

.page-content h2,
.page-content h3 {
    color: #0a3d62;
}

.page-content h2 {
    border-bottom: 2px solid #0a3d62;
    padding-bottom: 5px;
    margin-top: 1.8em;
    margin-bottom: 0.9em;
}

.page-content h3 {
    margin-top: 1.4em;
    margin-bottom: 0.75em;
}

.page-content p {
    text-align: justify;
    margin: 0 0 1.05em 0;
}

/* Listes dans les pages éditoriales (évite le rendu navigateur "aléatoire") */
.page-content ul,
.page-content ol {
    margin: 0 0 1em 1.4em;
    padding: 0;
}

.page-content li {
    margin: 0.2em 0;
}

/* Encadrés "important" utilisés dans les pages éditoriales */
.page-content .important {
    background: #f0f4f8;
    padding: 15px;
    border-left: 5px solid #0a3d62;
    margin: 20px 0;
    border-radius: 6px;
}

/* Contact page */
.page-content .contact-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 25px 0;
}

.page-content .contact-info {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-content .info-box {
    flex: 1;
    background: #f4f6f9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.page-content .info-box h4 {
    font-size: 1rem;
    color: #1e3c72;
    margin-top: 0; /* Evite une grosse marge venant de la règle globale h4 */
    margin-bottom: 6px;
}

.page-content form input,
.page-content form textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    font-size: 1rem;
    box-sizing: border-box; /* Evite le débordement (padding + border inclus dans la largeur) */
}

.page-content form textarea {
    min-height: 160px;
    resize: vertical;
}

.page-content form input:focus,
.page-content form textarea:focus {
    outline: none;
    border-color: #1e3c72;
}

.page-content .success {
    background: #e6f6ea;
    color: #256029;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.95rem;
}

.page-content .error {
    background: #ffe5e5;
    color: #b30000;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.95rem;
}

.page-content .map {
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 600px) {
    .page-content .contact-info {
        flex-direction: column;
    }
}

/* Ajustements pour pages éditoriales spécifiques (Infos soumission) */
.page-content.page-content-editorial {
    padding: 28px 30px;
}

.page-content.page-content-editorial h1,
.page-content.page-content-editorial h2,
.page-content.page-content-editorial h3 {
    margin-top: 1.2em;
    margin-bottom: 0.5em;
}

.page-content.page-content-editorial p {
    margin: 0 0 1em 0;
}

.page-content.page-content-editorial ul {
    margin-left: 1.4em;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 15px;
}

.page-content table th,
.page-content table td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    vertical-align: top;
}

.page-content table th {
    background-color: #e9eef3;
}

@media (max-width: 768px) {
    .page-content {
        padding: 25px 15px;
        margin: 20px 10px;
    }

    .container {
        padding: 15px;
        margin: 20px 10px;
    }
}

/* =====================================================
   INDEX (ACCUEIL)
===================================================== */
.search-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.search-box input[type="text"],
.search-box select {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid rgba(11, 42, 74, 0.25);
    background: #fff;
}

.search-box select {
    min-width: 240px;
}

.btn-primary {
    background-color: #0b2a4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #d9a441;
    color: #1f2a40;
}

.section-title {
    margin-top: 0;
    margin-bottom: 12px;
}

.index-more {
    margin-top: 20px;
    text-align: center;
}

.index-more a {
    color: #0b2a4a;
    font-weight: 700;
    text-decoration: underline;
}

/* =====================================================
   ARTICLE PAGE (DÉTAIL)
   ===================================================== */
.article-card {
    padding: 30px;
    justify-content: flex-start;
}

.article-meta {
    margin: 10px 0 20px 0;
    padding: 14px 16px;
    background: #f4f6f8;
    border-left: 6px solid #0b2a4a;
    border-radius: 8px;
}

.article-meta-line {
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.article-meta-line.small {
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-left: 8px;
}

.badge-special {
    background: #d9a441;
    color: #1f2a40;
}

.article-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn-secondary {
    background-color: #0b2a4a;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #d9a441;
    color: #1f2a40;
}

/* Le HTML TinyMCE est inséré dans .article-content: on enlève les paddings génériques */
.article-card .article-content {
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-card .article-content p {
    margin: 0 0 1.1em 0;
}

.article-card .article-content a {
    color: #0b2a4a;
    text-decoration: underline;
}

.article-card .article-content img {
    max-width: 100%;
    height: auto;
}

.article-card .article-content h1,
.article-card .article-content h2,
.article-card .article-content h3 {
    margin: 1.6em 0 0.7em 0;
    line-height: 1.25;
    color: #0b2a4a;
}

.article-card .article-content ul,
.article-card .article-content ol {
    margin: 0 0 1.1em 1.4em;
}

.article-card .article-content blockquote {
    margin: 1.2em 0;
    padding: 12px 16px;
    border-left: 4px solid #0b2a4a;
    background: #f4f6f8;
    border-radius: 8px;
}

.article-card .article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.98rem;
}

.article-card .article-content th,
.article-card .article-content td {
    border: 1px solid #ccc;
    padding: 10px 12px;
    vertical-align: top;
}

.article-card .article-content th {
    background: #e9eef3;
    font-weight: 800;
}

/* Paragraphes */
p {
    margin: 0 0 1.2em 0;
}

p:last-child {
    margin-bottom: 0;
}

/* Conteneur général */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: "Times New Roman", Times, serif !important;
}

/* Zone de lecture éditoriale */
.article,
.article-content,
.content {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* =====================================================
   2. TITRES – HIÉRARCHIE PROFESSIONNELLE
===================================================== */
h1, h2, h3, h4 {
    font-family: "Montserrat", "Arial", sans-serif;
    line-height: 1.3;
    margin-top: 2.2em;
    margin-bottom: 0.6em;
    color: #0b2a4a;
}

h1 { font-size: 2.4rem; font-weight: 800; }
h2 { font-size: 1.8rem; font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }


/* =====================================================
   3. HEADER / NAVIGATION
===================================================== */
.site-header {
    background-color: #1f3c88;
    color: #fff;
    padding: 10px 20px;
    border-bottom: 3px solid #0ce71b;
    position: relative;
    z-index: 1000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}


.logo {
    height: 80px;
}

.brand-text {
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* Navigation */
.nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
}

.nav a,
.dropdown .dropbtn {
    font-family: "Montserrat", "Arial", sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.03em;

    color: #fff;
    text-decoration: none;
    padding: 8px 0;
    white-space: nowrap;
    line-height: 1.2;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: #d9a441;
}

/* Dropdown desktop */
.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    flex-direction: column;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
}


.dropdown-content a {
    padding: 10px 15px;
    color: #000;
    text-decoration: none;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

/* Hover desktop */
@media(min-width: 769px) {
    .dropdown:hover .dropdown-content {
        display: flex;
    }
}

/* Hamburger desktop hidden */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

/* ================= RESPONSIVE MOBILE ================= */
@media(max-width: 768px) {

    /* Header NE BOUGE PAS */
    .header-container {
        position: relative;
        z-index: 1001;
    }


    .brand {
        flex: 1;
    }

    .logo {
        height: 60px;
    }

    .brand-text {
        font-size: 12px;
        line-height: 1.2;
    }

    /* Hamburger visible */
    .hamburger {
        display: flex;
        z-index: 1100;
    }

/* Menu hors du flux */
    .nav {
        position: fixed;
        top: 0;
        left: -280px; /* caché à gauche */
        width: 280px;
        height: 100vh;
        background-color: rgba(31, 60, 136, 0.85);
        flex-direction: column;
        padding-top: 90px; /* espace header */
        transition: left 0.35s ease;
        z-index: 1000;
    }

    .nav.open {
        left: 0; /* glisse vers la droite */
    }

    /* Alignement uniforme TOUS les items */
    /* Items */
    .nav > a,
    .nav > .dropdown {
        padding: 10px 20px;
    }
    .nav a,
    .dropdown .dropbtn {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        color: #fff;
        text-align: left;
        white-space: nowrap;
    }

    /* Dropdown mobile */
    /* Dropdown mobile */
    .dropdown-content {
        position: relative;
        top: 0;
        left: 0;
        background: transparent;
        box-shadow: none;
        padding-left: 15px;
    }

  .dropdown.open .dropdown-content {
        display: flex;
    }

    .dropdown-content a {
        color: #fff;
        padding: 8px 0;
    }

    /* Chevron animation */
    .chevron {
        margin-left: auto;
        transition: transform 0.3s ease;
    }

    .dropdown.open .chevron {
        transform: rotate(180deg);
    }
}

/* ================= RESPONSIVE HEADER (TABLET) ================= */
@media (max-width: 1100px) and (min-width: 769px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 16px;
    }
}


/* =====================================================
   3. HERO SLIDER (DESKTOP)
===================================================== */
.hero-slider {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: url("../img/slide.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, 0.55);
}

/* Texte */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    max-width: 1100px;
}


.hero-content h1,
.hero-content h2 {
    font-family: "Montserrat", sans-serif;
    line-height: 1.1;
}


.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-content h1 span {
    display: block;
    font-weight: 600;
    font-size: 2.2rem;
}

.hero-content h2 {
    font-size: 3.8rem;
    font-weight: 900;
    color: #d4af37;
    margin-top: 10px;
    letter-spacing: 3px;
}


/* =====================================================
   4. ARTICLES / CARDS
===================================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    width: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0b2a4a;
}

.card .btn {
    align-self: flex-start;
    background-color: #0b2a4a;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
}

.card .btn:hover {
    background-color: #d9a441;
}


/* =====================================================
   5. PAGINATION
===================================================== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 12px;
    background: #f0f0f0;
    color: #0b3c5d;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a.active,
.pagination a:hover {
    background: #0b3c5d;
    color: #fff;
}


/* =====================================================
   6. FOOTER
===================================================== */
.site-footer {
    text-align: center;
    padding: 15px;
    background: #f2f2f2;
    margin-top: 40px;
}


/* =====================================================
   7. ANIMATIONS
===================================================== */
@keyframes slide {
    0%, 45% { transform: translateX(0); }
    50%, 95% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}


/* =====================================================
   8. RESPONSIVE MOBILE (UNE SEULE SECTION)
===================================================== */
@media (max-width: 768px) {
    /* Hero */
    .hero-slider {
        height: 75vh;
    }

    .hero-slide {
        background-image: url("../img/slide_mob.png");
        background-position: center top;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content h1 span {
        font-size: 1.4rem;
    }

    .hero-content h2 {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    /* Cards */
    .cards-container {
        grid-template-columns: 1fr;
    }

    .card h3 {
        font-size: 16px;
    }

    .card .btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* Evite le débordement visuel (formulaires + cartes) sur mobile */
    .page-content .card {
        padding: 16px;
    }

    /* Table responsive */
    .articles-table table,
    .articles-table thead,
    .articles-table tbody,
    .articles-table th,
    .articles-table td,
    .articles-table tr {
        display: block;
    }

    .articles-table thead {
        display: none;
    }

    .articles-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 10px;
    }

    .articles-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 12px;
    }

    .articles-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-transform: uppercase;
    }

    .articles-table .btn {
        padding: 5px 10px;
        font-size: 12px;
    }
}

