/*
Theme Name: Néantrix — Que Notre Volonté Soit Fête !
Theme URI: https://neantrix.fr
Author: Jérôme Querrec
Author URI: https://neantrix.fr
Description: Thème sur-mesure pour le blog Néantrix, construit autour du voyage du microcosme au macrocosme. Un point d'origine doré, derrière le titre, irradie sur toute la page ; le fil du même or descend en capsule arrondie à travers chaque article, comme un rappel que tout est déjà là, contenu dans la graine. Formes rondes assumées partout : coins arrondis, capsules, pastilles et pilules.
Version: 1.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: neantrix
*/

/* ==========================================================================
   1. TOKENS — palette, typographie, rythme
   ========================================================================== */
:root {
  /* Couleurs — le point d'origine (ombre nocturne du microcosme) irradie vers l'éclosion (macrocosme) */
  --color-ground: #2E1B2A;        /* aubergine profonde — la nuit intérieure, le puits du soi */
  --color-ground-soft: #3D2637;   /* variante pour cartes sur fond sombre */
  --color-mist: #F3E6DE;          /* éclosion rosée — l'ouverture, le macrocosme (pas de crème/beige classique) */
  --color-mist-soft: #F8EFE9;
  --color-gold: #C9973F;          /* or de la volonté — le point d'origine, le fil qui traverse tout */
  --color-green: #3F5C46;         /* vert profond — le règne végétal, la croissance vers l'extérieur */
  --color-text-dark: #2E1B2A;
  --color-text-light: #F1E6DC;
  --color-text-muted: #7A5F6C;

  /* Typographie */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Rythme */
  --content-width: 42rem;
  --wide-width: 68rem;
  --line: 1px solid rgba(27, 31, 43, 0.12);
  --line-light: 1px solid rgba(241, 239, 230, 0.18);
  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-mist);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 480;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-green);
}
.eyebrow a,
.eyebrow a:visited { color: var(--color-green); text-decoration: none; }
.eyebrow a:hover { color: var(--color-gold); text-decoration: none; }

/* ==========================================================================
   3. LE POINT D'ORIGINE — élément signature
   Un point doré irradie doucement derrière le titre : la graine qui contient
   déjà tout. Le même or redescend ensuite en un fil fin à travers chaque
   article — le rappel que le macrocosme n'est jamais que le microcosme déplié.
   ========================================================================== */
.site-header {
  position: relative;
  background: var(--color-ground);
  color: var(--color-text-light);
  padding: 3.5rem 1.5rem 0;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}
.origin-point {
  position: absolute;
  left: 8%;
  top: 1.2rem;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 151, 63, 0.55) 0%, rgba(201, 151, 63, 0) 70%);
  pointer-events: none;
}
.site-header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  position: relative;
}
.site-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 460;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  margin: 0;
  display: inline-block;
}
.site-title a { text-decoration: none; color: inherit; }
.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(241, 239, 230, 0.6);
  margin: 0 0 2.2rem;
}
.primary-nav {
  padding-bottom: 3rem;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(241, 239, 230, 0.75);
  padding: 0.4em 0.9em;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--color-ground); background-color: var(--color-gold); }

/* ==========================================================================
   3bis. LA BANNIÈRE « GLOBALITÉ » — image d'accueil
   Le phénix qui s'élève depuis un point de lumière, entouré de la foule et
   de la ville : c'est le point d'origine devenu visible, la graine dépliée
   en macrocosme. Le cadre chevauche le bas arrondi du bandeau pour relier
   les deux plans plutôt que les juxtaposer.
   ========================================================================== */
.hero-globalite {
  max-width: var(--wide-width);
  margin: -2rem auto 3.5rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}
.hero-globalite figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 6px solid var(--color-mist);
  box-shadow: 0 24px 48px rgba(46, 27, 42, 0.28);
}
.hero-globalite img { width: 100%; height: auto; display: block; }
.hero-globalite figcaption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-muted);
  margin-top: 1.1rem;
}
@media (max-width: 640px) {
  .hero-globalite { margin-top: -1.25rem; }
  .hero-globalite figure { border-width: 4px; }
}

/* ==========================================================================
   4. LAYOUT PRINCIPAL
   ========================================================================== */
.site-main { max-width: var(--wide-width); margin: 0 auto; padding: 3rem 1.5rem 5rem; }

/* Colonne éditoriale ancrée au fil d'or — le point d'origine qui descend à travers le texte, en capsule arrondie */
.entry-content,
.single .entry-header,
.page .entry-header {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.6rem;
  position: relative;
}
.entry-content::before,
.single .entry-header::before,
.page .entry-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-gold);
}

