/*
Theme Name: Suprflu Éditorial
Theme URI: https://suprflu.com/
Author: Suprflu
Description: Thème éditorial léger, accessible et responsive conçu pour Suprflu.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.0
Text Domain: suprflu
*/

:root {
  --ink: #101828;
  --muted: #5d6678;
  --paper: #ffffff;
  --soft: #f3f5f8;
  --line: #dfe4ea;
  --brand: #0c2d57;
  --brand-dark: #071d38;
  --accent: #e5484d;
  --accent-dark: #be3035;
  --focus: #f5a524;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(12, 45, 87, 0.1);
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
.button {
  cursor: pointer;
}

:focus-visible {
  border-radius: 3px;
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  margin-inline: auto;
  max-width: var(--container);
  padding-inline: 24px;
  width: 100%;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  left: 16px;
  padding: 12px 18px;
  top: 16px;
  width: auto;
  z-index: 10000;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.site-topbar {
  background: var(--brand-dark);
  color: #d8e3f0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 7px 0;
  text-transform: uppercase;
}

.site-topbar__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.site-topbar a {
  color: #fff;
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-bar .site-header {
  top: 32px;
}

.site-header__main {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 82px;
}

.site-branding {
  line-height: 1;
}

.site-title {
  color: var(--brand-dark);
  display: inline-block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.site-title::after {
  color: var(--accent);
  content: ".";
}

.site-tagline {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 5px 0 0;
  text-transform: uppercase;
}

.custom-logo {
  max-height: 52px;
  width: auto;
}

.primary-menu,
.footer-menu,
.category-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu {
  align-items: center;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  justify-content: center;
}

.primary-menu a {
  color: var(--ink);
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 28px 0 24px;
  position: relative;
  text-decoration: none;
}

.primary-menu a::after {
  background: var(--accent);
  bottom: 17px;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
  width: 100%;
}

.primary-menu a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.menu-toggle,
.search-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.menu-toggle {
  display: none;
}

.header-search {
  align-items: center;
  display: flex;
}

.search-form {
  align-items: stretch;
  display: flex;
  max-width: 440px;
  width: 100%;
}

.search-field {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px 0 0 999px;
  color: var(--ink);
  min-width: 0;
  padding: 10px 14px;
  width: 100%;
}

.search-submit {
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 0 999px 999px 0;
  color: #fff;
  font-weight: 800;
  padding: 8px 16px;
}

.search-submit:hover {
  background: var(--brand-dark);
}

.hero {
  background:
    radial-gradient(circle at 85% 12%, rgba(229, 72, 77, 0.16), transparent 32%),
    linear-gradient(180deg, #f7f9fc 0%, #fff 100%);
  padding: clamp(42px, 7vw, 82px) 0 54px;
}

.hero__intro {
  max-width: 780px;
}

.eyebrow,
.section-kicker {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero h1,
.archive-header h1,
.entry-title,
.error-page h1 {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2.35rem, 7vw, 5rem);
  margin: 0;
  max-width: 920px;
}

.hero__dek {
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  margin: 20px 0 0;
  max-width: 720px;
}

.lead-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
  margin-top: 42px;
}

.lead-secondary {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

.story-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(12, 45, 87, 0.05);
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.story-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.story-card__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--brand), #2b6da8);
  display: block;
  overflow: hidden;
}

.story-card__media img {
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
  width: 100%;
}

.story-card:hover .story-card__media img {
  transform: scale(1.025);
}

.story-card__body {
  padding: 20px;
}

.story-card__category {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.story-card__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.2;
  margin: 8px 0 10px;
}

.story-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.story-card__meta,
.entry-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.story-card--lead {
  min-height: 480px;
  position: relative;
}

.story-card--lead .story-card__media {
  aspect-ratio: auto;
  inset: 0;
  position: absolute;
}

.story-card--lead .story-card__media::after {
  background: linear-gradient(180deg, transparent 28%, rgba(4, 17, 34, 0.92) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.story-card--lead .story-card__body {
  bottom: 0;
  color: #fff;
  padding: clamp(24px, 4vw, 42px);
  position: absolute;
  z-index: 1;
}

.story-card--lead .story-card__title {
  font-size: clamp(1.75rem, 4vw, 3.1rem);
  margin-bottom: 12px;
}

.story-card--lead .story-card__title a,
.story-card--lead .story-card__meta {
  color: #fff;
}

.lead-secondary .story-card__body {
  padding: 14px;
}

.lead-secondary .story-card__title {
  font-size: 1rem;
}

.site-main {
  min-height: 55vh;
}

.content-section {
  padding: clamp(46px, 7vw, 78px) 0;
}

.content-section--soft {
  background: var(--soft);
}

.section-header {
  align-items: end;
  border-bottom: 2px solid var(--brand-dark);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 12px;
}

.section-title {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
  margin: 0;
}

.section-link {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.story-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-list {
  display: grid;
  gap: 0;
}

.story-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 22px;
  grid-template-columns: 220px minmax(0, 1fr);
  padding: 22px 0;
}

.story-row:first-child {
  padding-top: 0;
}

.story-row__media {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--brand), #2b6da8);
  border-radius: 10px;
  overflow: hidden;
}

.story-row__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.story-row h2,
.story-row h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin: 6px 0 8px;
}

.story-row h2 a,
.story-row h3 a {
  color: var(--ink);
  text-decoration: none;
}

.story-row p {
  color: var(--muted);
  margin: 0;
}

.category-nav {
  background: var(--brand-dark);
  color: #fff;
  padding: 22px 0;
}

.category-nav__inner {
  align-items: center;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-nav strong {
  flex: 0 0 auto;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-links {
  display: flex;
  gap: 9px;
}

.category-links a {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 13px;
  text-decoration: none;
  white-space: nowrap;
}

.category-links a:hover {
  background: #fff;
  color: var(--brand-dark);
}

.editorial-cta {
  background: var(--brand);
  border-radius: 18px;
  color: #fff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(28px, 5vw, 52px);
}

.editorial-cta h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 10px;
}

.editorial-cta p {
  color: #dce8f5;
  margin: 0;
  max-width: 700px;
}

.button {
  align-self: center;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 13px 22px;
  text-decoration: none;
}

.button:hover {
  background: #fff;
  color: var(--brand-dark);
}

.archive-header {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: clamp(44px, 7vw, 76px) 0;
}

.archive-header h1 {
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  margin: 0;
}

.archive-description {
  color: var(--muted);
  margin-top: 14px;
  max-width: 720px;
}

.content-layout {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  grid-template-columns: minmax(0, 760px) minmax(250px, 1fr);
  padding: clamp(42px, 7vw, 76px) 24px;
}

.article-header {
  margin-bottom: 30px;
}

.article-header .category-links-inline {
  margin-bottom: 14px;
}

.category-links-inline a {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-right: 10px;
  text-decoration: none;
  text-transform: uppercase;
}

.entry-title {
  font-size: clamp(2.15rem, 5.5vw, 4.35rem);
  margin: 0 0 18px;
}

.entry-featured {
  border-radius: var(--radius);
  margin: 30px 0;
  overflow: hidden;
}

.entry-content {
  font-size: 1.08rem;
}

.entry-content > * {
  margin-inline: auto;
  max-width: 740px;
}

.entry-content > .alignwide {
  max-width: 980px;
}

.entry-content > .alignfull {
  max-width: none;
}

.entry-content h2,
.entry-content h3 {
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin-top: 1.65em;
}

.entry-content h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.entry-content h3 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.entry-content a {
  font-weight: 650;
}

.entry-content blockquote {
  border-left: 5px solid var(--accent);
  color: var(--brand-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  margin: 2em auto;
  padding: 8px 0 8px 24px;
}

.entry-content table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.entry-content iframe {
  max-width: 100%;
}

.sidebar {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.sidebar__box {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 116px;
}

.sidebar h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
  margin-top: 0;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.sidebar-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.sidebar-list a {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.page-shell,
.error-page {
  padding: clamp(48px, 8vw, 92px) 24px;
}

.page-shell {
  max-width: 900px;
}

.page-shell .entry-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.error-page {
  max-width: 760px;
  text-align: center;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  margin: 0;
}

.error-page .search-form {
  margin: 28px auto;
}

.pagination {
  margin-top: 40px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  min-height: 42px;
  min-width: 42px;
  padding: 8px 12px;
  text-decoration: none;
}

.page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.site-footer {
  background: var(--brand-dark);
  color: #c9d5e3;
  margin-top: 30px;
}

.site-footer__main {
  display: grid;
  gap: 48px;
  grid-template-columns: 1.25fr 1fr 1fr;
  padding-bottom: 56px;
  padding-top: 56px;
}

.site-footer h2 {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  margin: 0 0 16px;
}

.site-footer .site-title {
  color: #fff;
}

.footer-description {
  margin-top: 14px;
  max-width: 420px;
}

.footer-menu li {
  margin: 8px 0;
}

.footer-menu a {
  color: #dce6f1;
  font-size: 0.9rem;
  text-decoration: none;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  padding: 18px 0;
}

@media (max-width: 980px) {
  .site-header__main {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-navigation {
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
    grid-column: 1 / -1;
    left: 0;
    padding: 12px 24px 22px;
    position: absolute;
    right: 0;
    top: 100%;
  }

  .site-navigation.is-open {
    display: block;
  }

  .primary-menu {
    align-items: stretch;
    display: grid;
    gap: 0;
  }

  .primary-menu a {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
  }

  .primary-menu a::after {
    display: none;
  }

  .header-search {
    display: none;
  }

  .lead-grid {
    grid-template-columns: 1fr;
  }

  .story-card--lead {
    min-height: 460px;
  }

  .story-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 30px 0 0;
  }

  .sidebar__box {
    position: static;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }

  .site-topbar__inner {
    justify-content: center;
  }

  .site-topbar__link {
    display: none;
  }

  .story-grid,
  .site-footer__main {
    grid-template-columns: 1fr;
  }

  .editorial-cta {
    grid-template-columns: 1fr;
  }

  .editorial-cta .button {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .container {
    padding-inline: 18px;
  }

  .site-header__main {
    min-height: 70px;
  }

  .site-tagline {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 13vw, 3.5rem);
  }

  .lead-secondary,
  .story-grid--four {
    grid-template-columns: 1fr;
  }

  .story-card--lead {
    min-height: 410px;
  }

  .story-card--lead .story-card__title {
    font-size: 1.65rem;
  }

  .story-row {
    align-items: start;
    gap: 15px;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .story-row p {
    display: none;
  }

  .story-row h2,
  .story-row h3 {
    font-size: 1.05rem;
  }

  .section-header {
    align-items: start;
  }

  .section-link {
    margin-top: 5px;
  }

  .content-layout,
  .page-shell,
  .error-page {
    padding-inline: 18px;
  }

  .entry-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }
}

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

/* One clearly separated, responsive in-article advertising location. */
.suprflu-in-article-ad {
  clear: both;
  box-sizing: border-box;
  width: 100%;
  min-height: 250px;
  margin: 42px auto;
  padding: 14px 0 0;
  border-top: 1px solid var(--border, #dfe5ea);
  border-bottom: 1px solid var(--border, #dfe5ea);
  text-align: center;
}

.suprflu-in-article-ad__label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-muted, #637080);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suprflu-in-article-ad ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: 220px;
}

@media (max-width: 620px) {
  .suprflu-in-article-ad {
    min-height: 190px;
    margin: 34px auto;
  }

  .suprflu-in-article-ad ins.adsbygoogle {
    min-height: 170px;
  }
}
