/*
Theme Name: NFocus
Theme URI: https://nfocus.fr/
Author: Com Tidam - Web & DJ Events
Author URI: https://comtidam.fr/
Description: Thème WordPress moderne pour NFocus.fr : actualités locales, mobilité, nature et animaux. Responsive, accessible et personnalisable depuis l'outil de personnalisation WordPress.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nfocus
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --nf-green: #087a54;
  --nf-green-dark: #07513d;
  --nf-lime: #78a813;
  --nf-orange: #f4a316;
  --nf-cream: #fbfcf7;
  --nf-ink: #17332c;
  --nf-muted: #65746f;
  --nf-white: #ffffff;
  --nf-border: rgba(8, 122, 84, .12);
  --nf-shadow: 0 16px 36px rgba(14, 70, 51, .10);
  --nf-card-radius: 8px;
  --nf-panel-radius: 12px;
  --nf-container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--nf-ink);
  background: var(--nf-cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: var(--nf-green);
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

a:hover {
  color: var(--nf-orange);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(244, 163, 22, .55);
  outline-offset: 3px;
}

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

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

.nf-container {
  width: min(calc(100% - 36px), var(--nf-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 {
  clip: auto !important;
  width: auto;
  height: auto;
  margin: 8px;
  padding: 12px 16px;
  z-index: 99999;
  background: var(--nf-white);
  color: #000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(8, 122, 84, .08);
  backdrop-filter: blur(14px);
  transition: box-shadow .2s ease, background .2s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 10px 28px rgba(23, 51, 44, .08);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

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

.site-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: 0;
}

.site-title a {
  color: var(--nf-green-dark);
  text-decoration: none;
}

.site-title .accent,
.footer-brand-title .accent {
  color: var(--nf-orange);
}

.site-description {
  margin: -2px 0 0;
  color: var(--nf-muted);
  font-size: .9rem;
}

.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-navigation a {
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--nf-ink);
  text-decoration: none;
  font-weight: 750;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  background: #eef7f1;
  color: var(--nf-green);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #eef7f1;
  color: var(--nf-green-dark);
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle-lines {
  position: relative;
  width: 18px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.menu-toggle-lines::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 2px solid currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  background: linear-gradient(180deg, #fff 0%, #f5faf4 100%);
  border-bottom: 1px solid rgba(8, 122, 84, .08);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.22fr);
  align-items: center;
  gap: 64px;
}

.hero-copy {
  padding-block: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 7px 13px;
  border: 1px solid rgba(8, 122, 84, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--nf-green);
  font-size: .86rem;
  font-weight: 850;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--nf-orange);
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  color: var(--nf-green-dark);
  font-size: 5.25rem;
  line-height: .98;
  letter-spacing: 0;
}

.hero h1 strong {
  color: var(--nf-orange);
  font-weight: inherit;
}

.hero p {
  max-width: 630px;
  margin: 24px 0 0;
  color: var(--nf-muted);
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  max-width: 100%;
  padding: 12px 21px;
  border-radius: 999px;
  background: var(--nf-green);
  color: var(--nf-white);
  text-align: center;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(8, 122, 84, .20);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.nf-btn:hover {
  color: var(--nf-white);
  background: var(--nf-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(8, 122, 84, .28);
}

.nf-btn.secondary {
  background: var(--nf-white);
  color: var(--nf-green-dark);
  border: 1px solid rgba(8, 122, 84, .15);
  box-shadow: none;
}

.nf-btn.secondary:hover {
  color: var(--nf-orange);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border: 1px solid rgba(8, 122, 84, .10);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(29, 78, 59, .16);
}

.section {
  padding: 88px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--nf-orange);
  font-size: .86rem;
  font-weight: 850;
  letter-spacing: 0;
}

.section-title {
  margin: 0;
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-intro {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--nf-muted);
}

.section-link {
  font-weight: 850;
  white-space: nowrap;
}

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

.topic-card,
.post-card,
.entry-card,
.widget,
.home-widget {
  border: 1px solid var(--nf-border);
  border-radius: var(--nf-card-radius);
  background: var(--nf-white);
  box-shadow: var(--nf-shadow);
}

.topic-card {
  position: relative;
  min-height: 232px;
  padding: 28px;
  overflow: hidden;
  border-top: 4px solid var(--nf-green);
  transition: transform .2s ease, box-shadow .2s ease;
}

.topic-card:nth-child(2) {
  border-top-color: var(--nf-orange);
}

.topic-card:nth-child(3) {
  border-top-color: var(--nf-lime);
}

.topic-card:hover,
.topic-card:focus-within,
.post-card:hover,
.post-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(14, 70, 51, .14);
}

.topic-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef7f1;
  color: var(--nf-green-dark);
  font-size: 1rem;
  font-weight: 900;
}

.topic-card h3 {
  margin: 21px 0 8px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.topic-card p {
  margin: 0;
  color: var(--nf-muted);
}

.topic-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
}

.posts-section {
  padding-top: 0;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.post-card-media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #eaf2ec;
  color: rgba(7, 81, 61, .38);
  text-decoration: none;
  font-weight: 900;
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.post-card:hover .post-card-media img,
.post-card:focus-within .post-card-media img {
  transform: scale(1.035);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.post-meta {
  color: var(--nf-muted);
  font-size: .85rem;
  font-weight: 650;
}

.post-meta a {
  color: inherit;
}

.post-card h3 {
  margin: 10px 0 12px;
  font-size: 1.35rem;
  line-height: 1.24;
}

.post-card h3 a {
  color: var(--nf-ink);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--nf-green);
}

.post-excerpt {
  color: var(--nf-muted);
}

.read-more {
  margin-top: auto;
  padding-top: 18px;
  font-weight: 850;
  text-decoration: none;
}

.home-widget-area {
  padding: 48px 0 0;
}

.home-widget-area-before-cta {
  padding: 0 0 48px;
}

.home-widget {
  padding: 28px;
}

.cta {
  padding: 0 0 88px;
}

.cta-box {
  display: grid;
  grid-template-columns: 1.4fr auto;
  align-items: center;
  gap: 28px;
  padding: 56px;
  border-radius: var(--nf-panel-radius);
  background: linear-gradient(135deg, var(--nf-green-dark), var(--nf-green));
  color: var(--nf-white);
  box-shadow: 0 24px 60px rgba(8, 81, 61, .22);
}

.cta-box h2 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.cta-box p {
  max-width: 700px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, .82);
}

.cta-box .nf-btn {
  background: var(--nf-orange);
  color: #253119;
  box-shadow: none;
}

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

.content-area {
  padding: 64px 0 90px;
}

.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
}

.entry-card,
.widget {
  padding: 40px;
}

.entry-title {
  margin-top: 0;
  font-size: 3rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content img,
.entry-media img {
  border-radius: 12px;
}

.entry-media {
  margin: 24px 0;
}

.entry-content blockquote {
  margin-inline: 0;
  padding: 18px 24px;
  border-left: 5px solid var(--nf-orange);
  border-radius: 0 8px 8px 0;
  background: #fffaf0;
}

.entry-content .alignwide {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

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

.pagination {
  margin-top: 40px;
}

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

.page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--nf-white);
  text-decoration: none;
  font-weight: 800;
}

.page-numbers.current {
  background: var(--nf-green);
  color: var(--nf-white);
}

.widget {
  margin-bottom: 20px;
  padding: 24px;
}

.widget-title {
  margin-top: 0;
}

.widget ul {
  padding-left: 20px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e4dd;
  border-radius: 8px;
  background: var(--nf-white);
  color: var(--nf-ink);
}

.search-form .nf-btn {
  min-height: 44px;
  padding: 8px 16px;
}

.no-results {
  grid-column: 1 / -1;
}

.error-card {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.error-marker {
  margin: 0 0 12px;
  color: var(--nf-orange);
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
}

.site-footer {
  padding: 58px 0 28px;
  background: #092f25;
  color: rgba(255, 255, 255, .76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 42px;
}

.site-footer h2,
.site-footer h3,
.site-footer .widget-title {
  color: var(--nf-white);
}

.footer-brand-title {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.site-footer a {
  color: rgba(255, 255, 255, .88);
}

.site-footer a:hover {
  color: #ffc45b;
}

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

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

.footer-widget {
  margin: 0;
}

.footer-widget .widget-title {
  margin-top: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .9rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: nf-rise .55s ease both;
  }

  .hero-visual {
    animation: nf-rise .65s ease .08s both;
  }
}

@keyframes nf-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }

  .primary-navigation {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - 78px);
    padding: 12px 18px 20px;
    overflow: auto;
    background: var(--nf-white);
    box-shadow: 0 22px 40px rgba(0, 0, 0, .08);
  }

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

  .primary-navigation ul {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-navigation a {
    border-radius: 8px;
  }

  .hero {
    padding: 42px 0 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero h1 {
    max-width: 14ch;
    font-size: 4rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy p {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

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

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

  .cta-box {
    grid-template-columns: 1fr;
    padding: 42px;
  }

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

@media (max-width: 640px) {
  .nf-container {
    width: min(calc(100% - 28px), var(--nf-container));
  }

  .site-description {
    display: none;
  }

  .header-inner {
    min-height: 68px;
  }

  .site-title,
  .footer-brand-title {
    font-size: 1.65rem;
  }

  .custom-logo {
    max-height: 48px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-title,
  .cta-box h2,
  .entry-title {
    font-size: 2.2rem;
  }

  .topic-grid,
  .posts-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .entry-card,
  .widget {
    padding: 26px;
  }

  .cta {
    padding-bottom: 64px;
  }

  .cta-box {
    padding: 30px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
