/* ============================================================
   Pays d'Honfleur — Thème Joornal
   Style : Magazine éditorial maritime
   Palette : Navy #1B3A5C · Sable #F2EDE4 · Rouille #C8762B · Ardoise #2C2C2C
   Framework : CSS Grid + Flexbox pur
   ============================================================ */

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

:root {
  --navy:    #1B3A5C;
  --sand:    #F2EDE4;
  --rust:    #C8762B;
  --slate:   #4A5568;
  --text:    #2C2C2C;
  --white:   #FFFFFF;
  --light:   #F8F5F0;
  --border:  #DDD5C8;
  --navy-dk: #122840;
  --rust-lt: #E8924A;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Source Serif 4', Georgia, serif;

  --container: 1240px;
  --gap: 2rem;
  --radius: 2px;

  --shadow-sm: 0 1px 4px rgba(27,58,92,.08);
  --shadow-md: 0 4px 20px rgba(27,58,92,.12);
  --shadow-lg: 0 8px 40px rgba(27,58,92,.18);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  color: var(--text);
  background: var(--light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }

/* ─── TYPOGRAPHIE ─── */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; }
em     { font-style: italic; }

/* ─── UTILITAIRES ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ─── NAV ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 3px solid var(--rust);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.nav-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.nav-menu-wrap { display: flex; align-items: center; gap: 2.5rem; }

/* menu rendu par {{menu}} */
.nav-menu { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-menu li { position: relative; }
.nav-menu a {
  display: block;
  padding: .5rem 1rem;
  font-family: var(--ff-body);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sand);
  transition: color .2s;
}
.nav-menu a:hover { color: var(--rust); }
.nav-menu .current-menu-item > a { color: var(--rust); }

/* sous-menus */
.nav-menu .sub-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--navy-dk); min-width: 200px; list-style: none;
  border-top: 2px solid var(--rust); box-shadow: var(--shadow-md);
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a { padding: .6rem 1.2rem; font-size: .8rem; border-bottom: 1px solid rgba(255,255,255,.05); }

/* burger */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--sand); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── INDEX — Archétype A : Split 60/40 ─── */
.index-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 88vh;
  overflow: hidden;
}

.index-hero__text {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}

.index-hero__text::before {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 260px; height: 260px;
  border: 60px solid rgba(200,118,43,.12);
  border-radius: 50%;
  pointer-events: none;
}

