/*
Theme Name: MARS Bois
Theme URI: https://mars-bois.fr
Author: Cracker's Tech
Description: Theme dedie pour MARS Bois, exploitation forestiere et bois de chauffage local.
Version: 1.0.2
Text Domain: mars-bois
*/

:root {
  --mb-forest: #153627;
  --mb-forest-2: #2f6848;
  --mb-wood: #70491f;
  --mb-bark: #24170f;
  --mb-soil: #5a3a22;
  --mb-sand: #efe2cf;
  --mb-paper: #fbf6ed;
  --mb-card: #fffdf8;
  --mb-line: #d5c2a8;
  --mb-red: #a94422;
  --mb-gold: #c58a3e;
  --mb-text: #241a12;
  --mb-muted: #675948;
  --mb-radius: 8px;
  --mb-shadow: 0 18px 48px rgba(36, 23, 15, .16);
  --mb-ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mb-text);
  background: linear-gradient(180deg, #f8f1e6 0%, var(--mb-paper) 340px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

p {
  margin: 0 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 237, .96);
  border-bottom: 1px solid rgba(112, 73, 31, .22);
  backdrop-filter: blur(16px);
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.site-header:hover,
body.nav-open .site-header {
  border-color: rgba(112, 73, 31, .32);
  box-shadow: 0 10px 30px rgba(36, 23, 15, .08);
}

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

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  transition: transform .28s var(--mb-ease);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  width: 124px;
}

.brand-text {
  font-weight: 800;
  color: var(--mb-forest);
  line-height: 1.05;
}

