/* ============================================
   BIEN-ÊTRE CBD — Style principal
   Palette : Vert sauge, crème, terre cuite
   ============================================ */

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

:root {
  /* Couleurs principales */
  --vert-profond: #2d5016;
  --vert-sauge: #7a9a6d;
  --vert-clair: #b8d4a3;
  --vert-pale: #e8f0e2;
  --creme: #faf8f2;
  --creme-fonce: #f0ece0;
  --terre-cuite: #c27a54;
  --terre-cuite-fonce: #a3623e;
  --texte: #2c2c2c;
  --texte-leger: #5a5a5a;
  --texte-subtil: #8a8a8a;
  --blanc: #ffffff;
  --ombre-legere: rgba(45, 80, 22, 0.06);
  --ombre-moyenne: rgba(45, 80, 22, 0.12);

  /* Typographie */
  --font-titre: 'Playfair Display', Georgia, serif;
  --font-corps: 'Inter', system-ui, -apple-system, sans-serif;

  /* Espacements */
  --espace-xs: 0.5rem;
  --espace-sm: 1rem;
  --espace-md: 1.5rem;
  --espace-lg: 2.5rem;
  --espace-xl: 4rem;
  --espace-xxl: 6rem;

  /* Rayons */
  --rayon-sm: 6px;
  --rayon-md: 12px;
  --rayon-lg: 20px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Largeur max */
  --max-width: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-corps);
  color: var(--texte);
  background-color: var(--creme);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--vert-profond);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--terre-cuite);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titre);
  line-height: 1.25;
  color: var(--vert-profond);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--espace-md);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(250, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--vert-pale);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px var(--ombre-legere);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-titre);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vert-profond);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--vert-profond);
}

.logo-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.nav-main {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--texte-leger);
  border-radius: var(--rayon-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--vert-profond);
  background-color: var(--vert-pale);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--rayon-sm);
  transition: background-color var(--transition);
}

.hamburger:hover {
  background-color: var(--vert-pale);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--vert-profond);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: var(--espace-xxl) 0;
  background: linear-gradient(170deg, var(--vert-pale) 0%, var(--creme) 60%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(184, 212, 163, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(194, 122, 84, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background-color: var(--blanc);
  border: 1px solid var(--vert-clair);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--vert-profond);
  margin-bottom: var(--espace-md);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--vert-profond);
  margin-bottom: var(--espace-md);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero h1 em {
  font-style: normal;
  color: var(--terre-cuite);
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--texte-leger);
  line-height: 1.8;
  max-width: 640px;
}

/* ============================================
   SECTION PRÉSENTATION
   ============================================ */
.section-intro {
  padding: var(--espace-xl) 0;
}

.intro-content {
  max-width: 800px;
  margin: 0 auto;
}

.intro-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--espace-md);
  text-align: center;
}

.intro-text {
  columns: 1;
  gap: var(--espace-lg);
}

.intro-text p {
  font-size: 1.02rem;
  color: var(--texte-leger);
  margin-bottom: var(--espace-md);
  text-align: justify;
  hyphens: auto;
}

.intro-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--vert-sauge), var(--terre-cuite));
  border: none;
  border-radius: 3px;
  margin: var(--espace-lg) auto;
}

/* ============================================
   GRILLE D'ARTICLES
   ============================================ */
.section-articles {
  padding: var(--espace-xl) 0 var(--espace-xxl);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  text-align: center;
  color: var(--texte-subtil);
  font-size: 1.02rem;
  margin-bottom: var(--espace-xl);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--espace-md);
}

/* --- Carte Article --- */
.card {
  background-color: var(--blanc);
  border: 1px solid var(--creme-fonce);
  border-radius: var(--rayon-md);
  padding: var(--espace-lg);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vert-sauge), var(--vert-clair));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: var(--vert-clair);
  box-shadow: 0 8px 30px var(--ombre-legere), 0 2px 8px var(--ombre-legere);
  transform: translateY(-3px);
}

.card:hover::before {
  opacity: 1;
}

.card-emoji {
  font-size: 2.4rem;
  margin-bottom: var(--espace-sm);
  line-height: 1;
}

.card-tag {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background-color: var(--vert-pale);
  color: var(--vert-profond);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--espace-sm);
  width: fit-content;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.card h3 a {
  color: var(--vert-profond);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--terre-cuite);
}

.card-summary {
  font-size: 0.92rem;
  color: var(--texte-leger);
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: var(--espace-md);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--terre-cuite);
  transition: all var(--transition);
}

.card-link:hover {
  color: var(--terre-cuite-fonce);
  gap: 0.6rem;
}

.card-link .arrow {
  transition: transform var(--transition);
}

