/* ================================================
   Régies 95 — Thème Joornal
   Style : Swiss design / Magazine local sobre
   Framework : CSS Grid + Flexbox pur
   ================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary:   #1A4F8A;
  --c-secondary: #E8F0FB;
  --c-accent:    #E05C1A;
  --c-text:      #1E1E2E;
  --c-muted:     #6B7280;
  --c-border:    #D1DBE8;
  --c-white:     #FFFFFF;
  --c-nav-bg:    #0F3260;
  --c-footer-bg: #0D2748;

  --font-title: 'Sora', sans-serif;
  --font-body:  'Source Sans 3', sans-serif;

  --container: 1240px;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(26,79,138,.10);
  --shadow-hover: 0 6px 24px rgba(26,79,138,.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-accent); }

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- TYPOGRAPHIE ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-text);
}
h1 { font-size: clamp(2.6rem, 6vw, 5.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* ---------- NAV ---------- */
.site-nav {
  background: var(--c-nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-logo a {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 72px;
  width: auto;
}

/* Menu principal ({{menu}}) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
}
.nav-menu-item {
  list-style: none;
}
.nav-menu-link {
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,.85);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav-menu-link:hover {
  color: var(--c-white);
  background: rgba(255,255,255,.12);
}

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

/* ---------- HERO INDEX — ARCHÉTYPE C ---------- */
.hero-c {
  padding: 72px 0 48px;
  background: var(--c-secondary);
  border-bottom: 3px solid var(--c-primary);
  overflow: hidden;
}
.hero-c-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.hero-c-text {}
.hero-c-label {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-white);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.hero-c-h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--c-primary);
  text-align: left;
  margin-bottom: 20px;
}
.hero-c-baseline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--c-muted);
  font-weight: 400;
  line-height: 1.5;
}
.hero-c-thumb {
  position: relative;
}
.hero-c-thumb img,
.hero-c-thumb .thumb-wrapper {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  border: 3px solid var(--c-primary);
}
.hero-c-thumb::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  background: var(--c-primary);
  border-radius: 8px;
  z-index: -1;
  opacity: .15;
}

/* ---------- SECTION CONTENU INDEX ---------- */
.index-content {
  padding: 56px 0;
  border-bottom: 1px solid var(--c-border);
}
.index-content-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.index-content-inner p,
.index-content-inner ul,
.index-content-inner ol {
  font-size: 1.05rem;
  color: var(--c-muted);
  margin-bottom: 1rem;
}

/* ---------- SHOWCASE / GRILLE D'ARTICLES ---------- */
.section-showcase {
  padding: 64px 0;
}
.section-showcase-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--c-primary);
  padding-bottom: 12px;
}
.section-showcase-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-primary);
}
.section-showcase-header a {
  font-size: .9rem;
  color: var(--c-accent);
  font-weight: 600;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------- CARD / POST-LOOP ---------- */
.post-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.post-card-thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}
.post-card-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.post-card-cat {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.post-card-cat a {
  color: inherit;
}
.post-card-cat a:hover { color: var(--c-primary); }
.post-card-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--c-primary); }
.post-card-meta {
  font-size: .82rem;
  color: var(--c-muted);
}
.post-card-excerpt {
  font-size: .92rem;
  color: var(--c-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.btn-read {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.btn-read:hover { color: var(--c-accent); }
.btn-read::after { content: ' →'; }

/* ---------- POST-LIST ---------- */
.page-header-band {
  background: var(--c-primary);
  padding: 52px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-header-band::before {
  content: '';
  position: absolute;
  right: -60px;
  top: -40px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.page-header-band h1 {
  color: var(--c-white);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: left;
}
.page-header-band .breadcrumb {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  margin-bottom: 12px;
}
.page-header-band .breadcrumb a { color: rgba(255,255,255,.75); }
.page-header-band .breadcrumb a:hover { color: var(--c-white); }

.post-list-section {
  padding: 56px 0;
}
.post-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.pagination .page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font-title);
  font-size: .9rem;
  font-weight: 700;
  color: var(--c-primary);
  transition: all .2s;
}
.pagination .page:hover,
.pagination .page.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

/* ---------- POST SINGLE ---------- */
.post-header {
  padding: 48px 0 0;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 48px;
}
.post-breadcrumb {
  font-size: .85rem;
  color: var(--c-muted);
  margin-bottom: 20px;
}
.post-breadcrumb a {
  color: var(--c-muted);
}
.post-breadcrumb a:hover { color: var(--c-primary); }
.post-meta-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.post-cat-badge {
  background: var(--c-accent);
  color: var(--c-white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}
.post-cat-badge a { color: inherit; }
.post-date {
  font-size: .85rem;
  color: var(--c-muted);
}
.post-reading {
  font-size: .85rem;
  color: var(--c-muted);
  border-left: 2px solid var(--c-border);
  padding-left: 16px;
}
.post-h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--c-text);
  margin-bottom: 36px;
  text-align: left;
}
.post-featured-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 48px;
  box-shadow: var(--shadow);
}
.post-featured-img img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 6px;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
  padding-bottom: 64px;
}
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c-text);
}
.post-content h2 { margin: 2em 0 .8em; color: var(--c-primary); }
.post-content h3 { margin: 1.6em 0 .6em; }
.post-content p { margin-bottom: 1.2em; }
.post-content ul, .post-content ol { margin: 1em 0 1.2em 1.5em; }
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 16px 20px;
  margin: 1.5em 0;
  background: var(--c-secondary);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--c-muted);
}
.post-content img { border-radius: 4px; margin: 1em 0; }
.post-content a { color: var(--c-primary); text-decoration: underline; }

