@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,400&family=Inter:wght@400;500;600&family=Cormorant+Garamond:ital,wght@0,400;1,400&display=swap');

:root {
  --primary: #2D6A4F;
  --accent: #B5451B;
  --gold: #D4A017;
  --bg: #FDFAF5;
  --bg-alt: #F0EBE1;
  --bg-dark: #1A3329;
  --text: #1C2B25;
  --text-light: #5C7268;

  --primary-80: rgba(45, 106, 79, 0.8);
  --primary-20: rgba(45, 106, 79, 0.2);
  --primary-10: rgba(45, 106, 79, 0.1);
  --accent-20: rgba(181, 69, 27, 0.2);
  --gold-20: rgba(212, 160, 23, 0.2);

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;
  --ff-quote: 'Cormorant Garamond', Georgia, serif;

  --measure-article: 680px;
  --measure-wide: 1280px;
  --measure-hero: 1440px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 300ms;
  --dur: 500ms;
  --dur-slow: 700ms;
}

/* RESET ANTI-DISTORSION IMAGES */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

/* WRAPPERS ANTI-DISTORSION */
.img-hero     { aspect-ratio: 3/2; overflow: hidden; border-radius: 8px; }
.img-card     { aspect-ratio: 3/2; overflow: hidden; border-radius: 6px; }
.img-body     { aspect-ratio: 3/2; overflow: hidden; border-radius: 8px; margin: 2rem 0; }
.img-portrait { aspect-ratio: 1/1; overflow: hidden; border-radius: 50%; }

.img-hero img, .img-card img, .img-body img, .img-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}

/* HERO HOME */
.hero-home { position: relative; min-height: 90vh; display: flex; align-items: center; }
.hero-home__img { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-home__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-home__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,51,41,0.85) 0%, rgba(45,106,79,0.6) 60%, rgba(26,51,41,0.4) 100%); }
.hero-home__content { position: relative; z-index: 1; max-width: var(--measure-wide); margin: 0 auto; padding: var(--gutter); color: var(--bg); }

/* NAVIGATION */
header { background: var(--bg-dark); position: sticky; top: 0; z-index: 100; transition: box-shadow var(--dur-fast) var(--ease); }
header.scrolled { box-shadow: 0 2px 20px rgba(26,51,41,0.3); }
nav { max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--ff-display); font-size: 1.3rem; color: var(--bg); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: rgba(253,250,245,0.85); text-decoration: none; font-family: var(--ff-body); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.02em; text-transform: uppercase; transition: color var(--dur-fast) var(--ease); }
.nav-links a:hover { color: var(--gold); }

/* HAMBURGER MOBILE */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--bg); border-radius: 2px; transition: all var(--dur-fast) var(--ease); }
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-dark); flex-direction: column; padding: 1.5rem var(--gutter); gap: 1.2rem; }
  body.nav-open .nav-links { display: flex; }
}

/* SECTIONS */
.container { max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 4rem 0; }

/* KICKER */
.kicker { font-family: var(--ff-quote); font-style: italic; font-size: 0.85rem; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.5rem; display: block; }

