/* ============================================================
   FOIRE DE RENNES EN IMMERSION — main.css
   Framework : CSS Grid + Flexbox pur
   Archétype index : F (sidebar 70/30)
   ============================================================ */

/* ── IMPORTS ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,800;1,9..144,400;1,9..144,600&family=Inter:wght@300;400;500;600&display=swap');

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #3F6B60;
  --secondary:  #E8933A;
  --accent:     #ECAB36;
  --text:       #22302C;
  --text-light: #4A6660;
  --bg:         #FAF8F4;
  --bg-alt:     #F3EFE8;
  --white:      #FFFFFF;
  --border:     #DDD8CF;

  --font-title: 'Fraunces', Georgia, serif;
  --font-body:  'Inter', system-ui, sans-serif;

  --radius:     6px;
  --radius-lg:  12px;
  --shadow-sm:  0 1px 4px rgba(34,48,44,.08);
  --shadow-md:  0 4px 16px rgba(34,48,44,.12);
  --shadow-lg:  0 8px 32px rgba(34,48,44,.15);

  --nav-h:      80px;
  --container:  1280px;
  --content-w:  820px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }

/* ── CONTAINER ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.container--narrow {
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}

/* ── NAVIGATION ──────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(34,48,44,.12);
  min-height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--nav-h);
  flex-wrap: wrap;
}

.nav-logo a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
}

/* Menu principal Joornal */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.nav-menu li {
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(63,107,96,.1);
  color: var(--primary);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* Stripe déco sous la nav */
.nav-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 50%, var(--secondary) 100%);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.65);
  padding: 40px 0 28px;
  margin-top: 80px;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-title);
  font-size: 18px;
  color: rgba(255,255,255,.85);
  font-style: italic;
}

.footer-copy {
  text-align: right;
}

.footer-copy a {
  color: var(--accent);
}

/* ── INDEX — ARCHÉTYPE F (SIDEBAR 70/30) ─────────────────── */
.index-wrapper {
  padding: 56px 0 80px;
}

.index-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: start;
}

/* Colonne principale */
.index-main {}

.index-heading {
  font-family: var(--font-title);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  letter-spacing: -.02em;
  margin-bottom: 28px;
  text-align: left;
}

.index-heading em {
  font-style: italic;
  color: var(--secondary);
}

.index-content {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-light);
  margin-bottom: 52px;
  max-width: 680px;
  border-left: 4px solid var(--accent);
  padding-left: 20px;
}

.index-content p { margin-bottom: 1em; }
.index-content p:last-child { margin-bottom: 0; }

/* Section showcase */
.showcase-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.showcase-heading h2 {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.showcase-heading::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--secondary);
  flex-shrink: 0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* Sidebar */
.index-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.sidebar-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.sidebar-card:hover .sidebar-thumb img {
  transform: scale(1.04);
}

.sidebar-info {
  padding: 24px;
}

.sidebar-label {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.sidebar-baseline {
  font-family: var(--font-title);
  font-size: 17px;
  font-style: italic;
  color: var(--primary);
  line-height: 1.4;
  margin-bottom: 16px;
}

.sidebar-date {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-date::before {
  content: '◆';
  color: var(--secondary);
  font-size: 8px;
}

/* ── POST-LOOP — CARTE VERTICALE ÉDITORIALE ──────────────── */
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s, transform .3s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.post-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.05);
}

.post-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.post-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--secondary);
  padding: 3px 0;
  border-bottom: 2px solid var(--accent);
  align-self: flex-start;
}

.post-card__cat:hover { color: var(--primary); }

.post-card__title {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  transition: color .2s;
}

.post-card__title:hover { color: var(--primary); }

.post-card__excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  padding-top: 12px;
  border-top: 1px solid var(--bg-alt);
  margin-top: auto;
}

.post-card__read {
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}

.post-card__read:hover { gap: 8px; color: var(--secondary); }

/* ── POST-LIST ───────────────────────────────────────────── */
.post-list-header {
  background: var(--primary);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}

.post-list-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent), var(--secondary));
}

.post-list-header h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.02em;
  margin-bottom: 8px;
  text-align: left;
}

.post-list-header .breadcrumb-wrap {
  margin-bottom: 20px;
}

.post-list-body {
  padding: 56px 0 80px;
}

