/**
 * Socle du nouveau design (CWC_Design) — commun à toutes les pages rendues
 * sans Elementor ni archub : variables, base, boutons, en-tête, pied de
 * page, tiroirs (menu, panier), modale et notification. Complété par
 * cwc-home.css (accueil) ou cwc-pages.css (pages intérieures). Toutes les
 * classes sont préfixées jd-. La remise à zéro des marges ne touche que les
 * éléments du design (.jd-main, en-tête, pied de page…) : ni la modale de
 * devis CWC, ni la barre d'admin, ni le contenu WooCommerce des pages
 * panier / commande / compte.
 */

:root {
	--jd-black: #111111;
	--jd-white: #ffffff;
	--jd-ivory: #f7f5f2;
	--jd-sand: #efe9e1;
	--jd-gray-muted: #6b6b6b;
	--jd-font-serif: 'Instrument Serif', Georgia, serif;
	--jd-font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--jd-border-black: 1px solid #111111;
	--jd-header-height: 64px;
	--jd-container-pad: 20px;
	--jd-admin-bar: 0px;
	--cwc-logo-h: 36px;
}

@media (min-width: 768px) {
	:root {
		--jd-container-pad: 32px;
		--jd-header-height: 72px;
		--cwc-logo-h: 44px;
	}
}

@media (min-width: 1200px) {
	:root {
		--jd-container-pad: 48px;
	}
}

/* Barre d'admin WordPress : fixe au-dessus de 600 px. */
body.admin-bar {
	--jd-admin-bar: 32px;
}

@media (max-width: 782px) {
	body.admin-bar {
		--jd-admin-bar: 46px;
	}
}

@media (max-width: 600px) {
	body.admin-bar {
		--jd-admin-bar: 0px;
	}
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

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

:where(.jd-header, .jd-main, .jd-footer, .jd-drawer, .jd-modal, .jd-toast) :where(*) {
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-font-smoothing: antialiased;
}

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

body.jd-body {
	margin: 0;
	font-family: var(--jd-font-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--jd-black);
	background-color: var(--jd-white);
	overflow-x: hidden;
}

body.jd-modal-open {
	overflow: hidden;
}

.jd-body :where(.jd-main, .jd-header, .jd-footer, .jd-drawer, .jd-modal) :where(img, video) {
	display: block;
	max-width: 100%;
	height: auto;
}

.jd-body :where(.jd-main, .jd-header, .jd-footer, .jd-drawer, .jd-modal) a {
	color: inherit;
	text-decoration: none;
}

.jd-body :where(.jd-main, .jd-header, .jd-footer, .jd-drawer, .jd-modal) button {
	font: inherit;
	border: none;
	background: none;
	cursor: pointer;
	color: inherit;
}

.jd-body :where(button, a, input, textarea, select):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.jd-body :where(.jd-header, .jd-main, .jd-footer, .jd-drawer, .jd-modal) :where(ol, ul) {
	list-style: none;
}

[hidden] {
	display: none !important;
}

.jd-skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 2000;
	padding: 12px 18px;
	background: var(--jd-black);
	color: var(--jd-white);
	font-weight: 600;
}

.jd-skip-link:focus {
	top: calc(var(--jd-admin-bar) + 8px);
}

.jd-container {
	width: 100%;
	max-width: 1360px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--jd-container-pad);
	padding-right: var(--jd-container-pad);
}

.jd-serif {
	font-family: var(--jd-font-serif);
}

.jd-italic {
	font-style: italic;
}

.jd-mt-6 {
	margin-top: 6px;
}

.jd-mt-10 {
	margin-top: 10px;
}

.jd-mt-12 {
	margin-top: 12px;
}

.jd-mb-36 {
	margin-bottom: 36px;
}

.jd-eyebrow {
	display: inline-block;
	font-family: var(--jd-font-sans);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--jd-gray-muted);
}

.jd-eyebrow-dark {
	color: rgba(255, 255, 255, 0.65);
}

.jd-title-lg {
	font-family: var(--jd-font-serif);
	font-size: clamp(2.4rem, 5.5vw, 4.5rem);
	line-height: 1.05;
	font-weight: 400;
	text-wrap: balance;
}

.jd-title-md {
	font-family: var(--jd-font-serif);
	font-size: clamp(1.9rem, 3.8vw, 3.2rem);
	line-height: 1.1;
	font-weight: 400;
	text-wrap: balance;
}

