/*
Theme Name:  M3DC — Le Comptoir Découpe & Pliage
Description: Child theme Blocksy pour shop.midi-3dcoupe.com — déclinaison e-commerce de l'identité M3DC (m3dc.fr) : noir profond, or champagne, Playfair Display. Par amour du beau.
Author:      M3DC
Template:    blocksy
Version:     2.0.0
Text Domain: blocksy-child
*/

/* ==========================================================================
   TOKENS — charte M3DC (reprise de midi-3dcoupe.com)
   ========================================================================== */
:root {
  --noir: #0D0D0D;
  --warm-dark: #1A1815;
  --card: #252220;
  --card-border: rgba(201, 168, 76, 0.18);
  --or: #C9A84C;
  --or-clair: #D4B96A;
  --or-muted: rgba(201, 168, 76, 0.35);
  --texte: rgba(250, 250, 248, 0.85);
  --texte-muted: rgba(250, 250, 248, 0.50);
  --texte-faint: rgba(250, 250, 248, 0.30);
  --blanc: #FAFAF8;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-accent: 'Cormorant Garamond', Garamond, serif;
  --font-script: 'Italianno', cursive;
  --font-body: 'Inter', -apple-system, sans-serif;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Palette Blocksy mappée sur la charte */
  --theme-palette-color-1: #C9A84C;
  --theme-palette-color-2: #D4B96A;
  --theme-palette-color-3: #0D0D0D;
  --theme-palette-color-4: #1A1815;
  --theme-palette-color-5: #252220;
  --theme-palette-color-6: rgba(250,250,248,0.5);
  --theme-palette-color-7: #0D0D0D;
  --theme-palette-color-8: #FAFAF8;

  --theme-text-color: var(--texte);
  --theme-link-initial-color: var(--or-clair);
  --theme-link-hover-color: var(--blanc);
  --theme-headings-color: var(--blanc);
  --theme-form-field-border-focus-color: var(--or);
}

/* ==========================================================================
   FOND & TYPO GLOBALE — l'écrin
   ========================================================================== */
body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--texte);
  background-color: var(--noir) !important;
}

h1, h2, h3, h4, h5, h6, .entry-title {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--blanc);
  line-height: 1.2;
}
h1 { font-size: 2.9rem; }
h2 { font-size: 2.1rem; }

a { transition: color .25s var(--ease); }

::selection { background: var(--or); color: var(--noir); }

input[type=radio], input[type=checkbox] { accent-color: var(--or); }
.wc-block-components-radio-control__option, .wc-block-checkout__shipping-option { border-color: var(--card-border) !important; }

/* Étiquette de section — petites capitales dorées */
p.m3dc-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--or) !important;
  background: none;
  padding: 0;
  margin-bottom: 1.2rem !important;
  position: relative;
}
p.m3dc-eyebrow:after {
  content: '';
  display: block;
  width: 42px;
  height: 1px;
  background: var(--or-muted);
  margin-top: 0.7rem;
}

/* Signature manuscrite */
.m3dc-script {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 400;
  color: var(--or-clair);
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0;
}

/* ==========================================================================
   HEADER — noir profond, monogramme, filet or
   ========================================================================== */
header#header [data-row*="middle"],
header#header [data-row*="top"] {
  background-color: rgba(13, 13, 13, 0.97);
  border-bottom: 1px solid var(--card-border);
}
header#header:after { display: none; }

header#header .site-logo-container img {
  max-height: 58px;
  width: auto;
}
header#header .site-branding { gap: 14px; }
header#header .site-title { color: var(--blanc); }
header#header .site-title a {
  color: var(--blanc);
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.06em;
}
header#header .site-title a:hover { color: var(--or-clair); }
header#header .site-description { color: var(--texte-faint); }

header#header [data-id="menu"] > ul > li > a {
  font-family: var(--font-body);
  color: var(--texte);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  transition: color .25s var(--ease);
}
header#header [data-id="menu"] > ul > li > a:hover,
header#header [data-id="menu"] > ul > li[class*="current"] > a { color: var(--or-clair); }

header#header .ct-header-cart .ct-icon,
header#header [data-id="search"] .ct-icon,
header#header .ct-header-account .ct-icon { fill: var(--blanc); color: var(--blanc); }
header#header .ct-header-cart:hover .ct-icon { fill: var(--or-clair); color: var(--or-clair); }
header#header .ct-header-cart [data-count]:after {
  background: var(--or); color: var(--noir); font-weight: 600;
}

