/*
Theme Name: Trégor Blogger
Theme URI: https://tregorechecs.blogspot.com
Description: Affiche la première image du contenu de chaque article, comme Blogger.
Version: 1.0.13
Author: Migration Blogger
Text Domain: tregor-blogger
Requires at least: 6.0
Requires PHP: 8.0
*/

:root {
  --tb-bg: #f5f5f5;
  --tb-card: #ffffff;
  --tb-text: #1a1a1a;
  --tb-muted: #666666;
  --tb-accent: #2b6cb0;
  --tb-border: #e5e5e5;
  --tb-max: 1120px;
  --tb-sidebar: 260px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background-color: #1a2430;
  background-image: url("assets/6.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--tb-text);
  line-height: 1.6;
}

a {
  color: var(--tb-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--tb-border);
  padding: 1.25rem 1rem 0;
  backdrop-filter: blur(6px);
}

.site-header__inner {
  max-width: var(--tb-max);
  margin: 0 auto;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding-bottom: 1rem;
}

.site-social {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-social__link--instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.site-social__link--facebook {
  background: #1877f2;
}

.site-social__link--ffe {
  width: auto;
  min-width: 48px;
  padding: 0 0.4rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--tb-border);
}

.site-social__ffe-logo {
  display: block;
  width: 36px;
  height: auto;
}

.site-social__link:hover {
  text-decoration: none;
  transform: scale(1.06);
  opacity: 0.92;
}

.site-social__icon {
  display: block;
}

.site-logo-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: 64px;
  height: auto;
}

.site-branding__text {
  min-width: 0;
}

.site-title {
  margin: 0;
  font-size: 1.75rem;
}

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

.site-description {
  margin: 0.35rem 0 0;
  color: var(--tb-muted);
  font-size: 0.95rem;
}

.site-nav {
  border-top: 1px solid var(--tb-border);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
}

.site-nav__list a {
  color: var(--tb-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a {
  color: var(--tb-accent);
  text-decoration: underline;
}

.site-main {
  min-width: 0;
}

.site-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: var(--tb-max);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.site-body:has(> .site-sidebar) {
  grid-template-columns: minmax(0, 1fr) var(--tb-sidebar);
}

.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 1rem;
}

.sidebar-widget {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sidebar-widget__title {
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tb-border);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tb-text);
}

.sidebar-links,
.sidebar-archives,
.sidebar-events,
.sidebar-widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-links li,
.sidebar-archives li,
.sidebar-events li,
.sidebar-widget ul li {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.sidebar-links li:last-child,
.sidebar-archives li:last-child,
.sidebar-events li:last-child,
.sidebar-widget ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-events p {
  margin: 0;
  line-height: 1.4;
}

.sidebar-events strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--tb-text);
  font-size: 0.88rem;
}

.sidebar-links a,
.sidebar-archives a,
.sidebar-events a,
.sidebar-widget ul a {
  color: var(--tb-accent);
  text-decoration: none;
}

.sidebar-links a:hover,
.sidebar-archives a:hover,
.sidebar-events a:hover,
.sidebar-widget ul a:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .site-body {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: static;
    order: -1; /* Événements à venir au-dessus des articles */
  }

  .site-main {
    order: 1;
  }
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.post-card__image-link {
  display: block;
  background: #eee;
}

.post-card__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}

.post-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.post-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--tb-accent);
}

.post-card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--tb-muted);
}

.post-card__excerpt {
  margin: 0;
  color: var(--tb-text);
}

.post-card__excerpt p {
  margin: 0 0 0.75rem;
}

.post-card__more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
}

.post-card--no-image .post-card__body {
  padding-top: 1.5rem;
}

.single-post {
  background: var(--tb-card);
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 1.5rem;
}

.single-post__title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.single-post__meta {
  margin: 0 0 1.5rem;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

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

.single-post__content table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.pagination a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  color: var(--tb-text);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pagination a:hover {
  color: var(--tb-accent);
  text-decoration: underline;
}

.pagination .nav-previous:empty,
.pagination .nav-next:empty {
  display: none;
}

.no-posts {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}
