/*
Theme Name: Mon Nouveau Thème
Description: Un thème WordPress personnalisé avec support Gutenberg
Version: 1.0
Author: Votre Nom
*/

/* === RESET ET BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

/* === LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === HEADER === */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

/* === NAVIGATION === */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
    font-size: 18px;
}

.main-navigation a:hover {
    color: #0073aa;
}

/* === CONTENU PRINCIPAL === */
.site-content {
    padding: 2rem 0;
    min-height: 60vh;
}

.content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    max-width: none;
}

/* === SIDEBAR === */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
}

.sidebar-section li {
    margin-bottom: 0.5rem;
}

.sidebar-section a {
    color: #666;
    text-decoration: none;
    /*display: block;*/
    padding: 0.3rem 0;
    transition: color 0.3s;
}

.sidebar-section a:hover {
    color: #0073aa;
}

.sidebar-section .post-count {
    color: #999;
    font-size: 0.9rem;
    float: right;
}

/* === ARTICLES === */
.post {
    border-bottom: 1px solid #eee;
}

.index-article {
    margin-bottom: 3rem;
    padding: 20px 20px 2rem 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;

}


.entry-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    clear:both;
}

.entry-title a {
    text-decoration: none;
    color: inherit;
}

.entry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

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

/* === PAGES CATÉGORIES ET ARCHIVES === */
.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #0073aa;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.archive-meta {
    color: #999;
    font-size: 0.9rem;
}

/* === GRILLE D'ARTICLES === */
.posts-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.category-post {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.category-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-post .post-thumbnail {
    margin: 0;
}

.category-post .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.category-post .post-content {
    padding: 1.5rem;
}

.category-post .entry-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.category-post .entry-title a:hover {
    color: #0073aa;
}

.category-post .entry-meta {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.category-post .entry-summary {
    margin-bottom: 1rem;
    color: #555;
}

.category-post .entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.category-post .read-more {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.category-post .read-more:hover {
    text-decoration: underline;
}

.category-post .tags-links {
    font-size: 0.8rem;
}

.category-post .tags-links a {
    background: #f8f9fa;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    margin-left: 0.3rem;
}

.category-post .tags-links a:hover {
    background: #0073aa;
    color: #fff;
}

/* === PAGE VIDE === */
.no-posts {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-posts h2 {
    color: #333;
    margin-bottom: 1rem;
}

.no-posts p {
    color: #666;
    margin-bottom: 1rem;
}

/* === FOOTER === */
.site-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* === GUTENBERG BLOCKS === */
.wp-block-image {
    margin: 1rem 0;
}

.wp-block-quote {
    border-left: 4px solid #0073aa;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.wp-block-button__link {
    background: #0073aa;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

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

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        order: -1;
        background: #f8f9fa;
        border-radius: 8px;
        padding: 0;
        margin-bottom: 2rem;
    }

    /* Navigation mobile pour sidebar */
    .sidebar-mobile-nav {
        display: flex;
        gap: 0.5rem;
        padding: 1rem;
        background: #fff;
        border-radius: 8px 8px 0 0;
        border-bottom: 1px solid #e9ecef;
    }

    .sidebar-nav-button {
        flex: 1;
        background: #e9ecef;
        color: #333;
        border: none;
        padding: 0.75rem 1rem;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.3s;
        position: relative;
    }

    .sidebar-nav-button:hover {
        background: #dee2e6;
    }

    .sidebar-nav-button.active {
        background: #0073aa;
        color: white;
    }

    /* Sections cachées par défaut sur mobile */
    .sidebar-section {
        display: none;
        margin-bottom: 0;
        padding: 1rem;
        border-top: 1px solid #e9ecef;
        animation: slideDown 0.3s ease-out;
    }

    .sidebar-section.active {
        display: block;
    }

    /* Animation d'apparition */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .entry-title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .category-post .post-thumbnail img {
        height: 150px;
    }
}

/* Styles pour desktop - sidebar normale */
@media (min-width: 769px) {
    .sidebar-mobile-nav {
        display: none;
    }

    .sidebar-section {
        display: block !important;
    }
}

.acf-image-thumbnail {
    max-width: 150px;
    height: auto;
}

.acf-image-medium {
    max-width: 300px;
    height: auto;
}

.acf-image-large {
    max-width: 1024px;
    height: auto;
}

.acf-image-full {
    max-width: 100%;
    height: auto;
}

.acf-image-main {
    max-width: 500px;
    height: auto;
    float: right;
    margin: 0 0 15px 15px;
}

@media (max-width: 768px) {
    .entry-content img {
        max-width: 100%;
        height: auto;
    }

    .sidebar {
        order: -1;
    }
}

h2.titre_resume {
    color: #0a7aff
}

h3 {
    margin-bottom: 5px;
    font-size: 140%
}

a {
    color: #0a7aff;
}

a:hover {
    color: #1d2327;
}

ul {
    padding: 0 20px 20px 20px
}

.legende_photo {
    color: #3399cc;
    font-weight: bold;
}

.search-widget {
    margin-bottom: 20px;
}

.search-widget input[type="search"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-submit {
    background: #0073aa;
    color: white;
    border: none;
    padding: 0 10px;
    line-height: 1em;
    margin-top: 5px;
    border-radius: 4px;
    cursor: pointer;
    height: 2em;
}

.search-submit:hover {
    background: #293E48
}

.article-thumbnail {
    float: left;
    margin-right: 20px;
    border: 1px solid #dccbcb;
    box-shadow: 1px -4px 20px 2px #eee;
}

.thumbnail-blog {
    max-width: 200px;
    height: auto;
}

.entry-content-apercu p {
    display: inline;
    margin-bottom: 0;
}

.entry-footer .read-more {
    display: inline;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 20px; /* Espace entre les deux liens */
}

.nav-previous {
    flex: 1;
    text-align: left;
}

.nav-next {
    flex: 1;
    text-align: right;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 10px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    background-color: #0073AA;
    color: white;
    font-weight: 600;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: #333;
}

.category-post .tags-links a,
.cat-links a,
.entry-meta .byline a {
    background-color: #0073AA;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 11px;
    vertical-align: top;
    font-weight: 600;
    text-decoration: none;
}

.category-post .tags-links a:hover,
.cat-links a:hover,
.entry-meta .byline a:hover {
    background-color: #333;
}

.entry-meta .byline {
    padding-left: 20px;
}

.posted-on .date {
    color: #0073AA;
    font-weight: 600;
}

/** Eviter que les tags sur plusieurs lignes se chevauchent **/
.tags-links {
    line-height: 2.3em;
}

.comment-form {
    margin-top: 20px;
}


/* Formulaire commentaire */
.comment-form p {
    display: grid;
    grid-template-columns: 150px 1fr; /* 150px pour les labels, le reste pour les inputs */
    gap: 15px;
    align-items: start;
    margin-bottom: 20px;
}

.comment-form label {
    padding-top: 0; /* Aligne avec le début du texte dans l'input */
    vertical-align: top;
    text-align: right;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Cas spécial pour le textarea qui est plus haut */
.comment-form-comment {
    align-items: start;
}

/* Le bouton de soumission reste centré ou aligné normalement */
.form-submit {
    grid-column: 1 / -1;
    display: block !important;
    text-align: left;
    border-radius: 5px;
}

.form-submit input:hover {
    background: #293E48;
}

#respond {
    padding-top: 25px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border: 2px solid #0073AA;
}

.commentlist li {
    padding-bottom: 20px
}

.commentlist li ul {
    margin-top: 20px;
    margin-left: 20px;
}