.jd-touch-target {
	min-height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Boutons */
.jd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 28px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	white-space: nowrap;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.jd-btn:active {
	transform: scale(0.98);
}

.jd-body .jd-btn-primary {
	background-color: var(--jd-white);
	color: var(--jd-black);
	border: 1px solid var(--jd-white);
}

.jd-body .jd-btn-primary:hover {
	background-color: var(--jd-black);
	color: var(--jd-white);
}

.jd-body .jd-btn-outline {
	background-color: transparent;
	color: var(--jd-white);
	border: 1px solid var(--jd-white);
}

.jd-body .jd-btn-outline:hover {
	background-color: var(--jd-white);
	color: var(--jd-black);
}

.jd-body .jd-btn-black {
	background-color: var(--jd-black);
	color: var(--jd-white);
	border: 1px solid var(--jd-black);
}

.jd-body .jd-btn-black:hover {
	background-color: var(--jd-white);
	color: var(--jd-black);
}

.jd-body .jd-btn-black-outline {
	background-color: transparent;
	color: var(--jd-black);
	border: 1px solid var(--jd-black);
}

.jd-body .jd-btn-black-outline:hover {
	background-color: var(--jd-black);
	color: var(--jd-white);
}

.jd-btn-block {
	width: 100%;
}

/* Bloc neutre à la place d'une image absente */
.jd-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background:
		radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 60%),
		var(--jd-sand);
	color: rgba(17, 17, 17, 0.55);
	font-family: var(--jd-font-serif);
	font-style: italic;
	font-size: 15px;
	text-align: center;
	line-height: 1.2;
}

/* ------------------------------------------------------------------ */
/* 1. En-tête                                                          */
/* ------------------------------------------------------------------ */

.jd-header {
	position: sticky;
	top: var(--jd-admin-bar);
	left: 0;
	z-index: 100;
	width: 100%;
	height: var(--jd-header-height);
	background-color: var(--jd-white);
	border-bottom: var(--jd-border-black);
	color: var(--jd-black);
	transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.jd-header-inner {
	height: 100%;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
}

.jd-header-left {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.jd-burger-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.jd-burger-icon {
	width: 22px;
	height: 14px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.jd-burger-icon span {
	display: block;
	height: 1.5px;
	width: 100%;
	background-color: currentColor;
}

@media (max-width: 420px) {
	.jd-burger-label {
		display: none;
	}
}

.jd-nav-desktop {
	display: none;
	align-items: center;
	gap: 20px;
	white-space: nowrap;
}

.jd-nav-desktop a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: inherit;
}

.jd-nav-desktop a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 8px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}

.jd-nav-desktop a:hover::after,
.jd-nav-desktop a.jd-active::after {
	transform: scaleX(1);
}

.jd-header-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	text-align: center;
	color: inherit;
}

.jd-header-logo {
	display: block;
	width: auto;
	height: var(--cwc-logo-h);
	max-width: 100%;
	max-height: 100%;
	transition: height 0.35s ease;
}

/* Deux images dans le lien, une seule visible : la claire par-dessus le
   héros transparent (.jd-header--over), la principale partout ailleurs
   (classe absente dès l'en-tête opaque ou sur les autres types de page). */
.jd-header-logo--light {
	display: none;
}

.jd-header--over .jd-header-logo--main {
	display: none;
}

.jd-header--over .jd-header-logo--light {
	display: block;
}

.jd-logo-text-main {
	font-weight: 700;
	font-size: 19px;
	letter-spacing: 0.28em;
	line-height: 1;
	transform: translateX(0.14em);
}

.jd-logo-text-sub {
	font-family: var(--jd-font-serif);
	font-style: italic;
	font-size: 14px;
	letter-spacing: 0.08em;
	line-height: 1;
	margin-top: 2px;
}

.jd-header-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.jd-header-phone {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 4px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: inherit;
	white-space: nowrap;
}

.jd-body .jd-header-cta {
	display: none;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid currentColor;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: inherit;
	white-space: nowrap;
	transition: background-color 0.25s, color 0.25s;
}

.jd-body .jd-header-cta:hover {
	background: var(--jd-black);
	color: var(--jd-white);
	border-color: var(--jd-black);
}

.jd-icon-btn {
	color: inherit;
	border-radius: 50%;
}

.jd-cart-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 999px;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
}

