/*
Theme Name: Francine News
Theme URI: https://example.com/francine-news
Author: Francine
Author URI: https://example.com
Description: Theme WordPress public pour un site de news politique moderne, rapide et responsive.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: francine-news
Tags: news, blog, politics, responsive, custom-menu, featured-images
*/

:root {
  --fn-brand-red: #C50302;
  --fn-brand-blue: #001853;
  --fn-bg: #f3f6fb;
  --fn-surface: #ffffff;
  --fn-surface-strong: #ffffff;
  --fn-ink: #071225;
  --fn-muted: #5b6476;
  --fn-border: #d8dfec;
  --fn-primary: var(--fn-brand-red);
  --fn-primary-dark: #970201;
  --fn-accent: var(--fn-brand-blue);
  --fn-accent-soft: #e7ebf6;
  --fn-gold: #b6862e;
  --fn-header-bg: rgba(255, 255, 255, 0.96);
  --fn-input-bg: #ffffff;
  --fn-shadow: 0 16px 38px rgba(0, 24, 83, 0.1);
  --fn-radius: 8px;
  --fn-content: 1180px;
  --fn-readable: 760px;
}

html[data-theme="dark"] {
  --fn-bg: #070b16;
  --fn-surface: #0d1426;
  --fn-surface-strong: #111a2f;
  --fn-ink: #f5f7ff;
  --fn-muted: #b7c0d3;
  --fn-border: rgba(211, 220, 239, 0.18);
  --fn-primary: #ff5a58;
  --fn-primary-dark: #ff7876;
  --fn-accent: #9fb4ff;
  --fn-accent-soft: rgba(159, 180, 255, 0.14);
  --fn-header-bg: rgba(7, 11, 22, 0.94);
  --fn-input-bg: #0a1020;
  --fn-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fn-bg);
  color: var(--fn-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--fn-primary);
}

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(100% - 32px, var(--fn-content));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--fn-ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

.site-header {
  border-bottom: 1px solid var(--fn-border);
  background: var(--fn-header-bg);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.top-strip {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--fn-brand-blue);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.top-strip__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.top-strip__label {
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
}

.header-main {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  color: var(--fn-brand-blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.site-title::after {
  content: "";
  display: block;
  width: 68px;
  height: 5px;
  margin-top: 8px;
  background: linear-gradient(90deg, var(--fn-brand-red) 0 52%, var(--fn-brand-blue) 52% 100%);
  border-radius: 999px;
}

html[data-theme="dark"] .site-title {
  color: #ffffff;
}

.site-description {
  color: var(--fn-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.main-navigation {
  justify-self: center;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.main-navigation a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--fn-ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.header-search {
  justify-self: end;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--fn-border);
  border-radius: 999px;
  background: var(--fn-surface);
  color: var(--fn-ink);
  padding: 4px 11px 4px 5px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 24, 83, 0.08);
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--fn-primary);
  color: var(--fn-primary);
}

.theme-toggle__track {
  width: 44px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--fn-accent);
  padding: 3px;
}

.theme-toggle__knob {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle__track {
  background: var(--fn-primary);
}

.theme-toggle[aria-pressed="true"] .theme-toggle__knob {
  transform: translateX(16px);
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.search-field {
  width: 190px;
  min-height: 40px;
  border: 1px solid var(--fn-border);
  border-radius: 4px;
  background: var(--fn-input-bg);
  color: var(--fn-ink);
  padding: 0 11px;
  font: inherit;
}

.search-submit,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--fn-primary);
  border-radius: 4px;
  background: var(--fn-primary);
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.search-submit:hover,
.search-submit:focus,
.button-link:hover,
.button-link:focus {
  background: var(--fn-primary-dark);
  color: #fff;
}

.breaking-bar {
  background: linear-gradient(90deg, var(--fn-brand-blue), #071f68);
  color: #fff;
}

.breaking-bar__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.breaking-bar__label {
  flex: 0 0 auto;
  background: var(--fn-primary);
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.breaking-bar__text {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-header {
  padding: 44px 0 22px;
}

.page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1;
}

.archive-description,
.page-intro {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--fn-muted);
  font-size: 1.05rem;
}

.home-layout {
  padding: 34px 0 58px;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.hero-story {
  min-height: 520px;
  display: grid;
  align-items: end;
  overflow: hidden;
  position: relative;
  border-radius: var(--fn-radius);
  background: var(--fn-brand-blue);
  box-shadow: var(--fn-shadow);
}

.hero-story__image {
  position: absolute;
  inset: 0;
}

.hero-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 24, 83, 0.04), rgba(0, 24, 83, 0.88));
}

.hero-story__body {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: clamp(24px, 5vw, 44px);
  color: #fff;
}

.hero-story__title {
  margin: 10px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1;
}

.hero-story__excerpt {
  max-width: 670px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.news-rail {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  border-bottom: 2px solid var(--fn-brand-blue);
}

html[data-theme="dark"] .section-heading {
  border-bottom-color: var(--fn-border);
}

.section-heading h2 {
  margin: 0;
  padding: 0 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.1;
}

.section-heading span {
  padding: 0 0 11px;
  color: var(--fn-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 32px 0 60px;
  align-items: start;
}

.post-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  background: var(--fn-surface-strong);
  box-shadow: 0 10px 26px rgba(0, 24, 83, 0.04);
}

.post-card--compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 116px;
}

.post-card__media {
  display: block;
  background: var(--fn-accent-soft);
  aspect-ratio: 16 / 10;
}

.post-card--compact .post-card__media {
  aspect-ratio: auto;
  min-height: 100%;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--fn-brand-red), var(--fn-brand-blue));
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 900;
}

