/* =========================
   VARIABLES CSS
========================= */
:root {
    /* Couleurs */
    --color-base: #c69749;
    --color-base-dark: #7c5c27;
    --color-bg-dark: #111;
    --color-bg-medium: #222;
    --color-bg-light: #eee;
    --color-bg-lighter: #aaa;
    --color-bg-quote: #ccc;
    --color-text-dark: #222;
    --color-text-medium: #555;
    --color-text-light: #ccc;
    --color-text-lighter: #aaa;
    --color-border: #333;
    --color-boxshadow-medium: #555;
    --color-boxshadow-light: #ccc;
}

/* ===============================
   Base générale du blog
=============================== */
.fenetre-blog {
    gap:2rem;
    padding:1rem 2rem;
    max-width:1200px;
    margin:0 auto;
}
.fenetre-blog a {
    color: #d32f2f;
    text-decoration: none;
}
.fenetre-blog a:hover {
    text-decoration: underline;
}
.blog-article {
    text-align: justify;
    background-color:var(--color-bg-light);
    padding:1rem 100px 50px 100px;
    border-radius:30px;
    align-items: center;
}

/* ===============================
   ARTICLE COMPLET
=============================== */
.fenetre-blog .wp-article {
    max-width: 1200px;
    margin: 0 auto 40px 0;
}
.fenetre-blog .wp-article h1 {
    font-family: "Google Sans", sans-serif;
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    line-height: 1.2;
}
.fenetre-blog .wp-article .article-meta {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}
.fenetre-blog .wp-article .article-content img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 15px auto;
}
.fenetre-blog .wp-article .article-content p {
    margin-bottom: 15px;
}
.article-meta {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
}
.fenetre-blog .article-content {
    margin-top: 50px;
}

/* =========================
   CONTENU WORDPRESS
========================= */
.article-content img {
    max-width: 100%;
    height: auto;
}
.article-content figure {
    margin: 2rem auto;
}

/* =========================
   NAVIGATION BAS D’ARTICLE
========================= */
.blog-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ccc;
    font-size: 0.95rem;
}
.blog-navigation a {
    text-decoration: none;
    font-weight: 500;
    color: #c69749;
}
.blog-navigation a:hover {
    text-decoration: underline;
    font-weight: bold;
}
.nav-prev {
    text-align: left;
}
.nav-home {
    text-align: center;
    font-weight: 600;
}
.nav-next {
    text-align: right;
}

/* =========================
   RESPONSIVE MOBILE
========================= */
@media (max-width: 768px) {

    .blog-navigation {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .nav-prev,
    .nav-next,
    .nav-home {
        text-align: center;
        margin: 0.5rem 0;
    }
}

/* ===============================
   COMMENTAIRES DES ARTICLES
=============================== */
.wp-comments {
    margin-top: 40px;
    padding: 15px;
    border-top: 1px solid #ccc;
}
.comments-list {
    list-style: none;
    padding-left: 0;
}
.comments-list li {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.comment-author {
    font-weight: bold;
}
.comment-date {
    font-size: 0.85em;
    color: #666; }
.comment-form input, .comment-form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px; }
.comment-form button {
    padding: 10px 20px; }

/* ==============================================
   FORMULAIRE DE COMMENTAIRES - CHAMPS EN LIGNE
============================================== */

/* Container du formulaire en grid */
.comment-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
/* Les 3 premiers champs occupent une colonne chacun */
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: inline-block;
    width: 33%;
    margin: 0 auto;
    vertical-align: top;
}
.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
    font-size: 85%;
    text-align: left;
}
/* Le champ commentaire occupe toute la largeur */
.comment-form-comment {
    clear: both;
    width: 100%;
}
/* Bouton submit aussi */
.form-submit {
    grid-column: 1 / 4;
    margin-top: 10px;
    padding: 0 30px;
}