.brand-text small {
  display: block;
  color: var(--mb-muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  background: var(--mb-card);
  color: var(--mb-forest);
  cursor: pointer;
  transition: background-color .22s ease, border-color .22s ease, transform .22s var(--mb-ease);
}

.nav-toggle:hover,
.nav-toggle:focus {
  border-color: rgba(112, 73, 31, .44);
  transform: translateY(-1px);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: auto;
  background: currentColor;
  content: "";
  transition: transform .24s var(--mb-ease), background-color .2s ease;
}

.nav-toggle span::before {
  transform: translateY(-7px);
}

.nav-toggle span::after {
  transform: translateY(5px);
}

body.nav-open .nav-toggle span {
  background: transparent;
}

body.nav-open .nav-toggle span::before {
  background: currentColor;
  transform: translateY(0) rotate(45deg);
}

body.nav-open .nav-toggle span::after {
  background: currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

.main-nav {
  position: absolute;
  left: 16px;
  right: 16px;
  top: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px;
  background: var(--mb-card);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity .24s ease, transform .24s var(--mb-ease), visibility .24s ease;
}

body.nav-open .main-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.main-nav a {
  padding: 10px 12px;
  color: var(--mb-forest);
  border-radius: var(--mb-radius);
  font-size: .88rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: background-color .22s ease, color .22s ease, transform .22s var(--mb-ease);
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(47, 104, 72, .12);
  transform: translateY(-1px);
}

.main-nav .nav-cta {
  margin-left: 6px;
  background: var(--mb-wood);
  color: #fff;
  box-shadow: 0 10px 22px rgba(112, 73, 31, .16);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta:focus {
  background: var(--mb-bark);
}

@media (min-width: 981px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
  }
}

.hero {
  position: relative;
  min-height: clamp(520px, 78vh, 760px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--mb-forest);
  color: #fff;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(21, 54, 39, .9), rgba(36, 23, 15, .48) 48%, rgba(21, 54, 39, .18)),
    linear-gradient(0deg, rgba(36, 23, 15, .78), rgba(21, 54, 39, 0) 44%);
  z-index: 1;
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.035);
  animation: mb-hero-image 1.8s var(--mb-ease) both;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0;
}

.hero-content > * {
  animation: mb-rise .72s var(--mb-ease) both;
}

.hero-content > *:nth-child(2) {
  animation-delay: .08s;
}

.hero-content > *:nth-child(3) {
  animation-delay: .16s;
}

.hero-content > *:nth-child(4) {
  animation-delay: .24s;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #f1d2a2;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 2px;
  background: var(--mb-gold);
  content: "";
}

h1,
h2,
h3 {
  margin: 0;
  color: inherit;
  line-height: 1.08;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  font-weight: 900;
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: var(--mb-radius);
  border: 1px solid transparent;
  font-weight: 900;
  line-height: 1.2;
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s var(--mb-ease);
}

.button:hover,
.button:focus {
  box-shadow: 0 12px 28px rgba(36, 23, 15, .16);
  transform: translateY(-2px);
}

.button-primary {
  background: var(--mb-wood);
  color: #fff;
}

.button-secondary {
  background: var(--mb-card);
  color: var(--mb-forest);
}

.button-ghost {
  border-color: rgba(18, 53, 42, .2);
  color: var(--mb-forest);
  background: var(--mb-card);
}

.section {
  padding: clamp(58px, 8vw, 104px) 0;
}

.section.alt {
  background: var(--mb-sand);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head h2,
.page-hero h1 {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  font-weight: 900;
}

.section-head h2 {
  color: var(--mb-forest);
}

.page-hero h1 {
  color: #fff;
}

.section-head p,
.page-hero p {
  margin-top: 16px;
  font-size: 1.08rem;
}

.section-head p {
  color: var(--mb-muted);
}

.page-hero p {
  color: rgba(255, 255, 255, .86);
}

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

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

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

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

.card {
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
  background: var(--mb-card);
  box-shadow: 0 10px 28px rgba(36, 23, 15, .08);
  overflow: hidden;
  transition: border-color .24s ease, box-shadow .24s ease, transform .24s var(--mb-ease);
}

.card:hover {
  border-color: rgba(112, 73, 31, .34);
  box-shadow: 0 18px 40px rgba(36, 23, 15, .12);
  transform: translateY(-3px);
}

.card.pad {
  padding: 24px;
}

.card h3 {
  color: var(--mb-forest);
  font-size: 1.25rem;
}

.card p {
  color: var(--mb-muted);
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.service-card img,
.feature-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .7s var(--mb-ease);
}

.service-card:hover img,
.image-panel:hover img,
.gallery img:hover {
  transform: scale(1.035);
}

.service-card .card-body {
  padding: 24px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47, 104, 72, .12);
  color: var(--mb-forest);
  font-size: .85rem;
  font-weight: 800;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.image-panel {
  overflow: hidden;
  border-radius: var(--mb-radius);
  box-shadow: var(--mb-shadow);
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: -56px;
  position: relative;
  z-index: 4;
  background: var(--mb-line);
  border-radius: var(--mb-radius);
  overflow: hidden;
  box-shadow: var(--mb-shadow);
  animation: mb-rise .72s .28s var(--mb-ease) both;
}

.stat {
  background: var(--mb-card);
  padding: 24px;
}

.stat strong {
  display: block;
  color: var(--mb-forest);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--mb-muted);
  font-weight: 750;
}

.page-hero {
  padding: clamp(62px, 9vw, 118px) 0 48px;
  background:
    linear-gradient(135deg, rgba(21, 54, 39, .92), rgba(90, 58, 34, .78)),
    url("https://mars-bois.fr/wp-content/uploads/2023/11/schema-sylviculture-1536x899.png") center/cover;
  color: #fff;
}

.page-hero .container {
  animation: mb-rise .62s var(--mb-ease) both;
}

.breadcrumb {
  margin-bottom: 18px;
  color: #e8c892;
  font-size: .84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rankmath-breadcrumb-wrap {
  padding: 14px 0;
  background: #eadbc5;
  border-bottom: 1px solid var(--mb-line);
  color: var(--mb-muted);
  font-size: .9rem;
  font-weight: 750;
}

.rankmath-breadcrumb-wrap a {
  color: var(--mb-forest);
}

.rankmath-breadcrumb-wrap .last {
  color: var(--mb-soil);
}

.rankmath-breadcrumb-wrap + .page-hero {
  padding-top: clamp(44px, 7vw, 92px);
}

.rankmath-breadcrumb-wrap + .page-hero .breadcrumb {
  display: none;
}

.check-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-top: 12px;
  padding-left: 30px;
  color: var(--mb-muted);
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: .15rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mb-forest-2);
  color: #fff;
  content: "✓";
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 900;
  transition: background-color .22s ease, transform .22s var(--mb-ease);
}