/* ==========================================================================
   5. GRILLE D'ARTICLES
   ========================================================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.4rem 2rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--color-mist-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(46, 27, 42, 0.12); }
.post-card__thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--color-ground);
  position: relative;
  overflow: hidden;
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* graine dorée en remplacement d'une image absente — garde l'identité de la marque */
.post-card__thumb--seed::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 3.4rem; height: 3.4rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 151, 63, 0.9) 0%, rgba(201, 151, 63, 0) 72%);
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.5rem 1.6rem 1.7rem;
  flex: 1;
}
.post-card__meta { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-green); margin: 0; }
.post-card__meta a,
.post-card__meta a:visited { color: var(--color-green); text-decoration: none; }
.post-card__meta a:hover { color: var(--color-gold); text-decoration: none; }
.post-card__title { font-size: 1.35rem; margin: 0; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { color: var(--color-green); }
.post-card__excerpt { color: var(--color-text-muted); margin: 0; font-size: 0.96rem; }
.post-card__byline {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
.post-card__avatar { display: block; line-height: 0; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.post-card__avatar img { display: block; width: 26px; height: 26px; border-radius: 50%; }

/* ==========================================================================
   6. ARTICLE SIMPLE / PAGE
   ========================================================================== */
.entry-header { padding-top: 3rem; padding-bottom: 1.5rem; }
.entry-title {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-style: italic;
}
.entry-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-muted); letter-spacing: 0.05em; margin-top: 0.6rem; }
.entry-content { padding-top: 1rem; padding-bottom: 2rem; }
.entry-content p { margin: 0 0 1.3em; }
.entry-content h2 { font-size: 1.7rem; margin-top: 2.2em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.8em; }
.entry-content blockquote {
  margin: 2em 0;
  padding: 1em 1.6em;
  border-radius: var(--radius-md);
  background: var(--color-mist-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-green);
}
.entry-content a { color: var(--color-green); text-decoration-color: var(--color-gold); }
.entry-content code { font-family: var(--font-mono); background: var(--color-mist-soft); padding: 0.15em 0.4em; border-radius: var(--radius-sm); }
.entry-thumbnail { border-radius: var(--radius-lg); overflow: hidden; }

/* ==========================================================================
   7. SIDEBAR / WIDGETS (optionnel, discret)
   ========================================================================== */
.widget-area { max-width: var(--content-width); margin: 3rem auto 0; padding-top: 2.4rem; position: relative; }
.widget-area::before {
  content: "";
  position: absolute;
  top: 0; left: 1.6rem;
  width: 3rem; height: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-gold);
}
.widget-title { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-green); margin-bottom: 0.8rem; }

/* ==========================================================================
   7bis. BLOC NEWSLETTER
   Reprend le point d'origine en miniature — la graine qu'on sème dans la
   boîte mail de quelqu'un.
   ========================================================================== */
.newsletter-block {
  max-width: var(--wide-width);
  margin: 3.5rem auto;
  padding: 2.2rem 2rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
  position: relative;
  overflow: hidden;
}
.newsletter-block--light {
  background: var(--color-mist-soft);
  max-width: var(--content-width);
}
.newsletter-block--dark {
  background: var(--color-ground-soft);
  color: var(--color-text-light);
}
.newsletter-block__mark {
  position: absolute;
  left: -2rem; top: 50%;
  width: 7rem; height: 7rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: rgba(201, 151, 63, 0.28);
  pointer-events: none;
}
.newsletter-block__text { flex: 1 1 220px; position: relative; z-index: 1; }
.newsletter-block__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  margin: 0 0 0.3rem;
}
.newsletter-block__sub {
  font-size: 0.86rem;
  margin: 0;
  color: var(--color-text-muted);
}
.newsletter-block--dark .newsletter-block__sub { color: rgba(241, 230, 220, 0.65); }
.newsletter-block__form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 1 1 280px;
  position: relative;
  z-index: 1;
}
.newsletter-block__form input[type="email"] {
  flex: 1 1 180px;
  margin: 0;
  background: var(--color-mist);
}
.newsletter-block--dark .newsletter-block__form input[type="email"] {
  background: rgba(241, 230, 220, 0.1);
  border-color: rgba(241, 230, 220, 0.25);
  color: var(--color-text-light);
}
.newsletter-block__form button { flex: 0 0 auto; }
@media (max-width: 640px) {
  .newsletter-block { padding: 1.8rem 1.5rem; }
  .newsletter-block__form { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-ground);
  color: rgba(241, 239, 230, 0.6);
  margin-top: 4rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.site-footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 2.2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.site-footer a { color: var(--color-gold); text-decoration: none; }

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .entry-content, .entry-header { padding-left: 1rem; }
}

/* ==========================================================================
   10. PAGINATION
   ========================================================================== */
.pagination { display: flex; gap: 1rem; justify-content: space-between; max-width: var(--content-width); margin: 3rem auto 0; padding-left: 1.6rem; font-family: var(--font-mono); font-size: 0.8rem; }
.pagination a {
  text-decoration: none;
  padding: 0.5em 1.1em;
  border-radius: var(--radius-pill);
  background: var(--color-mist-soft);
  transition: background-color 0.15s ease;
}
.pagination a:hover { background: var(--color-gold); color: var(--color-ground); }

/* Skip link (accessibilité) */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-gold); color: var(--color-ground);
  padding: 0.6em 1.2em; border-radius: var(--radius-pill); z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   11. FORMULAIRES (commentaires, recherche)
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7em 1em;
  border: 1px solid rgba(46, 27, 42, 0.18);
  border-radius: var(--radius-md);
  background: var(--color-mist-soft);
  color: var(--color-text-dark);
}
input[type="submit"],
button {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7em 1.6em;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--color-gold);
  color: var(--color-ground);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
input[type="submit"]:hover,
button:hover { background: var(--color-green); color: var(--color-text-light); }
