/*
Theme Name: Corse Hyer
Description: Magazine voyage Corse-du-Sud — design system Hyer (standalone, aucun parent).
Version: 2.1
Author: Sam
*/

/* ============ TOKENS ============ */
:root {
  --ink: #000d10;
  --ink-soft: #10222a;
  --white: #ffffff;
  --clay: #bc7155;
  --line: #d5d3d4;
  --muted: #8e8e95;
  --sand: #f5f1ec;
  --font-display: "Helvetica Now Display", "Helvetica Neue", Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Helvetica Neue", Inter, -apple-system, "Segoe UI", Arial, sans-serif;
  --maxw: 1200px;
  --section-gap: 80px;
  --pill: 1000px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 900px; margin: 0 auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.screen-reader-text:focus { left: 16px; top: 16px; z-index: 1000; padding: 10px 14px; background: var(--ink); color: var(--white); }
::selection { background: var(--clay); color: var(--white); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 72px;
}
.site-logo {
  font-family: var(--font-display);
  font-weight: 700; font-size: 26px; letter-spacing: -0.03em;
  color: var(--ink); white-space: nowrap;
}
.site-logo svg { height: 30px; width: auto; display: block; }
.site-footer .site-logo { color: var(--white); }
.site-footer .site-logo svg { height: 36px; }
.main-nav ul { display: flex; align-items: center; gap: 6px; }
.main-nav li { position: relative; }
.main-nav a {
  display: inline-block; padding: 9px 18px;
  border-radius: var(--pill);
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.main-nav a:hover { background: var(--ink); color: var(--white); }
.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a { background: var(--ink); color: var(--white); }
.main-nav .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 110;
  min-width: 220px; padding: 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  display: none;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; border-radius: 10px; padding: 9px 14px; }
.main-nav .sub-menu a:hover { background: var(--sand); color: var(--ink); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .62;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .62;
}
.page-hero .hero-img { opacity: .38; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,13,16,.05) 30%, rgba(0,13,16,.82) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 120px 0 88px;
  max-width: 900px;
}
.hero-wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 15px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.75); margin-bottom: 22px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 8.5vw, 118px);
  font-weight: 700; line-height: .94; letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 21px); line-height: 1.55;
  color: rgba(255,255,255,.85); max-width: 620px; margin-bottom: 38px;
}
.hero .btn { margin-right: 12px; margin-bottom: 10px; }

/* ============ BUTTONS (pills) ============ */
.btn {
  display: inline-block; padding: 15px 32px;
  border-radius: var(--pill);
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; transition: all .18s ease; cursor: pointer;
}
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); color: var(--white); transform: translateY(-1px); }
.hero .btn-dark { background: var(--white); color: var(--ink); }
.hero .btn-dark:hover { background: var(--sand); color: var(--ink); }
.btn-ghost { background: transparent; border: 1.5px solid currentColor; }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hero .btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ============ SECTIONS / BANDES ============ */
.section { padding: var(--section-gap) 0; }
.section-white { background: var(--white); }
.section-dark { background: var(--ink); color: var(--white); }
.section-sand { background: var(--sand); }
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
  margin-bottom: 18px;
}
.section > .container > .narrow > p,
.section-intro { font-size: 19px; color: var(--ink-soft); margin-bottom: 44px; max-width: 640px; }
.section-dark .section-intro, .section-dark > .container > .narrow > p { color: rgba(255,255,255,.75); }

/* ============ CARTES ============ */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-date {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.card {
  border: 1px solid var(--line);
  background: var(--white);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sand); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 26px 28px 30px; }
.card h3 {
  font-family: var(--font-display);
  font-size: clamp(25px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 10px;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--clay); }
.card p { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.card .card-more {
  display: inline-block; margin-top: 16px;
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 2px;
}
.card .card-more:hover { color: var(--clay); border-color: var(--clay); }
.section-dark .card { background: var(--ink-soft); border-color: rgba(255,255,255,.14); }
.section-dark .card h3 a { color: var(--white); }
.section-dark .card h3 a:hover { color: var(--clay); }
.section-dark .card p { color: rgba(255,255,255,.72); }
.section-dark .card .card-more { color: var(--white); border-color: var(--white); }

/* ============ FEATURED CARD (1 seul accent clay) ============ */
.featured-card {
  background: var(--clay); color: var(--white);
  border-radius: 0;
  padding: 72px 60px;
  text-align: center;
}
.featured-card h2 { color: var(--white); }
.featured-card p { color: rgba(255,255,255,.88); font-size: 19px; max-width: 560px; margin: 0 auto 36px; }
.featured-card .btn-dark { background: var(--ink); color: var(--white); }
.featured-card .btn-ghost { border-color: var(--white); color: var(--white); }
.featured-card .btn-ghost:hover { background: var(--white); color: var(--clay); }

/* ============ PAGE / ARTICLE ============ */
.page-hero {
  position: relative;
  background: var(--ink); color: var(--white);
  padding: 96px 0 72px;
  overflow: hidden;
}
.page-hero .hero-bg { opacity: .38; }
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,13,16,.15) 0%, rgba(0,13,16,.8) 100%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 72px);
  font-weight: 700; letter-spacing: -0.04em; line-height: .98;
  max-width: 900px;
}
.page-hero .page-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: 18px;
}
.article-body { padding: 72px 0 96px; }
.entry-content { max-width: 760px; margin: 0 auto; font-size: 19px; line-height: 1.75; }
.entry-content p { margin-bottom: 26px; }
.entry-content h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.05;
  margin: 56px 0 20px;
}
.entry-content h3 {
  font-family: var(--font-display);
  font-size: 25px; font-weight: 700; letter-spacing: -0.02em;
  margin: 42px 0 14px;
}
.entry-content a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--clay); }
.entry-content .btn { text-decoration: none; }
.entry-content .btn-dark, .entry-content .btn-dark:hover { color: var(--white); }
.entry-content .btn-ghost, .entry-content .btn-ghost:hover { color: var(--ink); }
.entry-content .btn-ghost:hover { background: var(--ink); color: var(--white); }
.entry-content img { margin: 36px auto; }
.entry-content ul, .entry-content ol { list-style: disc; margin: 0 0 26px 26px; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; }
.entry-content blockquote,
.entry-content .encadre {
  background: var(--sand);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  padding: 26px 30px; margin: 36px 0;
  font-size: 18px; line-height: 1.65;
}
.entry-content blockquote p:last-child, .entry-content .encadre p:last-child { margin-bottom: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 32px 0; font-size: 16px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--sand); font-weight: 600; }
.post-thumb { margin-bottom: 0; }
.post-thumb img { width: 100%; }