/* Version tablette : 2 colonnes */
@media (max-width: 992px) {
    .comment-form {
        grid-template-columns: repeat(2, 1fr);
    }
    .comment-form-author {
        grid-column: 1 / 2;
    }
    .comment-form-email {
        grid-column: 2 / 3;
    }
    .comment-form-url,
    .comment-form-comment,
    .form-submit {
        grid-column: 1 / 3;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .comment-form {
        grid-template-columns: 1fr;
    }
    .comment-form-author,
    .comment-form-email,
    .comment-form-url,
    .form-submit {
        width: 100%;
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
    .comment-form-author {
    margin-right: 0;
    }
    .comment-form-url {
        margin-left: 0;
    }
}

/* ==============================================
   COMPACTER LA ZONE COMMENTAIRES
============================================== */

/* Réduire l'espacement global de la zone commentaires */
.wp-comments {
    margin-top: 15px;
}
/* Titre de la section commentaires / Titre du formulaire */
.wp-comments h3,
.comment-reply-title {
    margin: 5px 0 10px 0;
    font-size: 1.2em;
}
/* Liste des commentaires existants */
.comment-list {
    margin-bottom: 15px;
}
/* Chaque commentaire individuel */
.comment {
    margin-bottom: 10px;
    padding: 8px;
}
/* Métadonnées du commentaire (auteur, date) */
.comment-metadata {
    margin-bottom: 5px;
    font-size: 0.85em;
}
/* Contenu du commentaire */
.comment-content {
    margin-bottom: 5px;
}
/* Formulaire de commentaire */
.comment-form {
    margin-top: 15px;
}
/* Champs du formulaire */
.comment-form p {
    margin-bottom: 8px;
}
/* Labels */
.comment-form label {
    margin-bottom: 2px;
    font-size: 0.9em;
}
/* Inputs et textarea */
.comment-form input[type="author"],
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    padding: 6px;
}
/* Zone de texte du commentaire */
.comment-form textarea {
    min-height: 80px;
}
/* Notes et textes explicatifs */
.comment-notes,
.comment-form-cookies-consent {
    margin-bottom: 8px;
    font-size: 0.85em;
}

/* ===============================
   LISTE DES ARTICLES
=============================== */
.fenetre-blog .wp-excerpt {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.fenetre-blog .wp-excerpt h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    margin-top: 0;
}
.fenetre-blog .wp-excerpt .excerpt {
    font-size: 1em;
    color: #444;
}
.excerpt-thumb {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    overflow: hidden;
}
.excerpt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 25px;
}
.excerpt-content {
    flex: 1;
}

/* ===============================
   Blocs cover (image avec texte superposé)
=============================== */
.fenetre-blog .wp-block-cover {
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 5px;
    color: white;
    text-align: center;
}
.fenetre-blog .wp-block-cover__background {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); /* assombrissement */
    z-index: 1;
}
.fenetre-blog .wp-block-cover img {
    width: 100%;
    height: auto;
    display: block;
}
.fenetre-blog .wp-block-cover::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.4); /* assombrissement */
    z-index: 1;
}
.fenetre-blog .wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
}

/* ===============================
   Figures et images insérées
=============================== */
.fenetre-blog figure.wp-block-image {
    margin: 20px 0;
    text-align: center;
}
.fenetre-blog figure.wp-block-image img {
    max-width: 100%;
    height: auto;
}
.fenetre-blog img.size-large {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
.fenetre-blog .wp-block-image.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.fenetre-blog .wp-block-image.alignleft {
    float: left;
    margin-right: 20px;
}
.fenetre-blog .wp-block-image.alignright {
    float: right;
    margin-left: 20px;
}
/* ===============================
    Blocs WordPress : Colonnes
=============================== */
.wp-block-columns {
    max-width: 80%;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 0 auto 2rem auto;
}
.wp-block-column {
    flex: 1;
}
/* Responsive : empilement sur mobile */
@media (max-width: 768px) {
    .wp-block-columns {
        flex-direction: column;
    }
}

/* ===============================
    Vidéos YouTube WordPress
=============================== */
.wp-block-embed.is-type-video {
    max-width: 50%;
    margin: 2.5rem auto;
}
.wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}
.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* Responsive : empilement sur mobile */
@media (max-width: 768px) {
    .wp-block-embed.is-type-video {
        max-width: 100%;
    }
}

/* ===============================
   Retours et liens
=============================== */
.fenetre-blog .retour-blog {
    margin-top: 25px;
    font-size: 0.9em;
}
.fenetre-blog hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 25px 0;
}

/* ===============================
   Responsive
=============================== */
@media (max-width: 768px) {
    .fenetre-blog {
        padding: 0;
    }
    .blog-article {
        padding: 1.5rem;
        border-radius: 0;
        font-size: 85%;
    }
    .fenetre-blog .wp-article h1,
    .fenetre-blog .wp-excerpt h3 {
        font-size: 1.5em;
    }
    .fenetre-blog .wp-block-cover .wp-block-cover__inner-container {
        padding: 20px 10px;
    }
    .wp-excerpt {
        flex-direction: column;
    }
    .excerpt-thumb {
        width: 100%;
        height: auto;
    }
    .excerpt-thumb img {
        height: auto;
    }
}

/* ==============================================
   BOUTONS ET FORMULAIRE COMMENTAIRES
============================================== */
/* Bouton principal "Commenter" */
.btn-show-comment {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin: 20px 0;
    transition: background 0.3s;
}
.btn-show-comment:hover {
    background: #0056b3;
}
/* Bouton "Répondre" sous chaque commentaire */
.comment-reply-link {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.3s;
}
.comment-reply-link:hover {
    background: #5a6268;
}
/* Bouton "Annuler" dans le titre */
#cancel-comment-reply {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}
#cancel-comment-reply:hover {
    background: #c82333;
}
/* Indentation des réponses */
.comment-children {
    margin-left: 30px;
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
}
.comment-reply {
    background: #f8f9fa;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}
/* Titre du formulaire */
.comment-reply-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}