/**
 * Debout Malgré Tout – système visuel 1.0
 * Couche non destructive compatible ConsultStreet / Architect Hub,
 * Gutenberg, Contact Form 7 et WooCommerce.
 */

:root {
	--dmt-navy: #102a43;
	--dmt-navy-deep: #081d30;
	--dmt-blue: #1778b5;
	--dmt-blue-dark: #0d5f94;
	--dmt-sky: #eaf5fb;
	--dmt-ice: #f5f9fc;
	--dmt-white: #ffffff;
	--dmt-text: #263746;
	--dmt-muted: #617382;
	--dmt-border: #d7e4ec;
	--dmt-focus: #ffbf47;
	--dmt-success: #16794b;
	--dmt-radius-sm: 8px;
	--dmt-radius: 16px;
	--dmt-radius-lg: 24px;
	--dmt-shadow: 0 12px 34px rgba(16, 42, 67, 0.10);
	--dmt-shadow-hover: 0 18px 42px rgba(16, 42, 67, 0.16);
	--dmt-content: 1180px;
	--dmt-reading: 760px;
}

html {
	scroll-behavior: smooth;
	text-size-adjust: 100%;
}

body {
	color: var(--dmt-text);
	background: var(--dmt-white);
	font-size: 17px;
	line-height: 1.72;
	-webkit-font-smoothing: antialiased;
}

body a {
	color: var(--dmt-blue-dark);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

body a:hover {
	color: var(--dmt-navy);
}

body :where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--dmt-focus) !important;
	outline-offset: 3px;
}

body :where(h1, h2, h3, h4, h5, h6) {
	color: var(--dmt-navy);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.018em;
}

body h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
body h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
body h3 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }

body p,
body li {
	max-width: 75ch;
}

body img {
	height: auto;
}

/* Conteneurs et rythme vertical */
body :where(.container, .wp-block-group__inner-container) {
	max-width: var(--dmt-content);
}

body .site-content,
body .theme-page-wrapper,
body main {
	overflow: clip;
}

body .entry-content > :where(.wp-block-group, .wp-block-cover, .wp-block-columns) {
	margin-block: clamp(2.5rem, 6vw, 6rem);
}

body .entry-content > :where(h2, h3) {
	margin-top: clamp(2.3rem, 5vw, 4.5rem);
}

body .entry-content > :where(p, ul, ol, blockquote) {
	margin-bottom: 1.25rem;
}

/* En-tête et navigation */
body .theme-header-topbar {
	background: var(--dmt-navy-deep);
}

body .theme-header,
body .navbar-area,
body .theme-menu-area {
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 5px 24px rgba(8, 29, 48, 0.08);
}

body .navbar-brand img,
body .custom-logo {
	max-height: 76px;
	width: auto;
}

body .navbar-nav .menu-item > a {
	color: var(--dmt-navy);
	font-weight: 650;
	letter-spacing: 0.01em;
}

body .navbar-nav .current-menu-item > a,
body .navbar-nav .menu-item > a:hover {
	color: var(--dmt-blue);
}

/* Bandeau intérieur */
body .theme-page-header-area,
body .page-header {
	position: relative;
	background-color: var(--dmt-navy);
}

body .theme-page-header-area::before,
body .page-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, rgba(8, 29, 48, 0.94), rgba(23, 120, 181, 0.74));
	pointer-events: none;
}

body .theme-page-header-area .container,
body .page-header .container {
	position: relative;
}

body .theme-page-header-area :where(h1, .page-title, a, li),
body .page-header :where(h1, .page-title, a, li) {
	color: var(--dmt-white);
}

/* Boutons */
body :where(.wp-block-button__link, .theme-btn, .btn, button, input[type="submit"], .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button) {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.72rem 1.35rem;
	border: 2px solid var(--dmt-blue);
	border-radius: 999px;
	background: var(--dmt-blue);
	color: var(--dmt-white) !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 7px 18px rgba(23, 120, 181, 0.20);
	transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

body :where(.wp-block-button__link, .theme-btn, .btn, button, input[type="submit"], .button):hover {
	transform: translateY(-2px);
	border-color: var(--dmt-blue-dark);
	background: var(--dmt-blue-dark);
	box-shadow: 0 10px 24px rgba(23, 120, 181, 0.28);
}

body .is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--dmt-blue-dark) !important;
}

body .is-style-outline > .wp-block-button__link:hover {
	background: var(--dmt-blue-dark);
	color: var(--dmt-white) !important;
}

/* Cartes et colonnes éditoriales */
body .entry-content .wp-block-columns {
	gap: clamp(1.25rem, 3vw, 2.2rem);
}

body .entry-content .wp-block-column:has(> h3),
body .entry-content .wp-block-group.is-style-dmt-card,
body .dmt-card {
	padding: clamp(1.4rem, 3vw, 2rem);
	border: 1px solid var(--dmt-border);
	border-radius: var(--dmt-radius);
	background: var(--dmt-white);
	box-shadow: var(--dmt-shadow);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

body .entry-content .wp-block-column:has(> h3):hover,
body .dmt-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--dmt-shadow-hover);
}

body blockquote,
body .wp-block-quote {
	margin-inline: 0;
	padding: clamp(1.4rem, 3vw, 2.2rem);
	border: 0;
	border-left: 6px solid var(--dmt-blue);
	border-radius: 0 var(--dmt-radius) var(--dmt-radius) 0;
	background: var(--dmt-sky);
	color: var(--dmt-navy);
	font-size: clamp(1.15rem, 2.2vw, 1.5rem);
	font-style: italic;
}

body .wp-block-separator {
	border-color: var(--dmt-border);
	opacity: 1;
}

