/* ============================================================
   rencontres-legendaires.fr — Design system "Légendes & Passion"
   Magazine culturel : légendes et traditions amoureuses du monde
   ============================================================ */

/* --- Reset anti-distorsion images (OBLIGATOIRE, cf regle reseau) --- */
img { max-width: 100%; height: auto; display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

:root {
  /* --- Palette "Légendes & Passion" --- */
  --bordeaux: #6E1F2B;
  --bordeaux-light: #8C3441;
  --bordeaux-dark: #4A141C;
  --bordeaux-muted: rgba(110, 31, 43, .08);

  --or: #B98A3E;
  --or-light: #D3AC66;
  --or-dark: #8E6829;
  --or-muted: rgba(185, 138, 62, .12);

  --sauge: #5B7355;
  --sauge-light: #7A9373;
  --sauge-muted: rgba(91, 115, 85, .08);

  --nuit: #1E1A22;
  --nuit-2: #2B2530;

  /* --- Backgrounds --- */
  --bg: #FBF6EC;             /* parchemin / ivoire chaud */
  --bg-alt: #F4EBD9;
  --bg-warm: #F8F1E2;
  --bg-dark: #1E1A22;        /* encre nuit */
  --bg-dark-2: #2B2530;
  --bg-card: #FFFFFF;

  /* --- Texte --- */
  --txt: #2C2420;
  --txt-sec: #5A4F47;
  --txt-light: #8A7E74;
  --txt-white: #FBF6EC;

  /* --- Bordures --- */
  --border: #E3D6BC;
  --border-hover: #D3C3A0;
  --border-bordeaux: rgba(110, 31, 43, .22);

  /* --- Ombres --- */
  --shadow-sm: 0 1px 3px rgba(30,26,34,.06), 0 1px 2px rgba(30,26,34,.04);
  --shadow-md: 0 3px 10px rgba(30,26,34,.08), 0 1px 3px rgba(30,26,34,.05);
  --shadow-lg: 0 10px 28px rgba(30,26,34,.10), 0 2px 8px rgba(30,26,34,.05);
  --shadow-card: 0 2px 14px rgba(30,26,34,.06), 0 0 0 1px rgba(30,26,34,.03);
  --shadow-or: 0 4px 22px rgba(185,138,62,.18);

  /* --- Espacements --- */
  --sp-xs: .5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 6rem;

  /* --- Rayons --- */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 24px;
  --r-full: 9999px;

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

  /* --- Mesures --- */
  --measure-article: 840px;
  --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;
}

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

/* ============================================================
   BASE
   ============================================================ */
body {
  font-family: var(--ff-body);
  color: var(--txt);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  color: var(--bordeaux-dark);
  line-height: 1.15;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 600; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1.25rem; }

a { color: var(--bordeaux); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--or-dark); }

.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); }
.container--hero { max-width: var(--measure-hero); margin: 0 auto; padding: 0 var(--gutter); }

.kicker {
  font-family: var(--ff-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--or-dark);
}

.filet {
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--or), var(--bordeaux));
  border: none;
  border-radius: var(--r-full);
  margin: .9rem 0 1.6rem;
}

/* ============================================================
   WRAPPERS ANTI-DISTORSION IMAGES (OBLIGATOIRE)
   ============================================================ */
.img-hero     { position: relative; aspect-ratio: 3/2; overflow: hidden; border-radius: var(--r-lg); }
.img-card     { aspect-ratio: 3/2; overflow: hidden; border-radius: var(--r-md); }
.img-body     { aspect-ratio: 3/2; overflow: hidden; border-radius: var(--r-md); margin: 2rem 0; }
.img-portrait { aspect-ratio: 1/1; overflow: hidden; border-radius: var(--r-full); }

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

.article-body figure { margin: 2rem 0; }
.article-body figure > img { width: 100%; max-width: 100%; height: auto; border-radius: var(--r-md); display: block; }
.article-body figcaption {
  font-family: var(--ff-quote);
  font-style: italic;
  color: var(--txt-light);
  font-size: .92rem;
  margin-top: .6rem;
  text-align: center;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,246,236,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-fast) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.site-header__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--bordeaux-dark);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.logo img { width: 34px; height: 34px; }
.logo span.accent { color: var(--or-dark); }

.main-nav { display: flex; align-items: center; gap: 1.9rem; }
.main-nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--txt);
  position: relative;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--or);
  transition: width var(--dur-fast) var(--ease);
}
.main-nav a:hover::after { width: 100%; }
.main-nav a:hover { color: var(--bordeaux-dark); }

.nav-cta {
  background: var(--bordeaux);
  color: var(--txt-white) !important;
  padding: .6rem 1.3rem;
  border-radius: var(--r-full);
  font-weight: 600 !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--bordeaux-dark); color: var(--txt-white) !important; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--bordeaux-dark); margin: 5px 0; transition: all var(--dur-fast) var(--ease); }