/* Sous-menus */
header#header .sub-menu {
  background: var(--warm-dark) !important;
  border: 1px solid var(--card-border);
}
header#header .sub-menu a { color: var(--texte) !important; }
header#header .sub-menu a:hover { color: var(--or-clair) !important; }

/* Menu mobile / offcanvas */
.ct-panel-content, .ct-panel { background: var(--noir) !important; }
.ct-panel-content a { color: var(--texte); }

/* ==========================================================================
   BOUTONS — filet or, remplissage au survol
   ========================================================================== */
.ct-button, button, input[type=submit],
.woocommerce a.button, .woocommerce button.button,
.woocommerce a.add_to_cart_button, .woocommerce a.added_to_cart,
.woocommerce #respond input#submit,
.single_add_to_cart_button,
.wc-block-components-button:not(.is-link),
.wp-block-button__link.wp-element-button,
.wp-block-button .wp-block-button__link,
.checkout-button, button[name="apply_coupon"], button[name="update_cart"],
#place_order {
  background-color: transparent !important;
  color: var(--or-clair) !important;
  border: 1px solid var(--or) !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding: 0.9em 2.2em;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.ct-button:hover, button:hover, input[type=submit]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.add_to_cart_button:hover,
.single_add_to_cart_button:hover,
.wc-block-components-button:not(.is-link):hover,
.wp-block-button__link.wp-element-button:hover,
.checkout-button:hover, #place_order:hover {
  background-color: var(--or) !important;
  color: var(--noir) !important;
  border-color: var(--or) !important;
}

/* Variante pleine (CTA principal) */
.is-style-fill .wp-block-button__link,
#place_order, .checkout-button {
  background-color: var(--or) !important;
  color: var(--noir) !important;
}
.is-style-fill .wp-block-button__link:hover,
#place_order:hover, .checkout-button:hover {
  background-color: var(--or-clair) !important;
  color: var(--noir) !important;
}

/* ==========================================================================
   WOOCOMMERCE — vitrines d'objets précieux
   ========================================================================== */
[data-products] .product,
.woocommerce ul.products li.product,
ul.products li.product,
.wc-block-grid__product {
  background: var(--warm-dark);
  border: 1px solid var(--card-border);
  border-radius: 0;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
  overflow: hidden;
}
[data-products] .product:hover,
.woocommerce ul.products li.product:hover {
  border-color: var(--or-muted);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.woocommerce-loop-product__title,
[data-products] .product .woocommerce-loop-product__title {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--blanc);
}

.price, .woocommerce ul.products li.product .price,
[data-products] .product .price {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--or-clair);
}
.price del { color: var(--texte-faint); font-weight: 400; }

/* Placeholders produits : fondus dans l'écrin sombre */
img[src*="woocommerce-placeholder"] {
  filter: invert(1);
  opacity: 0.05;
  background: transparent;
}
li.product .attachment-woocommerce_thumbnail,
li.product img { background: var(--warm-dark); }

.onsale, .sale-flash {
  background: var(--noir) !important;
  color: var(--or-clair) !important;
  border: 1px solid var(--or) !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Fiche produit */
.single-product .product_title { font-size: 2rem; }
.product_meta, .product_meta .posted_in, .product_meta .sku_wrapper { color: var(--texte-muted); }
.product_meta a, .posted_in a, .tagged_as a,
.single-product .summary a:not(.button),
.woocommerce-tabs a:not(.button),
.woocommerce-breadcrumb a {
  color: var(--or-clair) !important;
}
.product_meta a:hover, .posted_in a:hover { color: var(--blanc) !important; }
.single-product .summary .price { font-size: 1.9rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: var(--warm-dark);
  border-color: var(--card-border);
  border-radius: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--card); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--texte); }

/* Catégories : libellés discrets */
[data-products] .product .ct-woo-card-extra,
.product__categories, .posted_in { color: var(--texte-muted); }
[data-products] .product [class*="category"] a,
li.product .ct-product-category,
li.product .ct-woo-card-extra a,
ul.products li.product a:not(.button):not(.woocommerce-loop-product__link) {
  color: var(--texte-muted) !important;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
ul.products li.product a:not(.button):hover { color: var(--or-clair) !important; }

/* Fil d'ariane */
.ct-breadcrumbs {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--texte-muted);
}
.ct-breadcrumbs a { color: var(--texte-muted); }
.ct-breadcrumbs a:hover { color: var(--or-clair); }

/* Bandeau de titre de page (boutique, panier…) */
.hero-section {
  background: var(--warm-dark);
  border-bottom: 1px solid var(--card-border);
}
.hero-section .page-title, .hero-section h1 {
  font-family: var(--font-heading);
  color: var(--blanc);
  font-weight: 500;
}

