/* ==========================================================================
   LES COURTISANS — Design system "Raffinement" (bordeaux / or / creme)
   ========================================================================== */

/* --- Fonts --- */
@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,500;0,600;1,400;1,500&display=swap');

:root {
  /* Couleurs de base */
  --bordeaux: #6B2737;
  --gold: #B8935A;
  --cream: #F7F2EA;
  --ink: #1E1B1A;
  --navy: #22303F;

  /* Derives opacite */
  --bordeaux-80: rgba(107, 39, 55, 0.8);
  --bordeaux-65: rgba(107, 39, 55, 0.65);
  --bordeaux-40: rgba(107, 39, 55, 0.4);
  --bordeaux-20: rgba(107, 39, 55, 0.2);
  --bordeaux-10: rgba(107, 39, 55, 0.1);
  --bordeaux-06: rgba(107, 39, 55, 0.06);

  --ink-80: rgba(30, 27, 26, 0.8);
  --ink-65: rgba(30, 27, 26, 0.65);
  --ink-40: rgba(30, 27, 26, 0.4);
  --ink-20: rgba(30, 27, 26, 0.2);
  --ink-10: rgba(30, 27, 26, 0.1);
  --ink-06: rgba(30, 27, 26, 0.06);

  --cream-95: rgba(247, 242, 234, 0.95);
  --cream-75: rgba(247, 242, 234, 0.75);
  --cream-40: rgba(247, 242, 234, 0.4);

  --gold-80: rgba(184, 147, 90, 0.8);
  --gold-40: rgba(184, 147, 90, 0.4);
  --gold-20: rgba(184, 147, 90, 0.2);

  /* Roles */
  --bg: var(--cream);
  --bg-alt: #EFE7D8;
  --bg-dark: var(--ink);
  --text: var(--ink);
  --text-light: var(--ink-65);
  --text-on-dark: var(--cream);
  --border: var(--ink-10);
  --border-gold: var(--gold-40);

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

  /* Mesures */
  --measure-article: 860px;
  --measure-wide: 1280px;
  --measure-hero: 1440px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
  --radius-lg: 12px;

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

  /* Ombres */
  --shadow-sm: 0 2px 8px rgba(30, 27, 26, 0.08);
  --shadow-md: 0 8px 24px rgba(30, 27, 26, 0.12);
  --shadow-lg: 0 16px 48px rgba(30, 27, 26, 0.18);
}

/* ==========================================================================
   RESET
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
  font-weight: 500;
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.6rem); }

p { margin: 0 0 1.2em; }

a { color: var(--bordeaux); text-decoration: none; }
a:hover { color: var(--gold); }

ul, ol { padding-left: 1.4em; }

.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);
}

/* ==========================================================================
   IMAGES — wrappers anti-distorsion (JAMAIS object-fit sur <img> seul)
   ========================================================================== */

.img-hero, .img-card, .img-body, .img-portrait {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
}
.img-hero { aspect-ratio: 3/2; }
.img-card { aspect-ratio: 3/2; }
.img-body { aspect-ratio: 3/2; }
.img-portrait { aspect-ratio: 1/1; 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;
  border-radius: 0;
}

/* ==========================================================================
   SIGNATURES VISUELLES
   ========================================================================== */

/* Kicker */
.kicker {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bordeaux);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* Filet decoratif sous H2 */
.section-title {
  position: relative;
  padding-bottom: 0.5em;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 64px;
  height: 2px;
  background: var(--gold);
  transform-origin: left;
  transform: scaleX(0);
  animation: filet-grow 900ms var(--ease) forwards;
  animation-delay: 150ms;
}
@keyframes filet-grow { to { transform: scaleX(1); } }

/* Lettrine */
.article-body > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 3.6em;
  font-weight: 600;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.08em 0 0;
  color: var(--bordeaux);
}

/* Pull quote */
blockquote, .pull-quote {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--bordeaux);
  border-left: 3px solid var(--gold);
  padding-left: 1.2em;
  margin: 2em 0;
}

/* Numerotation discrete (cards) */
.numbered-card {
  position: relative;
}
.numbered-card::before {
  content: attr(data-n);
  position: absolute;
  top: -0.3em;
  right: 0.2em;
  font-family: var(--ff-display);
  font-size: 4.5rem;
  color: var(--bordeaux-06);
  font-weight: 700;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream-95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  max-width: var(--measure-wide);
  margin: 0 auto;
}
.site-header__logo {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.site-header__logo span { color: var(--bordeaux); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list { display: flex; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.site-nav__list a:hover { color: var(--bordeaux); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

@media (max-width: 860px) {
  .site-nav__list { display: none; }
  .nav-toggle { display: block; }
  body.nav-open .site-nav__list {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    top: 68px;
    background: var(--cream);
    padding: 2rem;
    gap: 1.5rem;
    z-index: 99;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--text-on-dark);
  overflow: hidden;
}
.hero-home__img, .hero__img {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-home__img img, .hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.hero-home__overlay, .hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,27,26,0.15) 0%, rgba(30,27,26,0.55) 65%, rgba(30,27,26,0.85) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 4rem var(--gutter);
  width: 100%;
}
.hero .kicker { color: var(--gold); }
.hero .kicker::before { background: var(--gold); }
.hero h1 { color: var(--cream); max-width: 780px; }
.hero__description {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--cream-75);
  max-width: 620px;
  margin-top: 0.6em;
}
.hero-compact { min-height: 56vh; }
.hero__meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--cream-75);
}
.hero__breadcrumb {
  font-size: 0.82rem;
  color: var(--cream-75);
  margin-bottom: 1rem;
}
.hero__breadcrumb a { color: var(--cream-75); }
.hero__breadcrumb a:hover { color: var(--gold); }

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-75);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
}
.scroll-indicator::after {
  content: '';
  width: 1px;
  height: 32px;
  background: var(--gold);
  animation: scroll-pulse 1.8s var(--ease) infinite;
}
@keyframes scroll-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ==========================================================================
   CARDS
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.6rem;
}
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card__category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bordeaux);
}
.card__date {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-left: 0.6em;
}
.card__title {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  margin: 0.5em 0 0.4em;
  line-height: 1.3;
}
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--bordeaux); }
.card__excerpt { font-size: 0.92rem; color: var(--text-light); flex: 1; }

