/* === ENCRE DE NOHANT — Design System === */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cinzel:wght@400;600&display=swap');

/* === VARIABLES === */
:root {
  /* Couleurs — rôles VERROUILLÉS */
  --nohant:       #1A2E1A;    /* fond sombre uniquement */
  --parchemin:    #F4EDD8;    /* fond clair + texte sur fond foncé */
  --encre:        #18110A;    /* texte principal sur fond clair */
  --sanguine:     #A03020;    /* liens, accents, hover */
  --ocre:         #B8833A;    /* kickers/labels */
  --ardoise:      #6B6358;    /* texte secondaire, captions */
  --mousse:       #4A6440;    /* décoratif SVG uniquement */

  /* Dérivés opacité */
  --parchemin-95: rgba(244, 237, 216, 0.95);
  --parchemin-80: rgba(244, 237, 216, 0.80);
  --nohant-90:    rgba(26, 46, 26, 0.90);
  --sanguine-15:  rgba(160, 48, 32, 0.15);
  --ocre-40:      rgba(184, 131, 58, 0.40);

  /* Typographie */
  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'EB Garamond', Georgia, serif;
  --ff-label:   'Cinzel', serif;

  /* Mesures */
  --measure-article: 680px;
  --measure-wide:    1280px;
  --measure-hero:    1440px;
  --gutter:          clamp(1rem, 4vw, 2rem);
  --ease:            cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.75;
  color: var(--encre);
  background: var(--parchemin);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sanguine); text-decoration: underline; text-underline-offset: 3px; transition: color 200ms; }
a:hover { color: var(--nohant); }

/* === TYPOGRAPHIE === */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  line-height: 1.2;
  color: var(--encre);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 400; margin-top: 2.5rem; margin-bottom: 1rem; position: relative; padding-bottom: 0.5rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }

/* Filet sanguine sous H2 */
h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--sanguine);
  transition: width 600ms var(--ease);
}
h2.visible::after { width: 100%; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* Kicker / label Cinzel */
.kicker {
  font-family: var(--ff-label);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sanguine);
}
.kicker-dark { color: var(--ocre); }

/* Pull quote */
blockquote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.4em;
  border-left: 3px solid var(--ocre);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--encre);
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: var(--parchemin);
  transition: background 300ms var(--ease), color 300ms var(--ease), box-shadow 300ms;
}

.site-header.scrolled {
  background: var(--parchemin-95);
  color: var(--encre);
  box-shadow: 0 1px 0 var(--ocre-40);
}

.site-logo {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  letter-spacing: 0.02em;
}
.site-logo:hover { color: var(--sanguine); }

.site-nav { display: flex; gap: 1.5rem; align-items: center; list-style: none; }
.nav-link {
  font-family: var(--ff-label);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  transition: color 200ms;
}
.nav-link:hover { color: var(--sanguine); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: inherit;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    background: var(--nohant);
    color: var(--parchemin);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    gap: 2rem;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }
  .site-nav.open { display: flex; }
  .nav-link { color: var(--parchemin); font-size: 0.9rem; }
}

/* === HERO === */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--nohant);
}

.hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--nohant-90);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--parchemin);
  padding: 6rem var(--gutter) 3rem;
  max-width: var(--measure-article);
  margin: 0 auto;
}

.hero-content .kicker { color: var(--ocre); margin-bottom: 1rem; display: block; }
.hero-content h1 { color: var(--parchemin); margin-bottom: 1rem; }
.hero-content p { font-size: 1.1em; opacity: 0.9; margin-bottom: 1.5rem; }

/* Hero compact (articles) */
.hero-compact {
  min-height: 45vh;
  padding-top: 4rem;
}

/* === LAYOUT WRAPPERS === */
.container {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-article {
  max-width: var(--measure-article);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* === ARTICLE CONTENT === */
.article-summary { font-size: 1.1em; font-style: italic; color: var(--ardoise); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--ocre-40); }

.article-body {
  padding: 3rem 0;
}
.article-body h2 { margin-top: 2.5rem; }
.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; color: var(--encre); }
.article-body em { font-style: italic; }

/* Ornement séparateur */
.ornement {
  text-align: center;
  margin: 2.5rem 0;
  color: var(--mousse);
  opacity: 0.3;
  font-size: 1.5rem;
  user-select: none;
}

/* === CARDS === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: white;
  border: 1px solid var(--ocre-40);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-left-color 300ms;
  border-left: 3px solid transparent;
  position: relative;
}
.card:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(26,46,26,0.1);
  border-left-color: var(--sanguine);
}

.card-img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-img-placeholder {
  aspect-ratio: 16/9;
  background: var(--nohant);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body { padding: 1.25rem 1.25rem 1.5rem; }
.card-kicker { display: block; margin-bottom: 0.5rem; }
.card-title {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--encre);
  margin-bottom: 0.5rem;
  text-decoration: none;
  display: block;
}
.card-title:hover { color: var(--sanguine); }
.card-excerpt { font-size: 0.9rem; color: var(--ardoise); line-height: 1.6; }

/* Numérotation décorative */
.card-number {
  position: absolute;
  top: 0.5rem; right: 0.75rem;
  font-family: var(--ff-display);
  font-size: 5rem;
  font-weight: 300;
  color: var(--encre);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
}