.post-card--compact .post-card__placeholder {
  min-height: 100%;
  font-size: 1.2rem;
}

.post-card__body {
  padding: 16px;
}

.post-card--compact .post-card__body {
  padding: 12px 13px;
}

.post-card__title {
  margin: 7px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  line-height: 1.18;
}

.post-card--compact .post-card__title {
  margin: 5px 0 6px;
  font-size: 1.03rem;
}

.post-card__excerpt {
  margin: 0;
  color: var(--fn-muted);
  font-size: 0.94rem;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  color: var(--fn-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.entry-meta a {
  color: var(--fn-primary);
}

.category-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  border-radius: 4px;
  background: var(--fn-primary);
  color: #fff;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-pill:hover,
.category-pill:focus {
  background: var(--fn-primary-dark);
  color: #fff;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.sidebar-panel {
  border-top: 3px solid var(--fn-ink);
  background: var(--fn-surface);
  padding: 18px;
}

.sidebar-panel h2,
.sidebar-panel h3 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1.15;
}

.category-list,
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-list a,
.category-list span,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--fn-border);
  border-radius: 4px;
  background: var(--fn-surface-strong);
  padding: 0 10px;
  color: var(--fn-ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.category-list a:hover,
.tag-list a:hover {
  border-color: var(--fn-primary);
  color: var(--fn-primary);
}

.post-list {
  display: grid;
  gap: 22px;
}

.pagination {
  margin-top: 30px;
}

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

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--fn-border);
  border-radius: 4px;
  background: var(--fn-surface-strong);
  padding: 0 11px;
  font-weight: 800;
}

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

.single-header {
  padding: 42px 0 28px;
}

.single-header__inner {
  max-width: var(--fn-content);
}

.single-title {
  margin: 12px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.02;
}

.single-excerpt {
  margin: 0;
  color: var(--fn-muted);
  font-size: 1.2rem;
  line-height: 1.55;
}

.single-featured {
  margin: 8px auto 36px;
  width: min(100% - 32px, var(--fn-content));
  overflow: hidden;
  border-radius: var(--fn-radius);
  background: var(--fn-accent-soft);
}

.single-featured img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
}

.article-video {
  margin: 8px 0 36px;
}

