/*
Theme Name: Recycla Nord Vitrine
Theme URI: https://recyclanord.fr
Author: Recycla Nord
Description: Thème clé en main pour le site vitrine Recycla Nord.
Version: 0.3.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.1
Text Domain: recycla-nord
*/

:root {
  --rn-ink: #202522;
  --rn-muted: #667066;
  --rn-paper: #f7f4ed;
  --rn-surface: #ffffff;
  --rn-line: #ddd7cc;
  --rn-green: #91ad35;
  --rn-green-dark: #536f28;
  --rn-orange: #e89222;
  --rn-orange-dark: #b86b16;
  --rn-steel: #46545a;
  --rn-shadow: 0 18px 60px rgba(32, 37, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--rn-paper);
  color: var(--rn-ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

a {
  color: var(--rn-green-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.25;
}

p,
a,
strong,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: #ffffff;
  border-bottom: 1px solid var(--rn-line);
}

.primary-navigation {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 155px;
  color: var(--rn-ink);
  text-decoration: none;
  font-weight: 800;
}

.brand img {
  width: 146px;
  max-height: 84px;
  object-fit: contain;
}

.brand-text {
  display: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rn-line);
  border-radius: 6px;
  background: var(--rn-surface);
  color: var(--rn-ink);
  font-weight: 800;
}

.main-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 4px;
  color: var(--rn-ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
  color: var(--rn-green-dark);
}

.header-cta {
  white-space: nowrap;
}

.button,
button.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--rn-orange);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--rn-orange-dark);
  color: #ffffff;
}

.button.secondary {
  background: #ffffff;
  color: var(--rn-ink);
}

.hero,
.page-hero {
  position: relative;
  display: grid;
  align-items: center;
  padding: clamp(70px, 9vw, 120px) clamp(18px, 4vw, 56px);
  overflow: hidden;
}

.rn-hero-home {
  min-height: 78vh;
  background:
    linear-gradient(90deg, rgba(32, 37, 34, 0.84), rgba(32, 37, 34, 0.28)),
    url("assets/img/hero-palettes-entrepot.jpg") center / cover no-repeat,
    #3f4c36;
  color: #ffffff;
}

.page-hero {
  min-height: 42vh;
  background:
    linear-gradient(90deg, rgba(32, 37, 34, 0.86), rgba(32, 37, 34, 0.5)),
    url("assets/img/atelier-palettes.png") center / cover no-repeat,
    #33402e;
  color: #ffffff;
}

.hero-content,
.page-hero > * {
  max-width: 880px;
}

.hero p,
.page-hero p {
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--rn-green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-hero .eyebrow,
.cta-band .eyebrow {
  color: #dce8d2;
}

.section {
  padding: clamp(46px, 7vw, 88px) clamp(18px, 4vw, 56px);
}

.section > h2,
.section > p {
  max-width: 850px;
}

.section-muted {
  background: #fffdf7;
}

.rn-intro-grid,
.split-section,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.highlight-list {
  display: grid;
  gap: 12px;
}

.contact-strip {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: center;
  background: var(--rn-green-dark);
  color: #ffffff;
}

.contact-strip h2 {
  margin-bottom: 0;
}

.contact-strip .eyebrow {
  color: #e6f2d9;
}

.contact-strip-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.contact-card span {
  color: #e6f2d9;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-card strong {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.highlight-list p {
  margin: 0;
  padding: 18px;
  background: var(--rn-surface);
  border-left: 5px solid var(--rn-green);
  box-shadow: 0 1px 0 var(--rn-line);
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.card {
  min-height: 100%;
  padding: 24px;
  background: var(--rn-surface);
  border: 1px solid var(--rn-line);
  border-radius: 8px;
}

.card h3 {
  margin-bottom: 10px;
}

.product-card {
  padding: 0;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ece8dd;
}

.product-card h3,
.product-card p,
.product-card a {
  margin-left: 22px;
  margin-right: 22px;
}

.product-card h3 {
  margin-top: 22px;
}

.product-card a {
  display: inline-flex;
  margin-bottom: 22px;
  font-weight: 800;
}

.media-panel {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--rn-shadow);
  background: #ece8dd;
}

.media-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.contain-panel img {
  object-fit: contain;
  padding: 28px;
  background: #ffffff;
}

.cta-band {
  background: var(--rn-ink);
  color: #ffffff;
}

.cta-band p {
  color: #e5ebe2;
}

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.partner-row img {
  max-width: 220px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--rn-line);
  border-radius: 8px;
}

