/* ========================================================================
   FRANCE-OURAL · Mood board "Malachite & Quartzite"
   Édité par CQMI — Le portail des échanges culturels franco-russes
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* ----- PALETTE Malachite & Quartzite ----- */
  --encre-oural: #0F1A1F;
  --malachite: #0F5A45;
  --malachite-clair: #4A8A75;
  --malachite-fonce: #093D2E;
  --ocre-quartzite: #B8763A;
  --or-vieilli: #9F7B3F;
  --lin-russe: #EFE7D3;
  --ivoire: #F7F2E5;
  --craie: #FBF8F0;

  /* ----- Dérivés opacité ----- */
  --encre-80: rgba(15, 26, 31, 0.80);
  --encre-65: rgba(15, 26, 31, 0.65);
  --encre-40: rgba(15, 26, 31, 0.40);
  --encre-20: rgba(15, 26, 31, 0.20);
  --encre-10: rgba(15, 26, 31, 0.10);
  --encre-06: rgba(15, 26, 31, 0.06);
  --lin-95: rgba(239, 231, 211, 0.95);
  --lin-75: rgba(239, 231, 211, 0.75);
  --lin-40: rgba(239, 231, 211, 0.40);
  --malachite-20: rgba(15, 90, 69, 0.20);
  --malachite-10: rgba(15, 90, 69, 0.10);

  /* ----- TYPOGRAPHIE ----- */
  --ff-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --ff-mono: 'JetBrains Mono', 'Courier New', Courier, monospace;

  /* ----- TAILLES ----- */
  --fs-xxs: 0.75rem;
  --fs-xs: 0.875rem;
  --fs-sm: 0.95rem;
  --fs-base: 1.05rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.625rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 4rem;
  --fs-hero: clamp(2.5rem, 6vw, 4.5rem);

  /* ----- 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: 220ms;
  --dur: 420ms;
  --dur-slow: 720ms;

  /* ----- ELEVATIONS ----- */
  --shadow-sm: 0 1px 3px var(--encre-10);
  --shadow-md: 0 4px 12px var(--encre-10);
  --shadow-lg: 0 10px 30px var(--encre-20);
}

/* ========================================================================
   RESET + BASE
   ======================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--encre-oural);
  background: var(--lin-russe);
  font-feature-settings: 'kern', 'liga', 'onum';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--malachite); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--ocre-quartzite); }
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 600; line-height: 1.2; color: var(--encre-oural); margin: 0 0 0.5em; }
h1 { font-size: var(--fs-3xl); font-weight: 700; }
h2 { font-size: var(--fs-2xl); position: relative; padding-bottom: 0.5rem; }
h2::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 80px; height: 1px;
  background: var(--malachite);
  box-shadow: 0 3px 0 0 var(--ocre-quartzite);
}
h3 { font-size: var(--fs-xl); }
p { margin: 0 0 1.25em; }

/* ========================================================================
   KICKERS BILINGUES (signature visuelle 3)
   ======================================================================== */
.kicker {
  font-family: var(--ff-mono);
  font-size: var(--fs-xxs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ocre-quartzite);
}
.kicker-bilingue {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  line-height: 1.4;
}
.fr, .kicker-bilingue .fr { color: var(--malachite); font-weight: 600; }
.ru, .kicker-bilingue .ru { color: var(--malachite-clair); font-size: 0.9em; }

/* ========================================================================
   LETTRINE (signature visuelle 2)
   ======================================================================== */
.article-body > p:first-of-type::first-letter {
  font-family: var(--ff-display);
  font-size: 4.5em;
  font-weight: 700;
  color: var(--ocre-quartzite);
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.1em 0 0;
}

/* ========================================================================
   PULL QUOTES (signature visuelle 5)
   ======================================================================== */
.pull-quote {
  border-left: 4px solid var(--malachite);
  padding: 1.5rem 1.5rem 1.5rem 2rem;
  margin: 2rem 0;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--encre-80);
}
.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-style: normal;
  color: var(--ocre-quartzite);
  letter-spacing: 0.1em;
}

/* ========================================================================
   CARDS DEMIDOV (signature visuelle 7)
   ======================================================================== */
.card {
  background: var(--ivoire);
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-image { aspect-ratio: 3 / 2; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transition: transform var(--dur-slow) var(--ease); }
.card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 1.5rem; }
.card-number {
  position: absolute; top: 1rem; right: 1.5rem;
  background: var(--ocre-quartzite);
  color: var(--craie);
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  padding: 0.25rem 0.75rem;
  font-weight: 500;
}

/* ========================================================================
   FAQ ACCORDION (signature 8)
   ======================================================================== */
