/*
Theme Name: Falous344 Tech Blog
Theme URI: https://falous344.com
Author: Falous344
Author URI: https://falous344.com
Description: Thème WordPress moderne et professionnel pour blog tech, informatique et tutoriels. Design responsive avec support code syntax highlighting.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: falous344-blog
Tags: blog, tech, tutorials, responsive, modern
*/

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #10b981;
    --dark: #1f2937;
    --dark-light: #374151;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --bg: #f9fafb;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    color: var(--dark);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* === HEADER === */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-description {
    font-size: 13px;
    color: var(--gray);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: var(--primary);
    color: var(--white);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* === HERO SECTION === */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 20px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* === MAIN CONTENT === */
.site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.content-area {
    min-width: 0;
}

/* === POSTS GRID === */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 24px;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 12px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-title a {
    color: var(--dark);
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--gray);
    margin-bottom: 16px;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.post-category {
    background: var(--gray-light);
    color: var(--dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.post-category.tutorial {
    background: var(--secondary);
    color: var(--white);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
}

/* === SINGLE POST === */
.single-post {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

.single-post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--primary);
    position: relative;
}

.single-post-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--secondary);
}

.single-post-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    gap: 24px;
    color: var(--gray);
    flex-wrap: wrap;
}

.entry-content {
    font-size: 18px;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 32px;
    margin: 32px 0 16px;
    color: var(--dark);
}

.entry-content h3 {
    font-size: 24px;
    margin: 24px 0 12px;
    color: var(--dark);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0 20px 30px;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content code {
    background: var(--gray-light);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
}

.entry-content pre {
    background: var(--dark);
    color: #a9b7c6;
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* === TABLE OF CONTENTS === */
.table-of-contents {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    border-radius: var(--radius);
    margin: 30px 0;
    box-shadow: var(--shadow-lg);
}

.table-of-contents h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.table-of-contents li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--white);
    font-size: 10px;
}

.table-of-contents a {
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--secondary);
    padding-left: 8px;
}

.table-of-contents .toc-level-3 {
    padding-left: 40px;
    font-size: 14px;
}

/* === READING PROGRESS BAR === */
.reading-progress {
    position: fixed;
    top: 70px;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width 0.1s ease;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5);
}

/* === SIDEBAR === */
.sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
}

.widget li:last-child {
    border-bottom: none;
}

/* === COMMENTS MODERNIZED === */
.comments-area {
    margin-top: 60px;
    padding: 0;
    background: transparent;
}

.comments-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 16px;
}

.comments-title::before {
    content: '\f27a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 36px;
    color: var(--primary);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    background: var(--white);
    padding: 32px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.comment:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(8px);
}

.comment::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    color: var(--gray-light);
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.comment-body {
    position: relative;
    z-index: 1;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.comment-author .avatar {
    border-radius: 50%;
    width: 56px;
    height: 56px;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.comment-author .fn {
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
    font-style: normal;
}

.comment-metadata {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-metadata::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    font-size: 14px;
    color: var(--gray);
}

.comment-metadata a {
    color: var(--gray);
    transition: color 0.3s ease;
}

.comment-metadata a:hover {
    color: var(--primary);
}

.comment-content {
    color: var(--dark);
    line-height: 1.8;
    font-size: 16px;
    padding: 16px 20px;
    background: var(--bg);
    border-radius: 8px;
    margin-top: 16px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 16px;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.comment-reply-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    color: var(--white);
}

.comment-reply-link::before {
    content: '\f3e5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.children {
    list-style: none;
    margin-left: 50px;
    margin-top: 24px;
    padding-left: 30px;
    border-left: 3px solid var(--secondary);
}

.children .comment {
    border-left-color: var(--secondary);
}

/* Comment Form */
.comment-respond {
    background: linear-gradient(135deg, var(--white) 0%, var(--bg) 100%);
    padding: 40px;
    border-radius: var(--radius);
    margin-top: 40px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--gray-light);
}

.comment-reply-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-reply-title::before {
    content: '\f303';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 32px;
    color: var(--primary);
}

.comment-form {
    display: grid;
    gap: 24px;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
    margin: 0;
}

.comment-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 15px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--white);
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.comment-form textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-submit {
    margin: 0;
}

.submit {
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.submit::before {
    content: '\f1d8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
}

/* === FOOTER === */
.site-footer {
    background: var(--dark);
    color: var(--white);
    margin-top: 60px;
    padding: 40px 20px 20px;
    width: 100%;
    clear: both;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.footer-widget {
    min-height: 100px;
}

.footer-widget h3 {
    margin-bottom: 16px;
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: var(--gray-light);
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-widget p {
    color: var(--gray-light);
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding: 20px 20px;
    border-top: 1px solid var(--dark-light);
    color: var(--gray);
    max-width: 1200px;
    margin: 0 auto;
}

/* === RESPONSIVE === */
@media (max-width: 968px) {
    .site-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .single-post {
        padding: 24px;
    }
    
    .single-post-title {
        font-size: 28px;
    }
    
    .entry-content {
        font-size: 16px;
    }
}

/* === SEPARATORS & DIVIDERS === */
.content-separator {
    margin: 40px 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--gray-light), transparent);
}

.section-divider {
    margin: 60px 0;
    text-align: center;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--gray-light);
}

.section-divider span {
    position: relative;
    background: var(--white);
    padding: 0 20px;
    color: var(--gray);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 12px 18px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    min-width: 45px;
    text-align: center;
    font-weight: 600;
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.pagination .current {
    background: var(--primary);
    color: var(--white);
}

/* === SEARCH === */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 15px;
}

.search-form button {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--primary-dark);
}
