/* ============================================================
   Sérénité Truck — Design system
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --st-beige-pastel: #CBC1B1;
  --st-beige-rouille: #B48771;
  --st-brun-rouille: #7A2F00;
  --st-brun-fonce: #5C2400;
  --st-creme: #F5F1EC;
  --st-encre: #3A2A1A;
  --st-encre-doux: #6B5847;

  --st-radius: 18px;
  --st-radius-sm: 12px;
  --st-radius-lg: 26px;

  /* Ombres douces, superposées (2 couches = plus naturel) */
  --st-shadow-xs: 0 1px 2px rgba(60,40,20,.04), 0 2px 6px rgba(60,40,20,.04);
  --st-shadow-sm: 0 2px 4px rgba(60,40,20,.04), 0 6px 16px rgba(60,40,20,.06);
  --st-shadow-md: 0 4px 8px rgba(60,40,20,.05), 0 12px 28px rgba(60,40,20,.09);
  --st-shadow-lg: 0 8px 16px rgba(60,40,20,.06), 0 24px 48px rgba(60,40,20,.12);
  --st-shadow-cta: 0 4px 14px rgba(122,47,0,.22);
  --st-shadow-cta-hover: 0 10px 28px rgba(122,47,0,.32);

  --st-ease: cubic-bezier(.16, 1, .3, 1);
  --st-ease-out: cubic-bezier(.22, .61, .36, 1);

  --wp--style--global--content-size: 1200px;
  --wp--style--global--wide-size: 1400px;
}

/* ---------- 2. Typographie (échelle fluide moderne) ---------- */
body {
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.7;
  color: var(--st-encre);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

p, li, .wp-block-paragraph, .wp-block-list {
  font-family: 'Open Sans', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--st-encre);
}

/* Paragraphes de corps : largeur de lecture confortable */
.st-section p:not([class*="has-text-align-center"]):not(.st-eyebrow) {
  max-width: 68ch;
}
.st-section p.has-text-align-center {
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

h1, h2, h3, h4, h5, h6, .wp-block-heading {
  font-family: 'Noto Serif Extra Condensed', Georgia, serif;
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--st-encre);
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-family: 'Alex Brush', cursive;
  font-weight: 400;
  font-size: clamp(2.75rem, 4vw + 1rem, 4.25rem);
  line-height: 1.12;
  letter-spacing: .01em;
}
h2 { font-size: clamp(2rem, 1.6vw + 1.4rem, 2.75rem); }
h3 { font-size: clamp(1.4rem, 1vw + 1.05rem, 1.75rem); }
h4 { font-size: clamp(1.15rem, .4vw + 1rem, 1.3rem); line-height: 1.35; }
h5 { font-size: 1.0625rem; }

.wp-block-heading em, h2 em, h3 em {
  font-family: 'Alex Brush', cursive;
  font-style: normal;
  font-weight: 400;
  font-size: 1.45em;
  line-height: 1;
  color: var(--st-beige-rouille);
}

.st-eyebrow {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--st-beige-rouille);
}
.st-small { font-size: .9375rem; color: var(--st-encre-doux); }

/* ---------- 3. Rythme vertical ---------- */
section,
.wp-block-group.st-section {
  padding-top: clamp(64px, 8vw, 108px);
  padding-bottom: clamp(64px, 8vw, 108px);
}

.is-layout-constrained > :not(.alignleft):not(.alignright):not(.alignfull) {
  max-width: var(--wp--style--global--content-size);
  margin-left: auto !important;
  margin-right: auto !important;
}
.is-layout-constrained > .alignwide { max-width: var(--wp--style--global--wide-size); }

.page-header { display: none; }

/* ---------- 4. Header sticky ---------- */
#site-header {
  background-color: #fff;
  position: relative;
  z-index: 999;
  width: 100%;
  transition: box-shadow .35s var(--st-ease),
              padding .35s var(--st-ease),
              background-color .35s var(--st-ease);
}

#site-header.st-is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background-color: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--st-shadow-sm);
  border-bottom: 1px solid rgba(180,135,113,.14);
  animation: st-slide-down .4s var(--st-ease) both;
}

