@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul, ol { padding: 0; margin: 0; }

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  /* Couleurs */
  --color-primary: #3C7A73;
  --color-primary-rgb: 60, 122, 115;
  --color-secondary: #8FBCB5;
  --color-secondary-rgb: 143, 188, 181;
  --color-accent: #D9A464;
  --color-accent-rgb: 217, 164, 100;
  --color-bg: #FAF7F0;
  --color-bg-rgb: 250, 247, 240;
  --color-bg-alt: #F0EDE4;
  --color-bg-alt-rgb: 240, 237, 228;
  --color-text: #26332F;
  --color-text-rgb: 38, 51, 47;
  --color-text-muted: #5C6B66;

  /* Derives opacite */
  --color-primary-10: rgba(var(--color-primary-rgb), 0.10);
  --color-primary-20: rgba(var(--color-primary-rgb), 0.20);
  --color-primary-40: rgba(var(--color-primary-rgb), 0.40);
  --color-secondary-10: rgba(var(--color-secondary-rgb), 0.10);
  --color-secondary-20: rgba(var(--color-secondary-rgb), 0.20);
  --color-accent-10: rgba(var(--color-accent-rgb), 0.10);
  --color-accent-20: rgba(var(--color-accent-rgb), 0.20);
  --color-text-10: rgba(var(--color-text-rgb), 0.10);

  /* Polices */
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'Inter', system-ui, -apple-system, sans-serif;

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

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

  /* Ombres / rayons */
  --radius: 12px;
  --radius-sm: 6px;
  --shadow-soft: 0 8px 30px rgba(var(--color-text-rgb), 0.08);
  --shadow-card: 0 4px 18px rgba(var(--color-text-rgb), 0.10);
}

/* ==========================================================================
   BASE
   ========================================================================== */
body {
  font-family: var(--ff-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--ff-display);
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 500; }

p {
  max-width: var(--measure-article);
  line-height: 1.7;
  color: var(--color-text);
  margin: 0 0 1.2em;
}

a {
  color: var(--color-primary);
  transition: color var(--dur-fast) var(--ease);
}
a:hover, a:focus-visible {
  color: var(--color-accent);
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.6em;
}

/* ==========================================================================
   HEADER / FOOTER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(var(--color-bg-rgb));
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.site-header.scrolled {
  box-shadow: var(--shadow-soft);
  border-bottom-color: var(--color-primary-10);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.site-header__logo {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-primary);
}
.site-header__nav {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  list-style: none;
  align-items: center;
}
.site-header__nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
}
.site-header__nav a:hover { color: var(--color-primary); text-decoration: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.section {
  padding-block: 3rem;
}

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-primary-10);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
  margin-top: 4rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.site-footer h4 {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 1em;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5em; }
.site-footer a { color: var(--color-text-muted); font-size: 0.92rem; }
.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-primary-10);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 768px) {
  .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-home {
  min-height: 88vh;
  padding-block: 4rem;
}
.hero-home__img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-home__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-home__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(38,51,47,0.55) 0%, rgba(38,51,47,0.72) 65%, rgba(38,51,47,0.85) 100%);
}
.hero-home__content {
  position: relative;
  z-index: 2;
  max-width: var(--measure-hero);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.hero-home__content p { color: rgba(255,255,255,0.9); max-width: 620px; }

.hero-compact {
  min-height: 40vh;
  padding-block: 3rem;
}
.hero-compact__img {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: 16/7;
}
.hero-compact__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-compact__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(38,51,47,0.5) 0%, rgba(38,51,47,0.78) 100%);
}
.hero-compact__content {
  position: relative;
  z-index: 2;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-block: 1rem;
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb__sep { margin-inline: 0.4em; opacity: 0.6; }

/* ==========================================================================
   CARDS / GRID
   ========================================================================== */
.grid-guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.grid-guides > *:first-child {
  grid-column: span 2;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(var(--color-text-rgb), 0.14);
}

.card-img {
  aspect-ratio: 3/2;
  overflow: hidden;
  position: relative;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform var(--dur-slow) var(--ease);
}
.card:hover .card-img img { transform: scale(1.05); }