.article-video__frame {
  overflow: hidden;
  border: 1px solid var(--fn-border);
  border-radius: var(--fn-radius);
  background: #000;
  box-shadow: var(--fn-shadow);
  aspect-ratio: 16 / 9;
}

.article-video__frame iframe,
.article-video__frame embed,
.article-video__frame object {
  width: 100%;
  height: 100%;
  display: block;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--fn-readable)) 300px;
  gap: 48px;
  align-items: start;
  padding-bottom: 64px;
}

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

.entry-content > * {
  max-width: var(--fn-readable);
}

.entry-content p {
  margin: 0 0 1.3em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1.5em 0 0.55em;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
}

.entry-content h2 {
  font-size: 2rem;
}

.entry-content blockquote {
  margin: 1.8em 0;
  border-left: 4px solid var(--fn-primary);
  padding: 8px 0 8px 20px;
  color: var(--fn-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.35;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25em;
}

.entry-content a {
  color: var(--fn-primary);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entry-content img,
.entry-content figure {
  max-width: 100%;
}

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

.entry-content .wp-block-embed.is-type-video .wp-block-embed__wrapper,
.entry-content .wp-block-embed-youtube .wp-block-embed__wrapper {
  overflow: hidden;
  border-radius: var(--fn-radius);
  background: #000;
  aspect-ratio: 16 / 9;
}

.entry-content .wp-block-embed.is-type-video iframe,
.entry-content .wp-block-embed-youtube iframe {
  width: 100%;
  height: 100%;
}

.article-footer {
  max-width: var(--fn-readable);
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--fn-border);
}

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

.tag-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--fn-border);
  border-radius: 4px;
  background: var(--fn-surface-strong);
  padding: 0 9px;
  color: var(--fn-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.empty-state,
.not-found {
  max-width: 720px;
  padding: 42px 0 64px;
}

.empty-state p,
.not-found p {
  color: var(--fn-muted);
}

.site-footer {
  border-top: 1px solid var(--fn-border);
  background: var(--fn-brand-blue);
  color: #ffffff;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 34px 0;
}

.footer-title {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

.footer-description,
.footer-copy {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.footer-nav a {
  color: #ffffff;
  font-weight: 800;
}

.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;
}

.alignwide {
  max-width: var(--fn-content);
}

.alignfull {
  max-width: none;
  width: 100%;
}

@media (max-width: 980px) {
  .header-main {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 0;
  }

  .main-navigation,
  .header-tools {
    justify-self: stretch;
  }

  .header-tools {
    justify-content: space-between;
  }

  .main-navigation {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .main-navigation ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: max-content;
    min-width: 100%;
  }

  .main-navigation a {
    white-space: nowrap;
  }

  .header-search .search-form {
    max-width: 520px;
  }

  .search-field {
    width: 100%;
  }

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

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

  .single-layout {
    gap: 28px;
  }
}

@media (max-width: 680px) {
  .container,
  .single-featured {
    width: min(100% - 24px, var(--fn-content));
  }

  .top-strip {
    display: none;
  }

  .header-main {
    gap: 8px;
    padding: 10px 0 8px;
  }

  .top-strip__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
  }

  .site-title {
    font-size: 2rem;
  }

  .site-description {
    display: none;
  }

  .header-search {
    display: none;
  }

  .header-tools {
    justify-content: flex-start;
  }

  .theme-toggle {
    min-height: 36px;
  }

  .main-navigation {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .main-navigation ul {
    gap: 4px 16px;
  }

  .main-navigation a {
    min-height: 32px;
    font-size: 0.84rem;
  }

  .search-form {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .breaking-bar__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
  }

  .breaking-bar__text {
    white-space: normal;
  }

  .home-layout {
    padding-top: 22px;
  }

  .hero-story {
    min-height: 430px;
  }

  .hero-story__title {
    font-size: 2.1rem;
  }

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

  .post-card--compact {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .single-title,
  .page-title {
    font-size: 2.2rem;
  }

  .single-excerpt {
    font-size: 1.05rem;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-nav ul {
    justify-content: flex-start;
  }
}