@keyframes st-slide-down {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

body.st-has-sticky-spacer { padding-top: var(--st-header-height, 88px); }

/* Logo qui se compacte au scroll */
#site-logo img,
#site-logo-inner img,
.custom-logo {
  max-height: 56px !important;
  width: auto !important;
  height: auto !important;
  transition: max-height .35s var(--st-ease);
}
#site-header.st-is-sticky #site-logo img,
#site-header.st-is-sticky .custom-logo { max-height: 42px !important; }

/* Navigation — soulignement animé */
#site-navigation-wrap .main-nav > ul > li > a {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  color: var(--st-encre);
  position: relative;
  transition: color .25s var(--st-ease);
}

#site-navigation-wrap .main-nav > ul > li:not(.menu-cta-button) > a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--st-brun-rouille);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .35s var(--st-ease);
}
#site-navigation-wrap .main-nav > ul > li:not(.menu-cta-button) > a:hover::after,
#site-navigation-wrap .main-nav > ul > li:not(.menu-cta-button).current-menu-item > a::after {
  transform: scaleX(1);
  transform-origin: left center;
}

#site-navigation-wrap .main-nav > ul > li > a:hover,
#site-navigation-wrap .main-nav > ul > li.current-menu-item > a {
  color: var(--st-brun-rouille);
}

/* CTA dans le menu */
#site-navigation-wrap .main-nav > ul > li.menu-cta-button > a {
  background-color: var(--st-brun-rouille);
  color: #fff !important;
  padding: 11px 24px;
  border-radius: 50px;
  box-shadow: var(--st-shadow-cta);
  transition: background-color .25s var(--st-ease),
              transform .25s var(--st-ease),
              box-shadow .25s var(--st-ease);
}
#site-navigation-wrap .main-nav > ul > li.menu-cta-button > a:hover {
  background-color: var(--st-brun-fonce);
  transform: translateY(-2px);
  box-shadow: var(--st-shadow-cta-hover);
}

/* Sous-menus adoucis */
#site-navigation-wrap .main-nav ul li ul {
  border: none;
  border-radius: var(--st-radius-sm);
  box-shadow: var(--st-shadow-md);
  overflow: hidden;
  padding: 6px;
}
#site-navigation-wrap .main-nav ul li ul li a {
  border: none;
  border-radius: 8px;
  transition: background-color .2s var(--st-ease), color .2s var(--st-ease);
}
#site-navigation-wrap .main-nav ul li ul li a:hover {
  background-color: var(--st-creme);
  color: var(--st-brun-rouille);
}

/* ---------- 5. Boutons ---------- */
.wp-block-button__link {
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  border-radius: 50px;
  padding: 14px 32px;
  box-shadow: var(--st-shadow-cta);
  transition: transform .25s var(--st-ease),
              box-shadow .25s var(--st-ease),
              background-color .25s var(--st-ease);
}
.wp-block-button__link:hover {
  transform: translateY(-3px);
  box-shadow: var(--st-shadow-cta-hover);
}
.wp-block-button__link:active { transform: translateY(-1px); }

.wp-block-button:not(.is-style-outline) .wp-block-button__link { color: #fff; }

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  box-shadow: none;
  border-width: 1.5px;
  transition: background-color .25s var(--st-ease),
              transform .25s var(--st-ease),
              color .25s var(--st-ease);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: rgba(255,255,255,.14);
  box-shadow: none;
  transform: translateY(-3px);
}

/* ---------- 6. Cards ---------- */
.wp-block-columns { align-items: stretch; }
.wp-block-columns .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns .wp-block-column > .wp-block-group.st-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-grow: 1;
}

.st-card {
  position: relative;
  border-radius: var(--st-radius);
  background-color: #fff;
  border: 1px solid rgba(180,135,113,.10);
  box-shadow: var(--st-shadow-sm);
  overflow: hidden;
  transition: transform .4s var(--st-ease),
              box-shadow .4s var(--st-ease),
              border-color .4s var(--st-ease);
}

/* Liseré qui se révèle au survol */
.st-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--st-beige-rouille), var(--st-brun-rouille));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--st-ease);
}

