/* ============================================================
   BLOG - PAGE ACCUEIL (blog.php)
   ============================================================ */

/* --- Container principal --- */
.container {
    width: 80%;
    max-width: 1400px;
    margin: 160px auto 0 auto;
    padding: 0;
}

.container header {
    display: flex;
    gap: 15px;
    width: 100%;
    height: 450px;
    margin-bottom: 30px;
}

.container header a {
    text-decoration: none;
    color: #1a1a1a;
}

/* --- Header left (article principal) --- */
.header_left {
    width: 50%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.header_left article {
    width: 100%;
    height: 100%;
    position: relative;
}

.header_left figure {
    width: 100%;
    height: 100%;
    margin: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.header_left figure:hover {
    transform: scale(1.03);
}

.header_left .voile {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6));
    display: flex;
    align-items: flex-end;
}

.header_left .voile img {
    display: none;
}

.lien_top_left {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 1.4em;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    line-height: 1.3;
    max-width: 90%;
}

/* --- Header right (2 articles) --- */
.header_right {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header_right article {
    width: 100%;
    height: 50%;
    position: relative;
    overflow: hidden;
}

.header_right figure {
    width: 100%;
    height: 100%;
    margin: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.header_right figure:hover {
    transform: scale(1.03);
}

.header_right .voile {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6));
}

.header_right .voile img {
    display: none;
}

.lien_top_right {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    line-height: 1.3;
    max-width: 90%;
}

/* --- Section categorie mise en avant --- */
#middle_top {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e1e1e1;
    border-bottom: 1px solid #e1e1e1;
}

#middle_top > h3 {
    width: 100%;
    font-size: 1.3em;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#middle_top > h3 span {
    border-bottom: 3px solid #2137af;
    padding-bottom: 5px;
}

#middle_top > a {
    flex: 1;
    min-width: 250px;
    text-decoration: none;
    color: #1a1a1a;
}

#middle_top article {
    width: 100%;
    transition: transform 0.3s ease;
}

#middle_top article:hover {
    transform: translateY(-5px);
}

#middle_top article h2 {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.middle_top_trait {
    width: 40px;
    height: 3px;
    background-color: #2137af;
    margin-bottom: 15px;
}

#middle_top figure {
    width: 100%;
    height: 180px;
    margin: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

#middle_top figure img {
    display: none;
}

/* ============================================================
   BANNIERE NEWSLETTER
   ============================================================ */

#banniere {
    width: 100%;
    background-color: #000266;
    padding: 40px 0;
    margin: 0;
    text-align: center;
}

#banniere h3 {
    color: white;
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

#form_banniere {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

#form_banniere .form_nom,
#form_banniere .form_email {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#form_banniere label {
    color: white;
    font-size: 0.85em;
    margin-bottom: 5px;
}

#form_banniere input[type="text"],
#form_banniere input[type="email"] {
    height: 40px;
    width: 200px;
    padding: 0 10px;
    border: none;
    font-size: 0.95em;
}

#form_banniere input[type="submit"] {
    height: 40px;
    padding: 0 30px;
    background-color: #2137af;
    color: white;
    border: 2px solid white;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#form_banniere input[type="submit"]:hover {
    background-color: #1a2c8a;
}

#form_banniere .form_rgpd {
    width: 100%;
    text-align: center;
}

#form_banniere #label_rgpd {
    color: rgba(255,255,255,0.8);
    font-size: 0.8em;
}

/* ============================================================
   SECTION ARTICLES (middle) - blog.php & categories.php
   ============================================================ */

.container2 {
    width: 80%;
    max-width: 1400px;
    margin: 40px auto;
}

#middle {
    display: flex;
    gap: 40px;
    width: 100%;
}

#middle_left {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#middle_left article {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 30px;
    transition: transform 0.2s ease;
}

#middle_left article:hover {
    transform: translateX(5px);
}

#middle_left article figure {
    width: 280px;
    min-width: 280px;
    height: 180px;
    margin: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

#middle_left article figure img {
    display: none;
}

