/*
Theme Name: Atelier
Theme URI: https://example.com/
Author: Lionel
Author URI: https://example.com/
Description: Theme WordPress classique, leger et modulable, dans l'esprit d'Astra : palette, largeurs et mise en page reglables depuis Apparence > Personnaliser, avec modeles de page, widgets et menus standards.
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atelier
Tags: custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --heading: #17221f;
  --text: #17221f;
  --muted: #66736d;
  --bg: #f5f3ed;
  --surface: #fffdf8;
  --border: #d9ded8;
  --accent: #d7653d;
  --accent-hover: #a9472a;
  --font-body: Georgia, "Times New Roman", serif;
  --font-heading: Arial, Helvetica, sans-serif;
  --content-width: 1120px;
  --reading-width: 720px;
  --space: clamp(1rem, 2vw, 1.5rem);
  --header-bg: var(--surface);
  --header-text: var(--text);
  --header-padding-top: 20px;
  --header-padding-bottom: 20px;
  --header-margin-bottom: 0px;
  --footer-bg: var(--surface);
  --footer-text: var(--muted);
  --footer-padding-top: 32px;
  --footer-padding-bottom: 32px;
  --footer-margin-top: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-hover); text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
a:hover { color: var(--text); }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }
.container { width: min(calc(100% - 2rem), var(--content-width)); margin-inline: auto; }
.narrow { width: min(calc(100% - 2rem), var(--reading-width)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { border-bottom: 1px solid var(--border); background: var(--header-bg); color: var(--header-text); margin-bottom: var(--header-margin-bottom); position: sticky; top: 0; z-index: 100; }
.atelier-header-static .site-header { position: static; }
.header-inner { padding-top: var(--header-padding-top); padding-bottom: var(--header-padding-bottom); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-branding { display: flex; flex-direction: column; line-height: 1.1; }
.site-title { color: var(--header-text); font-family: var(--font-heading); font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; text-decoration: none; text-transform: uppercase; }
.site-description { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; }
.primary-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin: 0; padding: 0; list-style: none; font-family: var(--font-heading); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; }
.primary-menu a { color: var(--header-text); text-decoration: none; }
.primary-menu a:hover { color: var(--accent); }
.primary-menu ul { list-style: none; margin: 0.5rem 0 0; padding: 0 0 0 1rem; }

.hero { padding: clamp(4rem, 10vw, 8rem) 0; background: var(--text); color: var(--surface); }
.hero h1 { max-width: 850px; margin: 0; font-size: clamp(2.7rem, 7vw, 6.5rem); font-weight: 400; line-height: 0.98; letter-spacing: -0.03em; }
.hero p { max-width: 600px; margin: 2rem 0 0; color: #dce4dd; font-size: 1.12rem; }
.content-section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-heading { margin: 0 0 2rem; color: var(--heading); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 400; line-height: 1.1; }
.archive-description { margin: -1rem 0 2rem; color: var(--muted); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--border); background: var(--border); }
.post-card { min-height: 100%; padding: 1.5rem; background: var(--surface); }
.post-card h2 { margin: 0.6rem 0 0.75rem; font-size: 1.55rem; font-weight: 400; line-height: 1.15; }
.post-card h2 a { color: var(--heading); text-decoration: none; }
.post-card h2 a:hover { color: var(--accent-hover); }
.post-meta { color: var(--muted); font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--heading); line-height: 1.15; }
.entry-content blockquote { margin-inline: 0; padding: 0 1.5rem; border-left: 4px solid var(--accent); font-size: 1.3rem; }
.entry-title { margin: 0 0 1rem; color: var(--heading); font-size: clamp(2.4rem, 6vw, 5.5rem); font-weight: 400; line-height: 1; }
.page-header { padding: 4rem 0 2rem; border-bottom: 1px solid var(--border); }
.pagination { margin-top: 3rem; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; }
.post-navigation { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-heading); font-size: 0.85rem; font-weight: 700; }

.site-footer { padding: var(--footer-padding-top) 0 var(--footer-padding-bottom); margin-top: var(--footer-margin-top); border-top: 1px solid var(--border); color: var(--footer-text); background: var(--footer-bg); font-family: var(--font-heading); font-size: 0.78rem; }

/* Modele "Page avec barre laterale" */
.layout-sidebar { display: flex; flex-wrap: wrap; gap: var(--space) 3rem; align-items: flex-start; }
.layout-main { flex: 2 1 480px; min-width: 0; }
.layout-aside { flex: 1 1 260px; min-width: 0; }
.atelier-sidebar-left .layout-sidebar { flex-direction: row-reverse; }
.atelier-sidebar .widget { margin-bottom: 2.5rem; }
.atelier-sidebar .widget-title,
.atelier-sidebar h2 { margin: 0 0 1rem; font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.atelier-sidebar ul { margin: 0; padding: 0; list-style: none; }
.atelier-sidebar li { margin-bottom: 0.6rem; }
.atelier-sidebar .search-form { display: flex; gap: 0.5rem; }
.atelier-sidebar .search-form input[type="search"] { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--border); background: var(--surface); font-family: inherit; }
.atelier-sidebar .search-form button { padding: 0.5rem 0.9rem; border: 1px solid var(--text); background: var(--text); color: var(--surface); font-family: var(--font-heading); font-size: 0.78rem; text-transform: uppercase; cursor: pointer; }
.widget-empty-notice { color: var(--muted); font-size: 0.85rem; }

/* Grille des articles d'une categorie sur l'accueil (shortcode [atelier_home_posts]) */
.atelier-home-category { border-top: 1px solid var(--border); }
.atelier-meta { color: var(--muted); font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
.atelier-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  background: var(--border);
}
.atelier-category-grid > li { background: var(--surface); margin: 0; padding: 1.5rem; }
.atelier-category-grid h3 { margin: 0.6rem 0 0.75rem; font-size: 1.55rem; font-weight: 400; line-height: 1.15; }
.atelier-category-grid h3 a { color: var(--heading); text-decoration: none; }
.atelier-category-grid h3 a:hover { color: var(--accent-hover); }

@media (max-width: 780px) {
  .header-inner { align-items: flex-start; flex-direction: column; }
  .post-grid, .atelier-category-grid { grid-template-columns: 1fr; }
  .primary-menu { gap: 0.75rem 1rem; }
  .layout-sidebar, .atelier-sidebar-left .layout-sidebar { flex-direction: column; }
}
