/* ============================================================
   MARNE-LA-VALLÉE — Thème Magazine Éditorial
   Framework : CSS Grid + Flexbox pur
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,600&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

/* ---------- Variables ---------- */
:root {
  --primary:    #1a5276;
  --secondary:  #d4ac0d;
  --accent:     #e8f4f8;
  --text:       #1c1c1c;
  --text-muted: #5a6475;
  --white:      #ffffff;
  --border:     #dde4ea;
  --gold-light: #f5e9a2;
  --nav-bg:     #0d2d42;
  --footer-bg:  #0d2d42;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Source Sans 3', system-ui, sans-serif;

  --radius:     4px;
  --shadow-sm:  0 2px 8px rgba(26,82,118,.10);
  --shadow-md:  0 6px 24px rgba(26,82,118,.16);
  --shadow-lg:  0 12px 40px rgba(26,82,118,.22);

  --max-w:      1240px;
  --content-w:  740px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 2rem;
}
.container--narrow {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 2rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--secondary);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1rem;
}
.nav-logo a {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 72px;
  width: auto;
}

/* Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-menu a {
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  padding: .5rem 1.1rem;
  transition: color .2s;
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 1.1rem; right: 1.1rem;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transition: transform .25s;
}
.nav-menu a:hover { color: var(--secondary); }
.nav-menu a:hover::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: .5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--nav-bg);
    border-top: 1px solid rgba(255,255,255,.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-menu-wrapper.open { max-height: 600px; }
  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    padding: .5rem 0 1rem;
  }
  .nav-menu a { padding: .75rem 1.5rem; }
  .nav-menu a::after { display: none; }
  .nav-logo img { height: 52px; }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--accent);
  border-bottom: 1px solid var(--border);
  padding: .6rem 0;
  font-size: .85rem;
  color: var(--text-muted);
}
.breadcrumb-bar a { color: var(--primary); }
.breadcrumb-bar a:hover { text-decoration: underline; }

/* ============================================================
   INDEX — ARCHÉTYPE E : IMMERSIF PLEINE LARGEUR
   ============================================================ */

/* Hero immersif */
.hero-immersive {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--primary);
}
.hero-immersive .hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* thumbnail dans le hero */
.hero-immersive .hero-thumb {
  position: absolute;
  inset: 0;
}
.hero-immersive .hero-thumb img,
.hero-immersive .hero-thumb > * {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,24,36,.82) 0%,
    rgba(10,24,36,.35) 55%,
    rgba(10,24,36,.10) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem 3.5rem;
  max-width: var(--max-w);
  margin-inline: auto;
  width: 100%;
}
.hero-label {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
  background: rgba(0,0,0,.3);
  padding: .3rem .8rem;
  border-left: 3px solid var(--secondary);
}
.hero-h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  text-align: left;
  max-width: 800px;
  margin-bottom: 1.2rem;
}
.hero-baseline {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(255,255,255,.8);
  font-style: italic;
  text-align: left;
}

/* Section contenu intro */
.index-intro {
  padding: 4rem 0 3rem;
  background: var(--white);
}
.index-intro-inner {
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 2rem;
}
.index-intro p,
.index-intro .content-body {
  font-size: 1.15rem;
  font-family: var(--ff-body);
  color: var(--text);
  line-height: 1.9;
  font-weight: 400;
}
.intro-divider {
  width: 60px;
  height: 3px;
  background: var(--secondary);
  margin-bottom: 1.8rem;
}

