/*
Theme Name: LACGTR Overblog
Theme URI: https://lacgtr.re
Author: RUNXPERT - Daniel VOLSAN
Author URI: https://www.runxpert.re
Description: Thème CGTR Réunion reproduisant fidèlement le look Overblog historique. Fond rouge CGT, carte blanche centrée avec ombre, mise en page 3 colonnes, logo animé.
Version: 2.0
License: GPL v2 or later
Text Domain: lacgtr-overblog
Tags: rouge, syndicat, blog, trois-colonnes
*/

/* ===== Variables ===== */
:root {
  --rouge:        #c8102e;
  --rouge-fonce:  #8a0a1f;
  --texte:        #222;
  --texte-clair:  #1a1a1a;
  --muted:        #888;
  --bord:         #ddd;
  --bord-clair:   #e5e5e5;
  --fond-card:    #ffffff;
  --fond-light:   #f9f9f9;
  --fond-menu:    #f7f7f7;
  --fond-rouge:   #c8102e;
  --largeur:      1100px;
  --serif:        Georgia, "Times New Roman", Times, serif;
  --sans:         "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--texte);
  background: var(--fond-rouge);
}

a { color: var(--rouge); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== Conteneur principal blanc centré (style Overblog) ===== */
.site-container {
  max-width: var(--largeur);
  margin: 20px auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  overflow: hidden;
}

/* ===== En-tête : logo + titre + recherche ===== */
.site-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 18px 25px 14px 25px;
  background: #fff;
  flex-wrap: wrap;
}
.site-logo {
  flex: 0 0 auto;
}
.site-logo img {
  width: 100px;
  height: auto;
  display: block;
}
.site-title-block {
  flex: 1 1 auto;
  min-width: 0;
}
.site-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.2;
  color: #4a90c8;
}
.site-title a {
  color: #4a90c8;
  text-decoration: none;
}
.site-title a:hover { text-decoration: none; color: #4a90c8; }
.site-tagline {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.site-search {
  flex: 0 0 auto;
  width: 220px;
}
.site-search input[type="search"] {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--bord);
  border-radius: 3px;
  background: var(--fond-light);
  font-size: 0.85rem;
}
.site-search button {
  display: none;
}

/* ===== Menu navigation horizontal ===== */
.site-nav {
  background: var(--fond-menu);
  border-top: 1px solid var(--bord-clair);
  border-bottom: 1px solid var(--bord-clair);
  padding: 0 25px;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.site-nav li {
  margin: 0;
}
.site-nav a {
  display: inline-block;
  padding: 12px 14px;
  color: var(--texte);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-right: 1px solid var(--bord-clair);
}
.site-nav a:hover {
  background: #fff;
  color: var(--rouge);
  text-decoration: none;
}
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: #fff;
  color: var(--texte-clair);
  font-weight: 700;
}

/* ===== Layout 3 colonnes ===== */
.site-main {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 18px;
  padding: 20px 25px 30px 25px;
  background: #fff;
}

/* ===== Sidebars ===== */
.sidebar {
  font-size: 0.85rem;
}
.widget {
  background: #fff;
  border: 1px solid var(--bord-clair);
  margin-bottom: 18px;
  border-radius: 2px;
}
.widget-title {
  margin: 0;
  padding: 10px 12px;
  background: var(--fond-light);
  border-bottom: 1px solid var(--bord-clair);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--texte-clair);
}
.widget-content {
  padding: 10px 12px;
}
.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget li {
  padding: 5px 0;
  border-bottom: 1px dotted var(--bord-clair);
}
.widget li:last-child { border-bottom: none; }
.widget a { color: var(--texte); }
.widget a:hover { color: var(--rouge); text-decoration: none; }

/* ===== Contenu central ===== */
.content-area {
  min-width: 0;
}

/* ===== Articles en cards (index) ===== */
.post-card {
  background: #fff;
  border: 1px solid var(--bord);
  margin-bottom: 18px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.post-card-header {
  padding: 12px 15px;
  border-bottom: 1px solid var(--bord-clair);
}
.post-card-date {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 4px;
}
.post-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
.post-card-title a {
  color: var(--texte-clair);
  text-decoration: none;
}
.post-card-title a:hover {
  color: var(--rouge);
  text-decoration: none;
}
.post-card-excerpt {
  padding: 12px 15px;
  font-size: 0.9rem;
  color: #555;
}
.post-card-excerpt p { margin: 0 0 0.5rem 0; }
.post-card-excerpt p:last-child { margin-bottom: 0; }
.post-card-thumbnail {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--bord-clair);
}
.post-card-meta {
  padding: 8px 15px;
  background: var(--fond-light);
  border-top: 1px solid var(--bord-clair);
  font-size: 0.8rem;
  color: var(--muted);
}
.post-card-meta a { color: var(--rouge); }
.read-more {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 12px;
  background: var(--rouge);
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 3px;
  text-decoration: none;
}
.read-more:hover { background: var(--rouge-fonce); text-decoration: none; }