.a-card-sq { grid-column: span 3; }
.a-card-po { grid-column: span 4; }
.a-card-feature { grid-column: span 6; }

@media (max-width: 960px) {
  .a-card-sq, .a-card-po, .a-card-feature { grid-column: span 6; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .a-card-sq, .a-card-po, .a-card-feature { grid-column: span 1; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

section { padding: 5rem 0; }
.section-dark {
  background: var(--ink);
  color: var(--cream);
}
.section-dark h2 { color: var(--cream); }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 3rem; max-width: 640px; }
.section-header .kicker { margin-bottom: 0.8em; }

.section-immersive {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: var(--cream);
  overflow: hidden;
}
.section-immersive__img { position: absolute; inset: 0; z-index: 0; }
.section-immersive__img img { width: 100%; height: 100%; object-fit: cover; }
.section-immersive__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(30,27,26,0.9) 0%, rgba(107,39,55,0.55) 100%);
  z-index: 1;
}
.section-immersive__content { position: relative; z-index: 2; max-width: 620px; }
.section-immersive .kicker { color: var(--gold); }

/* ==========================================================================
   ARTICLE BODY
   ========================================================================== */

.article-summary {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-light);
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-gold);
  padding: 1.6rem 0;
  margin: 2rem 0 2.5rem;
}

.article-body h2 { margin-top: 2.4em; }
.article-body h3 { margin-top: 1.8em; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
.article-body figure { margin: 2.4em 0; }
.article-body figcaption {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: var(--ff-quote);
  font-style: italic;
  margin-top: 0.6em;
  text-align: center;
}

.toc {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
}
.toc summary {
  font-family: var(--ff-display);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
}
.toc ul { margin: 1em 0 0; padding-left: 1.2em; }
.toc a { font-size: 0.92rem; }

.saviez-vous {
  background: var(--bordeaux-06);
  border-left: 3px solid var(--bordeaux);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2.4em 0;
}
.saviez-vous strong { color: var(--bordeaux); font-family: var(--ff-display); }

/* Tableaux */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.94rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 0.7em 0.9em;
  text-align: left;
}
.article-body th {
  background: var(--bordeaux);
  color: var(--cream);
  font-family: var(--ff-display);
  font-weight: 500;
}
.article-body tr:nth-child(even) td { background: var(--bg-alt); }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq { margin: 3rem 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  cursor: pointer;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.faq-item__icon {
  font-size: 1.4rem;
  color: var(--bordeaux);
  transition: transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-item__icon { transform: rotate(45deg); }
.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease);
  font-size: 0.96rem;
  color: var(--text-light);
}
.faq-item.open .faq-item__answer { max-height: 600px; padding-bottom: 1.2rem; }

/* ==========================================================================
   RELATED / NAV
   ========================================================================== */

.article-nav-related {
  margin: 4rem 0 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.article-nav-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  list-style: none;
  padding: 0;
}
.article-nav-related a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease);
}
.article-nav-related a:hover { background: var(--gold-20); color: var(--ink); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.8em;
  font-family: var(--ff-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.btn--primary { background: var(--bordeaux); color: var(--cream); }
.btn--primary:hover { background: var(--ink); color: var(--gold); }
.btn--ghost { border-color: var(--cream-75); color: var(--cream); }
.btn--ghost:hover { background: var(--cream); color: var(--ink); }
.btn--outline { border-color: var(--bordeaux); color: var(--bordeaux); }
.btn--outline:hover { background: var(--bordeaux); color: var(--cream); }

/* ==========================================================================
   FILTRES BLOG (categories)
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.55em 1.3em;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.filter-btn:hover { border-color: var(--bordeaux); color: var(--bordeaux); }
.filter-btn.active { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--cream); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--cream-75);
  padding: 4.5rem 0 2rem;
}
.site-footer a { color: var(--cream-75); }
.site-footer a:hover { color: var(--gold); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(247,242,234,0.12);
}
.footer-brand__logo {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 0.6em;
}
.footer-brand__logo span { color: var(--gold); }
.footer-brand__tagline {
  font-family: var(--ff-quote);
  font-style: italic;
  font-size: 1rem;
  color: var(--cream-75);
  max-width: 280px;
}
.footer-col h4 {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2em;
  font-family: var(--ff-body);
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.7em; font-size: 0.9rem; }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(247,242,234,0.5);
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   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); }

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

@media (max-width: 640px) {
  section { padding: 3.2rem 0; }
  .hero { min-height: 80vh; }
}
