/*
Theme Name: Bonsai Entretien v2
Theme URI: https://www.bonsai-entretien.fr
Description: Thème botanique moderne pour Bonsai Entretien
Author: Arnaud Bruckler
Version: 1.0
Text Domain: bonsai-v2
*/

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-900: #1a3a2a;
  --green-800: #1e4d35;
  --green-700: #276749;
  --green-600: #2f855a;
  --green-500: #38a169;
  --green-400: #48bb78;
  --green-100: #f0fff4;
  --green-50:  #f7fdf9;

  --earth-900: #3d2c1e;
  --earth-700: #6b4c35;
  --earth-500: #a0845c;
  --earth-300: #d4c5a9;
  --earth-100: #f5f0e8;

  --gray-900: #1a1a2e;
  --gray-700: #4a4a5a;
  --gray-500: #717185;
  --gray-300: #c4c4d0;
  --gray-100: #f4f4f7;
  --gray-50:  #fafafa;

  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --content-width: 1200px;
  --content-narrow: 780px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-700); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-500); }

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

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--gray-900); line-height: 1.3; }
.species-hero h1, .page-hero h1, .home-hero h1 { color: var(--white); }
h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 600; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.75rem; }
p { margin-bottom: 1.2rem; }
ul, ol { margin: 0 0 1.2rem 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ── Layout ───────────────────────────────────────── */
.site-container { min-height: 100vh; display: flex; flex-direction: column; }
.content-wrap { flex: 1; }

.container { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--content-narrow); margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-800);
}

.site-logo img { height: 40px; width: auto; }
.site-logo span { color: var(--green-500); }

.site-nav > ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; }
.site-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  display: block;
}
.site-nav > ul > li > a:hover { color: var(--green-700); border-bottom-color: var(--green-500); }

/* Dropdown */
.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  background: var(--white);
  min-width: 220px;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  z-index: 200;
  list-style: none;
}
.site-nav > ul > li:hover > .sub-menu { display: block; }
.site-nav .sub-menu li { margin: 0; }
.site-nav .sub-menu a {
  padding: 8px 20px;
  font-size: 0.85rem;
  color: var(--gray-700);
  border-bottom: none;
}
.site-nav .sub-menu a:hover { background: var(--green-50); color: var(--green-700); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gray-700); margin: 5px 0; transition: 0.3s; }

/* ── Species Hero ─────────────────────────────────── */
.species-hero {
  position: relative;
  background: var(--green-900);
  color: var(--white);
  overflow: hidden;
}

.species-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
}

.species-hero__content {
  position: relative;
  z-index: 2;
  padding: 80px 0 60px;
}

.species-hero__breadcrumb {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 16px;
}
.species-hero__breadcrumb a { color: var(--green-400); }

.species-hero__title {
  font-size: 3rem;
  font-family: var(--font-serif);
  margin-bottom: 8px;
}

.species-hero__latin {
  font-style: italic;
  font-size: 1.3rem;
  opacity: 0.7;
  font-family: var(--font-serif);
}

/* ── Species Quick Facts ──────────────────────────── */
.species-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: -30px 24px 0;
  position: relative;
  z-index: 3;
  box-shadow: var(--shadow-lg);
}

.species-fact {
  background: var(--white);
  padding: 20px;
  text-align: center;
}

.species-fact__icon { font-size: 1.5rem; margin-bottom: 6px; }
.species-fact__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); margin-bottom: 4px; }
.species-fact__value { font-size: 0.95rem; font-weight: 600; color: var(--gray-900); }

/* ── Species Content ──────────────────────────────── */
.species-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 48px 0 80px;
}

.species-main h2 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-100);
}

.species-main h3 { color: var(--green-800); }

.species-main address { font-style: normal; }

.species-main ul { padding-left: 1.5rem; }
.species-main li { margin-bottom: 0.5rem; }

/* ── Sidebar ──────────────────────────────────────── */
.species-sidebar { position: sticky; top: 90px; align-self: start; }

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.sidebar-card__title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-100);
}

/* ── Origin Card (CN link) ────────────────────────── */
.origin-card {
  background: linear-gradient(135deg, var(--green-100), var(--earth-100));
  border: 1px solid var(--green-400);
}

.origin-card__map {
  width: 100%;
  height: 150px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--gray-100);
  overflow: hidden;
}

.origin-card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--green-700);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 10px;
  transition: background 0.2s;
}
.origin-card__link:hover { background: var(--green-600); color: var(--white); }

/* ── Trip Planner Card ────────────────────────────── */
.tp-card-sidebar {
  background: linear-gradient(135deg, #eef6fc, #f0faf5);
  border: 1px solid #b8d8e8;
}

.tp-card-sidebar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #2980b9;
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 10px;
  transition: background 0.2s;
}
.tp-card-sidebar__link:hover { background: #3498db; color: var(--white); }

/* ── Related Species Grid ─────────────────────────── */
.related-species {
  background: var(--earth-100);
  padding: 60px 0;
}

.related-species__title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 32px;
}

.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.species-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.species-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.species-card__img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.species-card__body { padding: 14px 16px; }
.species-card__name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  background: var(--green-900);
  color: var(--earth-300);
  padding: 48px 0 24px;
}

