/* Styles pour les articles */
.post {
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Titres */
.post h1,
.post h2,
.post h3 {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    color: #333;
}

/* Liens */
.post a {
    color: #0073aa;
    text-decoration: none;
}
.post a:hover {
    color: #005177;
    text-decoration: none;
}

/* Images dans les articles */
.post img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    margin-top: 20px;
}

/* Galerie d'images */
.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 30px;
}
.wp-block-gallery .wp-block-image {
    flex: 1 1 45%;
    max-width: 65%;
}

/* Conteneur principal de l'article */
.wp-block-post-content {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    text-align: left;
   
}

/* Bloc citation */
.wp-block-quote {
    font-style: italic;
    border-left: 4px solid #0073aa;
    padding-left: 15px;
    color: #666;
    text-align: left;
}

/* Boutons */
.wp-block-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    border-radius: 5px;
}
.wp-block-button:hover {
    background-color: #005177;
}

/* Conteneur principal de l'article */
.detailpost {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

/* Espacement vertical entre les éléments */
.detailpost p,
.detailpost ul,
.detailpost ol,
.detailpost blockquote,
.detailpost h1,
.detailpost h2,
.detailpost h3,
.detailpost h4,
.detailpost h5,
.detailpost h6,
.detailpost img,
.detailpost figure {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Titres */
.detailpost h1,
.detailpost h2,
.detailpost h3 {
    font-weight: bold;
    color: #333;
}

/* Liens */
.detailpost a {
    color: #0073aa;
    text-decoration: none;
}
.detailpost a:hover {
    color: #005177;
    text-decoration: none;
}

/* Images dans les articles */
.detailpost img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    margin-top: 20px;
}

/* Galerie d'images */
.detailpost .wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.detailpost .wp-block-gallery .wp-block-image {
    flex: 1 1 45%;
    max-width: 45%;
}
.wp-block-image img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Bloc citation */
.detailpost blockquote {
    font-style: italic;
    border-left: 4px solid #0073aa;
    padding-left: 15px;
    color: #666;
    line-height: 2;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Espacement entre les paragraphes dans les blockquotes */
.detailpost blockquote p {
    margin-bottom: 0.75rem;
}

/* Boutons */
.detailpost .wp-block-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    border-radius: 5px;
}
.detailpost .wp-block-button:hover {
    background-color: #005177;
}

/* Liste bien espacée */
.detailpost ul,
.detailpost ol {
    padding-left: 1.5rem;
}
.police {
    font-family: var(--font-peugeot), sans-serif !important;
}

/* ---------- RESPONSIVITÉ ---------- */
/* Petits écrans (smartphones) */
@media (max-width: 767px) {
    .post,
    .detailpost {
        padding: 15px;
    }
    .post h1,
    .detailpost h1 {
        font-size: 1.5rem;
    }
    .post h2,
    .detailpost h2 {
        font-size: 1.25rem;
    }
    .post h3,
    .detailpost h3 {
        font-size: 1.125rem;
    }
    .wp-block-gallery,
    .detailpost .wp-block-gallery {
        flex-direction: column;
        align-items: center;
    }
    .wp-block-gallery .wp-block-image,
    .detailpost .wp-block-gallery .wp-block-image {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .wp-block-button,
    .detailpost .wp-block-button {
        width: 100%;
        text-align: center;
    }
    .detailpost ul,
    .detailpost ol {
        padding-left: 1rem;
    }
}

/* Moyens écrans (tablettes) */
@media (min-width: 768px) and (max-width: 1024px) {
    .wp-block-gallery .wp-block-image,
    .detailpost .wp-block-gallery .wp-block-image {
        flex: 1 1 48%;
        max-width: 48%;
    }
}

/* Grands écrans (desktop) */
@media (min-width: 1025px) {
    .wp-block-gallery .wp-block-image,
    .detailpost .wp-block-gallery .wp-block-image {
        flex: 1 1 30%;
        max-width: 30%;
    }
}

/* Additional styles from your index.html */
@font-face {
    font-family: 'Peugeot';
    src: url('./fonts/PeugeotNew-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Peugeot', sans-serif;
    line-height: 1.6;
    color: #333;
}

:root {
    --primary-color: #c3002f;
    --primary-hover: #a0001f;
}

.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: left;
    position: relative;
}

.section-underline {
    width: 16.66%; /* Half of 33.33% */
    height: 8px; /* Doubled height */
    background: var(--primary-color);
    margin-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 380px; /* Fixed height for consistency */
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-blog {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-top: auto; /* Push to bottom */
}

.read-more-blog:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.read-more-blog i {
    margin-left: 0.25rem;
    font-size: 1rem;
}

/* Loader and Error styles */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.loader-circle {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 2rem;
    font-size: 1.1rem;
}

.blog-detail-header {
    margin-top: 80px; /* Adjust for fixed navbar */
    padding-top: 2rem;
    padding-bottom: 1rem;
    text-align: center;
}

.blog-detail-header h1 {
    font-size: 2.8rem;
    color: #333;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.blog-detail-main-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.blog-detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-detail-content p,
.blog-detail-content h1,
.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content ul,
.blog-detail-content ol,
.blog-detail-content blockquote,
.blog-detail-content img {
    margin-bottom: 1.5rem;
}

.related-articles-section {
    background-color: #f8f9fa;
    padding: 4rem 0;
    margin-top: 4rem;
}

.related-articles-section h3 {
    font-size: 2rem;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;

}


#article-text {
  max-width: 900px;       /* largeur limitée */
  margin: 0 auto;         /* centré */
  padding: 0 1rem;        /* marges intérieures */
}


/* ============================================= */
/*          PAGE DE DÉTAIL D'UN ARTICLE          */
/* ============================================= */

/* Conteneur principal et mise en page */
.main-container {
    padding-top: 80px; /* Espace pour la navbar fixe */
    background-color: #f9f9f9;
}

.blog-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr; /* Colonne unique par défaut pour mobile */
    gap: 2rem;
}

/* Colonne principale du contenu */
.main-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Entête de l'article */
.article-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1.5rem;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span {
    color: #333;
    font-weight: 500;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #222;
    text-transform: uppercase;
}

/* Métadonnées (auteur, date, catégorie) */
.post-meta {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item .fa-regular {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.category-tag {
    background-color: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    font-size: 0.8rem;
    margin-left: 0.3rem;
    transition: background-color 0.3s;
}

.category-tag:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Image principale */
.article-main-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-main-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Contenu de l'article (hérite de .detailpost) */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Pied de l'article (partage) */
.article-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-share span {
    font-weight: 600;
}

.social-share a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.social-share a:hover {
    background-color: var(--primary-color);
    color: white;
}


/* ============================================= */
/*                 BARRE LATÉRALE                */
/* ============================================= */
.sidebar {
    position: sticky;
    top: 100px; /* 80px (navbar) + 20px (margin) */
    align-self: start;
}

.widget {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-post-item {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}
.sidebar-post-item:last-child {
    border-bottom: none;
}
.sidebar-post-item:hover span {
    color: var(--primary-color);
}

.sidebar-post-item span {
    display: block;
    font-weight: 500;
    line-height: 1.4;
}

.sidebar-post-item small {
    color: #888;
    font-size: 0.8rem;
}

/* ============================================= */
/*           SECTION ARTICLES SIMILAIRES         */
/* ============================================= */
.related-articles-section {
    padding: 3rem 1rem;
    background-color: #fff;
}
.related-articles-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Styles pour les classes WordPress */
.post-content p, .post-content ul, .post-content ol { margin-bottom: 1.5rem; }
.post-content strong { font-weight: 700; }
.post-content a { color: var(--primary-color); text-decoration: underline; }
.post-content a:hover { text-decoration: none; }
.post-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 5px solid var(--primary-color);
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
}
.post-content blockquote p { margin: 0; }
.wp-block-gallery {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}
.wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wp-block-gallery.columns-3 { grid-template-columns: repeat(3, 1fr); }
.wp-block-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* ============================================= */
/*                 RESPONSIVITÉ                  */
/* ============================================= */
@media (min-width: 768px) {
    .blog-layout {
        /* 2/3 pour le contenu, 1/3 pour la sidebar */
        grid-template-columns: 2fr 1fr; 
    }
}

@media (max-width: 767px) {
    .article-title {
        font-size: 1.8rem;
    }
    .post-meta {
        font-size: 0.8rem;
        gap: 0.5rem 1rem;
    }
    .post-content {
        font-size: 1rem;
    }
    .main-content {
        padding: 1.5rem;
    }
}