/*
Theme Name: Arbor Data
Theme URI: https://arbor-data.fr
Author: Arbor Data
Author URI: https://arbor-data.fr
Description: Revue intellectuelle augmentée — blog éditorial haut de gamme avec neumorphisme sobre et typographie soignée.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arbor-data
Tags: blog, editorial, custom-menu, featured-images, translation-ready
*/

/* ========================================
   VARIABLES & FOUNDATION
   ======================================== */

:root {
  /* Fond principal */
  --bg-primary: #e8e4dc;
  --bg-secondary: #ddd8cf;
  --bg-tertiary: #d2cdc4;

  /* Texte */
  --text-primary: #2a2a28;
  --text-secondary: #5a5852;
  --text-tertiary: #8a857c;

  /* Accent 1 — Bronze */
  --accent-gold: #b8976a;
  --accent-gold-light: #c8a45e;
  --accent-gold-muted: #a08860;

  /* Accent 2 — Vert sapin */
  --accent-green: #1a3a2a;
  --accent-green-light: #2d5a42;
  --accent-green-muted: #3a6b52;

  /* Accent data */
  --accent-data: #4a7c68;

  /* Ombres neumorphiques */
  --shadow-light: #f2ede5;
  --shadow-dark: #c8c3ba;

  --neu-raised: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --neu-raised-sm: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  --neu-inset: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  --neu-inset-sm: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);

  /* Transition */
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Fonts */
  --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-data);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--accent-green-light);
}

ul, ol {
  list-style: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
}

p {
  margin-bottom: 1.5rem;
}

blockquote {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  border-left: 3px solid var(--accent-gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--bg-primary);
  box-shadow: var(--neu-raised);
  border-radius: 12px;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 680px;
}

.section {
  padding: 5rem 0;
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  box-shadow: 4px 4px 12px var(--shadow-dark), -4px -4px 12px var(--shadow-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-logo:hover {
  color: var(--accent-green-light);
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: ;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-smooth);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--text-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-smooth);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: var(--bg-secondary);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--accent-data);
}

.footer-sep {
  margin: 0 0.75rem;
}

/* ========================================
   HERO (front-page)
   ======================================== */

.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: var(--accent-green);
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.05em;
}

.hero-block {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 2rem 3rem;
  background: var(--bg-primary);
  box-shadow: var(--neu-raised);
  border-radius: 16px;
}

/* ========================================
   CARDS
   ======================================== */

