/*
Theme Name: Serge Avril
Author: Mediapilote
Description: 
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 8.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serge-avril
*/

/* Reset et base */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wp--preset--color--foreground, #0C0A09);
    background-color: var(--wp--preset--color--background, #FAFAF9);
    line-height: 1.6;
}

/* Variables CSS */
:root {
    --primary-color: #0C0A09;
    --secondary-color: #FAFAF9;
    --accent-color: #0073aa;
    --text-color: #0C0A09;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 4px;
    --transition: all 0.3s ease;
}

/* Layout principal */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: var(--wp--style--global--content-size, 1200px);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--wp--preset--color--background, #FAFAF9);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-description {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.main-navigation a:hover {
    color: var(--accent-color);
}

/* Contenu principal */
.posts-container {
    display: grid;
    gap: 2rem;
}

.post-item {
    background: var(--wp--preset--color--background, #FAFAF9);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.entry-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.entry-title a {
    color: var(--text-color);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--accent-color);
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.entry-content {
    margin-bottom: 1rem;
}

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

.read-more {
    margin-top: 1rem;
}

.more-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.more-link:hover {
    background: #005a87;
    color: white;
}

.entry-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag-links,
.comments-link {
    font-size: 0.9rem;
}

/* Sidebar */
.widget-area {
    background: var(--wp--preset--color--background, #FAFAF9);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.widget {
    margin-bottom: 2rem;
}

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

.widget-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widgets .widget {
    background: none;
    box-shadow: none;
    padding: 0;
}

.footer-widgets .widget-title {
    color: var(--secondary-color);
}

.footer-widgets a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-widgets a:hover {
    text-decoration: underline;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--wp--preset--color--background, #FAFAF9);
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--accent-color);
    color: white;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }

    .site-branding {
        flex-direction: column;
        text-align: center;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }

    .entry-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .entry-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* Blocs Gutenberg */
.wp-block-wrapper {
    margin-bottom: 1.5rem;
}

.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* Utilitaires */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.no-posts {
    text-align: center;
    padding: 3rem 1rem;
}

.no-posts h2 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Commentaires */
.comments-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

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

.comment {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--wp--preset--color--background, #FAFAF9);
    border-radius: var(--border-radius);
}

.comment-author {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.comment-content {
    margin-top: 1rem;
}

.comment-reply-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.comment-reply-link:hover {
    background: #005a87;
    color: white;
}