/*
Theme Name: CRKS Thèmes - Nicolas Bulier
Theme URI: https://crackerstech.com/
Author: Cracker's Tech
Author URI: https://crackerstech.com/
Description: Thème bloc Gutenberg sur mesure pour Nicolas Bulier, pâtisserie traiteur sans gluten.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: crks-themes-nicolas-bulier
*/

:root {
  --nb-black: #0d0b08;
  --nb-ink: #1e1712;
  --nb-ivory: #fbf7ee;
  --nb-cream: #f4eadb;
  --nb-gold: #c6a965;
  --nb-caramel: #b96f35;
  --nb-cacao: #4a2a1d;
  --nb-sage: #8d9a76;
  --nb-sage-dark: #3f4936;
  --nb-berry: #8e334a;
  --nb-muted: #5e5247;
  --nb-line: rgba(198, 169, 101, 0.34);
  --nb-shadow: 0 24px 70px rgba(46, 25, 14, 0.13);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--nb-ivory);
}

::selection {
  background: rgba(185, 111, 53, 0.28);
}

a {
  text-underline-offset: 0.18em;
}

.wp-site-blocks {
  min-height: 100vh;
}

.wp-block-post-content > .nb-hero-cover,
.wp-block-post-content > .nb-section,
.wp-block-post-content > .nb-method,
.wp-block-post-content > .nb-cta-cover {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  max-width: none !important;
  width: auto;
}

.crks-header {
  border-bottom: 1px solid rgba(251, 247, 238, 0.12);
  box-shadow: 0 12px 36px rgba(13, 11, 8, 0.18);
  position: sticky;
  top: 0;
  z-index: 30;
}

.crks-header__inner {
  gap: 24px;
}

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

.crks-header a {
  text-decoration: none;
}

.crks-footer a,
.crks-header a {
  color: inherit;
}

.crks-nav .wp-block-navigation-item__content {
  transition: color 180ms ease, opacity 180ms ease;
}

.crks-nav .wp-block-navigation-item__content:hover,
.crks-nav .wp-block-navigation-item__content:focus-visible {
  color: var(--nb-gold);
}

.crks-nav .wp-block-navigation__submenu-container {
  background: rgba(13, 11, 8, 0.98);
  border: 1px solid rgba(198, 169, 101, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  min-width: 230px !important;
}

.crks-nav .wp-block-navigation__submenu-container a {
  padding: 12px 16px;
}

.nb-hero-cover {
  min-height: min(760px, calc(100vh - 76px));
  text-align: left;
}

.nb-hero-cover .wp-block-cover__background {
  background-color: transparent !important;
  background-image: linear-gradient(90deg, rgba(13, 11, 8, 0.94) 0%, rgba(13, 11, 8, 0.76) 34%, rgba(13, 11, 8, 0.1) 62%, rgba(13, 11, 8, 0) 100%) !important;
  opacity: 1 !important;
}

.nb-hero-cover .wp-block-cover__image-background,
.nb-hero-cover .wp-block-cover__video-background {
  filter: brightness(1.22) contrast(1.05);
  object-position: center right;
}

.nb-hero-cover .wp-block-cover__inner-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
  width: min(1120px, calc(100% - 48px));
}

.nb-hero-cover .wp-block-cover__inner-container > .wp-block-group {
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: 760px;
}

.nb-hero-cover .wp-block-heading,
.nb-hero-cover .wp-block-buttons {
  text-align: left;
}

.nb-hero-cover .wp-block-buttons {
  justify-content: flex-start;
}

.nb-signature img {
  width: min(330px, 72vw);
}

.nb-hero-title {
  max-width: 760px;
}

.nb-hero-copy {
  max-width: 610px;
}

.nb-monogram {
  color: rgba(198, 169, 101, 0.42);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(92px, 12vw, 168px);
  line-height: 0.8;
}