/* TITRES */
h1, h2, h3, h4 { font-family: var(--ff-display); line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h2::after { content: ''; display: block; width: 3rem; height: 3px; background: var(--gold); margin-top: 0.5rem; transform: scaleX(1); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ARTICLE BODY */
.article-body { max-width: var(--measure-article); margin: 0 auto; font-family: var(--ff-body); font-size: 1.0625rem; line-height: 1.75; color: var(--text); }
.article-body h2 { margin: 2.5rem 0 1rem; }
.article-body h3 { margin: 1.8rem 0 0.8rem; color: var(--primary); }
.article-body p { margin-bottom: 1.2rem; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent); }
.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { font-weight: 600; }

/* ARTICLE SUMMARY */
.article-summary { font-family: var(--ff-quote); font-style: italic; font-size: 1.15rem; color: var(--text-light); border-left: 3px solid var(--gold); padding: 1rem 1.5rem; margin: 2rem auto; background: var(--bg-alt); border-radius: 0 8px 8px 0; max-width: var(--measure-article); }

/* ARTICLE WRAP — grid 2 colonnes (sidebar TOC + contenu) */
.article-wrap {
  max-width: var(--measure-wide); margin: 0 auto;
  padding: 3rem var(--gutter);
  display: grid; grid-template-columns: 220px 1fr;
  gap: 3.5rem; align-items: start;
}
.article-wrap:not(:has(.article-toc)) { grid-template-columns: 1fr; }
@media (max-width: 1024px) {
  .article-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .article-toc { display: none; }
}

/* TOC sidebar sticky */
.article-toc { position: sticky; top: 5rem; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc-title { font-family: var(--ff-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-20); }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin: 0; }
.toc-list a { font-family: var(--ff-body); font-size: 0.82rem; color: var(--text-light); line-height: 1.5; display: block; padding: 0.25rem 0 0.25rem 0.75rem; border-left: 2px solid transparent; text-decoration: none; transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.toc-list a:hover { color: var(--primary); border-left-color: var(--primary); }

/* article-main : contrainte de largeur pour le corps */
.article-main { min-width: 0; }
.article-main .article-summary { max-width: none; }
.article-main .article-body { max-width: none; }
.article-main .faq-section { max-width: none; }
.article-main .article-nav-related { max-width: none; }

/* TOC inline (BlogLayout — articles de blog, pas de sidebar) */
.toc { background: var(--bg-alt); border: 1px solid var(--primary-20); border-left: 4px solid var(--primary); border-radius: 0 10px 10px 0; padding: 1.5rem 2rem; margin: 2rem 0; }
.toc ol { margin: 0 0 0 1.2rem; }
.toc li { margin: 0.4rem 0; }
.toc a { color: var(--primary); text-decoration: none; font-size: 0.9rem; line-height: 1.4; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* SAVIEZ-VOUS */
.saviez-vous { background: var(--primary-10); border: 1px solid var(--primary-20); border-left: 4px solid var(--primary); border-radius: 0 8px 8px 0; padding: 1.2rem 1.5rem; margin: 2rem auto; max-width: var(--measure-article); }
.saviez-vous strong { color: var(--primary); font-family: var(--ff-display); }

/* FAQ */
.faq-section { max-width: var(--measure-article); margin: 3rem auto; }
.faq-section h2 { margin-bottom: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--primary-20); }
.faq-question { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; cursor: pointer; background: none; border: none; text-align: left; font-family: var(--ff-display); font-size: 1.05rem; color: var(--text); font-weight: 600; }
.faq-icon { font-size: 1.2rem; color: var(--primary); transition: transform var(--dur-fast) var(--ease); flex-shrink: 0; margin-left: 1rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); font-family: var(--ff-body); line-height: 1.7; color: var(--text-light); }
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 1rem; }

/* GUIDES GRID */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.guide-card { background: var(--bg); border: 1px solid var(--primary-20); border-radius: 12px; overflow: hidden; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(45,106,79,0.15); }
.guide-card-content { padding: 1.2rem; }
.guide-card-cat { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; margin-bottom: 0.4rem; }
.guide-card h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.guide-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.5; }
.guide-card a { text-decoration: none; color: inherit; display: block; }