.check-list li:hover::before {
  transform: scale(1.08);
}

.quote-band {
  padding: 48px;
  border-radius: var(--mb-radius);
  background: linear-gradient(135deg, var(--mb-forest), var(--mb-bark));
  color: #fff;
}

.quote-band h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.quote-band p {
  max-width: 760px;
  color: rgba(255, 255, 255, .82);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--mb-radius);
  transition: transform .7s var(--mb-ease), box-shadow .24s ease;
}

.contact-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-card {
  padding: 24px;
  background: var(--mb-card);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius);
}

.contact-card strong {
  display: block;
  color: var(--mb-forest);
  font-size: 1.2rem;
}

.person-card {
  padding: 24px;
  border-left: 4px solid var(--mb-forest-2);
}

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

.form-wrap {
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--mb-radius);
  background: var(--mb-card);
  border: 1px solid var(--mb-line);
  box-shadow: var(--mb-shadow);
}

.form-wrap input,
.form-wrap textarea,
.form-wrap select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c5ae8d;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  transition: border-color .22s ease, box-shadow .22s ease;
}

.form-wrap input:focus,
.form-wrap textarea:focus,
.form-wrap select:focus {
  border-color: var(--mb-forest-2);
  box-shadow: 0 0 0 3px rgba(47, 104, 72, .13);
  outline: 0;
}

.form-wrap textarea {
  min-height: 140px;
}

.form-wrap button,
.form-wrap input[type="submit"] {
  min-height: 48px;
  border: 0;
  border-radius: var(--mb-radius);
  background: var(--mb-wood);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: background-color .22s ease, box-shadow .22s ease, transform .22s var(--mb-ease);
}

.form-wrap button:hover,
.form-wrap button:focus,
.form-wrap input[type="submit"]:hover,
.form-wrap input[type="submit"]:focus {
  background: var(--mb-bark);
  box-shadow: 0 12px 28px rgba(36, 23, 15, .16);
  transform: translateY(-2px);
}

.animations-ready .reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .68s ease, transform .68s var(--mb-ease);
}

.animations-ready .reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

@keyframes mb-hero-image {
  from {
    opacity: .82;
    transform: scale(1.06);
  }

  to {
    opacity: 1;
    transform: scale(1.035);
  }
}

.site-footer {
  background: #20140d;
  color: rgba(255, 255, 255, .82);
  padding: 54px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
}

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

.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .62);
  font-size: .9rem;
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 72px;
  }

  .brand img {
    width: 108px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--mb-card);
    border: 1px solid var(--mb-line);
    border-radius: var(--mb-radius);
    box-shadow: var(--mb-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    visibility: hidden;
  }

  body.nav-open .main-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .main-nav a {
    width: 100%;
  }

  .main-nav .nav-cta {
    margin-left: 0;
  }

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

  .split,
  .contact-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .header-inner {
    width: 100%;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

  .nav-toggle {
    flex: 0 0 44px;
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 61;
  }

  .brand-text {
    display: none;
  }

  .hero {
    min-height: 580px;
  }

  .hero-content {
    padding: 58px 0;
  }

  .hero h1 {
    max-width: 330px;
    font-size: 1.55rem;
    line-height: 1.16;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .stats,
  .gallery {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 20px;
  }

  .quote-band {
    padding: 28px;
  }

  .page-hero {
    padding-top: 42px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .animations-ready .reveal-item,
  .hero > img {
    opacity: 1;
    transform: none;
  }
}