.nb-section-kicker {
  color: var(--nb-gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nb-section {
  position: relative;
}

.nb-band-cream {
  background:
    linear-gradient(135deg, rgba(198, 169, 101, 0.12), rgba(141, 154, 118, 0.08)),
    var(--nb-cream);
}

.nb-band-sage {
  background: #e7eadc;
}

.nb-band-berry {
  background: #f3e3df;
}

.nb-card {
  background: rgba(255, 252, 246, 0.82);
  border: 1px solid rgba(74, 42, 29, 0.13);
  border-radius: 8px;
  box-shadow: var(--nb-shadow);
}

.nb-card--dark {
  background: linear-gradient(145deg, #21150f, #0d0b08);
  border: 1px solid rgba(198, 169, 101, 0.24);
  color: var(--nb-ivory);
}

.nb-card--sage {
  background: #eef1e7;
  border-color: rgba(63, 73, 54, 0.18);
}

.nb-card--berry {
  background: #f8ece9;
  border-color: rgba(142, 51, 74, 0.22);
}

.nb-card h2,
.nb-card h3,
.nb-card h4 {
  margin-top: 0;
}

.nb-card .wp-block-button__link {
  box-shadow: none;
}

.nb-feature-number {
  color: var(--nb-caramel);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nb-pillar {
  border-top: 1px solid var(--nb-line);
}

.nb-link {
  color: #7a4e25;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.wp-block-button__link {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
  transform: translateY(-1px);
}

.nb-method {
  background: var(--nb-black);
  color: var(--nb-ivory);
}

.nb-step {
  border-left: 1px solid rgba(198, 169, 101, 0.35);
}

.nb-step-number {
  color: var(--nb-gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nb-timeline {
  counter-reset: nb-step;
}

.nb-timeline.is-layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important;
}

.nb-timeline > * {
  position: relative;
}

.nb-timeline > *::before {
  background: var(--nb-gold);
  border-radius: 999px;
  color: var(--nb-black);
  content: counter(nb-step, decimal-leading-zero);
  counter-increment: nb-step;
  display: inline-grid;
  font-size: 0.76rem;
  font-weight: 900;
  height: 34px;
  margin-bottom: 18px;
  place-items: center;
  width: 34px;
}

.nb-trust {
  background: #f0e5d4;
}

.nb-note {
  border-top: 1px solid rgba(74, 42, 29, 0.22);
}

.nb-media-frame img {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: var(--nb-shadow);
  object-fit: cover;
  width: 100%;
}

.nb-sitemap-grid a {
  color: inherit;
  text-decoration: none;
}

.nb-sitemap-grid a:hover,
.nb-sitemap-grid a:focus-visible {
  color: var(--nb-caramel);
}

.woocommerce,
.woocommerce-page {
  color: var(--nb-ink);
}

.woocommerce main,
.woocommerce-page main {
  background: var(--nb-ivory);
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering,
.woocommerce .product_meta {
  color: var(--nb-muted);
  font-size: 0.9rem;
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering,
.woocommerce .woocommerce-products-header {
  display: none !important;
}

.woocommerce-shop .wp-block-query-title {
  display: none !important;
}

.nb-shop-intro {
  margin-bottom: 42px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 88px 32px 76px;
}

.nb-shop-intro__inner {
  margin: 0 auto;
  max-width: 1040px;
}

.nb-shop-intro h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0 0 24px;
}

.nb-shop-intro p {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.6;
  max-width: 760px;
}

.nb-shop-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.woocommerce-checkout header.wp-block-template-part > .wp-block-group {
  background: var(--nb-black);
  box-shadow: 0 12px 36px rgba(13, 11, 8, 0.18);
  color: var(--nb-ivory);
  max-width: none;
  padding-left: 32px !important;
  padding-right: 32px !important;
}

.woocommerce-checkout header.wp-block-template-part .wp-block-site-title {
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.woocommerce-checkout header.wp-block-template-part a {
  color: inherit;
  text-decoration: none;
}

.woocommerce-checkout .wc-block-cart-link {
  color: var(--nb-gold);
}

.woocommerce ul.products {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(74, 42, 29, 0.13);
  border-radius: 8px;
  box-shadow: var(--nb-shadow);
  float: none;
  margin: 0 !important;
  overflow: hidden;
  padding: 0 0 24px;
  width: auto !important;
}

.woocommerce ul.products li.product a img {
  aspect-ratio: 4 / 3;
  margin: 0 0 20px;
  object-fit: cover;
  width: 100%;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce div.product .product_title {
  color: var(--nb-ink);
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1.45rem;
  line-height: 1.16;
  padding: 0 24px;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--nb-caramel);
  font-weight: 900;
  padding: 0 24px;
}

.nb-price-on-request {
  color: var(--nb-caramel);
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce div.product form.cart .button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background: var(--nb-gold);
  border: 1px solid var(--nb-gold);
  border-radius: 3px;
  color: var(--nb-black);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 14px 18px;
  text-transform: uppercase;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce div.product form.cart .button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background: var(--nb-caramel);
  border-color: var(--nb-caramel);
  color: var(--nb-black);
}

.woocommerce ul.products li.product .button {
  margin-left: 24px;
  margin-top: 10px;
}

.woocommerce div.product {
  margin: 0 auto;
  max-width: 1120px;
  padding: 72px 32px;
}

.woocommerce div.product div.images img {
  border-radius: 8px;
  box-shadow: var(--nb-shadow);
}

.woocommerce div.product form.cart {
  border-top: 1px solid rgba(74, 42, 29, 0.16);
  padding-top: 22px;
}

.woocommerce table.shop_table,
.woocommerce form.checkout,
.woocommerce form.login,
.woocommerce form.register,
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
  background: rgba(255, 252, 246, 0.88);
  border: 1px solid rgba(74, 42, 29, 0.14);
  border-radius: 8px;
  box-shadow: var(--nb-shadow);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: rgba(74, 42, 29, 0.12);
}

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select {
  background: #fffdfa;
  border: 1px solid rgba(74, 42, 29, 0.2);
  border-radius: 4px;
  color: var(--nb-ink);
  min-height: 44px;
  padding: 10px 12px;
}

.woocommerce-page .entry-content > .woocommerce,
.wp-block-post-content > .woocommerce {
  margin-left: auto;
  margin-right: auto;
  max-width: 1120px;
  padding: 72px 32px;
}

.nb-commerce-note {
  border-left: 4px solid var(--nb-gold);
}

.nb-footer-sitemap h3 {
  color: var(--nb-gold);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem !important;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nb-footer-lead {
  max-width: 430px;
}

.nb-footer-list {
  list-style: none;
  padding-left: 0;
}

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

.nb-cta-cover {
  min-height: 420px;
}

.nb-video-cover .wp-block-cover__video-background {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.nb-cta-cover .wp-block-cover__background {
  background-color: transparent !important;
  background-image: linear-gradient(90deg, rgba(13, 11, 8, 0.98), rgba(13, 11, 8, 0.66)) !important;
  opacity: 1 !important;
}

.nb-cta-cover .wp-block-cover__video-background {
  filter: brightness(1.05) contrast(1.05) saturate(1.04);
  object-position: center right;
}

.nb-anim-ready .nb-animate,
.nb-anim-ready .nb-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
  transition-delay: var(--nb-delay, 0ms);
}

.nb-anim-ready .nb-animate.is-visible,
.nb-anim-ready .nb-stagger > *.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nb-stagger > *:nth-child(2) {
  --nb-delay: 90ms;
}

.nb-stagger > *:nth-child(3) {
  --nb-delay: 180ms;
}

.nb-stagger > *:nth-child(4) {
  --nb-delay: 270ms;
}

.nb-hero-cover .wp-block-cover__image-background,
.nb-hero-cover .wp-block-cover__video-background,
.nb-cta-cover .wp-block-cover__image-background,
.nb-cta-cover .wp-block-cover__video-background {
  transform: scale(1.018);
  transition: transform 900ms ease;
}

.nb-hero-cover:hover .wp-block-cover__image-background,
.nb-hero-cover:hover .wp-block-cover__video-background,
.nb-cta-cover:hover .wp-block-cover__image-background,
.nb-cta-cover:hover .wp-block-cover__video-background {
  transform: scale(1.035);
}

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

  .nb-anim-ready .nb-animate,
  .nb-anim-ready .nb-stagger > *,
  .wp-block-button__link,
  .nb-hero-cover .wp-block-cover__image-background,
  .nb-hero-cover .wp-block-cover__video-background,
  .nb-cta-cover .wp-block-cover__image-background,
  .nb-cta-cover .wp-block-cover__video-background {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

  .nb-hero-cover {
    min-height: 680px;
  }

  .crks-header {
    position: relative;
  }

  .crks-header__inner {
    align-items: center;
  }

  .nb-hero-cover .wp-block-cover__image-background,
  .nb-hero-cover .wp-block-cover__video-background {
    object-position: 62% center;
  }

  .nb-hero-cover .wp-block-buttons,
  .nb-cta-cover .wp-block-buttons {
    align-items: flex-start;
    flex-direction: column;
  }

  .nb-hero-cover .wp-block-button,
  .nb-cta-cover .wp-block-button {
    width: auto;
  }

  .nb-card {
    box-shadow: 0 18px 44px rgba(46, 25, 14, 0.1);
  }
}