/* ============ EDITORIAL MODULES ============ */
.entry-content .ru-toc,
.entry-content .ru-summary,
.entry-content .ru-related {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 0 0 38px;
}
.entry-content .ru-toc strong,
.entry-content .ru-summary > strong {
  display: block;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.entry-content .ru-toc ul { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.entry-content .ru-toc li { margin: 0; }
.entry-content .ru-toc a { text-decoration: none; border-bottom: 1px solid var(--line); display: inline-block; padding-bottom: 2px; }
.entry-content .ru-summary { background: var(--sand); padding: 24px 28px; border: 1px solid var(--line); border-top: 3px solid var(--ink); }
.entry-content .ru-summary ul { list-style: disc; margin: 0 0 0 22px; }
.entry-content .ru-summary li { margin-bottom: 8px; }
.entry-content .ru-summary li:last-child { margin-bottom: 0; }
.entry-content .ru-related { margin-top: 50px; }
.entry-content .ru-related h2 { margin-top: 0; font-size: 30px; }
.entry-content .ru-related p { margin-bottom: 0; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--ink); color: var(--white);
  padding: 80px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 64px;
}
.footer-brand .site-logo { color: var(--white); font-size: 30px; }
.footer-brand p { color: var(--muted); font-size: 15px; line-height: 1.7; margin-top: 18px; max-width: 300px; }
.footer-col h4 {
  font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.55); margin-bottom: 22px;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col a {
  color: var(--muted); font-size: 17px; text-decoration: none;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 26px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; padding: 12px 0 10px; }
  .main-nav {
    width: 100%; margin: 0; padding: 0;
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .main-nav ul { flex-wrap: wrap; gap: 4px; padding: 4px 0 6px; }
  .main-nav a { font-size: 14px; padding: 8px 12px; }
  .site-logo svg { height: 26px; }
  .grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .featured-card { padding: 48px 26px; }
  .hero { min-height: 66vh; }
  .hero-content { padding: 80px 0 64px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 18px; }
  .entry-content { font-size: 18px; }
  .entry-content .ru-toc ul { grid-template-columns: 1fr; }
  .entry-content blockquote, .entry-content .encadre, .entry-content .ru-summary { padding: 20px; }
}

/* ============ BYLINE + AUTHOR BOX ============ */
.byline { margin-top: 22px; font-size: 15px; color: rgba(255,255,255,.72); }
.byline a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); }
.byline a:hover { border-bottom-color: var(--white); }
.byline strong { color: var(--white); font-weight: 600; }
.author-box {
  display: flex; gap: 24px; align-items: flex-start;
  max-width: 760px; margin: 56px auto 0;
  padding: 30px 32px;
  background: var(--sand); border: 1px solid var(--line);
}
.author-box .avatar {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; flex: none;
}
.author-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.author-role { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.author-bio { font-size: 15.5px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 14px; }
@media (max-width: 560px) {
  .author-box { flex-direction: column; gap: 16px; padding: 24px; }
}
/* Page profil auteur */
.author-box-page { margin: 0 0 40px; max-width: none; }
.author-box-page .avatar { width: 140px; height: 140px; }
.author-list-title {
  font-family: var(--font-display); font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 24px;
}

/* ============ MAILLAGE (Pour aller plus loin) ============ */
.maillage {
  max-width: 760px; margin: 48px auto 0;
  padding-top: 36px; border-top: 1px solid var(--line);
}
.maillage h2 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.maillage p { font-size: 17px; margin-bottom: 14px; }
.maillage ul { list-style: none; margin: 0 0 22px; }
.maillage li { margin-bottom: 10px; padding-left: 20px; position: relative; }
.maillage li::before {
  content: ""; position: absolute; left: 0; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--clay);
}
.maillage a { font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1.5px solid var(--line); }
.maillage a:hover { color: var(--clay); border-color: var(--clay); }

/* ============ CARTE INTERACTIVE ============ */
.map-section { padding: 56px 0 0; }
.map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill-filter {
  border: 1.5px solid var(--ink); background: var(--white); color: var(--ink);
  border-radius: var(--pill); padding: 9px 20px;
  font-size: 14px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; transition: all .15s ease;
}
.pill-filter:hover { background: var(--sand); }
.pill-filter.active { background: var(--ink); color: var(--white); }
#corse-map {
  height: 68vh; min-height: 420px;
  border: 1px solid var(--line);
}
.map-note { font-size: 14px; color: var(--muted); margin-top: 14px; }
.leaflet-popup-content { font-family: var(--font-body); font-size: 15px; }
.leaflet-popup-content a { color: var(--clay); font-weight: 600; text-decoration: none; }
.leaflet-popup-content .map-type { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 900px) { #corse-map { height: 55vh; } }