/* Showcase section */
.index-showcase {
  padding: 3rem 0 5rem;
  background: var(--accent);
}
.showcase-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
}
.showcase-title {
  font-family: var(--ff-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
}
.showcase-link {
  font-family: var(--ff-body);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--secondary);
  border-bottom: 1.5px solid var(--secondary);
  padding-bottom: 1px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
@media (max-width: 991px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
  .showcase-grid { grid-template-columns: 1fr; }
  .hero-content { padding-inline: 1.25rem; }
  .hero-h1 { font-size: 2.2rem; }
}

/* ============================================================
   POST LOOP — CARTE OVERLAY
   ============================================================ */
.post-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  background: var(--primary);
  transition: box-shadow .3s, transform .3s;
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.post-card .card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card .card-thumb img,
.post-card .card-thumb > * {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .card-thumb,
.post-card:hover .card-thumb img { transform: scale(1.05); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,24,36,.85) 0%, rgba(10,24,36,.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem 1.3rem 1.3rem;
}
.card-category {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: .5rem;
}
.card-title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: .5rem;
}
.card-meta {
  font-family: var(--ff-body);
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}
.card-excerpt {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin-top: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
}

/* ============================================================
   POST LIST
   ============================================================ */
.page-header-band {
  background: var(--primary);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-header-band::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(212,172,13,.12);
  pointer-events: none;
}
.page-header-band::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.page-header-band h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  text-align: left;
  margin-bottom: .75rem;
  position: relative;
  z-index: 1;
}
.page-header-band .page-header-sub {
  font-family: var(--ff-body);
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  font-style: italic;
  position: relative;
  z-index: 1;
}
.page-header-accent {
  width: 50px;
  height: 3px;
  background: var(--secondary);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.list-section {
  padding: 4rem 0 5rem;
}
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 991px) {
  .list-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
  .list-grid { grid-template-columns: 1fr; }
  .page-header-band { padding: 2.5rem 0 2rem; }
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.pagination-wrap .page,
.pagination-wrap a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 .75rem;
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all .2s;
}
.pagination-wrap .page:hover,
.pagination-wrap a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.pagination-wrap .active {
  background: var(--secondary);
  color: var(--text);
  border-color: var(--secondary);
}

/* ============================================================
   POST DETAIL
   ============================================================ */
.post-hero {
  background: var(--primary);
  padding: 3rem 0 0;
}
.post-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.post-meta-top {
  padding-bottom: 1.5rem;
}
.post-category-link {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--secondary);
  border: 1.5px solid var(--secondary);
  padding: .25rem .7rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}
.post-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  text-align: left;
  margin-bottom: 1.2rem;
}
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--ff-body);
  font-size: .85rem;
  color: rgba(255,255,255,.65);
}
.post-meta-row .sep { opacity: .4; }

.post-featured-image {
  margin-top: 2.5rem;
  width: 100%;
  max-height: 520px;
  overflow: hidden;
}
.post-featured-image img,
.post-featured-image > * {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

/* Article body */
.post-body-section {
  padding: 3.5rem 0 4rem;
  background: var(--white);
}
.post-body {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: 2rem;
}
.post-body h2 {
  font-family: var(--ff-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2.5rem;
  margin-bottom: .9rem;
  line-height: 1.2;
}
.post-body h3 {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: .7rem;
}
.post-body p { margin-bottom: 1.4rem; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body a:hover { color: var(--secondary); }
.post-body blockquote {
  border-left: 4px solid var(--secondary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--primary);
}
.post-body ul, .post-body ol {
  margin: 1.2rem 0 1.2rem 1.8rem;
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: .4rem; }
.post-body img {
  width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.post-body figure { margin: 2rem 0; }
.post-body figcaption {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: .5rem;
}
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: .6rem .9rem;
  text-align: left;
}
.post-body th { background: var(--accent); font-weight: 700; }

/* Signatory */
.signatory-block {
  max-width: var(--content-w);
  margin: 3rem auto 0;
  padding-inline: 2rem;
}
.signatory-inner {
  background: var(--accent);
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.signatory-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 700;
}
.signatory-content { flex: 1; }
.signatory-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: .3rem;
}

/* Related articles */
.related-section {
  background: var(--accent);
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--border);
}
.related-title {
  font-family: var(--ff-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  text-align: left;
  margin-bottom: 2rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 991px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
  .related-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 2rem; }
  .signatory-inner { flex-direction: column; }
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.toc-box {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc-box h4 {
  font-family: var(--ff-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .75rem;
  letter-spacing: .05em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,.65);
  padding: 2.5rem 0;
  border-top: 3px solid var(--secondary);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-family: var(--ff-body);
  font-size: .85rem;
}
.footer-copy a { color: var(--secondary); }
.footer-copy a:hover { text-decoration: underline; }
.footer-credits {
  font-family: var(--ff-body);
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  font-style: italic;
}
@media (max-width: 599px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   UTILITY
   ============================================================ */
.gold-bar {
  display: block;
  width: 50px;
  height: 3px;
  background: var(--secondary);
  margin-bottom: 1.25rem;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