.card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 { margin-bottom: 0.4em; }
.card-body p { font-size: 0.94rem; color: var(--color-text-muted); margin-bottom: 0.8em; }
.card-body .card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-primary);
}

.card-guide { border-top: 4px solid var(--color-secondary); }
.card-article { border-top: 4px solid var(--color-accent); }

@media (max-width: 1024px) {
  .grid-guides { grid-template-columns: repeat(2, 1fr); }
  .grid-guides > *:first-child { grid-column: span 2; }
}
@media (max-width: 768px) {
  .grid-guides { grid-template-columns: 1fr; }
  .grid-guides > *:first-child { grid-column: span 1; }
}

/* ==========================================================================
   ARTICLE BODY
   ========================================================================== */
.article-body {
  max-width: var(--measure-article);
  margin-inline: auto;
}
.article-body h2 { margin-top: 2.2em; }
.article-body h3 { margin-top: 1.6em; }
.article-body ul, .article-body ol {
  max-width: var(--measure-article);
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}
.article-body li { margin-bottom: 0.5em; line-height: 1.65; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 0.94rem;
}
.article-body th, .article-body td {
  padding: 0.7em 0.9em;
  border: 1px solid var(--color-primary-10);
  text-align: left;
}
.article-body th { background: var(--color-bg-alt); font-weight: 600; }
.article-body blockquote {
  border-left: 4px solid var(--color-secondary);
  margin: 1.6em 0;
  padding: 0.4em 1.2em;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ==========================================================================
   TOC (sommaire sticky desktop)
   ========================================================================== */
.toc {
  position: sticky;
  top: 6rem;
  background: #fff;
  border: 1px solid var(--color-primary-10);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  font-size: 0.9rem;
}
.toc h2 {
  font-family: var(--ff-body);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.8em;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 0.55em; }
.toc a {
  color: var(--color-text-muted);
  font-weight: 500;
}
.toc a:hover { color: var(--color-primary); text-decoration: none; }

@media (max-width: 1024px) {
  .toc { position: static; }
}

/* ==========================================================================
   DISCLAIMER MEDICAL
   ========================================================================== */
.disclaimer-medical {
  background: var(--color-accent-10);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  max-width: var(--measure-article);
}
.disclaimer-medical__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 0.5em;
}
.disclaimer-medical p { margin-bottom: 0; font-size: 0.94rem; color: var(--color-text-muted); }

/* ==========================================================================
   SAVIEZ-VOUS
   ========================================================================== */
.saviez-vous {
  background: var(--color-secondary-10);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  max-width: var(--measure-article);
}
.saviez-vous strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.4em;
  font-family: var(--ff-display);
}
.saviez-vous p { margin-bottom: 0; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: var(--measure-article); margin: 2rem 0; }
.faq-item {
  border-bottom: 1px solid var(--color-primary-10);
}
.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  padding: 1.1rem 0;
  text-align: left;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
}
.faq-toggle-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-10);
  color: var(--color-primary);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease);
}
.faq-item.open .faq-toggle-icon { transform: rotate(45deg); }

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease);
}
.faq-item.open .faq-item__answer { max-height: 600px; }
.faq-item__answer-inner { padding-bottom: 1.2rem; }
.faq-item__answer-inner p { font-size: 0.96rem; color: var(--color-text-muted); }

/* ==========================================================================
   BLOG FILTER
   ========================================================================== */
.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.filter-btn {
  background: #fff;
  border: 1px solid var(--color-primary-20);
  color: var(--color-text-muted);
  padding: 0.5em 1.1em;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.filter-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--dur-fast) var(--ease);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: #c48f4e;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}
.btn-outline {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  text-decoration: none;
}

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

/* ==========================================================================
   RESPONSIVE GLOBAL
   ========================================================================== */
@media (max-width: 1024px) {
  .site-header__nav { gap: 1rem; }
}
@media (max-width: 768px) {
  .hero-home { min-height: 70vh; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .hamburger { display: flex; }
  .site-header__nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
  }
  body.nav-open .site-header__nav { transform: translateX(0); }
}