.contact-help {
  margin-top: 24px;
  padding: 22px;
  background: #fffdf7;
  border: 1px solid var(--rn-line);
  border-radius: 8px;
}

.rn-contact-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--rn-surface);
  border: 1px solid var(--rn-line);
  border-radius: 8px;
  box-shadow: var(--rn-shadow);
}

.rn-contact-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

.rn-contact-form input,
.rn-contact-form select,
.rn-contact-form textarea {
  width: 100%;
  border: 1px solid var(--rn-line);
  border-radius: 6px;
  background: #fbfaf6;
  padding: 12px;
  color: var(--rn-ink);
  font: inherit;
}

.rn-contact-form textarea {
  resize: vertical;
}

.rn-hp {
  position: absolute;
  left: -9999px;
}

.rn-form-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 800;
}

.rn-form-status.is-success {
  background: #e7f0df;
  color: var(--rn-green-dark);
}

.rn-form-status.is-error {
  background: #f4dfdc;
  color: #94382f;
}

.legal-content {
  max-width: 920px;
}

.seo-text {
  max-width: 980px;
}

.faq-list {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.faq-item {
  padding: 22px;
  border: 1px solid var(--rn-line);
  border-radius: 8px;
  background: var(--rn-surface);
}

.faq-item h2 {
  margin-bottom: 8px;
  font-size: 1.28rem;
  line-height: 1.25;
}

.blog-list-section {
  background: var(--rn-paper);
}

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

.blog-card {
  display: grid;
  overflow: hidden;
  background: var(--rn-surface);
  border: 1px solid var(--rn-line);
  border-radius: 8px;
}

.blog-card-media {
  display: block;
  background: #ece8dd;
}

.blog-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.blog-card-body {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.post-date {
  margin: 0;
  color: var(--rn-green-dark);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.blog-card h2 {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.2;
}

.blog-card h2 a {
  color: var(--rn-ink);
  text-decoration: none;
}

.text-link {
  font-weight: 800;
}

.empty-blog {
  max-width: 760px;
  padding: 26px;
  background: var(--rn-surface);
  border: 1px solid var(--rn-line);
  border-radius: 8px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--rn-line);
  border-radius: 6px;
  background: var(--rn-surface);
  text-decoration: none;
}

.pagination .current {
  background: var(--rn-green-dark);
  color: #ffffff;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 56px);
  background: #fffdf7;
}

.article-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.article-hero-media {
  overflow: hidden;
  border-radius: 8px;
  background: #ece8dd;
  box-shadow: var(--rn-shadow);
}

.article-hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article-content {
  background: var(--rn-surface);
}

.article-content .article-body-text h2 {
  margin-top: 34px;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.article-cta {
  margin-top: 0;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.keyword-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3e7;
  color: var(--rn-green-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.cta-band .contact-strip-actions {
  margin: 20px 0;
}

.cta-band .contact-card {
  max-width: 360px;
}

.site-footer {
  background: #171b18;
  color: #ffffff;
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 34px clamp(18px, 4vw, 56px);
}

.footer-logo {
  width: 135px;
  margin-bottom: 12px;
  background: #ffffff;
  padding: 8px;
}

.site-footer a {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5c7;
  font-size: 0.9rem;
  text-align: center;
}

.footer-menu {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 1080px) {
  .header-cta {
    display: none;
  }

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

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

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

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .brand img {
    width: auto;
    max-width: 132px;
    max-height: 58px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    flex: 0 0 auto;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1;
  }

  .primary-navigation {
    grid-column: 1 / -1;
    position: static;
    display: none;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0;
    background: #ffffff;
    border: 1px solid var(--rn-line);
    border-radius: 6px;
    box-shadow: none;
    overflow: hidden;
  }

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

  .main-menu {
    display: grid;
    justify-content: stretch;
    justify-items: stretch;
    gap: 0;
    width: 100%;
    padding: 8px 0 14px;
  }

  .main-menu li {
    width: 100%;
  }

  .main-menu a {
    width: 100%;
    min-height: 50px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--rn-line);
    font-size: 1.06rem;
    font-weight: 800;
    line-height: 1.25;
  }

  .main-menu li:last-child a {
    border-bottom: 0;
  }

  .rn-intro-grid,
  .split-section,
  .article-hero,
  .contact-layout,
  .contact-strip,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .cards-3,
  .cards-4,
  .blog-grid,
  .contact-strip-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .brand img {
    max-width: 112px;
    max-height: 50px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .hero,
  .page-hero,
  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-actions,
  .footer-bottom {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .contact-card strong {
    font-size: 1rem;
  }
}