/* Images */
body .entry-content :where(.wp-block-image img, .wp-block-media-text__media img) {
	border-radius: var(--dmt-radius);
	box-shadow: var(--dmt-shadow);
}

body figure figcaption {
	color: var(--dmt-muted);
	font-size: 0.875rem;
}

/* Pages prioritaires */
body:is(.dmt-page-home, .dmt-page-book, .dmt-page-conferences, .dmt-page-contact) .entry-content > .wp-block-cover:first-child,
body:is(.dmt-page-home, .dmt-page-book, .dmt-page-conferences, .dmt-page-contact) .entry-content > .wp-block-group:first-child {
	margin-top: 0;
	padding-block: clamp(4rem, 9vw, 8rem);
}

body.dmt-page-book .entry-content img[alt*="Couverture" i],
body.dmt-page-book .entry-content img[alt*="livre" i] {
	filter: drop-shadow(0 24px 24px rgba(8, 29, 48, 0.22));
}

body.dmt-page-conferences .entry-content :where(table, .wp-block-table),
body.dmt-page-book .entry-content :where(table, .wp-block-table) {
	border-radius: var(--dmt-radius);
	overflow: hidden;
	box-shadow: var(--dmt-shadow);
}

body.dmt-page-contact .wpcf7,
body.dmt-page-contact .wpforms-container {
	max-width: 820px;
	padding: clamp(1.4rem, 4vw, 2.6rem);
	border: 1px solid var(--dmt-border);
	border-radius: var(--dmt-radius-lg);
	background: var(--dmt-ice);
}

/* Formulaires */
body :where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="search"], textarea, select) {
	width: 100%;
	min-height: 48px;
	padding: 0.75rem 0.9rem;
	border: 1px solid #aabdc9;
	border-radius: var(--dmt-radius-sm);
	background: var(--dmt-white);
	color: var(--dmt-text);
	font: inherit;
}

body textarea {
	min-height: 160px;
	resize: vertical;
}

body :where(label, .wpforms-field-label) {
	color: var(--dmt-navy);
	font-weight: 700;
}

body .wpcf7 form .wpcf7-response-output {
	margin-inline: 0;
	padding: 0.9rem 1rem;
	border-radius: var(--dmt-radius-sm);
}

/* Journal */
body :where(.post, .theme-blog .post) {
	border-radius: var(--dmt-radius);
}

body .theme-blog .post,
body .wp-block-post-template > li {
	border: 1px solid var(--dmt-border);
	background: var(--dmt-white);
	box-shadow: var(--dmt-shadow);
	overflow: hidden;
}

body.single-post .entry-content {
	font-size: 1.075rem;
}

body.single-post .entry-content > :where(p, h2, h3, ul, ol, blockquote) {
	max-width: var(--dmt-reading);
	margin-inline: auto;
}

/* WooCommerce */
body.woocommerce-page .woocommerce,
body.dmt-page-shop .woocommerce {
	max-width: var(--dmt-content);
	margin-inline: auto;
}

body .woocommerce ul.products li.product,
body .wc-block-grid__product {
	padding: 1rem;
	border: 1px solid var(--dmt-border);
	border-radius: var(--dmt-radius);
	background: var(--dmt-white);
	box-shadow: var(--dmt-shadow);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

body .woocommerce ul.products li.product:hover,
body .wc-block-grid__product:hover {
	transform: translateY(-4px);
	box-shadow: var(--dmt-shadow-hover);
}

body .woocommerce ul.products li.product img,
body .woocommerce div.product div.images img {
	border-radius: var(--dmt-radius-sm);
}

body .woocommerce div.product p.price,
body .woocommerce div.product span.price,
body .woocommerce ul.products li.product .price {
	color: var(--dmt-blue-dark);
	font-weight: 800;
}

body .woocommerce-message,
body .woocommerce-info {
	border-top-color: var(--dmt-blue);
	background: var(--dmt-sky);
}

body .woocommerce-error {
	border-top-color: #a12622;
}

body .woocommerce table.shop_table {
	border-color: var(--dmt-border);
	border-radius: var(--dmt-radius);
	overflow: hidden;
}

/* Pied de page */
body .theme-footer,
body footer.site-footer {
	background: var(--dmt-navy-deep);
	color: #d8e7f0;
}

body .theme-footer :where(h2, h3, h4, .widget-title),
body footer.site-footer :where(h2, h3, h4, .widget-title) {
	color: var(--dmt-white);
}

body .theme-footer a,
body footer.site-footer a {
	color: #d8e7f0;
}

body .theme-footer a:hover,
body footer.site-footer a:hover {
	color: var(--dmt-white);
	text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
	body {
		font-size: 16px;
	}

	body .navbar-brand img,
	body .custom-logo {
		max-height: 62px;
	}

	body .entry-content .wp-block-columns:not(.is-not-stacked-on-mobile) {
		gap: 1.25rem;
	}
}

@media (max-width: 600px) {
	body h1 { font-size: clamp(2.25rem, 12vw, 3.25rem); }
	body h2 { font-size: clamp(1.75rem, 9vw, 2.4rem); }

	body :where(.wp-block-button, .wp-block-button__link, .theme-btn, .btn, input[type="submit"]) {
		width: 100%;
	}

	body .entry-content .wp-block-column:has(> h3),
	body .dmt-card {
		padding: 1.25rem;
	}
}

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

@media print {
	body .theme-header,
	body .theme-footer,
	body .navbar-area,
	body .woocommerce-cart-form .actions {
		display: none !important;
	}

	body,
	body * {
		color: #000 !important;
		background: #fff !important;
		box-shadow: none !important;
	}
}

