/*
Theme Name: Le Pigeon Décongelé
Theme URI: http://votresite.com
Description: Thème personnalisé pour un journal satirique
Author: Claude
Version: 1.0
*/

/* Réinitialisation et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

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

/* En-tête */
header {
    background-color: #222;
    color: #fff;
    padding: 20px 0;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

.site-description {
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

/* Navigation */
nav {
    background-color: #444;
    padding: 10px 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffcc00;
}

/* Section principale - Mise en page 3 colonnes type France-Soir */
main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Colonne principale - Articles du numéro en cours */
.posts-current {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.posts-current .section-title {
    background-color: #ffcc00;
    color: #333;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.current-articles {
    padding: 20px;
}

.current-article {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.current-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.current-article .article-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 15px;
}

.current-article .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.current-article h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.current-article h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.current-article h2 a:hover {
    color: #ffcc00;
}

.current-article .article-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.current-article .article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.current-article .read-more {
    display: inline-block;
    background-color: #ffcc00;
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.current-article .read-more:hover {
    background-color: #f0b800;
}

/* Colonne des articles antérieurs */
.posts-archive {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    height: fit-content;
}

.posts-archive .section-title {
    background-color: #6c757d;
    color: #fff;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.archive-articles {
    padding: 20px;
}

.archive-article {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.archive-article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.archive-article h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.archive-article h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.archive-article h3 a:hover {
    color: #6c757d;
}

.archive-article .article-date {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.archive-article .article-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Colonne de droite - Dessins, commentaires, messages */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sidebar-section .section-title {
    background-color: #28a745;
    color: #fff;
    padding: 12px 15px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar-section.dessins .section-title {
    background-color: #fd7e14;
}

.sidebar-section.messages .section-title {
    background-color: #17a2b8;
}

.sidebar-content {
    padding: 15px;
}

/* Dessins dans la sidebar */
.dessins-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dessin-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.dessin-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dessin-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

.dessin-item h4 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

.dessin-item h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.dessin-item h4 a:hover {
    color: #fd7e14;
}

/* Messages des lecteurs dans la sidebar */
.messages-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid #17a2b8;
}

.message-author {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.message-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 5px;
}

.message-date {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* Formulaire de message */
.message-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.message-form h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #333;
}

.message-form input,
.message-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.message-form textarea {
    height: 80px;
    resize: vertical;
}

.message-form button {
    background-color: #17a2b8;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.message-form button:hover {
    background-color: #138496;
}

/* Articles */
.posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.post {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.post:hover {
    transform: translateY(-5px);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-title a {
    color: #333;
    text-decoration: none;
}

.post-title a:hover {
    color: #ffcc00;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-excerpt {
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    background-color: #ffcc00;
    color: #333;
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
}

.read-more:hover {
    background-color: #f0b800;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a, .pagination span {
    margin: 0 5px;
    padding: 8px 15px;
    background-color: #fff;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.pagination a:hover, .pagination span.current {
    background-color: #ffcc00;
}

/* Barre latérale */
.sidebar {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffcc00;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.widget ul li a:hover {
    color: #ffcc00;
}

/* Section lecteurs */
.readers-section {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.reader-comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.reader-comment:last-child {
    border-bottom: none;
}

.reader-name {
    font-weight: 700;
    color: #444;
}

.reader-date {
    color: #777;
    font-size: 0.9rem;
}

/* Page article unique */
.single-post {
    background-color: #fff;
    border-radius: 5px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.single-post .post-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.single-post .post-image {
    height: auto;
    margin-bottom: 20px;
}

.single-post .post-content {
    padding: 0;
    margin-bottom: 20px;
}

.post-tags {
    margin: 20px 0;
    color: #666;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Bouton retour en haut */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background-color: #ffcc00;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    text-decoration: none;
    transition: background-color 0.3s, opacity 0.3s;
    opacity: 0;
    z-index: 999;
}

#back-to-top.show {
    display: block;
    opacity: 1;
}

#back-to-top:hover {
    background-color: #f0b800;
}

.arrow-up {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid #333;
}

/* Popup image */
.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-popup-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-popup-container img {
    max-width: 100%;
    max-height: 90vh;
    display: block;
}

.image-popup-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Popup partage */
.share-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    position: relative;
    width: 300px;
}

.share-popup-content h3 {
    margin-bottom: 15px;
}

.share-popup-content ul {
    list-style: none;
}

.share-popup-content ul li {
    margin-bottom: 10px;
}

.share-popup-content ul li a {
    display: block;
    padding: 10px;
    border-radius: 3px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.share-popup-content ul li:nth-child(1) a {
    background-color: #3b5998;
}

.share-popup-content ul li:nth-child(2) a {
    background-color: #1da1f2;
}

.share-popup-content ul li:nth-child(3) a {
    background-color: #666;
}

.share-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #333;
}

/* Animation pour les nouveaux articles */
.post.animated {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { box-shadow: 0 0 0 2px rgba(255, 204, 0, 0); }
    50% { box-shadow: 0 0 0 5px rgba(255, 204, 0, 1); }
    100% { box-shadow: 0 0 0 2px rgba(255, 204, 0, 0); }
}

/* Pied de page */
footer {
    background-color: #222;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #ffcc00;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ffcc00;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    color: #888;
}

/* Menu fixe */
nav.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Formulaire de recherche */
.search-form {
    display: flex;
}

.search-field {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
}

.search-submit {
    background-color: #ffcc00;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

/* Commentaires */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.comment-form textarea {
    height: 150px;
}

.comment-form input[type="submit"] {
    background-color: #ffcc00;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
}

.comment-form input[type="submit"]:hover {
    background-color: #f0b800;
}

.comment-form input.error,
.comment-form textarea.error {
    border-color: #ff5555;
}

.error-message {
    color: #ff5555;
    margin-bottom: 10px;
}

/* Widget dessins */
.dessins-widget {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.dessin-item {
    text-align: center;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.dessin-item img {
    border-radius: 3px;
    margin-bottom: 5px;
    max-width: 100%;
    height: auto;
}

.dessin-item h4 {
    font-size: 0.9rem;
    margin: 0;
}

/* Widget flashs */
.flashs-widget {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.flashs-widget .widget-title {
    color: #856404;
    border-bottom-color: #ffeaa7;
    font-size: 1.1rem;
}

.flash-item {
    background-color: #fff;
    border-left: 3px solid #ffcc00;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.flash-item:last-child {
    margin-bottom: 0;
}

.flash-time {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* Widget messages lecteurs */
.messages-lecteurs-widget {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.messages-lecteurs-widget .widget-title {
    color: #495057;
    border-bottom-color: #dee2e6;
    font-size: 1.1rem;
}

.message-lecteur-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.message-lecteur-item:last-child {
    margin-bottom: 0;
}

.message-lecteur-author {
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.message-lecteur-content {
    margin-bottom: 5px;
    line-height: 1.4;
}

.message-lecteur-time {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* Formulaire de soumission de message */
.submit-message-form {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.submit-message-form h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333;
}

.submit-message-form input[type="text"],
.submit-message-form input[type="email"],
.submit-message-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
}

.submit-message-form textarea {
    height: 80px;
    resize: vertical;
}

.submit-message-form button {
    background-color: #ffcc00;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
}

.submit-message-form button:hover {
    background-color: #f0b800;
}

/* Logo en en-tête */
.site-branding {
    text-align: center;
    padding: 30px 0;
    background: #ffffff;
    border-bottom: 3px solid #ffcc00;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-logo {
    display: inline-block;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.logo-image {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.custom-logo-wrapper img {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.site-description {
    margin-top: 15px;
    font-size: 1.3rem;
    font-style: italic;
    color: #555;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
}

/* Responsive pour le logo et la mise en page */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .posts-archive {
        grid-column: 1 / -1;
        order: 3;
    }
    
    .posts-current {
        order: 1;
    }
    
    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }
    
    .posts-current,
    .posts-archive,
    .sidebar {
        order: unset;
    }
    
    .logo-image,
    .custom-logo-wrapper img {
        max-width: 280px;
    }
    
    .site-branding {
        padding: 20px 0;
    }
    
    .current-article h2 {
        font-size: 1.4rem;
    }
    
    .current-article .article-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul li {
        margin: 5px 0;
    }
    
    .logo-image,
    .custom-logo-wrapper img {
        max-width: 220px;
    }
    
    .site-description {
        font-size: 1.1rem;
    }
    
    .current-article h2 {
        font-size: 1.2rem;
    }
    
    .current-article .article-image {
        height: 180px;
    }
    
    .section-title {
        font-size: 1.1rem;
        padding: 12px 15px;
    }
}