.st-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--st-shadow-lg);
  border-color: rgba(180,135,113,.22);
}
.st-card:hover::before { transform: scaleX(1); }

.st-card .wp-block-buttons { margin-top: auto; padding-top: 1rem; }

/* ---------- 7. Images ---------- */
.wp-block-image img,
figure.wp-block-image {
  border-radius: var(--st-radius);
}
figure.wp-block-image {
  overflow: hidden;
  box-shadow: var(--st-shadow-md);
}
figure.wp-block-image img {
  transition: transform .7s var(--st-ease);
  display: block;
}
figure.wp-block-image:hover img { transform: scale(1.04); }

/* ---------- 8. Cover / Hero ---------- */
.wp-block-cover { overflow: hidden; }
.wp-block-cover__image-background {
  animation: st-hero-zoom 18s var(--st-ease-out) both;
}
@keyframes st-hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* ---------- 9. Reveal au scroll ---------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--st-ease), transform .8s var(--st-ease);
  will-change: opacity, transform;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}
.animate-on-scroll.delay-1 { transition-delay: .09s; }
.animate-on-scroll.delay-2 { transition-delay: .18s; }
.animate-on-scroll.delay-3 { transition-delay: .27s; }
.animate-on-scroll.delay-4 { transition-delay: .36s; }
.animate-on-scroll.delay-5 { transition-delay: .45s; }

/* ---------- 10. Footer ---------- */
#footer-widgets {
  background-color: #241A12;
  color: #D9CFC3;
  font-size: .9375rem;
}
#footer-widgets h4,
#footer-widgets .wp-block-heading {
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .02em;
}
#footer-widgets p,
#footer-widgets li,
#footer-widgets ul li,
#footer-widgets .wp-block-list,
#footer-widgets .wp-block-list-item { color: #D9CFC3 !important; font-size: .9375rem; }

#footer-widgets a,
#footer-widgets ul li a,
#footer-widgets .wp-block-list-item a {
  color: #D9CFC3 !important;
  transition: color .2s var(--st-ease);
}
#footer-widgets a:hover,
#footer-widgets ul li a:hover { color: #fff !important; }

#footer-bottom {
  background-color: #1A120C;
  color: #D9CFC3;
  font-size: .875rem;
}

.oceanwp-html-sitemap,
.site-footer-bottom-links,
#footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

/* ---------- 11. Formulaires (CF7) ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
  border: 1px solid rgba(180,135,113,.28);
  border-radius: var(--st-radius-sm);
  padding: 13px 16px;
  font-family: 'Open Sans', sans-serif;
  font-size: 1rem;
  background: #fff;
  transition: border-color .25s var(--st-ease), box-shadow .25s var(--st-ease);
  width: 100%;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-color: var(--st-beige-rouille);
  box-shadow: 0 0 0 4px rgba(180,135,113,.14);
}
.wpcf7 input[type="submit"] {
  background: var(--st-brun-rouille);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 34px;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  box-shadow: var(--st-shadow-cta);
  transition: transform .25s var(--st-ease),
              box-shadow .25s var(--st-ease),
              background-color .25s var(--st-ease);
  width: auto;
}
.wpcf7 input[type="submit"]:hover {
  background: var(--st-brun-fonce);
  transform: translateY(-3px);
  box-shadow: var(--st-shadow-cta-hover);
}

/* ---------- 12. Focus visible (accessibilité) ---------- */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 2px solid var(--st-brun-rouille);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 13. Bouton retour en haut ---------- */
#scroll-top {
  border-radius: 50% !important;
  box-shadow: var(--st-shadow-md);
  transition: transform .25s var(--st-ease), background-color .25s var(--st-ease);
}
#scroll-top:hover { transform: translateY(-3px); }

/* ---------- 14. Responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 1rem; }
  p, li { font-size: 1rem; }
  .st-card:hover { transform: none; }
  .wp-block-cover { min-height: 78vh !important; }
  .wp-block-cover[style*="padding-left"] {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  #site-navigation-wrap .main-nav > ul > li > a::after { display: none; }
}

/* ---------- 15. Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
  .wp-block-cover__image-background { animation: none !important; }
}
