/*
Theme Name: Publyra
Theme URI: https://publyra.com
Author: Publyra
Author URI: https://publyra.com
Description: Thème éditorial léger du blog Publyra, aligné sur l'identité visuelle du SaaS.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: publyra
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --publyra-brand-50: #fff3ee;
  --publyra-brand-100: #ffe1d6;
  --publyra-brand-300: #f79679;
  --publyra-brand-500: #d9583b;
  --publyra-brand-600: #c4492f;
  --publyra-brand-700: #a43a28;
  --publyra-accent-100: #e2e9e1;
  --publyra-accent-600: #536956;
  --publyra-canvas: #f6f3ec;
  --publyra-surface: #fffcf7;
  --publyra-surface-muted: #f0ece3;
  --publyra-ink: #17212b;
  --publyra-ink-muted: #5f6870;
  --publyra-line: #ded8cd;
  --publyra-line-strong: #cfc7ba;
  --publyra-content: 760px;
  --publyra-wide: 1200px;
  --publyra-radius: 18px;
  --publyra-font-sans: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --publyra-font-display: Newsreader, Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--publyra-canvas);
  color: var(--publyra-ink);
  font-family: var(--publyra-font-sans);
  font-feature-settings: "rlig" 1, "calt" 1;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
a { color: var(--publyra-brand-600); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--publyra-brand-700); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid rgba(217, 88, 59, .42);
  outline-offset: 3px;
}
::selection { background: var(--publyra-brand-100); color: var(--publyra-brand-700); }

.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 {
  z-index: 100000; top: 8px; left: 8px; width: auto; height: auto;
  padding: 12px 16px; clip: auto; background: white; color: var(--publyra-ink);
}
.site-shell { width: min(calc(100% - 32px), var(--publyra-wide)); margin-inline: auto; }

/* Header partagé visuellement avec la landing Publyra. */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(23,33,43,.96);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: white; text-decoration: none; }
.brand:hover { color: white; }
.brand-mark {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  background: rgba(255,255,255,.1); font-family: var(--publyra-font-display);
  font-size: 20px; font-style: italic;
}
.brand-name { font-family: var(--publyra-font-display); font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.primary-navigation { display: flex; align-items: center; gap: 22px; }
.primary-navigation ul { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { color: #d1d5db; font-size: 14px; font-weight: 650; text-decoration: none; transition: color .18s ease; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a, .primary-navigation .current_page_parent > a { color: white; }
.primary-navigation .menu-item-resources > a { color: white; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-login { color: #d1d5db; font-size: 14px; font-weight: 650; text-decoration: none; }
.button {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 10px 17px;
  background: var(--publyra-brand-500); color: white; font-weight: 750; text-decoration: none;
  box-shadow: 0 2px 0 var(--publyra-brand-700); transition: transform .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--publyra-brand-600); color: white; }
.menu-toggle { display: none; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(255,255,255,.06); color: white; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Page Ressources. */
.blog-hero { position: relative; overflow: hidden; background: var(--publyra-ink); color: white; padding: 76px 0 82px; }
.blog-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .38;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 32px 32px;
}
.blog-hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -120px; top: -190px; border-radius: 50%; background: rgba(83,105,86,.3); filter: blur(90px); }
.blog-hero-inner { position: relative; z-index: 1; max-width: 780px; }
.eyebrow { margin: 0 0 14px; color: var(--publyra-brand-300); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.blog-hero h1, .archive-header h1, .entry-title {
  margin: 0; font-family: var(--publyra-font-display); font-weight: 500;
  letter-spacing: -.035em; line-height: 1.02;
}
.blog-hero h1 { max-width: 720px; font-size: clamp(46px, 7vw, 76px); text-wrap: balance; }
.blog-hero h1 em { color: var(--publyra-brand-300); font-weight: 400; }
.blog-hero-description { max-width: 650px; margin: 22px 0 0; color: #d1d5db; font-size: clamp(17px, 2vw, 20px); line-height: 1.65; }
.posts-section { padding: 74px 0 92px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-family: var(--publyra-font-display); font-size: clamp(34px, 5vw, 48px); font-weight: 500; letter-spacing: -.03em; }
.section-heading p { max-width: 480px; margin: 0; color: var(--publyra-ink-muted); }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card { overflow: hidden; border: 1px solid var(--publyra-line); border-radius: var(--publyra-radius); background: var(--publyra-surface); box-shadow: 0 14px 40px rgba(23,33,43,.06); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 20px 50px rgba(23,33,43,.1); }
.post-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #e5d7c1, #9bae9b 58%, #526b58); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.025); }
.post-card-placeholder { width: 100%; height: 100%; opacity: .45; background-image: linear-gradient(rgba(23,33,43,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(23,33,43,.08) 1px, transparent 1px); background-size: 28px 28px; }
.post-card-body { padding: 24px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--publyra-ink-muted); font-size: 12px; }
.post-category { color: var(--publyra-brand-600); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.post-card-title { margin: 12px 0 10px; font-family: var(--publyra-font-display); font-size: 27px; font-weight: 550; letter-spacing: -.025em; line-height: 1.12; }
.post-card-title a { color: var(--publyra-ink); text-decoration: none; }
.post-card-excerpt { margin: 0; color: var(--publyra-ink-muted); font-size: 14px; line-height: 1.7; }
.post-card-link { display: inline-flex; margin-top: 18px; color: var(--publyra-brand-600); font-size: 14px; font-weight: 750; text-decoration: none; }

/* Archives et recherche. */
.archive-main { padding: 66px 0 92px; }
.archive-header { max-width: 760px; margin-bottom: 38px; }
.archive-header h1 { font-size: clamp(40px, 6vw, 62px); }
.archive-description { margin-top: 16px; color: var(--publyra-ink-muted); }
.search-form { display: flex; max-width: 560px; gap: 10px; margin-top: 26px; }
.search-field { min-width: 0; flex: 1; border: 1px solid var(--publyra-line-strong); border-radius: 11px; padding: 12px 14px; background: var(--publyra-surface); color: var(--publyra-ink); }
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 42px; padding: 8px 12px; border: 1px solid var(--publyra-line); border-radius: 9px; background: var(--publyra-surface); color: var(--publyra-ink); text-align: center; text-decoration: none; }
.pagination .current { border-color: var(--publyra-brand-500); background: var(--publyra-brand-500); color: white; }
.empty-state { padding: 42px; border: 1px solid var(--publyra-line); border-radius: var(--publyra-radius); background: var(--publyra-surface); text-align: center; }

/* Article. */
.single-main { padding: 58px 0 94px; }
.breadcrumbs { max-width: var(--publyra-content); margin: 0 auto 26px; color: var(--publyra-ink-muted); font-size: 13px; }
.breadcrumbs a { color: inherit; }
.article-header { max-width: 900px; margin: 0 auto 42px; text-align: center; }
.article-header .post-meta { justify-content: center; }
.entry-title { margin-top: 18px; font-size: clamp(42px, 7vw, 72px); text-wrap: balance; }
.entry-subtitle { max-width: 730px; margin: 22px auto 0; color: var(--publyra-ink-muted); font-size: 19px; line-height: 1.65; }
.article-featured { width: min(calc(100% - 32px), 1060px); max-height: 620px; margin: 0 auto 52px; border-radius: 24px; object-fit: cover; box-shadow: 0 24px 70px rgba(23,33,43,.12); }
.entry-content { max-width: var(--publyra-content); margin: 0 auto; font-size: 18px; line-height: 1.85; }
.entry-content > * { margin-top: 0; margin-bottom: 1.45em; }
.entry-content :is(h2,h3,h4) { margin-top: 1.7em; margin-bottom: .65em; color: var(--publyra-ink); font-family: var(--publyra-font-display); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.entry-content h2 { font-size: clamp(31px, 5vw, 42px); }
.entry-content h3 { font-size: clamp(25px, 4vw, 32px); }
.entry-content blockquote { margin-inline: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--publyra-brand-500); color: #3f4a53; font-family: var(--publyra-font-display); font-size: 25px; line-height: 1.45; }
.entry-content :is(ul,ol) { padding-left: 1.35em; }
.entry-content li + li { margin-top: .5em; }
.entry-content img { border-radius: 16px; }
.entry-content pre { overflow-x: auto; padding: 20px; border-radius: 12px; background: var(--publyra-ink); color: #f9fafb; font-size: 14px; }
.entry-content code:not(pre code) { padding: 2px 6px; border-radius: 5px; background: var(--publyra-surface-muted); font-size: .9em; }
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content :is(th,td) { padding: 10px 12px; border: 1px solid var(--publyra-line); text-align: left; }
.entry-content .alignwide { width: min(100vw - 32px, 1040px); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.article-tags { max-width: var(--publyra-content); margin: 42px auto 0; padding-top: 24px; border-top: 1px solid var(--publyra-line); }
.article-tags a { display: inline-flex; margin: 4px 4px 4px 0; padding: 6px 11px; border-radius: 999px; background: var(--publyra-surface-muted); color: var(--publyra-ink-muted); font-size: 12px; text-decoration: none; }
.article-cta { max-width: 900px; margin: 72px auto 0; padding: 42px; border-radius: 24px; background: var(--publyra-ink); color: white; text-align: center; }
.article-cta h2 { margin: 0; font-family: var(--publyra-font-display); font-size: clamp(32px, 5vw, 46px); font-weight: 500; line-height: 1.08; }
.article-cta p { max-width: 590px; margin: 15px auto 24px; color: #d1d5db; }
.post-navigation { max-width: 900px; margin: 44px auto 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-navigation a { display: block; height: 100%; padding: 20px; border: 1px solid var(--publyra-line); border-radius: 14px; background: var(--publyra-surface); color: var(--publyra-ink); text-decoration: none; }
.post-navigation .nav-next { text-align: right; }

/* Footer. */
.site-footer { border-top: 1px solid var(--publyra-line); background: var(--publyra-surface); padding: 52px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--publyra-line); }
.footer-description { max-width: 460px; margin: 15px 0 0; color: var(--publyra-ink-muted); font-size: 14px; }
.footer-navigation ul { display: flex; flex-wrap: wrap; justify-content: end; gap: 14px 24px; margin: 0; padding: 0; list-style: none; }
.footer-navigation a { color: var(--publyra-ink-muted); font-size: 14px; text-decoration: none; }
.footer-navigation a:hover { color: var(--publyra-brand-600); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; color: #8b9298; font-size: 12px; }

@media (max-width: 980px) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .primary-navigation, .header-login { display: none; }
  .menu-toggle { display: grid; }
  .site-header.is-open .primary-navigation {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    padding: 16px; border-top: 1px solid rgba(255,255,255,.1); background: var(--publyra-ink);
  }
  .site-header.is-open .primary-navigation ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .site-header.is-open .primary-navigation a { display: block; padding: 12px; border-radius: 9px; }
  .site-header.is-open .primary-navigation a:hover { background: rgba(255,255,255,.06); }
}
@media (max-width: 700px) {
  body.admin-bar .site-header { top: 46px; }
  .site-shell { width: min(calc(100% - 24px), var(--publyra-wide)); }
  .header-actions .button { display: none; }
  .blog-hero { padding: 58px 0 62px; }
  .posts-section, .archive-main { padding: 52px 0 68px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
  .posts-grid { grid-template-columns: 1fr; }
  .single-main { padding-top: 40px; }
  .article-header { text-align: left; }
  .article-header .post-meta { justify-content: flex-start; }
  .entry-content { font-size: 17px; }
  .article-cta { padding: 32px 22px; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { text-align: left; }
  .footer-top { grid-template-columns: 1fr; align-items: start; }
  .footer-navigation ul { justify-content: start; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