.index-hero__eyebrow {
  font-family: var(--ff-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1.5rem;
}

.index-hero__h1 {
  color: var(--sand);
  font-size: clamp(2.4rem, 4.5vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.index-hero__baseline {
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(242,237,228,.7);
  margin-bottom: 2.5rem;
  max-width: 420px;
}

.index-hero__cta {
  display: inline-block;
  background: var(--rust);
  color: var(--white);
  padding: .75rem 1.8rem;
  font-family: var(--ff-body);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .2s, transform .2s;
  align-self: flex-start;
}
.index-hero__cta:hover { background: var(--rust-lt); transform: translateY(-2px); }

.index-hero__image {
  position: relative;
  overflow: hidden;
}
.index-hero__image img,
.index-hero__thumb {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* zone content page d'accueil */
.index-content {
  background: var(--sand);
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.index-content__inner {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  font-size: 1.05rem;
  color: var(--slate);
  line-height: 1.8;
}

.index-content__inner h2,
.index-content__inner h3 { color: var(--navy); margin-bottom: .75rem; }

/* showcase (grille articles) */
.index-showcase {
  background: var(--light);
  padding: 4rem 0 5rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--navy);
  position: relative;
  padding-bottom: .5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--rust);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ─── POST LOOP ─── */
.post-card {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 3px solid transparent;
}
.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-top-color: var(--rust);
}

.post-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.post-card__image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.post-card:hover .post-card__image-wrap img { transform: scale(1.04); }

.post-card__body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.post-card__cat {
  font-family: var(--ff-body);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1px solid var(--rust);
  padding: .15rem .55rem;
  transition: background .2s, color .2s;
}
.post-card__cat:hover { background: var(--rust); color: var(--white); }

.post-card__date {
  font-family: var(--ff-body);
  font-size: .75rem;
  color: var(--slate);
}

.post-card__title {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: .6rem;
  line-height: 1.35;
  transition: color .2s;
}
.post-card:hover .post-card__title { color: var(--rust); }

.post-card__excerpt {
  font-size: .9rem;
  color: var(--slate);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.post-card__read {
  font-family: var(--ff-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color .2s, gap .2s;
  align-self: flex-start;
}
.post-card__read::after { content: '→'; }
.post-card:hover .post-card__read { color: var(--rust); gap: .6rem; }

/* ─── POST LIST ─── */
.post-list-header {
  background: var(--navy);
  padding: 3.5rem 0 3rem;
  border-bottom: 3px solid var(--rust);
}

.post-list-header__eyebrow {
  font-family: var(--ff-body);
  font-size: .78rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .75rem;
  font-weight: 600;
}

.post-list-header h1 {
  color: var(--sand);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.post-list-content { padding: 3.5rem 0 5rem; }

.post-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination .page a,
.pagination .page span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-family: var(--ff-body);
  font-size: .85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  transition: background .2s, color .2s, border-color .2s;
}

.pagination .page a:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.pagination .page.active span,
.pagination .page.active a {
  background: var(--rust);
  color: var(--white);
  border-color: var(--rust);
}

/* ─── POST SINGLE ─── */
.post-breadcrumb {
  background: var(--sand);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--ff-body);
  font-size: .8rem;
  color: var(--slate);
}
.post-breadcrumb a { color: var(--navy); }
.post-breadcrumb a:hover { color: var(--rust); }
.post-breadcrumb span { margin-inline: .4rem; }

.post-header {
  background: var(--navy);
  padding: 3.5rem 0 3rem;
  border-bottom: 3px solid var(--rust);
}

.post-header__inner { max-width: 860px; }

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.post-header__cat {
  font-family: var(--ff-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  background: var(--rust);
  color: var(--white);
  padding: .25rem .7rem;
  transition: background .2s;
}
.post-header__cat:hover { background: var(--rust-lt); }

.post-header__date {
  font-family: var(--ff-body);
  font-size: .8rem;
  color: rgba(242,237,228,.6);
}

.post-header__reading {
  font-family: var(--ff-body);
  font-size: .8rem;
  color: rgba(242,237,228,.6);
}

.post-header h1 {
  color: var(--sand);
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  max-width: 800px;
  margin-bottom: 0;
}

/* image principale article */
.post-featured {
  background: var(--navy-dk);
  overflow: hidden;
  max-height: 520px;
}
.post-featured img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  opacity: .92;
}

/* corps article */
.post-body {
  padding: 3.5rem 0 4rem;
}

.post-content {
  max-width: 740px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
}

.post-content h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
.post-content p  { margin-bottom: 1.4em; }
.post-content ul, .post-content ol { margin: 1em 0 1.4em 1.5em; }
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
  border-left: 4px solid var(--rust);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--sand);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--navy);
}
.post-content a { color: var(--rust); text-decoration: underline; }
.post-content a:hover { color: var(--navy); }
.post-content img { max-width: 100%; margin: 1.5rem auto; border-radius: var(--radius); }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.post-content th { background: var(--navy); color: var(--sand); padding: .6rem 1rem; text-align: left; }
.post-content td { padding: .5rem 1rem; border-bottom: 1px solid var(--border); }
.post-content tr:nth-child(even) td { background: var(--sand); }

/* signatory */
.post-signatory {
  max-width: 740px;
  margin: 2.5rem auto;
  padding: 1.5rem;
  background: var(--sand);
  border-left: 4px solid var(--navy);
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.post-signatory__content { flex: 1; }
.post-signatory__label {
  font-family: var(--ff-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .3rem;
}
.post-signatory__name {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 700;
}

/* articles liés */
.post-related {
  background: var(--sand);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--navy-dk);
  color: rgba(242,237,228,.7);
  padding: 2.5rem 0;
  border-top: 3px solid var(--rust);
}

.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: .82rem;
}

.footer-copy a { color: var(--rust); }
.footer-copy a:hover { color: var(--sand); }

.footer-right {
  font-family: var(--ff-body);
  font-size: .78rem;
  font-style: italic;
  opacity: .6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 992px) {
  .index-hero { grid-template-columns: 1fr; min-height: auto; }
  .index-hero__text { padding: 3rem 1.5rem 2.5rem; min-height: 60vw; }
  .index-hero__image { min-height: 50vw; }

  .showcase-grid, .post-list-grid, .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-menu-wrap { display: none; flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-menu-wrap.is-open {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy-dk);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-menu { flex-direction: column; width: 100%; }
  .nav-menu li { width: 100%; }
  .nav-menu a { padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-menu .sub-menu { position: static; border-top: none; box-shadow: none; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }

  .showcase-grid, .post-list-grid, .related-grid { grid-template-columns: 1fr; }

  .nav-logo img { height: 52px; }

  .index-hero__text { padding: 2.5rem 1.25rem; }
  .index-hero__h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .post-content { font-size: 1rem; }
  .post-signatory { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
}
