/*
Theme Name: Frédéric Marin — Carnets d’Occitanie
Theme URI: https://frederic-marin.fr/
Author: Frédéric Marin
Description: Un thème personnel pastel consacré aux randonnées en Occitanie et au changement climatique, avec cartes Leaflet et traces GPX.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: frederic-marin
Tags: blog, custom-menu, featured-images, accessibility-ready
*/

body.admin-bar .site-header { top: 44px; }
.main-nav { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; list-style: none; }
.main-nav li { margin: 0; padding: 0; list-style: none; }
.main-nav a { display: block; padding: 10px 15px; border-radius: 999px; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--sky); }
.feature-art { display: block; background-position: center; background-size: cover; }
.feature-art.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(48,43,73,.05), rgba(48,43,73,.5)); }
.feature-art.has-image .feature-year, .feature-art.has-image .feature-caption { z-index: 2; }
.empty-state { max-width: 1500px; margin: 0 auto; padding: 70px 40px; border-radius: 28px; background: rgba(255,255,255,.55); text-align: center; }
.empty-state h3 { margin: 0 0 12px; font: 600 clamp(28px,4vw,46px)/1.05 var(--serif); }
.site-main { width: min(1180px, calc(100% - 40px)); margin: 70px auto 110px; }
.archive-header, .article-header { max-width: 900px; margin: 0 auto 55px; text-align: center; }
.archive-header h1, .article-header h1 { margin: 25px 0 20px; font-size: clamp(52px,8vw,100px); line-height: .9; }
.archive-description, .article-meta { color: #716c83; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; min-height: 370px; overflow: hidden; border-radius: 26px; background: #f7dce5; box-shadow: 0 14px 35px rgba(48,43,73,.08); }
.post-card:nth-child(3n+2) { background: #e8e1fb; }
.post-card:nth-child(3n) { background: #cfeaf5; }
.post-card-image { height: 210px; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-content { display: flex; flex: 1; flex-direction: column; padding: 26px; }
.post-card-content h2 { margin: 13px 0; font-size: 30px; line-height: 1.05; }
.post-card-content p { line-height: 1.6; }
.post-card-content .text-link { align-self: flex-start; margin-top: auto; }
.single-article { max-width: 900px; margin: 70px auto 120px; padding: 0 24px; }
.single-article .article-header { margin-bottom: 42px; }
.single-article .featured-image { margin: 0 0 42px; overflow: hidden; border-radius: 30px; }
.single-article .featured-image img { width: 100%; height: auto; display: block; }
.entry-content { font-size: 18px; line-height: 1.8; }
.entry-content h2, .entry-content h3 { margin-top: 2em; font-family: var(--serif); line-height: 1.1; }
.entry-content h2 { font-size: 44px; }
.entry-content h3 { font-size: 32px; }
.entry-content a { color: #6752bd; text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 22px; }
.entry-content blockquote { margin: 2em 0; padding: 30px; border-radius: 22px; background: #ffe6a7; font-size: 32px; }
.trail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 28px; }
.trail-stat { padding: 18px; border-radius: 18px; background: #e8e1fb; }
.trail-stat:nth-child(2) { background: #c9eadb; }
.trail-stat:nth-child(3) { background: #ffe6a7; }
.trail-stat:nth-child(4) { background: #f7dce5; }
.trail-stat small { display: block; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .12em; font-size: 9px; }
.trail-stat strong { font: 600 20px/1.1 var(--serif); }
.single-map-wrap { margin: 36px 0; padding: 10px; border-radius: 28px; background: #c9eadb; }
#single-map { height: 530px; border-radius: 20px; overflow: hidden; }
.post-navigation { display: flex; justify-content: space-between; gap: 20px; margin-top: 60px; padding-top: 25px; border-top: 1px solid var(--line); }
.comments-area { margin-top: 65px; }
.comments-area input, .comments-area textarea { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.comments-area .submit { width: auto; border: 0; color: white; background: #7560c7; cursor: pointer; }
.screen-reader-text { position: absolute!important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { width: auto; height: auto; clip: auto; margin: 8px; padding: 12px; z-index: 9999; background: white; }

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .trail-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  body.admin-bar .site-header { top: 53px; }
  nav .main-nav { flex-direction: column; align-items: stretch; }
  .posts-grid { grid-template-columns: 1fr; }
  .site-main { margin-top: 50px; }
  #single-map { height: 430px; }
}