.jd-body .jd-cart-btn {
	border: 1px solid rgba(127, 127, 127, 0.35);
}

.jd-cart-btn:hover {
	background-color: rgba(127, 127, 127, 0.12);
}

.jd-cart-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background-color: var(--jd-black);
	color: var(--jd-white);
	font-size: 13px;
	font-weight: 700;
}

@media (min-width: 768px) {
	.jd-body .jd-header-cta {
		display: inline-flex;
	}
}

@media (min-width: 1200px) {
	.jd-nav-desktop {
		display: flex;
	}

	.jd-burger-btn {
		display: none;
	}
}

@media (min-width: 1280px) {
	.jd-header-phone {
		display: inline-flex;
	}
}

/* Transparent par-dessus le héros */
.jd-header--over {
	background-color: transparent;
	border-bottom-color: rgba(255, 255, 255, 0.25);
	color: var(--jd-white);
}

.jd-body .jd-header--over .jd-cart-btn {
	border-color: rgba(255, 255, 255, 0.45);
}

.jd-header--over .jd-cart-count {
	background: var(--jd-white);
	color: var(--jd-black);
}

.jd-body .jd-header--over .jd-header-cta:hover {
	background: var(--jd-white);
	color: var(--jd-black);
	border-color: var(--jd-white);
}

.jd-header--solid:not(.jd-header--over) {
	box-shadow: 0 6px 24px rgba(17, 17, 17, 0.06);
	--cwc-logo-h: 30px;
}

@media (min-width: 768px) {
	.jd-header--solid:not(.jd-header--over) {
		--cwc-logo-h: 36px;
	}
}

.jd-header--hidden {
	transform: translateY(calc(-100% - var(--jd-admin-bar)));
}

/* ------------------------------------------------------------------ */
/* 9. Pied de page                                                     */
/* ------------------------------------------------------------------ */

.jd-footer {
	padding: clamp(60px, 8vw, 110px) 0 40px;
	background-color: var(--jd-black);
	color: var(--jd-white);
}

.jd-footer-top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
	padding-bottom: 60px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 992px) {
	.jd-footer-top {
		grid-template-columns: 1.2fr 0.8fr;
		gap: 80px;
	}
}

.jd-footer-cta-title {
	margin-bottom: 22px;
	font-family: var(--jd-font-serif);
	font-size: clamp(2.3rem, 4.8vw, 4rem);
	line-height: 1.08;
	font-weight: 400;
	text-wrap: balance;
}

.jd-footer-cta-desc {
	max-width: 460px;
	margin-bottom: 32px;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.75);
}

.jd-footer-contact-block {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.jd-contact-item-title {
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

.jd-contact-item-val {
	font-size: 16px;
	font-style: normal;
	line-height: 1.5;
}

.jd-contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.jd-contact-links a,
.jd-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 15px;
}

.jd-contact-links a:hover,
.jd-footer-links a:hover {
	text-decoration: underline;
}

.jd-social-links {
	display: flex;
	gap: 16px;
	margin-top: 8px;
}

.jd-body .jd-social-link {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: var(--jd-white);
	transition: all 0.2s;
}

.jd-body .jd-social-link:hover {
	background-color: var(--jd-white);
	color: var(--jd-black);
}

.jd-footer-bottom {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	padding-top: 24px;
	font-size: 15px;
	color: rgba(255, 255, 255, 0.6);
	text-align: center;
}

.jd-footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 20px;
}

.jd-footer-links a {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.75);
}

@media (min-width: 768px) {
	.jd-footer-bottom {
		flex-direction: row;
		justify-content: space-between;
		text-align: left;
	}
}

/* ------------------------------------------------------------------ */
/* 10. Tiroirs et modale                                               */
/* ------------------------------------------------------------------ */

.jd-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
	visibility: hidden;
	transition: visibility 0.3s;
}

/* À l'ouverture, visible immédiatement (le focus y est placé aussitôt) ;
   la transition de visibilité ne sert qu'à la fermeture. */
.jd-drawer.jd-open {
	visibility: visible;
	transition: none;
}

.jd-drawer-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.3s;
}

.jd-drawer.jd-open .jd-drawer-overlay {
	opacity: 1;
}

.jd-drawer-panel {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 88%;
	max-width: 400px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
	overflow-y: auto;
	background-color: var(--jd-white);
	color: var(--jd-black);
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	transition: transform 0.3s ease;
}