.post-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  transition: background .2s, color .2s, border-color .2s;
}

.pagination a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination .active {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  font-weight: 600;
}

/* ── POST DETAIL ─────────────────────────────────────────── */
.post-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
}

.post-header .breadcrumb-wrap {
  margin-bottom: 16px;
}

.post-header h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text);
  letter-spacing: -.025em;
  margin-bottom: 20px;
  text-align: left;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-light);
}

.post-meta__cat {
  background: var(--secondary);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 3px;
}

.post-meta__cat:hover { background: var(--primary); color: var(--white); }

.post-meta__dot { color: var(--accent); }

.post-body {
  padding: 56px 0 80px;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
  max-width: 1140px;
  margin-inline: auto;
}

.post-article {}

.post-thumb {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16/7;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  font-size: 17.5px;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin: 2em 0 .6em;
  letter-spacing: -.01em;
}

.post-content h3 {
  font-family: var(--font-title);
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  margin: 1.6em 0 .5em;
}

.post-content p { margin-bottom: 1.4em; }

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content blockquote {
  border-left: 4px solid var(--secondary);
  background: var(--bg-alt);
  padding: 16px 20px;
  margin: 2em 0;
  font-family: var(--font-title);
  font-style: italic;
  font-size: 19px;
  color: var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 1.4em;
}

.post-content li { margin-bottom: .4em; }

.post-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

/* Auteur / Signatory */
.post-signatory {
  margin-top: 56px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.post-signatory__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.post-signatory__content {
  font-size: 15px;
  color: var(--text-light);
}

/* Articles liés */
.post-related {
  margin-top: 72px;
}

.post-related__title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  text-align: left;
}

.post-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Sidebar post.html */
.post-sidebar {}

.post-sidebar__block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.post-sidebar__block h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bg-alt);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  font-size: 14px;
  color: var(--text-light);
  padding-left: 12px;
  border-left: 2px solid var(--border);
  display: block;
  transition: border-color .2s, color .2s;
}

.toc-list a:hover {
  border-color: var(--secondary);
  color: var(--primary);
}

/* ── BREADCRUMB ──────────────────────────────────────────── */
/* Le tag {{breadcrumb}} de Joornal rend <nav><ol><li>…</li></ol></nav> —
   sans reset list-style, le navigateur affiche une numérotation par défaut. */
.breadcrumb-wrap ol {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-wrap li { list-style: none; }

.breadcrumb-wrap a { color: rgba(255,255,255,.7); }
.breadcrumb-wrap a:hover { color: var(--accent); }
.breadcrumb-wrap span { color: rgba(255,255,255,.45); }

.post-header .breadcrumb-wrap a { color: var(--text-light); }
.post-header .breadcrumb-wrap span { color: var(--border); }
.post-header .breadcrumb-wrap [aria-current="page"] { color: var(--primary); font-weight: 500; }

/* ── UTILITAIRES ─────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

/* Tablette lg → md */
@media (max-width: 1100px) {
  .index-layout { grid-template-columns: 1fr 280px; gap: 40px; }
  .post-layout { grid-template-columns: 1fr 240px; gap: 48px; }
  .post-list-grid { grid-template-columns: repeat(2, 1fr); }
  .post-related__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablette md */
@media (max-width: 820px) {
  .index-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .index-sidebar {
    position: static;
    max-width: 480px;
  }

  .showcase-grid { grid-template-columns: 1fr; }

  .post-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .post-sidebar { display: none; }

  .post-list-grid { grid-template-columns: repeat(2, 1fr); }

  .post-related__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile sm */
@media (max-width: 600px) {
  :root { --nav-h: 64px; }

  .nav-logo img { height: 48px; }

  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--bg-alt);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    gap: 0;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    padding: 12px 24px;
    border-radius: 0;
    font-size: 15px;
  }

  .site-nav { position: relative; }

  .post-list-grid { grid-template-columns: 1fr; }
  .post-related__grid { grid-template-columns: 1fr; }

  .post-header h1 { font-size: 28px; }

  .index-heading { font-size: 32px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { text-align: center; }
}

/* XS */
@media (max-width: 380px) {
  .nav-logo img { height: 44px; }
  .post-signatory { flex-direction: column; gap: 12px; }
}
