/* ==========================================================================
   AGENCE PEZS - STYLES POUR LES ARTICLES DE BLOG
   Styles pour les pages d'articles individuels et archives
   ========================================================================== */

/* ==========================================================================
   SINGLE POST - PAGE D'ARTICLE INDIVIDUEL
   ========================================================================== */

.single-post-wrapper {
    padding: 120px 0 80px; /* Espace pour le header fixe */
    background: var(--color-light);
    min-height: 100vh;
}

.single-post-wrapper .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.site-main {
    background: var(--color-white);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

/* En-tête de l'article */
.entry-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-light);
}

.entry-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Assurer que le titre est visible sur toutes les lignes */
.entry-title {
    display: block;
    max-width: 100%;
    white-space: normal; /* Permet le retour à la ligne */
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--color-gray);
    align-items: center;
}

.entry-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-meta i {
    color: var(--color-primary);
    font-size: 1.1rem;
}

.entry-meta a {
    color: var(--color-gray);
    font-weight: 600;
    transition: var(--transition);
}

.entry-meta a:hover {
    color: var(--color-primary);
}

/* Image mise en avant */
.post-thumbnail {
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Contenu de l'article */
.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-dark);
    margin-bottom: 2.5rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

.entry-content a:hover {
    color: var(--color-primary-dark);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.75rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--color-light);
    border-radius: 8px;
    font-style: italic;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.entry-content code {
    background: var(--color-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.entry-content pre {
    background: var(--color-dark);
    color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: var(--color-white);
}

/* Pagination des pages */
.page-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-light);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.page-links span,
.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    background: var(--color-light);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.page-links a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.page-links .current {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Pied de page de l'article */
.entry-footer {
    padding-top: 2rem;
    border-top: 2px solid var(--color-light);
    margin-top: 2rem;
}

.entry-categories,
.entry-tags {
    margin-bottom: 1.5rem;
}

.entry-categories span,
.entry-tags span {
    font-weight: 700;
    color: var(--color-dark);
    margin-right: 0.5rem;
}

.entry-categories a,
.entry-tags a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-light);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0.25rem;
    transition: var(--transition);
}

.entry-categories a:hover,
.entry-tags a:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Navigation entre les articles */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-light);
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--color-light);
    border-radius: 12px;
    transition: var(--transition);
}

.post-navigation a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.post-navigation .nav-previous {
    text-align: left;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation span {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.post-navigation .post-title {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-dark);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-light);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-light);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--color-gray);
    font-weight: 500;
    transition: var(--transition);
}

.widget a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

/* ==========================================================================
   COMMENTAIRES
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-light);
}

.comments-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--color-dark);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: var(--color-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--color-gray);
}

.comment-content {
    line-height: 1.7;
    color: var(--color-dark);
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.comment-reply-link:hover {
    background: var(--color-primary-dark);
}

/* ==========================================================================
   RESPONSIVE - BLOG
   ========================================================================== */

@media (max-width: 1024px) {
    .single-post-wrapper .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .single-post-wrapper {
        padding: 100px 0 60px;
    }
    
    .site-main {
        padding: 2rem;
    }
    
    .entry-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .entry-content {
        font-size: 1rem;
    }
    
    .entry-content h2 {
        font-size: 1.5rem;
    }
    
    .entry-content h3 {
        font-size: 1.25rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 1.5rem;
    }
    
    .entry-header {
        padding-bottom: 1.5rem;
    }
    
    .entry-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .entry-content {
        font-size: 0.95rem;
    }
    
    .entry-content h2 {
        font-size: 1.25rem;
    }
    
    .post-thumbnail {
        margin-bottom: 1.5rem;
    }
}

/* ==========================================================================
   ARCHIVES ET LISTE D'ARTICLES
   ========================================================================== */

.archive-wrapper {
    padding: 120px 0 80px;
    background: var(--color-light);
    min-height: 100vh;
}

.archive-wrapper .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.page-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem;
    background: var(--color-white);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.125rem;
    color: var(--color-gray);
    line-height: 1.7;
}

.posts-list {
    display: grid;
    gap: 2rem;
}

.posts-list article {
    background: var(--color-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 350px 1fr;
}

.posts-list article:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.posts-list .post-thumbnail {
    height: 100%;
    min-height: 250px;
    overflow: hidden;
}

.posts-list .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.posts-list article:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrapper {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.posts-list .entry-header {
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.posts-list .entry-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.posts-list .entry-title a {
    color: var(--color-dark);
    transition: var(--transition);
}

.posts-list .entry-title a:hover {
    color: var(--color-primary);
}

.posts-list .entry-meta {
    font-size: 0.875rem;
    gap: 1rem;
}

.posts-list .entry-summary {
    flex-grow: 1;
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    align-self: flex-start;
}

.read-more-btn:hover {
    background: var(--color-primary-dark);
    transform: translateX(5px);
}

.read-more-btn i {
    transition: var(--transition);
}

.read-more-btn:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0.5rem 1rem;
    background: var(--color-white);
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .current {
    background: var(--color-primary);
    color: var(--color-white);
}

.pagination .dots {
    background: transparent;
    box-shadow: none;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-white);
    border-radius: 15px;
    box-shadow: var(--shadow-md);
}

.no-results h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--color-gray);
    font-size: 1.125rem;
}

/* Responsive - Archives */
@media (max-width: 1024px) {
    .archive-wrapper .container {
        grid-template-columns: 1fr;
    }
    
    .posts-list article {
        grid-template-columns: 1fr;
    }
    
    .posts-list .post-thumbnail {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .archive-wrapper {
        padding: 100px 0 60px;
    }
    
    .page-header {
        padding: 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .posts-list .entry-title {
        font-size: 1.5rem;
    }
    
    .posts-list .post-thumbnail {
        min-height: 250px;
    }
    
    .post-content-wrapper {
        padding: 1.5rem;
    }
}
/* Fix pour les boutons de navigation Précédent/Suivant */

/* Container de navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Bouton Précédent (à gauche) */
.nav-previous {
    flex: 1;
    text-align: left;
    max-width: 48%;
}

/* Bouton Suivant (à droite) */
.nav-next {
    flex: 1;
    text-align: right;
    max-width: 48%;
}

/* Style des liens de navigation */
.post-navigation a {
    display: block;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-size: 14px;
}

.post-navigation a:hover {
    background: #e9ecef;
    border-color: #FF6B35;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Labels PRÉCÉDENT et SUIVANT */
.post-navigation .meta-nav {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

/* Titre du post */
.post-navigation .post-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-top: 5px;
    /* Limiter à 2 lignes */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Icônes de flèches optionnelles */
.nav-previous .meta-nav::before {
    content: "← ";
    font-size: 14px;
}

.nav-next .meta-nav::after {
    content: " →";
    font-size: 14px;
}

/* Version responsive pour mobile */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-previous,
    .nav-next {
        max-width: 100%;
        text-align: center;
    }
    
    .post-navigation a {
        padding: 12px 15px;
    }
}

/* Alternative compacte (sans titres) */
.post-navigation.compact .post-title {
    display: none;
}

.post-navigation.compact a {
    padding: 12px 25px;
    font-size: 13px;
    font-weight: 600;
}