/* ===== Article single ===== */
.single-post {
  background: #fff;
  border: 1px solid var(--bord);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.single-post-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--bord-clair);
}
.single-post-date {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 6px;
}
.single-post-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--rouge-fonce);
  font-weight: 700;
}
.single-post-content {
  padding: 18px 22px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--texte);
}
.single-post-content p { margin: 0.7rem 0; }
.single-post-content h2,
.single-post-content h3 {
  font-family: var(--serif);
  color: var(--rouge-fonce);
  margin-top: 1.5rem;
}
.single-post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem auto;
  border: 1px solid var(--bord-clair);
}
.single-post-content figure {
  margin: 1rem 0;
  text-align: center;
}
.single-post-content blockquote {
  border-left: 3px solid var(--rouge);
  padding-left: 1rem;
  color: var(--muted);
  font-style: italic;
  margin: 1rem 0;
}
.single-post-footer {
  padding: 12px 22px;
  background: var(--fond-light);
  border-top: 1px solid var(--bord-clair);
  font-size: 0.85rem;
}
.single-post-footer .post-tags { color: var(--muted); }

/* ===== Boutons PDF style Overblog ===== */
.single-post-content .ob-button-link,
.single-post-content a[href$=".pdf"],
.single-post-content a[href$=".PDF"],
.post-card-excerpt a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--rouge);
  color: #fff !important;
  border-radius: 3px;
  font-weight: 500;
  margin: 0.25rem 0.4rem 0.25rem 0;
  text-decoration: none;
}
.single-post-content .ob-button-link:hover,
.single-post-content a[href$=".pdf"]:hover {
  background: var(--rouge-fonce);
  text-decoration: none;
}
.single-post-content .ob-button-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ===== Page archive (catégories, dates, recherche) ===== */
.archive-header {
  background: #fff;
  border: 1px solid var(--bord);
  padding: 14px 20px;
  margin-bottom: 18px;
  border-radius: 2px;
}
.archive-title {
  margin: 0;
  font-size: 1.3rem;
  color: var(--rouge-fonce);
  font-family: var(--serif);
}
.archive-description {
  margin: 6px 0 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== Pagination ===== */
.pagination {
  margin: 25px 0 5px;
  text-align: center;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 3px;
  background: #fff;
  border: 1px solid var(--bord);
  border-radius: 3px;
  color: var(--texte);
  font-size: 0.85rem;
}
.pagination a:hover {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
  text-decoration: none;
}
.pagination .current {
  background: var(--rouge);
  color: #fff;
  border-color: var(--rouge);
}

/* ===== Recherche dans la sidebar ===== */
.search-form {
  display: flex;
  gap: 5px;
}
.search-form input[type="search"] {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--bord);
  border-radius: 2px;
  font-size: 0.85rem;
}
.search-form button {
  padding: 5px 10px;
  background: var(--rouge);
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.8rem;
}
.search-form button:hover { background: var(--rouge-fonce); }

/* ===== Pied de page ===== */
.site-footer {
  padding: 18px 25px;
  background: var(--fond-light);
  border-top: 1px solid var(--bord-clair);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--rouge); }

/* ===== Commentaires ===== */
.comments-area {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--bord);
  padding: 18px 22px;
  border-radius: 2px;
}
.comments-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--texte-clair);
}
.comment {
  padding: 10px;
  margin-bottom: 10px;
  background: var(--fond-light);
  border-left: 3px solid var(--bord);
  border-radius: 2px;
  font-size: 0.9rem;
}
.comment-meta {
  margin: 0 0 0.4rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== Alignements images WordPress ===== */
.alignleft  { float: left;  margin: 0.5rem 1rem 0.5rem 0; }
.alignright { float: right; margin: 0.5rem 0 0.5rem 1rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--muted); font-size: 0.85rem; text-align: center; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ===== Responsive : mobile ===== */
@media (max-width: 900px) {
  .site-container { margin: 0; box-shadow: none; }
  .site-main {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 14px 20px 14px;
  }
  .sidebar { order: 2; }
  .content-area { order: 1; }
  .site-header {
    padding: 14px 14px 10px;
  }
  .site-title { font-size: 1.3rem; }
  .site-search { width: 100%; }
  .site-nav { padding: 0 14px; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { border-right: none; border-bottom: 1px solid var(--bord-clair); }
  .single-post-title { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  body { background: #fff; }
  .site-container { margin: 0; }
}

/* ===== Widget images sidebar (style Overblog) ===== */
.widget-images-content {
  padding: 12px;
  text-align: center;
}
.widget-image-link {
  display: block;
  margin-bottom: 12px;
}
.widget-image-link:last-child { margin-bottom: 0; }
.widget-image-link img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e5e5;
  border-radius: 2px;
  transition: opacity 0.2s;
}
.widget-image-link:hover img {
  opacity: 0.85;
}

/* ===== Ajustement taille images sidebar gauche ===== */
.widget-images-content {
  padding: 10px;
}
.widget-image-link img {
  max-width: 165px;
  margin: 0 auto 10px;
}
.widget-image-link:last-child img { margin-bottom: 0; }