.jd-drawer-left .jd-drawer-panel {
	left: 0;
	border-right: var(--jd-border-black);
	transform: translateX(-100%);
}

.jd-drawer-right .jd-drawer-panel {
	right: 0;
	border-left: var(--jd-border-black);
	transform: translateX(100%);
	justify-content: flex-start;
}

.jd-drawer.jd-open .jd-drawer-panel {
	transform: translateX(0);
}

.jd-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 14px;
	border-bottom: var(--jd-border-black);
}

.jd-drawer-title {
	font-size: 22px;
}

.jd-body .jd-drawer-close {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
}

.jd-drawer-nav {
	display: flex;
	flex-direction: column;
}

.jd-drawer-nav a {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-family: var(--jd-font-serif);
	font-size: 24px;
	color: var(--jd-black);
}

.jd-drawer-nav a.jd-drawer-sub {
	padding-left: 16px;
	font-family: var(--jd-font-sans);
	font-size: 15px;
	color: #444444;
}

.jd-drawer-nav a:hover {
	font-style: italic;
}

.jd-drawer-contact {
	padding-top: 16px;
	border-top: var(--jd-border-black);
	font-size: 15px;
	line-height: 1.5;
	color: #444444;
}

.jd-drawer-contact p {
	margin: 6px 0 2px;
}

.jd-drawer-contact a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-right: 16px;
	font-weight: 600;
	color: var(--jd-black);
}

/* Mini-panier WooCommerce dans le tiroir */
.jd-mini-cart {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.jd-mini-cart .cart_list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
}

.jd-mini-cart .mini_cart_item {
	position: relative;
	display: block;
	min-height: 64px;
	padding: 0 40px 14px 76px;
	border-bottom: 1px solid rgba(17, 17, 17, 0.1);
	font-size: 15px;
	line-height: 1.35;
}

.jd-mini-cart .mini_cart_item a:not(.remove) {
	display: block;
	font-family: var(--jd-font-serif);
	font-style: italic;
	font-size: 16px;
}

.jd-mini-cart .mini_cart_item img {
	position: absolute;
	left: 0;
	top: 0;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	background: var(--jd-sand);
}

.jd-mini-cart .mini_cart_item .quantity {
	display: block;
	margin-top: 4px;
	font-weight: 700;
}

.jd-mini-cart .remove {
	position: absolute;
	top: -8px;
	right: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: var(--jd-gray-muted);
}

.jd-mini-cart .remove:hover {
	color: var(--jd-black);
}

.jd-mini-cart .empty,
.jd-mini-cart .woocommerce-mini-cart__empty-message {
	padding: 24px 0;
	color: var(--jd-gray-muted);
}

.jd-mini-cart .total {
	display: flex;
	justify-content: space-between;
	margin: 18px 0 14px;
	padding-top: 16px;
	border-top: var(--jd-border-black);
	font-size: 16px;
	font-weight: 700;
}

.jd-mini-cart .buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.jd-mini-cart .buttons .button {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 20px;
	border: var(--jd-border-black);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.jd-mini-cart .buttons .checkout {
	background: var(--jd-black);
	color: var(--jd-white);
}

.jd-cart-note {
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--jd-gray-muted);
}

.jd-cart-note a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 700;
	color: var(--jd-black);
	text-decoration: underline;
}

/* Modale (fenêtre de dialogue) */
.jd-modal {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s, visibility 0.25s;
}

.jd-modal.jd-open {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.25s;
}

.jd-modal-backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
}

.jd-modal-dialog {
	position: relative;
	z-index: 10;
	width: 100%;
	transform: translateY(20px);
	transition: transform 0.25s ease;
}

.jd-modal.jd-open .jd-modal-dialog {
	transform: translateY(0);
}

.jd-body .jd-modal-close-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 30;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--jd-black);
	font-size: 20px;
}

/* Notification */
.jd-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 2000;
	max-width: calc(100vw - 32px);
	padding: 12px 24px;
	border-radius: 999px;
	background-color: var(--jd-black);
	color: var(--jd-white);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.04em;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%) translateY(100px);
	transition: transform 0.3s ease, opacity 0.3s;
}

.jd-toast.jd-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}


/* ------------------------------------------------------------------ */
/* Mouvement réduit                                                    */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.jd-header,
	.jd-drawer,
	.jd-drawer-panel,
	.jd-modal,
	.jd-modal-dialog {
		transition: none !important;
	}
}
