/*
Theme Name: NZADI Editorial
Theme URI: https://nzadinews.net/
Author: NZADI News
Description: Thème éditorial original conçu pour NZADI News, avec une hiérarchie de presse moderne, une grande une et des rubriques responsives.
Version: 1.1.13
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: nzadi-editorial
*/

:root {
  --ink: #1a1a1a;
  --muted: #666b70;
  --line: #d8d5cf;
  --paper: #f2f9fd;
  --white: #fff;
  --accent: #ed1c24;
  --accent-dark: #b7121a;
  --brand-blue: #2e3092;
  --brand-cyan: #2997d5;
  --nav: #22245f;
  --section: #247ebc;
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus { width: auto; height: auto; clip: auto; padding: 10px; background: #fff; z-index: 9999; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.utility-bar { color: #eef1f2; background: linear-gradient(90deg, var(--brand-blue), #235ba7 58%, var(--brand-cyan)); font-size: .75rem; letter-spacing: .03em; }
.utility-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.utility-links { display: flex; align-items: center; gap: 18px; }
.live-link { color: #fff; font-weight: 800; text-transform: uppercase; }
.live-link::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #ff4056; box-shadow: 0 0 0 4px rgb(255 64 86 / 15%); }
.brand-row { min-height: 140px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.site-branding { text-align: center; }
.site-title { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 700; letter-spacing: -.065em; line-height: .9; }
.site-title span { color: var(--accent); }
.site-logo-slot { display: flex; justify-content: center; align-items: center; min-width: 210px; min-height: 96px; }
.custom-logo-link { display: inline-flex; align-items: center; justify-content: center; }
.custom-logo { width: auto; max-width: min(250px, 44vw); max-height: 110px; object-fit: contain; }
.site-tagline { margin: 10px 0 0; color: var(--muted); font-family: var(--serif); font-size: .9rem; font-style: italic; letter-spacing: .03em; }
.brand-actions { justify-self: end; display: flex; gap: 10px; }
.icon-button, .menu-toggle {
  min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 2px; cursor: pointer;
}
.menu-toggle { justify-self: start; width: auto; padding: 0 14px; gap: 9px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.hamburger, .hamburger::before, .hamburger::after { width: 17px; height: 2px; display: block; background: currentColor; }
.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; }
.hamburger::before { top: -5px; }
.hamburger::after { top: 5px; }
.primary-nav { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.primary-nav ul { margin: 0; padding: 0; list-style: none; }
.primary-nav > .container > ul { display: flex; align-items: center; justify-content: center; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 14px 17px 13px; font-size: .77rem; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.primary-nav li:hover > a, .primary-nav .current-menu-item > a { color: var(--accent); }
.primary-nav .sub-menu { min-width: 220px; display: none; position: absolute; top: 100%; left: 0; z-index: 30; background: var(--white); border: 1px solid var(--line); box-shadow: 0 14px 30px rgb(0 0 0 / 12%); }
.primary-nav li:hover > .sub-menu { display: block; }
.primary-nav .sub-menu a { padding: 11px 16px; text-transform: none; letter-spacing: 0; }
.topics-bar { background: linear-gradient(90deg, #f3f3fb, #edf7fc); border-bottom: 1px solid #ccd8e7; }
.topics-inner { min-height: 42px; display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.topics-inner::-webkit-scrollbar { display: none; }
.topics-label { flex: none; color: var(--accent); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.topics-inner a { flex: none; font-family: var(--serif); font-size: .86rem; }
.search-panel { display: none; padding: 18px 0; background: var(--white); border-bottom: 1px solid var(--line); }
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-field { width: 100%; padding: 12px 14px; border: 1px solid var(--line); background: var(--paper); }
.search-submit { padding: 12px 18px; color: #fff; background: var(--accent); border: 0; cursor: pointer; font-weight: 800; }

/* Editorial home */
.site-main { padding: 28px 0 60px; }
.section-kicker { margin: 0 0 7px; color: var(--accent); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.article-title { margin: 0; font-family: var(--serif); line-height: 1.08; letter-spacing: -.025em; }
.article-title, .article-title a, .entry-title { overflow-wrap: anywhere; }
.article-title a:hover { color: var(--accent-dark); }
.article-summary { margin: 10px 0 0; color: #4f5356; font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
.article-meta { margin-top: 10px; color: var(--muted); font-size: .72rem; }
.article-meta a { font-weight: 700; }
.media-frame { display: block; position: relative; overflow: hidden; background: #dedbd4; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.media-frame:hover img { transform: scale(1.025); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, .7fr); gap: 26px; padding-bottom: 18px; border-bottom: 3px solid var(--ink); }
.hero-lead { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(250px, .95fr); gap: 22px; }
.hero-grid > *, .hero-lead > *, .editorial-grid > *, .news-grid > *, .category-feature > * { min-width: 0; }
.hero-lead .media-frame { aspect-ratio: 1.34; }
.hero-lead .article-title { font-size: clamp(1.9rem, 3.25vw, 3rem); }
.hero-secondary { border-left: 1px solid var(--line); padding-left: 26px; }
.hero-secondary article + article { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-secondary .media-frame { aspect-ratio: 16 / 9; margin-bottom: 12px; }
.hero-secondary .article-title { font-size: 1.28rem; }

@media (min-width: 981px) {
  .hero-lead { align-items: stretch; }
  .hero-lead .media-frame {
    aspect-ratio: auto;
    align-self: stretch;
    height: auto;
    min-height: 0;
  }
  .hero-secondary article + article { margin-top: 16px; padding-top: 16px; }
}

.latest-strip { display: grid; grid-template-columns: 150px repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.latest-heading { padding: 22px 18px 22px 0; color: #fff; background: var(--accent); display: flex; align-items: center; justify-content: center; text-align: center; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.latest-item { padding: 20px; border-right: 1px solid var(--line); }
.latest-item:last-child { border-right: 0; }
.latest-time { display: block; margin-bottom: 6px; color: var(--accent); font-size: .72rem; font-weight: 800; }
.latest-item .article-title { font-size: 1.02rem; }
.editorial-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .75fr); gap: 34px; margin-top: 34px; }
.section-heading { margin: 0 0 20px; padding: 0 0 10px; border-bottom: 3px solid var(--ink); font-family: var(--serif); font-size: 1.65rem; }
.section-heading span { padding-right: 16px; border-bottom: 3px solid var(--accent); }
.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.news-card { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.news-card .media-frame { aspect-ratio: 16 / 10; margin-bottom: 13px; }
.news-card .article-title { font-size: 1.35rem; }
.news-card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.news-card--wide .media-frame { margin: 0; }
.news-card--wide .article-title { font-size: 1.8rem; }
.sidebar-block { padding: 22px; background: linear-gradient(145deg, #f1f1fa, #eaf6fc); border-top: 5px solid var(--brand-cyan); }
.sidebar-block + .sidebar-block { margin-top: 28px; }
.sidebar-title { margin: 0 0 18px; color: var(--section); font-family: var(--serif); font-size: 1.4rem; }
.ranked-list { margin: 0; padding: 0; list-style: none; counter-reset: popular; }
.ranked-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid #ccc8bf; counter-increment: popular; }
.ranked-list li::before { content: counter(popular); color: var(--accent); font-family: var(--serif); font-size: 1.6rem; line-height: 1; }
.ranked-list a { font-family: var(--serif); font-weight: 700; line-height: 1.25; }
.category-section { margin-top: 42px; }
.category-feature { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; }
.category-feature article { border-right: 1px solid var(--line); padding-right: 22px; }
.category-feature article:last-child { border-right: 0; padding-right: 0; }
.category-feature .media-frame { aspect-ratio: 16 / 9; margin-bottom: 12px; }
.category-feature article:first-child .article-title { font-size: 1.75rem; }
.category-feature .article-title { font-size: 1.15rem; }

/* Archives and article pages */
.page-header { margin-bottom: 26px; padding-bottom: 14px; border-bottom: 4px solid var(--ink); }
.page-title { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.4rem); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
.pagination { margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { padding: 8px 12px; background: var(--white); border: 1px solid var(--line); }
.pagination .current { color: #fff; background: var(--accent); border-color: var(--accent); }
.single-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: 52px; align-items: start; }
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0; font-family: var(--serif); font-size: clamp(2.45rem, 6vw, 4.7rem); line-height: 1.02; letter-spacing: -.04em; }
.entry-deck { color: #55595c; font-family: var(--serif); font-size: 1.28rem; }
.entry-featured { margin: 0 0 28px; }
.entry-featured figcaption { margin-top: 7px; color: var(--muted); font-size: .72rem; }
.entry-content { font-family: var(--serif); font-size: 1.16rem; line-height: 1.75; }
.entry-content > * { max-width: 720px; }
.entry-content h2, .entry-content h3 { margin-top: 1.7em; line-height: 1.2; }
.entry-content blockquote { margin: 1.6em 0; padding-left: 24px; border-left: 5px solid var(--accent); font-size: 1.35rem; font-style: italic; }
.entry-content a { color: var(--accent-dark); text-decoration: underline; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.post-tags a { padding: 6px 9px; background: #e7e4dd; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.sticky-sidebar { position: sticky; top: 24px; }

/* Footer */
.site-footer { color: #e8ebed; background: linear-gradient(135deg, #1d1f52, var(--brand-blue) 62%, #165f92); border-top: 8px solid var(--accent); }
.footer-brand { padding: 28px 0 24px; border-bottom: 1px solid rgb(255 255 255 / 18%); }
.footer-logo-wrap { width: 190px; min-height: 86px; display: flex; align-items: center; justify-content: center; padding: 6px 9px; background: #fff; border-radius: 2px; }
.footer-logo { width: 100%; height: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 38px; padding: 34px 0; }
.footer-title { margin: 0 0 13px; color: #fff; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-menu, .footer-categories { margin: 0; padding: 0; list-style: none; }
.footer-menu li, .footer-categories li { margin: 8px 0; }
.footer-menu a, .footer-categories a, .footer-copy { color: #c3c8cb; font-size: .83rem; }
.footer-bottom { padding: 17px 0; border-top: 1px solid rgb(255 255 255 / 16%); color: #aeb4b7; font-size: .72rem; }

@media (max-width: 980px) {
  .primary-nav { display: none; position: fixed; inset: 0; z-index: 100; padding-top: 72px; overflow: auto; background: var(--white); }
  .primary-nav.is-open { display: block; }
  .primary-nav > .container > ul { display: block; }
  .primary-nav a { padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: .9rem; }
  .primary-nav .sub-menu { min-width: 0; display: block; position: static; padding-left: 20px; border: 0; box-shadow: none; }
  .menu-open .menu-toggle { position: fixed; top: 15px; left: 16px; z-index: 110; background: var(--white); }
  .hero-lead { grid-template-columns: 1fr; }
  .hero-lead .media-frame { aspect-ratio: 16 / 9; }
  .editorial-grid { grid-template-columns: minmax(0, 1fr); }
  .sticky-sidebar { position: static; }
  .single-layout { grid-template-columns: 1fr; gap: 34px; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .utility-date { display: none; }
  .brand-row { min-height: 110px; grid-template-columns: auto 1fr auto; gap: 8px; }
  .site-title { font-size: 2.25rem; }
  .site-logo-slot { min-width: 0; min-height: 78px; }
  .custom-logo { max-width: min(170px, 48vw); max-height: 86px; }
  .site-tagline { display: none; }
  .brand-actions .icon-button:first-child { display: none; }
  .menu-toggle { width: 42px; padding: 0; }
  .menu-toggle-label { display: none; }
  .site-main { padding-top: 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-left: 0; border-left: 0; }
  .hero-secondary article + article { margin-top: 0; padding-top: 0; border-top: 0; }
  .hero-lead .article-title { font-size: 2.3rem; }
  .latest-strip { grid-template-columns: 1fr; }
  .latest-heading { justify-content: flex-start; padding: 11px 14px; }
  .latest-item { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .news-grid, .archive-grid { grid-template-columns: minmax(0, 1fr); }
  .news-grid, .news-card, .news-card--wide, .news-card--wide > * { width: 100%; max-width: 100%; min-width: 0; }
  .news-card--wide { grid-column: auto; grid-template-columns: 1fr; }
  .category-feature { grid-template-columns: 1fr; }
  .category-feature article { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .entry-title { font-size: 2.45rem; }
  body.single .single-layout > article {
    padding: 24px 18px 32px;
    color: #fff;
    background: #1877f2;
    border-radius: 3px;
  }
  body.single .entry-title,
  body.single .entry-content,
  body.single .entry-content h2,
  body.single .entry-content h3,
  body.single .entry-content p,
  body.single .entry-content li,
  body.single .entry-content strong {
    color: #fff;
  }
  body.single .entry-deck { color: #eef7ff; }
  body.single .article-meta,
  body.single .entry-featured figcaption { color: #dbeeff; }
  body.single .entry-content a {
    color: #fff;
    text-decoration-color: #77d1ff;
  }
  body.single .post-tags a {
    color: #fff;
    background: rgb(255 255 255 / 14%);
  }
}

@media (max-width: 440px) {
  .hero-secondary, .footer-grid { grid-template-columns: 1fr; }
  .hero-secondary article + article { padding-top: 18px; border-top: 1px solid var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