/* === GUIDES PILIERS — liste compacte === */
.guides-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.guide-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--ocre-40);
  border-radius: 3px;
  text-decoration: none;
  color: var(--encre);
  font-family: var(--ff-display);
  font-size: 1rem;
  transition: background 200ms, border-color 200ms, transform 200ms;
}
.guide-item:hover {
  background: var(--sanguine-15);
  border-color: var(--sanguine);
  transform: translateX(3px);
  color: var(--encre);
}

/* === SECTION FONCÉE === */
.section-dark {
  background: var(--nohant);
  color: var(--parchemin);
  padding: 4rem var(--gutter);
}
.section-dark h2, .section-dark h3 { color: var(--parchemin); }
.section-dark .kicker { color: var(--ocre); }
.section-dark p { color: var(--parchemin); opacity: 0.9; }

/* === SECTION CLAIRE === */
.section {
  padding: 4rem 0;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}
.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-number {
  font-family: var(--ff-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--sanguine);
  display: block;
  line-height: 1;
}
.stat-label {
  display: block;
  font-family: var(--ff-label);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ardoise);
  margin-top: 0.25rem;
}

/* Citation */
.citation-section {
  background: var(--nohant);
  padding: 4rem var(--gutter);
  text-align: center;
}
.citation-text {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  color: var(--parchemin);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}
.citation-source {
  font-family: var(--ff-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocre);
}

/* === BLOG FILTERS === */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  font-family: var(--ff-label);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--ocre-40);
  background: transparent;
  color: var(--ardoise);
  cursor: pointer;
  border-radius: 2px;
  transition: all 200ms;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--sanguine);
  border-color: var(--sanguine);
  color: var(--parchemin);
}

/* === FAQ === */
.faq-section { margin: 3rem 0; }
.faq-section h2 { margin-bottom: 1.5rem; }
.faq-item {
  border-bottom: 1px solid var(--ocre-40);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--encre);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover { color: var(--sanguine); }
.faq-icon { font-size: 1.5rem; line-height: 1; transition: transform 300ms; flex-shrink: 0; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 0 1rem;
  color: var(--ardoise);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* === TABLE DES MATIÈRES === */
.toc { margin: 2rem 0; padding: 1.5rem 2rem; background: var(--parchemin); border-left: 3px solid var(--ocre); border-radius: 0 4px 4px 0; }
.toc-title { font-family: var(--ff-label); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ardoise); margin: 0 0 1rem; }
.toc ol { margin: 0; padding-left: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.toc li { font-size: 0.95rem; }
.toc a { color: var(--sanguine); text-decoration: none; font-family: var(--ff-body); }
.toc a:hover { text-decoration: underline; }

/* === ARTICLES CONNEXES === */
.related-section { margin: 3rem 0; padding: 2rem; background: var(--sanguine-15); border-radius: 4px; }
.related-section h3 { margin-top: 0; margin-bottom: 1rem; }
.related-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.related-list a { font-weight: 500; }

/* === FOOTER === */
.site-footer {
  background: var(--nohant);
  color: var(--parchemin);
  padding: 3rem var(--gutter) 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  max-width: var(--measure-wide);
  margin: 0 auto 2rem;
}
.footer-col h4 {
  font-family: var(--ff-label);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ocre);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--parchemin); opacity: 0.8; text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--ocre); opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(184,131,58,0.3);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--measure-wide);
  margin: 0 auto;
  font-size: 0.85rem;
  opacity: 0.7;
  color: var(--parchemin);
}
.footer-bottom a { color: var(--parchemin); }

/* === PAGES TECHNIQUES === */
.page-wrapper { padding-top: 5rem; }
.page-content { padding: 3rem 0 4rem; }

/* Plan du site */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.sitemap-col h3 {
  font-size: 1rem;
  border-bottom: 2px solid var(--sanguine);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.sitemap-col ul { list-style: none; }
.sitemap-col li { margin-bottom: 0.4rem; }
.sitemap-col a { text-decoration: none; font-size: 0.95rem; }
.sitemap-col a:hover { text-decoration: underline; }

/* Contact */
.contact-form { max-width: 560px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-family: var(--ff-label); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4rem; color: var(--ardoise); }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ocre-40);
  background: white;
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--encre);
  border-radius: 2px;
  transition: border-color 200ms;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--sanguine);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.btn-submit {
  font-family: var(--ff-label);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  background: var(--sanguine);
  color: var(--parchemin);
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background 200ms, transform 200ms;
}
.btn-submit:hover { background: var(--nohant); transform: translateX(2px); }

/* 404 */
.page-404 { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }

/* === BREADCRUMB === */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ardoise);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--ardoise); }
.breadcrumb span { margin: 0 0.3rem; }

/* === SCROLL ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {
  .animate-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  }
  .animate-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === UTILITAIRES === */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title .kicker { display: block; margin-bottom: 0.75rem; }