.card-article {
  background: var(--bg-primary);
  box-shadow: var(--neu-raised);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-article:hover {
  box-shadow: var(--neu-raised-sm);
  transform: translateY(1px);
}

.card-article .card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.card-article .card-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.card-article .card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.card-article .card-title a:hover {
  color: var(--accent-green);
}

.card-article .card-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.card-article .card-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ========================================
   SECTION APPROCHE (front-page)
   ======================================== */

.section-approche {
  background: var(--bg-secondary);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.pillar {
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent-data);
}

.pillar h3 {
  margin-bottom: 0.75rem;
}

.pillar p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ========================================
   CTA NEWSLETTER
   ======================================== */

.cta-newsletter {
  background: var(--bg-primary);
  box-shadow: var(--neu-inset);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-newsletter h2 {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.cta-newsletter p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter-form input[type=email] {
  background: var(--bg-primary);
  box-shadow: var(--neu-inset-sm);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  width: 100%;
  max-width: 320px;
  color: var(--text-primary);
  outline: none;
}

.newsletter-form input[type=email]:focus {
  box-shadow: var(--neu-inset), 0 0 0 2px var(--accent-green-muted);
}

.newsletter-form input[type=email]::placeholder {
  color: var(--text-tertiary);
}

.newsletter-form button {
  background: var(--accent-green);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: var(--neu-raised-sm);
  transition: var(--transition-smooth);
}

.newsletter-form button:hover {
  background: var(--accent-green-light);
  box-shadow: var(--neu-inset-sm);
}

.newsletter-form button:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ========================================
   SINGLE ARTICLE
   ======================================== */

.article-header {
  text-align: center;
  padding: 4rem 0 2rem;
  max-width: 780px;
  margin: 0 auto;
}

.article-header h1 {
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  align-items: start;
}

/* Table des matières */
.toc {
  background: var(--bg-primary);
  box-shadow: var(--neu-inset);
  border-radius: 12px;
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}

.toc-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.toc ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  display: block;
  padding: 0.25rem 0;
}

.toc a.active,
.toc a:hover {
  color: var(--accent-green);
}

/* Article content */
.article-content {
  max-width: 680px;
}

.article-content h2 {
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-top: 1rem;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content ul {
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: var(--accent-data);
  text-decoration: underline;
  text-decoration-color: var(--accent-gold-muted);
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--accent-green);
  text-decoration-color: var(--accent-green);
}

/* Bloc insight dans article */
.bloc-insight {
  background: var(--bg-primary);
  box-shadow: var(--neu-raised);
  border-left: 3px solid var(--accent-gold);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  margin: 2.5rem 0;
}

.bloc-insight p:last-child {
  margin-bottom: 0;
}

/* Bloc framework */
.bloc-framework {
  background: var(--bg-secondary);
  box-shadow: var(--neu-raised);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.bloc-framework .pillar {
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  border-radius: 12px;
  padding: 1.5rem;
}

/* Data point */
.data-point {
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
}

.data-point .number {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-data);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.data-point .label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.5rem;
}

/* Article footer */
.article-footer {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--bg-tertiary);
}

.related-posts {
  margin-top: 3rem;
}

.related-posts h2 {
  text-align: center;
  margin-bottom: 2rem;
}

/* ========================================
   ARCHIVE / BLOG
   ======================================== */

.archive-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.archive-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.category-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.category-filters a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.category-filters a:hover,
.category-filters a.active {
  box-shadow: var(--neu-inset-sm);
  color: var(--accent-green);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 2rem 0;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.pagination .page-numbers:hover {
  box-shadow: var(--neu-inset-sm);
  color: var(--accent-green);
}

.pagination .page-numbers.current {
  box-shadow: var(--neu-inset-sm);
  color: var(--accent-green);
}

.pagination .page-numbers.dots {
  box-shadow: none;
  background: transparent;
}

/* ========================================
   PAGE TEMPLATE
   ======================================== */

.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.page-content h1 {
  margin-bottom: 2rem;
  text-align: center;
}

/* ========================================
   404
   ======================================== */

.page-404 {
  text-align: center;
  padding: 6rem 1.5rem;
}

.page-404 h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent-gold-muted);
  margin-bottom: 1rem;
}

.page-404 p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-block;
  background: var(--bg-primary);
  box-shadow: var(--neu-raised-sm);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn:hover {
  box-shadow: var(--neu-inset-sm);
  color: var(--text-primary);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent-green);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--accent-green-light);
  color: var(--bg-primary);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SECTION TITLES
   ======================================== */

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.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;
}

:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Mobile */
@media (max-width: 639px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .pillars {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc {
    position: static;
    margin-bottom: 2rem;
    box-shadow: var(--neu-inset-sm);
  }
  .hero {
    padding: 3rem 0 2rem;
  }
  .hero-block {
    padding: 1.5rem 2rem;
    box-shadow: var(--neu-raised-sm);
  }
  .section {
    padding: 3rem 0;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: var(--neu-raised);
    padding: 1.5rem;
    border-radius: 0 0 16px 16px;
  }
  .main-nav.active {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  .menu-toggle {
    display: block;
  }
  .card-article {
    box-shadow: var(--neu-raised-sm);
  }
  .cta-newsletter {
    padding: 2rem 1.5rem;
  }
  .newsletter-form {
    flex-direction: column;
    align-items: center;
  }
  .newsletter-form input[type=email] {
    max-width: 100%;
  }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars .pillar:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
  .article-layout {
    grid-template-columns: 180px 1fr;
    gap: 2rem;
  }
}

/* Large */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ========================================
   WORDPRESS DEFAULTS
   ======================================== */

.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