/* Sidebar post */
.post-sidebar {
  position: sticky;
  top: 100px;
}
.sidebar-widget {
  background: var(--c-secondary);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 28px;
}
.sidebar-widget-title {
  font-family: var(--font-title);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-primary);
}

/* Signatory */
.post-signatory {
  margin-top: 56px;
  padding: 28px 32px;
  background: var(--c-secondary);
  border-radius: 8px;
  border-left: 4px solid var(--c-primary);
}
.post-signatory-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-muted);
  margin-bottom: 10px;
}

/* Related */
.related-section {
  padding: 56px 0 72px;
  background: var(--c-secondary);
  border-top: 2px solid var(--c-primary);
}
.related-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-primary);
  margin-bottom: 32px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-primary);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---------- TABLE OF CONTENTS ---------- */
.toc-widget {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 20px;
}
.toc-widget ul { padding-left: 18px; }
.toc-widget ul li { font-size: .9rem; margin-bottom: 6px; }
.toc-widget ul li a { color: var(--c-primary); }
.toc-widget ul li a:hover { color: var(--c-accent); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--c-footer-bg);
  color: rgba(255,255,255,.75);
  padding: 40px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-white);
  margin-bottom: 6px;
}
.footer-copy {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}
.footer-legal {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  text-align: right;
}
.footer-legal a {
  color: rgba(255,255,255,.6);
}
.footer-legal a:hover { color: var(--c-white); }
.footer-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-accent) 100%);
  margin-bottom: 40px;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb-nav {
  font-size: .85rem;
  color: var(--c-muted);
  margin-bottom: 20px;
}
.breadcrumb-nav a { color: var(--c-muted); }
.breadcrumb-nav a:hover { color: var(--c-primary); }
.breadcrumb-nav span { margin: 0 6px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .hero-c-inner {
    grid-template-columns: 1fr 200px;
    gap: 28px;
  }
  .articles-grid,
  .post-list-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-layout {
    grid-template-columns: 1fr;
  }
  .post-sidebar { position: static; }
}

@media (max-width: 720px) {
  .hero-c-inner {
    grid-template-columns: 1fr;
  }
  .hero-c-thumb {
    display: none;
  }
  .hero-c {
    padding: 48px 0 36px;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 8px 0 12px;
    gap: 2px;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu-link { padding: 10px 16px; border-radius: 0; }
  .nav-toggle { display: flex; }
  .nav-inner { flex-wrap: wrap; }
  .articles-grid,
  .post-list-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-legal { text-align: left; }
  .page-header-band { padding: 36px 0 32px; }
  .post-header { padding: 32px 0 0; }
}

@media (max-width: 480px) {
  .nav-logo img { height: 52px; }
  .hero-c-h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
}