@media (max-width: 860px) {
  .main-nav {
    position: fixed; inset: 76px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-md) var(--gutter);
    gap: 1.4rem;
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    overflow-y: auto;
  }
  body.nav-open .main-nav { transform: translateX(0); }
  .hamburger { display: block; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-dark);
  color: var(--txt-white);
  padding: var(--sp-xl) 0 var(--sp-md);
  margin-top: var(--sp-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-lg);
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--sp-lg);
}
.footer-grid h4 { color: var(--or-light); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--ff-body); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.footer-grid a { color: rgba(251,246,236,.72); font-size: .93rem; }
.footer-grid a:hover { color: var(--or-light); }
.footer-brand p { color: rgba(251,246,236,.65); font-size: .93rem; max-width: 30ch; }
.footer-bottom {
  text-align: center;
  padding-top: var(--sp-md);
  border-top: 1px solid rgba(251,246,236,.12);
  color: rgba(251,246,236,.5);
  font-size: .82rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; color: var(--txt-white); overflow: hidden; }
.hero-home { min-height: 92vh; display: flex; align-items: flex-end; }
.hero-compact { min-height: 56vh; display: flex; align-items: flex-end; padding-top: 76px; }

.hero-home__img, .hero-compact__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-home__img img, .hero-compact__img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.hero-home__overlay, .hero-compact__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30,26,34,.35) 0%, rgba(30,26,34,.55) 55%, rgba(30,26,34,.92) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: var(--measure-hero);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--sp-xl);
  width: 100%;
}
.hero-content .kicker { color: var(--or-light); }
.hero-content h1 { color: var(--txt-white); }
.hero-content .hero-desc { color: rgba(251,246,236,.86); max-width: 62ch; font-size: 1.08rem; }
.hero-breadcrumb { font-size: .85rem; color: rgba(251,246,236,.7); margin-bottom: 1rem; }
.hero-breadcrumb a { color: rgba(251,246,236,.7); }
.hero-breadcrumb a:hover { color: var(--or-light); }
.hero-meta { display: flex; gap: 1.2rem; font-size: .88rem; color: rgba(251,246,236,.75); margin-top: 1rem; }

.hero-cta-group { display: flex; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.7rem;
  border-radius: var(--r-full);
  font-weight: 600; font-size: .95rem;
  transition: all var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--or); color: var(--nuit) !important; }
.btn-primary:hover { background: var(--or-light); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid rgba(251,246,236,.5); color: var(--txt-white) !important; }
.btn-outline:hover { border-color: var(--or-light); background: rgba(251,246,236,.08); }

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: rgba(251,246,236,.7); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ============================================================
   CARDS
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__cat { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--or-dark); }
.card__date { font-size: .8rem; color: var(--txt-light); }
.card__title { font-size: 1.15rem; margin: .5rem 0 .6rem; }
.card__title a { color: var(--bordeaux-dark); }
.card__title a:hover { color: var(--or-dark); }
.card__excerpt { color: var(--txt-sec); font-size: .92rem; flex: 1; }
.card__meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }

/* Numérotation en arrière-plan des cards */
.card--numbered { position: relative; }
.card--numbered::before {
  content: counter(card-n, decimal-leading-zero);
  counter-increment: card-n;
  position: absolute; top: .6rem; right: .9rem;
  font-family: var(--ff-quote);
  font-size: 2.4rem;
  font-weight: 600;
  color: rgba(185,138,62,.28);
  z-index: 2;
  line-height: 1;
}
.card-grid--numbered { counter-reset: card-n; }

/* ============================================================
   ARTICLE
   ============================================================ */
.article-summary {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--txt-sec);
  line-height: 1.6;
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}

.article-body { max-width: var(--measure-article); margin: 0 auto; padding: 0 var(--gutter); }
.article-body > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 4.2rem;
  font-weight: 600;
  float: left;
  line-height: .8;
  padding: .1rem .5rem 0 0;
  color: var(--bordeaux);
}

.article-body h2 {
  position: relative;
  margin-top: 3rem;
  padding-bottom: .6rem;
}
.article-body h2::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--or), var(--bordeaux));
  border-radius: var(--r-full);
}
.article-body h3 { margin-top: 2.2rem; color: var(--bordeaux); }

.article-body ul, .article-body ol { padding-left: 1.3rem; margin-bottom: 1.4rem; }
.article-body ul { list-style: none; }
.article-body ul li { position: relative; padding-left: 1.5rem; margin-bottom: .5rem; }
.article-body ul li::before {
  content: ''; position: absolute; left: 0; top: .55em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--or);
}
.article-body ol li { margin-bottom: .5rem; padding-left: .3rem; }

.article-body table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: .94rem; }
.article-body th, .article-body td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.article-body th { font-family: var(--ff-body); font-weight: 700; color: var(--bordeaux-dark); border-bottom: 2px solid var(--bordeaux); }
.article-body td { border-right: 1px solid var(--border); }
.article-body td:last-child { border-right: none; }

.article-body blockquote {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--bordeaux-dark);
  border-left: 3px solid var(--or);
  padding: .3rem 0 .3rem 1.6rem;
  margin: 2.2rem 0;
}

.article-body blockquote.journalist-question,
.article-body blockquote.expert-answer {
  font-family: var(--ff-body) !important;
  font-style: normal !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  color: var(--txt) !important;
  border-left: 3px solid var(--or) !important;
  padding: .9rem 1.4rem !important;
  margin: 1.4rem 0 !important;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--bg-alt);
}