.asid {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asid h4 {
    font-size: 0.8em;
    color: #2137af;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
}

.asid h4 a {
    color: #2137af;
    text-decoration: none;
}

.asid h4 a:hover {
    text-decoration: underline;
}

.asid h2 {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.text_intro_accueil {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.lien_middle_left {
    color: #2137af;
    font-weight: 700;
    font-size: 0.9em;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.lien_middle_left:hover {
    text-decoration: underline;
}

/* --- Widget sidebar (les + lus, categories) --- */
#widget {
    flex: 1;
    min-width: 250px;
}

.middle_right {
    margin-bottom: 30px;
}

.middle_right h3 {
    font-size: 1.1em;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 3px solid #2137af;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.middle_right a {
    text-decoration: none;
    color: #1a1a1a;
}

.middle_right article {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform 0.2s ease;
}

.middle_right article:hover {
    transform: translateX(3px);
}

.middle_right figure {
    width: 80px;
    min-width: 80px;
    height: 60px;
    margin: 0;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.middle_right figure img {
    display: none;
}

.aside_les_plus_lus h2 {
    font-size: 0.9em;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
}

.aside_categories {
    margin-bottom: 5px;
}

.aside_categories a {
    text-decoration: none;
}

.aside_categories h2 {
    font-size: 0.95em;
    color: #1a1a1a;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s;
}

.aside_categories h2:hover {
    color: #2137af;
}

/* --- Pagination --- */
#pagination {
    width: 100%;
    text-align: center;
    margin: 40px 0;
}

.pagination {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: block;
    padding: 8px 15px;
    border: 1px solid #e1e1e1;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: #2137af;
    color: white;
    border-color: #2137af;
}

.page-item.active .page-link {
    background-color: #2137af;
    color: white;
    border-color: #2137af;
}

.page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
}

.page-item.hide {
    display: none;
}

/* --- Categories page --- */
#h1_categorie {
    font-size: 1.8em;
    color: #1a1a1a;
    margin: 160px 0 30px 0;
    text-align: center;
}

/* ============================================================
   PAGE ARTICLE (article.php)
   ============================================================ */

.containerArticle {
    display: flex;
    justify-content: center;
    width: 60%;
    max-width: 1200px;
    min-width: 1000px;
    height: auto;
    margin: 180px auto 40px auto;
    background-color: #fefefe;
}

.articleSide {
    width: 70%;
    min-width: 240px;
    height: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border: #d8d8d8 solid;
    border-width: 0 1px 0 0;
}

#imgarticle {
    width: 100%;
    height: 400px;
    overflow-y: hidden;
}

.articleSide img {
    width: 100%;
    height: auto;
}

.articleSide h1 {
    font-style: normal;
    color: #1a1a1a;
    font-size: 2em;
    line-height: 1.2em;
    letter-spacing: 1px;
    height: auto;
    width: 100%;
    min-width: 400px;
    text-align: left;
    margin-top: 40px;
}

.articleSide h2 {
    font-weight: bold;
    border-bottom: #e1e1e1 solid 1px;
    border-top: #e1e1e1 solid 1px;
    padding: 20px;
}

.articleSide p {
    font-style: normal;
    color: #888888;
    font-size: 1em;
    line-height: 24px;
    font-weight: 400;
    height: auto;
    width: 100%;
    min-width: 240px;
    text-align: left;
}

.articleSide form {
    width: 100%;
    height: auto;
}

.articleSide #author {
    width: 50%;
    height: 40px;
    margin: 15px 0;
}

.articleSide #comment {
    width: 100%;
    height: 250px;
    margin: 15px 0;
}

.commentaires {
    margin-bottom: 5px;
}

h3.commentaires {
    font-weight: 700;
    margin-top: 15px;
}

time.commentaires {
    font-size: 0.85em;
    color: #999;
}

p.commentaires {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

#loged_for_comment {
    display: none;
}

#not_loged_for_comment {
    color: #888;
    font-style: italic;
    font-size: 0.95em;
}

/* --- Sidebar article --- */
.sideSide {
    width: 30%;
    min-width: 300px;
    height: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.cadreNewsletter {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: auto;
    padding-bottom: 20px;
    background-color: #f1f1f1;
}

#newsletter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 60px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    color: white;
    background-color: #000266;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.side_form {
    width: 90%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin: 20px auto 0 auto;
}

.side_form input {
    padding-left: 15px;
}

.side_form #courriel,
.side_form #nom,
.side_form #email {
    font-style: normal;
    color: #1a1a1a;
    width: 100%;
    box-sizing: border-box;
    height: 50px;
    vertical-align: middle;
    opacity: 1;
    background-color: white;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.side_form ::placeholder {
    color: #1a1a1a;
    opacity: 1;
}

.side_form #envoie {
    width: 100%;
    height: 50px;
    background-color: #2137af;
    border: none;
    color: white;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
}

.side_form #envoie:hover {
    background-color: #13227c;
}

.side_form #nom:focus,
.side_form #courriel:focus,
.side_form #email:focus {
    outline: none;
}

#titre_tousArticles {
    text-decoration: none;
    color: #2137af;
    font-size: 1em;
    font-weight: bold;
    border: #2137af solid 2px;
    margin: 30px 0;
    width: 100%;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s;
}

#titre_tousArticles:hover {
    background-color: #2137af;
    color: white;
}

.sideSide h3 {
    width: 100%;
    text-align: left;
    font-weight: bold;
    margin-bottom: 0;
}

.articles_recents {
    width: 100%;
    height: auto;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
    padding: 15px 0;
}

