/*
Theme Name: DiscoBBX
Description: Thème WordPress ultra-léger et rapide optimisé pour Google Discover. Design inspiré de Kadence TechReviews avec performances PageSpeed > 95.
Author: DiscoBBX Team
Version: 1.2.1
License: GPL v2 or later
Text Domain: discobbx
*/

/* Reset CSS minimal pour performances optimales */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;line-height:1.6;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:#333;background:#fff;font-weight:400}

/* Layout principal */
.container{max-width:1200px;margin:0 auto;padding:0 20px}
.site-header{background:#fff;border-bottom:1px solid #e1e5e9;position:sticky;top:0;z-index:100;box-shadow:0 2px 4px rgba(0,0,0,.05)}
.site-main{min-height:calc(100vh - 200px)}
.site-footer{background:#f8f9fa;border-top:1px solid #e1e5e9;padding:40px 0;margin-top:60px}

/* Header Navigation */
.main-navigation{display:flex;justify-content:space-between;align-items:center;padding:15px 0;min-height:60px}
.site-branding h1{font-size:28px;font-weight:700;color:#2c3e50;margin:0}
.site-branding a{text-decoration:none;color:inherit}
.nav-menu{display:flex;list-style:none;gap:30px}
.nav-menu a{text-decoration:none;color:#555;font-weight:500;transition:color .2s ease}
.nav-menu a:hover{color:#3498db}

/* Masquer le menu desktop sur mobile */
@media (max-width:768px){
.nav-menu{display:none}
}


/* Articles Grid - Style TechReviews */
.posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:30px;margin:40px 0}
.post-card{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.08);transition:transform .2s ease,box-shadow .2s ease}
.post-card:hover{transform:translateY(-4px);box-shadow:0 8px 25px rgba(0,0,0,.12)}

/* Featured Image optimisée */
.post-thumbnail{position:relative;overflow:hidden;aspect-ratio:16/9}
.post-thumbnail img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.post-card:hover .post-thumbnail img{transform:scale(1.05)}

/* Images dans le contenu - centrées */
.post-content img,.page-content img,.single-post .post-content img{display:block;margin:20px auto;max-width:100%;height:auto;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.1)}
.post-featured-image{text-align:center;margin:30px 0}
.post-featured-image img{border-radius:12px;box-shadow:0 8px 25px rgba(0,0,0,.15)}
.wp-caption-text{text-align:center;font-size:14px;color:#666;margin-top:10px;font-style:italic}

/* Contenu des articles */
.post-content{padding:24px}
.post-category{display:inline-block;background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;padding:6px 16px;border-radius:25px;font-size:11px;font-weight:700;text-transform:uppercase;margin-bottom:12px;letter-spacing:0.5px;box-shadow:0 2px 8px rgba(52,152,219,.3);transition:all .2s ease}
.post-category:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(52,152,219,.4)}
.post-category a{color:#fff;text-decoration:none}

/* Pastilles de catégories personnalisables */
.post-category.cat-tech{background:linear-gradient(135deg,#3498db,#2980b9)}
.post-category.cat-lifestyle{background:linear-gradient(135deg,#e74c3c,#c0392b)}
.post-category.cat-business{background:linear-gradient(135deg,#2ecc71,#27ae60)}
.post-category.cat-travel{background:linear-gradient(135deg,#f39c12,#e67e22)}
.post-category.cat-food{background:linear-gradient(135deg,#9b59b6,#8e44ad)}
.post-category.cat-health{background:linear-gradient(135deg,#1abc9c,#16a085)}
.post-title{font-size:20px;font-weight:700;line-height:1.3;margin-bottom:12px}
.post-title a{color:#2c3e50;text-decoration:none}
.post-title a:hover{color:#3498db}
.post-excerpt{color:#666;font-size:14px;line-height:1.5;margin-bottom:16px}
.post-meta{display:flex;align-items:center;gap:15px;font-size:13px;color:#888}
.post-date,.post-author{display:flex;align-items:center;gap:5px}

/* Article single */
.single-post .post-header{text-align:center;margin-bottom:40px}
.single-post .post-title{font-size:36px;margin-bottom:20px}
.single-post .post-meta{justify-content:center;margin-bottom:15px}
.post-updated-meta{text-align:center;margin-bottom:30px}
.post-updated{font-size:14px;color:#888;font-style:italic}
.single-post .post-content{max-width:800px;margin:0 auto;font-size:18px;line-height:1.7}
.single-post .post-content h2{font-size:28px;margin:40px 0 20px;color:#2c3e50}
.single-post .post-content h3{font-size:24px;margin:30px 0 15px;color:#34495e}
.single-post .post-content p{margin-bottom:20px}

/* Sidebar */
.sidebar{background:#f8f9fa;padding:30px;border-radius:12px;margin-top:40px}
.widget{margin-bottom:40px}
.widget-title{font-size:18px;font-weight:700;margin-bottom:20px;color:#2c3e50}
.widget ul{list-style:none}
.widget li{padding:8px 0;border-bottom:1px solid #e1e5e9}
.widget a{color:#555;text-decoration:none}
.widget a:hover{color:#3498db}

/* Articles populaires améliorés avec navigation - largeur limitée */
.popular-posts-container{position:relative;max-width:900px;margin:0 auto}
.popular-posts-slider{overflow:hidden;position:relative}
.popular-posts-grid{display:flex;gap:15px;transition:transform .3s ease;width:max-content}
.popular-post-card{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.08);transition:all .2s ease;width:280px;flex-shrink:0}
.popular-post-card:hover{transform:translateY(-2px);box-shadow:0 4px 15px rgba(0,0,0,.12)}
.popular-post-link{text-decoration:none;color:inherit;display:block}
.popular-post-thumb{aspect-ratio:16/9;overflow:hidden}
.popular-post-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.popular-post-card:hover .popular-post-thumb img{transform:scale(1.05)}
.popular-post-content{padding:15px}
.popular-post-category{font-size:10px;padding:3px 8px;border-radius:12px;margin-bottom:8px;display:inline-block}
.popular-post-title{font-size:14px;font-weight:600;line-height:1.3;margin-bottom:8px;color:#2c3e50}
.popular-post-meta{font-size:12px;color:#888}

/* Navigation des articles populaires */
.popular-posts-nav{display:flex;justify-content:center;gap:10px;margin-top:15px}
.popular-nav-btn{background:#3498db;color:#fff;border:none;border-radius:50%;width:40px;height:40px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease;font-size:16px}
.popular-nav-btn:hover{background:#2980b9;transform:scale(1.1)}
.popular-nav-btn:disabled{background:#bdc3c7;cursor:not-allowed;transform:none}

/* Responsive pour articles populaires */
@media (max-width:768px){
.popular-posts-container{max-width:100%}
.popular-posts-grid{display:grid;grid-template-columns:1fr;gap:15px;width:auto}
.popular-post-card{width:auto}
.popular-posts-nav{display:none}
}

/* Tag cloud amélioré */
.tag-cloud{display:flex;flex-wrap:wrap;gap:8px}
.tag-cloud-link{display:inline-block;padding:5px 10px;background:#fff;border:1px solid #e1e5e9;border-radius:15px;font-size:12px;color:#666;text-decoration:none;transition:all .2s ease}
.tag-cloud-link:hover{background:#3498db;color:#fff;border-color:#3498db}
.tag-count{font-size:10px;opacity:0.7}

/* Boutons CTA optimisés pour naviboost */
.btn{display:inline-block;padding:12px 24px;background:#3498db;color:#fff;text-decoration:none;border-radius:6px;font-weight:600;transition:all .2s ease;border:none;cursor:pointer}
.btn:hover{background:#2980b9;transform:translateY(-1px)}
.btn-secondary{background:#95a5a6}
.btn-secondary:hover{background:#7f8c8d}

/* Navigation pagination */
.pagination{display:flex;justify-content:center;gap:10px;margin:50px 0}
.page-numbers{padding:10px 15px;background:#f8f9fa;color:#555;text-decoration:none;border-radius:6px;transition:all .2s ease}
.page-numbers:hover,.page-numbers.current{background:#3498db;color:#fff}

/* Tags styles */
.post-tags{margin:30px 0;padding:20px 0;border-top:1px solid #e1e5e9}
.post-tags h3{font-size:16px;margin-bottom:15px;color:#2c3e50}
.tags-list{display:flex;flex-wrap:wrap;gap:8px}
.tag-link{display:inline-block;padding:4px 12px;background:#f8f9fa;color:#666;text-decoration:none;border-radius:15px;font-size:13px;transition:all .2s ease}
.tag-link:hover{background:#3498db;color:#fff;transform:translateY(-1px)}

/* Navigation entre articles */
.post-navigation{margin:50px 0;padding:30px 0;border-top:1px solid #e1e5e9;border-bottom:1px solid #e1e5e9}
.nav-links{display:grid;grid-template-columns:1fr 1fr;gap:30px}
.nav-previous,.nav-next{padding:20px;background:#f8f9fa;border-radius:8px;transition:all .2s ease}
.nav-previous:hover,.nav-next:hover{background:#e8f4fd;transform:translateY(-2px)}
.nav-previous a,.nav-next a{text-decoration:none;color:#333;display:block}
.nav-subtitle{font-size:12px;color:#888;text-transform:uppercase;font-weight:600;margin-bottom:5px;display:block}
.nav-title{font-size:16px;font-weight:600;color:#2c3e50;line-height:1.3}
.nav-next{text-align:right}

/* Responsive Design */
@media (max-width:768px){
.container{padding:0 15px}
.main-navigation{flex-direction:row;gap:0;position:relative}
.site-branding h1{font-size:24px}
.posts-grid{grid-template-columns:1fr;gap:20px}
.post-content{padding:20px}
.single-post .post-title{font-size:28px}
.single-post .post-content{font-size:16px}
.nav-links{grid-template-columns:1fr;gap:15px}
.nav-next{text-align:left}
.author-box .author-avatar{float:none;margin:0 auto 15px;display:block}
.author-box{text-align:center}
.footer-content{flex-direction:column;text-align:center}
.footer-links{justify-content:center}
}

/* Optimisations Core Web Vitals */
img{max-width:100%;height:auto;loading:lazy}
.post-thumbnail img{will-change:transform}
.post-card{will-change:transform,box-shadow}

/* Styles pour améliorer les signaux naviboost */
.related-posts{margin:60px 0;padding:40px;background:#f8f9fa;border-radius:12px}
.related-posts h3{text-align:center;margin-bottom:30px;font-size:24px;color:#2c3e50}
.breadcrumb{margin:20px 0;font-size:14px}
.breadcrumb a{color:#3498db;text-decoration:none}
.breadcrumb span{color:#888;margin:0 8px}

/* Social sharing optimisé */
.social-share{display:flex;gap:10px;margin:30px 0;justify-content:center}
.social-share a{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;color:#fff;text-decoration:none;transition:transform .2s ease}
.social-share .facebook{background:#3b5998}
.social-share .twitter{background:#1da1f2}
.social-share .linkedin{background:#0077b5}
.social-share a:hover{transform:scale(1.1)}

/* Performance: Réduction des repaints */
.post-card,.btn,.page-numbers{backface-visibility:hidden;transform:translateZ(0)}

/* Accessibilité */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Focus states pour l'accessibilité */
a:focus,.btn:focus{outline:2px solid #3498db;outline-offset:2px}

/* Footer styles simples */
.footer-content{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:20px}
.footer-links{display:flex;gap:25px;flex-wrap:wrap;justify-content:center;margin-top:20px}
.footer-links a{color:#666;text-decoration:none;font-size:14px;transition:color .2s ease}
.footer-links a:hover{color:#3498db}
.footer-menu{display:flex;gap:25px;flex-wrap:wrap;list-style:none}
.footer-menu a{color:#666;text-decoration:none;font-size:14px;transition:color .2s ease}
.footer-menu a:hover{color:#3498db}

/* Layout single post avec sidebar */
.single-post-layout{display:grid;grid-template-columns:2fr 1fr;gap:40px;margin-top:20px}
.single-post-content{max-width:none}
.single-post-sidebar{background:#f8f9fa;padding:30px;border-radius:12px;height:fit-content;position:sticky;top:100px}

/* Articles similaires sidebar */
.sidebar-related-posts .sidebar-title{font-size:18px;font-weight:700;margin-bottom:20px;color:#2c3e50;text-align:center}
.sidebar-post-card{display:flex;gap:15px;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #e1e5e9}
.sidebar-post-card:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.sidebar-post-thumb{flex-shrink:0;width:80px;height:60px;overflow:hidden;border-radius:6px}
.sidebar-post-thumb img{width:100%;height:100%;object-fit:cover}
.sidebar-post-content{flex:1}
.sidebar-post-category{font-size:9px;padding:2px 6px;border-radius:8px;margin-bottom:5px;display:inline-block}
.sidebar-post-title{font-size:13px;font-weight:600;line-height:1.3;margin-bottom:5px}
.sidebar-post-title a{color:#2c3e50;text-decoration:none}
.sidebar-post-title a:hover{color:#3498db}
.sidebar-post-meta{font-size:11px;color:#888}

/* Bloc auteur amélioré */
.enhanced-author-box{background:linear-gradient(135deg,#f8f9fa,#e8f4fd);border-radius:16px;padding:40px;margin:60px 0;border:1px solid #e1e5e9;display:flex;gap:30px;align-items:center;box-shadow:0 8px 25px rgba(0,0,0,.08)}
.author-avatar-container{flex-shrink:0}
.author-avatar-large{width:120px;height:120px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 4px 15px rgba(0,0,0,.1)}
.author-info{flex:1}
.author-name-large{font-size:24px;font-weight:700;color:#2c3e50;margin-bottom:8px}
.author-title-large{font-size:14px;color:#3498db;font-weight:600;margin-bottom:15px;text-transform:uppercase;letter-spacing:0.5px}
.author-bio-large{color:#666;line-height:1.6;margin-bottom:20px;font-size:16px}
.author-seo-hashtags{margin-bottom:20px}
.hashtags-label{font-weight:600;color:#2c3e50;margin-right:10px}
.seo-hashtag{display:inline-block;background:#3498db;color:#fff;padding:4px 10px;border-radius:15px;font-size:12px;margin:2px 4px 2px 0;font-weight:600}
.author-social-large{display:flex;gap:12px}
.social-btn{display:inline-flex;align-items:center;justify-content:center;width:45px;height:45px;background:#3498db;color:#fff;border-radius:50%;text-decoration:none;font-size:16px;transition:all .3s ease;box-shadow:0 2px 8px rgba(52,152,219,.3)}
.social-btn:hover{background:#2980b9;transform:translateY(-3px);box-shadow:0 4px 15px rgba(52,152,219,.4)}

/* Bloc auteur classique (conservé pour compatibilité) */
.author-box{background:#f8f9fa;border-radius:12px;padding:30px;margin:50px 0;border-left:4px solid #3498db}
.author-box .author-avatar{float:left;margin:0 20px 20px 0;border-radius:50%;width:80px;height:80px;object-fit:cover}
.author-box .author-name{font-size:20px;font-weight:700;color:#2c3e50;margin-bottom:8px}
.author-box .author-title{font-size:14px;color:#3498db;font-weight:600;margin-bottom:15px;text-transform:uppercase;letter-spacing:0.5px}
.author-box .author-bio{color:#666;line-height:1.6;margin-bottom:15px}
.author-box .author-social{display:flex;gap:10px;clear:both}
.author-box .author-social a{display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;background:#3498db;color:#fff;border-radius:50%;text-decoration:none;font-size:14px;transition:all .2s ease}
.author-box .author-social a:hover{background:#2980b9;transform:translateY(-2px)}
.author-box::after{content:"";display:table;clear:both}

/* Responsive pour layout single */
@media (max-width:1024px){
.single-post-layout{grid-template-columns:1fr;gap:30px}
.single-post-sidebar{position:static}
.enhanced-author-box{flex-direction:column;text-align:center;gap:20px}
.author-info{text-align:center}
}

/* Print styles */
@media print{
.site-header,.site-footer,.sidebar,.social-share,.author-box{display:none}
.container{max-width:none;padding:0}
}