.article-body blockquote.journalist-question {
  border-left-color: var(--sauge) !important;
}

.article-body blockquote.journalist-question strong,
.article-body blockquote.expert-answer strong {
  color: var(--bordeaux-dark);
}

.saviez-vous {
  background: var(--or-muted);
  border: 1px solid rgba(185,138,62,.25);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.7rem;
  margin: 2rem 0;
}
.saviez-vous__title {
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--or-dark);
  margin-bottom: .5rem;
  display: flex; align-items: center; gap: .5rem;
}

/* --- TOC sticky --- */
.article-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-lg); max-width: var(--measure-wide); margin: 0 auto; padding: 0 var(--gutter); }
.article-layout:not(:has(.toc-sticky)) { grid-template-columns: 1fr; }
.toc-sticky { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; }
.toc-sticky nav { border-left: 2px solid var(--border); padding-left: 1rem; }
.toc-sticky .kicker { display: block; margin-bottom: .8rem; }
.toc-sticky a { display: block; font-size: .88rem; color: var(--txt-sec); padding: .35rem 0; }
.toc-sticky a:hover { color: var(--bordeaux); }
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-sticky { display: none; }
}
.toc-mobile { display: none; }
@media (max-width: 1080px) {
  .toc-mobile { display: block; max-width: var(--measure-article); margin: 0 auto 2rem; padding: 0 var(--gutter); }
  .toc-mobile summary { cursor: pointer; font-weight: 600; padding: .8rem 1rem; background: var(--bg-alt); border-radius: var(--r-md); }
  .toc-mobile ul { list-style: none; padding: 1rem 1.2rem; margin: 0; background: var(--bg-alt); border-radius: 0 0 var(--r-md) var(--r-md); }
  .toc-mobile li { margin-bottom: .5rem; }
}

/* --- Pull quote --- */
.pull-quote {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--bordeaux-dark);
  border-left: 4px solid var(--or);
  padding-left: 1.6rem;
  margin: 2.5rem 0;
  line-height: 1.4;
}

/* ============================================================
   FAQ ACCORDÉON
   ============================================================ */
.faq-section { max-width: var(--measure-article); margin: var(--sp-lg) auto; padding: 0 var(--gutter); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem 0; cursor: pointer;
  font-family: var(--ff-display); font-weight: 600; font-size: 1.08rem;
  color: var(--bordeaux-dark);
}
.faq-toggle {
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--or-dark);
  transition: transform var(--dur-fast) var(--ease);
}
.faq-item.open .faq-toggle { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height var(--dur) var(--ease);
  color: var(--txt-sec);
}
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: 1.3rem; }

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

/* ============================================================
   SECTIONS GÉNÉRIQUES
   ============================================================ */
.section { padding: var(--sp-xl) 0; }
.section-header { max-width: 640px; margin: 0 auto var(--sp-lg); text-align: center; }
.section-header.left { margin-left: 0; text-align: left; }

.section-immersive { position: relative; color: var(--txt-white); min-height: 70vh; display: flex; align-items: center; }
.section-immersive__img { position: absolute; inset: 0; }
.section-immersive__img img { width: 100%; height: 100%; object-fit: cover; }
.section-immersive__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,26,34,.88) 0%, rgba(30,26,34,.45) 100%); }
.section-immersive__content { position: relative; z-index: 2; max-width: 560px; padding: 0 var(--gutter); }
.section-immersive .kicker { color: var(--or-light); }
.section-immersive h2 { color: var(--txt-white); }
.section-immersive p { color: rgba(251,246,236,.85); }

.stat-counter { display: flex; justify-content: center; gap: var(--sp-xl); flex-wrap: wrap; text-align: center; }
.stat-counter__item .num { font-family: var(--ff-display); font-size: 3rem; font-weight: 700; color: var(--bordeaux); display: block; }
.stat-counter__item .label { font-size: .9rem; color: var(--txt-sec); text-transform: uppercase; letter-spacing: .06em; }

/* ============================================================
   FORMULAIRE CONTACT
   ============================================================ */
.form-group { margin-bottom: 1.3rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .92rem; color: var(--bordeaux-dark); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-family: var(--ff-body); font-size: .96rem;
  background: var(--bg-card);
  transition: border-color var(--dur-fast) var(--ease);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--bordeaux); }
.form-status { padding: 1rem; border-radius: var(--r-md); margin-top: 1rem; font-size: .92rem; }
.form-status.success { background: var(--sauge-muted); color: var(--sauge); }
.form-status.error { background: var(--bordeaux-muted); color: var(--bordeaux); }

/* ============================================================
   BREADCRUMB (pages internes non-hero)
   ============================================================ */
.breadcrumb { font-size: .85rem; color: var(--txt-light); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--txt-sec); }
.breadcrumb a:hover { color: var(--bordeaux); }

/* ============================================================
   UTILITAIRES
   ============================================================ */
.blog-grid-item { display: contents; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.related-grid { margin-top: var(--sp-lg); }