.articles_recents a:link {
    color: #1a1a1a;
    text-decoration: none;
}

.articles_recents a:visited {
    color: #1a1a1a;
}

.articles_recents h2 {
    color: #1a1a1a;
    font-size: 1em;
    line-height: 1.2em;
    border-bottom: #e1e1e1 solid 1px;
    padding: 10px 0;
    transition: 0.3s ease;
}

.articles_recents h2:hover {
    transform: scale(1.05);
}

#messageArticle {
    width: 100%;
    height: 40px;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 20px;
    color: red;
}

#blog_message {
    width: 100%;
    text-align: center;
    color: green;
    font-weight: bold;
    margin: 10px 0;
}

/* ============================================================
   GESTION BLOG (admin)
   ============================================================ */

.gestblog {
    width: 50%;
    height: auto;
    margin: 200px auto 0 auto;
}

.gestblog #monTitre {
    width: 100%;
    height: 40px;
}

.gestblog #monArticle {
    width: 100%;
    height: 200px;
}

.gestblog #monIntro {
    width: 100%;
    height: 80px;
}

.gestblog #monAlt {
    width: 100%;
    height: 40px;
    margin-bottom: 50px;
}

/* --- Admin navigation --- */
.contenaire_admin {
    width: 80%;
    margin: 160px auto 40px auto;
}

.contenaire_menu_admin {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contenaire_menu_admin a {
    padding: 10px 20px;
    background-color: #2137af;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.contenaire_menu_admin a:hover {
    background-color: #13227c;
}

.contenaire_categorie {
    margin-bottom: 40px;
}

.supprimH3cat {
    font-weight: bold;
    margin: 20px 0;
}

#categories {
    margin-bottom: 30px;
}

#cat_list,
#art_list {
    width: 100%;
    border-collapse: collapse;
}

#cat_list th,
#cat_list td,
#art_list th,
#art_list td {
    padding: 10px;
    border-bottom: 1px solid #e1e1e1;
    text-align: left;
}

#cat_list th,
#art_list th {
    background-color: #f5f5f5;
    font-weight: bold;
}

#art_list figure {
    width: 80px;
    height: 50px;
    background-size: cover;
    background-position: center;
    margin: 0;
}

#suppArticle {
    padding: 7px;
    background-color: rgb(255, 96, 96);
    color: white;
    text-decoration: none;
}

.suppArticle a {
    color: #333;
}

.contenaire_article {
    margin-top: 40px;
}

/* --- Navigation lists --- */
.navigation ul li {
    width: 400px;
    margin-left: 50px;
    border-bottom: #e1e1e1 solid 1px;
    padding: 10px;
}

.navigation ul li a {
    color: #1a1a1a;
    text-decoration: none;
}

.navigation ul li a:hover {
    font-weight: bold;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1650px) {
    .container {
        width: 90%;
    }

    .container2 {
        width: 90%;
    }
}

@media (max-width: 1300px) {
    .container header {
        flex-direction: column;
        height: auto;
    }

    .header_left,
    .header_right {
        width: 100%;
    }

    .header_left {
        height: 350px;
    }

    .header_right {
        flex-direction: row;
        height: 200px;
    }

    .containerArticle {
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-width: 200px;
        margin: 110px auto 0 auto;
        padding: 0 2%;
    }

    .articleSide {
        width: 95%;
        min-width: 240px;
        order: -1;
        border: unset;
        padding: 0 20px;
    }

    .articleSide h1 {
        width: 90%;
        font-size: 1.4em;
        min-width: 240px;
    }

    .articleSide p {
        width: 99%;
        padding: 0 10px;
    }

    .sideSide {
        width: 100%;
        min-width: 240px;
        order: 1;
    }

    .articleSide #author {
        width: 90%;
        height: 40px;
    }

    #imgarticle {
        width: 100%;
        height: auto;
        overflow-y: hidden;
    }

    #middle {
        flex-direction: column;
    }

    #middle_left article {
        flex-direction: column;
    }

    #middle_left article figure {
        width: 100%;
        height: 200px;
    }

    .contenaire_admin {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        margin-top: 100px;
    }

    .container2 {
        width: 95%;
    }

    .header_right {
        flex-direction: column;
        height: auto;
    }

    .header_right article {
        height: 200px;
    }

    #middle_top {
        flex-direction: column;
    }

    #middle_top figure {
        height: 150px;
    }

    #form_banniere {
        flex-direction: column;
        align-items: center;
    }

    #form_banniere input[type="text"],
    #form_banniere input[type="email"] {
        width: 100%;
    }

    .gestblog {
        width: 90%;
        margin-top: 120px;
    }

    .containerArticle {
        margin-top: 80px;
    }

    #h1_categorie {
        margin-top: 100px;
    }
}