/* BLOG GRID */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.blog-card { background: var(--bg); border-radius: 12px; overflow: hidden; border: 1px solid rgba(45,106,79,0.1); transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(45,106,79,0.12); }
.blog-card-content { padding: 1.2rem; }
.blog-card-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; display: flex; gap: 0.8rem; align-items: center; }
.blog-card-cat { background: var(--primary-10); color: var(--primary); padding: 0.15rem 0.5rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.blog-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; line-height: 1.3; }
.blog-card p { font-size: 0.875rem; color: var(--text-light); line-height: 1.5; }
.blog-card a { text-decoration: none; color: inherit; display: block; }
.blog-card-img { aspect-ratio: 3/2; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* RELATED ARTICLES */
.article-nav-related { max-width: var(--measure-article); margin: 3rem auto; padding-top: 2rem; border-top: 2px solid var(--gold); }
.article-nav-related h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.related-card { background: var(--bg-alt); border-radius: 8px; padding: 1rem; border: 1px solid var(--primary-10); }
.related-card a { text-decoration: none; color: var(--text); font-family: var(--ff-body); font-size: 0.9rem; font-weight: 500; }
.related-card a:hover { color: var(--primary); }

/* PAGE HERO (pages de menu : blog, thèmes, à-propos, contact…) */
.page-hero { position: relative; min-height: 40vh; display: flex; align-items: center; justify-content: center; }
.page-hero__img { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.page-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.page-hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,51,41,0.82) 0%, rgba(45,106,79,0.65) 60%, rgba(26,51,41,0.5) 100%); }
.page-hero__content { position: relative; z-index: 1; text-align: center; max-width: 760px; padding: 4rem var(--gutter); color: var(--bg); }
.page-hero__title { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--bg); margin: 0.5rem 0 1rem; }
.page-hero__desc { color: rgba(253,250,245,0.8); font-size: 1.05rem; line-height: 1.7; max-width: 600px; margin: 0 auto; }

/* HERO ARTICLE */
.hero { position: relative; min-height: 50vh; display: flex; align-items: flex-end; }
.hero__img { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,51,41,0.92) 0%, rgba(26,51,41,0.5) 50%, rgba(26,51,41,0.2) 100%); }
.hero__content { position: relative; z-index: 1; max-width: var(--measure-wide); margin: 0 auto; padding: 3rem var(--gutter); color: var(--bg); }
.hero__breadcrumb { font-size: 0.8rem; color: rgba(253,250,245,0.7); margin-bottom: 1rem; }
.hero__breadcrumb a { color: inherit; text-decoration: none; }
.hero__breadcrumb a:hover { color: var(--gold); }
.hero__tag { background: var(--gold); color: var(--bg-dark); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.2rem 0.6rem; border-radius: 3px; font-weight: 700; display: inline-block; margin-bottom: 0.8rem; }
.hero__title { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 1rem; }
.hero__meta { font-size: 0.85rem; color: rgba(253,250,245,0.75); display: flex; gap: 1rem; }

/* FOOTER */
footer { background: var(--bg-dark); color: rgba(253,250,245,0.8); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); }
.footer-brand { font-family: var(--ff-display); font-size: 1.3rem; color: var(--bg); margin-bottom: 0.8rem; }
.footer-brand span { color: var(--gold); }
.footer-tagline { font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.5rem; }
.footer-col h4 { font-family: var(--ff-display); font-size: 1rem; color: var(--gold); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: rgba(253,250,245,0.7); text-decoration: none; font-size: 0.875rem; transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: var(--measure-wide); margin: 2rem auto 0; padding: 1.5rem var(--gutter) 0; border-top: 1px solid rgba(253,250,245,0.1); font-size: 0.8rem; color: rgba(253,250,245,0.5); display: flex; justify-content: space-between; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* CTA BUTTONS */
.btn-primary { background: var(--accent); color: var(--bg); padding: 0.9rem 2rem; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 1rem; display: inline-block; transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.btn-primary:hover { background: #9a3a15; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--bg); border: 2px solid rgba(253,250,245,0.7); padding: 0.9rem 2rem; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 1rem; display: inline-block; transition: all var(--dur-fast) var(--ease); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* REVEAL ANIMATIONS */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* LETTRINE */
.article-body > p:first-of-type::first-letter { font-family: var(--ff-display); font-size: 3.5rem; font-weight: 700; color: var(--primary); float: left; line-height: 0.85; margin: 0.1rem 0.15rem 0 0; }

/* BREADCRUMB */
.breadcrumb { font-size: 0.8rem; color: var(--text-light); margin-bottom: 2rem; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; }

/* STAT COUNTER */
.stat-section { background: var(--bg-dark); padding: 3rem 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.stat-item .stat-number { font-family: var(--ff-display); font-size: clamp(2rem, 5vw, 3.5rem); color: var(--gold); font-weight: 700; }
.stat-item .stat-label { font-family: var(--ff-body); font-size: 0.9rem; color: rgba(253,250,245,0.7); margin-top: 0.3rem; }