.faq-item { border-bottom: 1px solid var(--encre-10); padding: 1rem 0; cursor: pointer; }
.faq-item-question { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-family: var(--ff-display); font-size: var(--fs-lg); }
.faq-item-icon { font-size: 1.5em; color: var(--malachite); transition: transform var(--dur) var(--ease); }
.faq-item.open .faq-item-icon { transform: rotate(45deg); color: var(--ocre-quartzite); }
.faq-item-answer { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease), padding var(--dur-slow) var(--ease); }
.faq-item.open .faq-item-answer { max-height: 1000px; padding-top: 0.75rem; }

/* ========================================================================
   TOC STICKY (signature 6)
   ======================================================================== */
.toc {
  position: sticky; top: 100px;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  border-left: 1px solid var(--encre-10);
  padding-left: 1rem;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; padding: 0.5rem 0; }
.toc li::before { content: counter(toc, decimal-leading-zero) ". "; font-family: var(--ff-mono); color: var(--or-vieilli); font-size: var(--fs-xxs); }
.toc a { color: var(--encre-65); }
.toc a:hover { color: var(--malachite); }

/* ========================================================================
   HEADER + NAV
   ======================================================================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--lin-95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--encre-10);
  transition: padding var(--dur) var(--ease);
}
.header-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.logo { font-family: var(--ff-display); font-size: var(--fs-xl); font-weight: 700; color: var(--encre-oural); display: flex; align-items: center; gap: 0.5rem; }
.logo-dot { width: 8px; height: 8px; background: var(--malachite); border-radius: 50%; }
.nav { display: flex; gap: 2rem; }
.nav a { font-family: var(--ff-body); font-size: var(--fs-sm); color: var(--encre-80); }
.nav a:hover, .nav a.active { color: var(--malachite); }
.lang-switch { font-family: var(--ff-mono); font-size: var(--fs-xs); display: flex; gap: 0.5rem; }
.lang-switch a { padding: 0.25rem 0.5rem; border: 1px solid var(--encre-20); }
.lang-switch a.active { background: var(--malachite); color: var(--craie); border-color: var(--malachite); }

/* ========================================================================
   FOOTER (4 colonnes)
   ======================================================================== */
.footer {
  background: var(--encre-oural);
  color: var(--lin-russe);
  padding: 4rem var(--gutter) 2rem;
  margin-top: 5rem;
}
.footer-inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}
.footer h3 { color: var(--ocre-quartzite); font-family: var(--ff-mono); font-size: var(--fs-xxs); text-transform: uppercase; letter-spacing: 0.2em; }
.footer a { color: var(--lin-75); font-size: var(--fs-sm); }
.footer a:hover { color: var(--ocre-quartzite); }
.footer-bottom { max-width: var(--measure-wide); margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--encre-65); text-align: center; font-size: var(--fs-xs); color: var(--lin-40); }

/* ========================================================================
   HERO
   ======================================================================== */
.hero {
  position: relative;
  min-height: clamp(380px, 50vh, 560px);
  display: flex; align-items: center;
  background: var(--encre-oural);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: 0.5; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, var(--encre-oural) 95%); z-index: 2; }
.hero-content { position: relative; z-index: 3; max-width: var(--measure-hero); margin: 0 auto; padding: 4rem var(--gutter) 3rem; color: var(--craie); }
.hero h1 { color: var(--craie); font-size: var(--fs-hero); margin-bottom: 1rem; }
.hero .lead { font-size: var(--fs-lg); color: var(--lin-95); font-family: var(--ff-display); font-style: italic; max-width: 700px; }
/* Watermark Stèle Europe-Asie (signature 4) */
.hero::after {
  content: '';
  position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
  width: 200px; height: 300px;
  background: url('/images/stele-watermark.svg') center/contain no-repeat;
  opacity: 0.05;
  filter: invert(53%) sepia(78%) saturate(384%) hue-rotate(15deg) brightness(95%);
  z-index: 2;
  pointer-events: none;
}

/* ========================================================================
   LAYOUT ARTICLE
   ======================================================================== */
.article-summary { font-family: var(--ff-display); font-style: italic; font-size: var(--fs-lg); color: var(--encre-80); border-left: 2px solid var(--ocre-quartzite); padding-left: 1.5rem; margin: 2rem 0 3rem; }
.article-body { max-width: var(--measure-article); margin: 0 auto; padding: 0 var(--gutter); }
.article-body img { margin: 2rem 0; }

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

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--craie); padding: 1.5rem var(--gutter); border-bottom: 1px solid var(--encre-10); }
  .hamburger { display: block; cursor: pointer; font-size: 1.5em; }
}
@media (min-width: 901px) { .hamburger { display: none; } }
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }
}