.site-footer a { color: var(--green-400); }
.site-footer a:hover { color: var(--white); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col__title {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 0.9rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.7;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 968px) {
  .species-content { grid-template-columns: 1fr; }
  .species-sidebar { position: static; }
  .species-facts { margin: -20px 16px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.active { display: block; position: absolute; top: 70px; left: 0; right: 0; background: var(--white); padding: 16px 24px; box-shadow: var(--shadow-md); }
  .site-nav.active ul { flex-direction: column; gap: 8px; }
  .nav-toggle { display: block; }

  .species-hero__title { font-size: 2rem; }
  .species-hero__content { padding: 50px 0 40px; }
  .species-facts { grid-template-columns: repeat(2, 1fr); }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .species-facts { grid-template-columns: 1fr 1fr; margin: -15px 12px 0; }
  .species-hero__title { font-size: 1.6rem; }
}

/* ── Content elements ─────────────────────────────── */
#boutique { margin: 1.5rem 0; }

.post-entry img {
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}

/* ── Child Pages ──────────────────────────────────── */
.child-pages { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--green-100); }
.child-pages h2 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 20px; }
.child-pages__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.child-page-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--gray-900);
}
.child-page-card:hover { border-color: var(--green-400); box-shadow: var(--shadow-sm); color: var(--green-700); }
.child-page-card__img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.child-page-card__img--empty { background: var(--green-100); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.child-page-card__title { font-size: 0.9rem; font-weight: 500; }

/* ── Page Hero (internal pages) ────────────────────── */
.page-hero {
  position: relative;
  background: var(--green-900);
  color: var(--white);
  overflow: hidden;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background: url('images/fond_en_tete_entretien_bonsai.jpg') center/cover;
  opacity: 0.25;
}
.page-hero__content {
  position: relative;
  z-index: 2;
  padding: 50px 0 40px;
}
.page-hero h1 {
  color: var(--white);
  font-size: 2.2rem;
}

/* ── Homepage ──────────────────────────────────────── */
.home-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background: var(--green-900);
  color: var(--white);
  overflow: hidden;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: url('images/fond_en_tete_entretien_bonsai.jpg') center/cover;
  opacity: 0.35;
}

.home-hero__content { position: relative; z-index: 2; padding: 80px 0; max-width: 640px; }
.home-hero__title { font-size: 3.5rem; font-family: var(--font-serif); margin-bottom: 16px; line-height: 1.15; }
.home-hero__title em { color: var(--green-400); font-style: normal; }
.home-hero__subtitle { font-size: 1.2rem; opacity: 0.85; margin-bottom: 32px; line-height: 1.6; }

.home-hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary { background: var(--green-500); color: var(--white); }
.btn--primary:hover { background: var(--green-400); color: var(--white); }
.btn--outline { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn--outline:hover { border-color: var(--white); color: var(--white); }
.btn--secondary { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn--secondary:hover { background: var(--green-700); color: var(--white); }

/* Sections */
.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* Species grid home */
.home-species { padding: 72px 0; background: var(--green-50); }
.species-grid--home { grid-template-columns: repeat(4, 1fr); }
.species-card--home .species-card__img { height: 180px; }
.species-card__meta { font-size: 0.8rem; font-style: italic; color: var(--gray-500); margin-top: 2px; }
.species-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag { display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 3px; background: var(--gray-100); color: var(--gray-700); }
.tag--easy { background: #d4edda; color: #155724; }
.tag--medium { background: #fff3cd; color: #856404; }
.tag--hard { background: #f8d7da; color: #721c24; }

/* Guides */
.home-guides { padding: 72px 0; background: var(--white); }
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
}
.guide-card:hover { box-shadow: var(--shadow-md); border-color: var(--green-400); color: inherit; }
.guide-card__icon { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.guide-card__title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.guide-card__desc { font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; }

/* About */
.home-about { padding: 72px 0; background: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; max-width: 900px; margin: 0 auto; }
.about-text h2 { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 20px; }
.about-text p { color: var(--gray-700); line-height: 1.8; }
.about-image { text-align: center; }

/* Network */
.home-network { padding: 72px 0; background: var(--green-900); }
.network-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.network-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s;
  text-decoration: none;
}
.network-card:hover { background: rgba(255,255,255,0.15); }
.network-card__icon { font-size: 2rem; margin-bottom: 12px; }
.network-card__name { color: var(--white); font-family: var(--font-serif); font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.network-card__desc { color: var(--earth-300); font-size: 0.8rem; line-height: 1.4; }

/* Homepage responsive */
@media (max-width: 968px) {
  .species-grid--home { grid-template-columns: repeat(2, 1fr); }
  .guides-grid { grid-template-columns: 1fr 1fr; }
  .network-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image { order: -1; }
}
@media (max-width: 768px) {
  .home-hero__title { font-size: 2.4rem; }
  .home-hero { min-height: 400px; }
  .guides-grid { grid-template-columns: 1fr; }
  .species-grid--home { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .network-grid { grid-template-columns: 1fr; }
  .home-hero__title { font-size: 2rem; }
  .home-hero__cta { flex-direction: column; }
}

/* TOC compatibility */
.ez-toc-container {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 2rem 0;
}