/* Tri / résultats */
.woocommerce-result-count { color: var(--texte-muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.woocommerce-ordering select, select, .orderby {
  background: var(--warm-dark);
  color: var(--texte);
  border: 1px solid var(--card-border);
  border-radius: 0;
}

/* Pagination — sobre, dorée */
.ct-pagination .page-numbers,
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  background: transparent !important;
  border: 1px solid var(--card-border) !important;
  border-radius: 0 !important;
  color: var(--texte) !important;
  font-weight: 400;
}
.ct-pagination .page-numbers.current,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--or) !important;
  border-color: var(--or) !important;
  color: var(--noir) !important;
}
.ct-pagination .page-numbers:not(.current):hover,
.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: var(--or) !important;
  color: var(--or-clair) !important;
}

/* Tableaux panier / totaux */
.woocommerce table.shop_table, .woocommerce table.shop_table td, .woocommerce table.shop_table th {
  border-color: var(--card-border) !important;
  color: var(--texte);
}
.woocommerce table.shop_table { background: var(--warm-dark); border-radius: 0; }
.woocommerce-cart-form .product-name a { color: var(--blanc); }
.cart_totals h2, .cross-sells h2 { color: var(--blanc); }

/* Blocs panier/commande (Gutenberg WooCommerce) */
.wc-block-components-sidebar .wc-block-components-panel,
.wc-block-cart .wc-block-cart__sidebar,
.wc-block-components-order-summary,
.wc-block-components-totals-wrapper,
.wc-block-cart-items {
  color: var(--texte);
}
.wc-block-cart-items__row, .wc-block-cart-items .wc-block-cart-items__header {
  border-color: var(--card-border) !important;
}
.wc-block-components-product-name { color: var(--blanc) !important; }
.wc-block-components-product-price, .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-family: var(--font-accent);
  color: var(--or-clair) !important;
}
.wc-block-components-sidebar-layout .wc-block-components-main { color: var(--texte); }
.wc-block-components-checkout-step__heading .wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-title { color: var(--blanc) !important; }
.wc-block-components-checkout-step__description { color: var(--texte-muted); }

/* Formulaires — écrin sombre */
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=search], input[type=number], input[type=url], textarea,
.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-form .wc-block-components-text-input input {
  background: var(--warm-dark) !important;
  color: var(--blanc) !important;
  border: 1px solid rgba(250,250,248,0.18) !important;
  border-radius: 0 !important;
}
input:focus, textarea:focus,
.wc-block-components-text-input input:focus {
  border-color: var(--or) !important;
  box-shadow: 0 0 0 1px var(--or) !important;
}
.wc-block-components-text-input label,
.wc-block-components-checkbox__label, label { color: var(--texte-muted) !important; }
::placeholder { color: var(--texte-faint) !important; }