.card-link:hover .arrow {
  transform: translateX(3px);
}

/* ============================================
   ARTICLE PAGE (styles prêts pour les articles)
   ============================================ */
.article-page {
  padding: var(--espace-lg) 0 var(--espace-xxl);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--texte-subtil);
  margin-bottom: var(--espace-lg);
  padding: var(--espace-sm) 0;
}

.breadcrumb a {
  color: var(--texte-subtil);
}

.breadcrumb a:hover {
  color: var(--vert-profond);
}

.breadcrumb .separator {
  color: var(--texte-subtil);
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--vert-profond);
  font-weight: 500;
}

.article-header {
  max-width: 780px;
  margin-bottom: var(--espace-xl);
}

.article-header .card-tag {
  margin-bottom: var(--espace-sm);
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: var(--espace-sm);
}

.article-meta {
  font-size: 0.88rem;
  color: var(--texte-subtil);
}

.article-content {
  max-width: 780px;
}

.article-content h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  margin-top: var(--espace-xl);
  margin-bottom: var(--espace-sm);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--vert-pale);
}

.article-content h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-top: var(--espace-lg);
  margin-bottom: var(--espace-xs);
}

.article-content p {
  font-size: 1.02rem;
  color: var(--texte-leger);
  margin-bottom: var(--espace-md);
}

.article-content ul,
.article-content ol {
  margin-bottom: var(--espace-md);
  padding-left: 1.5rem;
}

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

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

.article-content li {
  font-size: 1.02rem;
  color: var(--texte-leger);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--vert-sauge);
  padding: var(--espace-sm) var(--espace-md);
  margin: var(--espace-lg) 0;
  background-color: var(--vert-pale);
  border-radius: 0 var(--rayon-sm) var(--rayon-sm) 0;
  font-style: italic;
  color: var(--texte-leger);
}

.article-content strong {
  color: var(--texte);
  font-weight: 600;
}

.article-content a {
  color: var(--terre-cuite);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--terre-cuite-fonce);
}

/* Info box pour articles */
.info-box {
  background-color: var(--vert-pale);
  border: 1px solid var(--vert-clair);
  border-radius: var(--rayon-md);
  padding: var(--espace-md);
  margin: var(--espace-lg) 0;
}

.info-box-title {
  font-family: var(--font-titre);
  font-weight: 700;
  color: var(--vert-profond);
  margin-bottom: 0.5rem;
}

/* Table des matières */
.toc {
  background-color: var(--blanc);
  border: 1px solid var(--creme-fonce);
  border-radius: var(--rayon-md);
  padding: var(--espace-md);
  margin-bottom: var(--espace-xl);
}

.toc-title {
  font-family: var(--font-titre);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--vert-profond);
  margin-bottom: var(--espace-sm);
}

.toc ol {
  list-style: decimal;
  padding-left: 1.3rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  font-size: 0.92rem;
  color: var(--texte-leger);
}

.toc a:hover {
  color: var(--terre-cuite);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: var(--vert-profond);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--espace-xl) 0 var(--espace-lg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--espace-xl);
}

.footer-about h3 {
  font-size: 1.3rem;
  color: var(--blanc);
  margin-bottom: var(--espace-sm);
}

.footer-about p {
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 480px;
}

.footer-nav h4 {
  font-size: 1rem;
  color: var(--blanc);
  font-family: var(--font-corps);
  font-weight: 600;
  margin-bottom: var(--espace-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-nav a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--blanc);
}

.footer-bottom {
  margin-top: var(--espace-xl);
  padding-top: var(--espace-md);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

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

/* Tablette */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--espace-lg);
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .hero {
    padding: var(--espace-xl) 0;
  }
}

/* Mobile */
@media (max-width: 700px) {
  :root {
    --espace-xl: 3rem;
    --espace-xxl: 4rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-main {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--creme);
    border-bottom: 1px solid var(--vert-pale);
    padding: var(--espace-sm) var(--espace-md);
    transform: translateY(-110%);
    opacity: 0;
    transition: all var(--transition);
    box-shadow: 0 10px 30px var(--ombre-moyenne);
    z-index: 99;
  }

  .nav-main.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links a {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    border-radius: var(--rayon-sm);
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: var(--espace-sm);
  }

  .card {
    padding: var(--espace-md);
  }

  .header-inner {
    height: 60px;
  }

  .nav-main {
    top: 60px;
  }

  .article-content h2 {
    margin-top: var(--espace-lg);
  }
}

/* Très petit écran */
@media (max-width: 400px) {
  .container {
    padding: 0 var(--espace-sm);
  }

  .logo {
    font-size: 1.15rem;
  }

  .hero-badge {
    font-size: 0.75rem;
  }
}