/* Notices Woo — TOUTES les variantes, lisibles sur l'écrin sombre */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.woocommerce-notice, .woocommerce-notice--success, .woocommerce-notice--error,
.woocommerce-thankyou-order-received,
.wc-block-components-notice-banner,
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-error,
.wc-block-store-notice {
  background: var(--warm-dark) !important;
  border: 1px solid var(--or) !important;
  color: var(--blanc) !important;
  border-radius: 0 !important;
}
.woocommerce-error { border-left: 3px solid #B0413E !important; }
.woocommerce-message::before, .woocommerce-info::before,
.woocommerce-notice--success::before { color: var(--or) !important; }
.wc-block-components-notice-banner > svg { fill: var(--or) !important; background: transparent !important; }
.wc-block-components-notice-banner a { color: var(--or-clair) !important; }

/* Page « Merci, commande reçue » */
.woocommerce-thankyou-order-received {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  padding: 1.2rem 1.6rem 1.2rem 3.2rem !important;
}
.woocommerce-order-overview, .woocommerce-order-overview li,
.woocommerce-order-overview li strong { color: var(--texte); }
.woocommerce-customer-details address { color: var(--texte); border-color: var(--card-border) !important; }

/* Liens dans les contenus commande / tableaux / textes : toujours dorés */
.woocommerce-order a:not(.button),
.woocommerce table.shop_table a:not(.button),
.woocommerce-table a, .woocommerce-order-details a,
.woocommerce-MyAccount-content a:not(.button),
.entry-content a:not(.button):not(.wp-block-button__link):not(.m3dc-cat-card),
.woocommerce-cart-form a:not(.button) {
  color: var(--or-clair) !important;
}
.woocommerce-order a:not(.button):hover,
.entry-content a:not(.button):not(.wp-block-button__link):not(.m3dc-cat-card):hover {
  color: var(--blanc) !important;
}

/* Widgets, wishlist, divers surfaces claires -> sombres */
.yith-wcwl-add-to-wishlist a { color: var(--texte-muted); }
.ct-sidebar .ct-widget > *, .widget-title { color: var(--blanc); }

/* ==========================================================================
   FOOTER — warm dark, double filet or
   ========================================================================== */
.m3dc-footer {
  background: var(--warm-dark);
  color: var(--texte-muted);
  border-top: 1px solid var(--card-border);
  border-image: none;
  position: relative;
  padding: 4.5rem 1.5rem 3rem;
}
.m3dc-footer:before {
  content: '';
  position: absolute;
  top: 5px; left: 0; right: 0;
  height: 1px;
  background: var(--card-border);
}
.m3dc-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
}
.m3dc-footer p { font-size: 0.88rem; line-height: 1.8; margin: 0 0 1rem; }
.m3dc-footer a { color: var(--texte); text-decoration: none; }
.m3dc-footer a:hover { color: var(--or-clair); }
.m3dc-footer-brand {
  font-family: var(--font-heading) !important;
  font-size: 1.35rem !important;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--blanc);
  line-height: 1.3 !important;
}
.m3dc-footer-title {
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-weight: 500;
  font-size: 0.72rem !important;
}
.m3dc-footer-menu { list-style: none; margin: 0; padding: 0; }
.m3dc-footer-menu li { margin: 0 0 0.6rem; }
.m3dc-footer-menu a { font-size: 0.88rem; color: var(--texte-muted); }
@media (max-width: 800px) {
  .m3dc-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

footer.ct-footer [data-row],
footer.ct-footer [data-row] > div {
  background-color: var(--noir) !important;
  color: var(--texte-faint) !important;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
footer.ct-footer .ct-footer-copyright { color: var(--texte-faint) !important; }
footer.ct-footer:before { display: none; }

/* ==========================================================================
   SECTIONS ACCUEIL
   ========================================================================== */
.home main > .ct-container-full { padding-top: 0; padding-bottom: 0; }
.home .entry-content > .alignfull { margin-top: 0 !important; margin-bottom: 0 !important; }
.home .hero-section, .home .entry-header,
.page-id-4542 .hero-section { display: none; }

.m3dc-hero {
  position: relative;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(201,168,76,0.07) 0%, transparent 55%),
    linear-gradient(180deg, #0D0D0D 0%, #14120F 100%);
  color: var(--blanc);
  overflow: hidden;
}
.m3dc-hero:after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(1100px, 88%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--or-muted), transparent);
}
.m3dc-hero h1 {
  color: var(--blanc);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}
.m3dc-hero .m3dc-hero-accent {
  color: var(--or-clair);
  font-style: italic;
}
.m3dc-hero p:not(.m3dc-eyebrow):not(.m3dc-script) {
  color: var(--texte-muted);
  font-size: 1.02rem;
  font-weight: 300;
}
.m3dc-hero .has-text-align-center { margin-left: auto !important; margin-right: auto !important; }
.m3dc-hero h2 { color: var(--blanc); }

/* Cartes rayons — plaques gravées */
.m3dc-cat-card {
  display: block;
  background: var(--warm-dark);
  border: 1px solid var(--card-border);
  border-left: 1px solid var(--card-border);
  padding: 1.8rem 1.7rem 1.6rem;
  text-decoration: none;
  position: relative;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.m3dc-cat-card:before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--or), transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.m3dc-cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--or-muted);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.m3dc-cat-card:hover:before { opacity: 1; }
.m3dc-cat-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--blanc);
  margin-bottom: 0.35rem;
}
.m3dc-cat-card span { color: var(--texte-muted); font-size: 0.86rem; font-weight: 300; }
.m3dc-cat-card:after {
  content: '→';
  position: absolute;
  right: 1.5rem; bottom: 1.2rem;
  color: var(--or);
  opacity: 0;
  transform: translateX(-6px);
  transition: all .3s var(--ease);
}
.m3dc-cat-card:hover:after { opacity: 1; transform: translateX(0); }

/* Bande services — liseré or */
.m3dc-usp {
  background: var(--warm-dark);
  color: var(--blanc);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.m3dc-usp h3 {
  font-family: var(--font-body);
  color: var(--or);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-weight: 500;
}
.m3dc-usp p { color: var(--texte-muted); font-size: 0.9rem; font-weight: 300; }

/* Responsive */
@media (max-width: 689px) {
  h1 { font-size: 2rem; }
  header#header .site-logo-container img { max-height: 44px; }
}
