/* ==========================================================================
   Fiche produit — mise en forme IMPRESSION (19/10/2026)
   Chargée en media="print" par tous les gabarits product_claude, _test, _disque, _machine, _maquette (product.twig,
   product_outil.twig, product_machine.twig, product_rental.twig).
   Compagnon : product-print.js (en-tête imprimé, FAQ dépliée, images lazy,
   colonnes quantité/panier marquées .dvp-hide).
   Une page A4 = ~718 px CSS → Bootstrap passe en mise en page xs : le hero est
   reconstruit ici en 2 colonnes (photo / titre + caractéristiques).
   ========================================================================== */
@media print {
	/* Marges de page à 0 : Chrome n'a plus de place pour SES en-têtes/pieds (titre, URL, date,
	   « 1 sur 5 ») même si l'option est cochée. Les marges sont recréées par le padding du body,
	   répété sur chaque feuille (box-decoration-break: clone), et le pied .dvp-foot (position
	   fixed = répété sur chaque feuille) porte l'adresse. */
	@page { size: A4 portrait; margin: 0; }

	html, body { background: #fff !important; color: #1e2d3d !important; width: auto !important; min-width: 0 !important; }
	body {
		font-size: 10.5pt; line-height: 1.4; margin: 0 !important;
		padding: 11mm 10mm 17mm !important;
		-webkit-box-decoration-break: clone; box-decoration-break: clone;
	}
	.dvp-foot {
		display: block !important; position: fixed; left: 10mm; right: 10mm; bottom: 6mm;
		border-top: 0.5pt solid #ccc; padding-top: 2mm;
		font: 7pt/1.3 sans-serif; color: #666; text-align: center;
	}
	*, *::before, *::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
	#product-page, #product-page *, .dvp-head, .dvp-head * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	a[href]::after, abbr[title]::after { content: none !important; }
	a { color: inherit !important; }

	/* ---- Chrome du site et éléments interactifs ---- */
	.top-header, body > header, footer, #column-left, .carousel-category-block,
	#gallery-thumbs, #prevButton, #nextButton, .modal, .modal-backdrop,
	#button-request-information, #desc-videos-block, #videoModal, .related-products-block,
	#dv-mpack, #order-add-cart, #order-add-cart-btn, #product-page input[type="number"], #dv-sheet-overlay, .dv-selbtn, .btn-addcart, .vp-act, .qty-group, .btn-qty,
	.faq-icon, .dvp-hide, [id*="smartsupp"], [class*="smartsupp"], [id^="cookiefirst"], [class*="cookiefirst"],
	#chat-application, .whatsapp-float, iframe, video, .video-js, #back-top, .back-to-top,
	button.carousel-cat-btn, .elevatezoom-gallery + .zoomContainer, .zoomContainer,
	img[data-src]:not(.lazyloaded):not(.dvp-loaded) {
		display: none !important;
	}

	/* ---- En-tête imprimé (construit par product-print.js) ---- */
	.dvp-head {
		display: flex !important; align-items: center; justify-content: space-between; gap: 12px;
		border-bottom: 2px solid #fbb81b; padding: 0 0 6px; margin: 0;
	}
	.dvp-head img { height: 62px; width: auto; }
	.dvp-head .dvp-co { text-align: right; font-size: 9pt; line-height: 1.4; color: #1e2d3d; }
	.dvp-head .dvp-co strong { font-size: 12pt; }
	.dvp-head .dvp-date { font-size: 8pt; color: #666; }
	/* URL de la fiche : ligne sous l'en-tête */
	.dvp-url { display: block !important; font-size: 7.5pt; color: #666; word-break: break-all; margin: 3px 0 10px; }
	.dvp-url strong { color: #1e2d3d; }

	/* ---- Gabarit pleine largeur ---- */
	#product-page { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
	#product-page > .row { margin: 0 !important; }
	#content { width: 100% !important; float: none !important; padding: 0 !important; }
	/* fil d'Ariane = navigation écran, remplacé sur papier par la ligne « Fiche en ligne » */
	.dvd-crumb, .breadcrumb { display: none !important; }
	.dvq-fx-see { display: none !important; } /* « Voir la photo » : lien écran */

	/* ---- Hero : photo à gauche, titre + infos à droite ---- */
	.product-body-row { display: flex !important; align-items: flex-start; gap: 14px; margin: 0 0 8px !important; break-inside: avoid; }
	.product-body-row::before, .product-body-row::after { display: none !important; }
	.product-body-row > .product-gallery-col { flex: 0 0 34%; max-width: 34%; width: auto !important; float: none !important; padding: 0 !important; }
	.product-body-row > .col-sm-7 { flex: 1 1 auto; width: auto !important; float: none !important; padding: 0 !important; min-width: 0; }
	.gallery-main-wrap, .gallery-main-wrap .thumbnail { border: 1px solid #e5e7eb !important; padding: 4px !important; margin: 0 !important; }
	#main-product-image, .gallery-main-wrap img { max-height: 230px !important; width: auto !important; max-width: 100% !important; margin: 0 auto; display: block; }
	h1, .product-main-title { font-size: 15pt !important; line-height: 1.25 !important; margin: 0 0 6px !important; }
	.hmq-lead, .hmq-lead p { font-size: 10pt !important; margin-bottom: 4px !important; }

	/* Cartes Matériaux / Machines / Fixation / Mode d'utilisation */
	.dvq-tech { break-inside: avoid; margin-top: 8px !important; }
	.dvq-tech-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dvq-tech-row .dvq-col { border-left: 0 !important; border-bottom: 1px solid #e3e6e9; }
	.dvq-tech-row .dvq-col:nth-child(even of .dvq-col) { border-left: 1px solid #e3e6e9 !important; }
	.dvq-tech .dvq-h { padding: 4px !important; min-height: 0 !important; }
	.dvq-tech .dvq-b > div { padding: 5px 4px !important; gap: 2px 8px !important; }
	.dvq-tech .dvq-b img { max-height: 32px !important; max-width: 32px !important; margin-bottom: 2px !important; }
	.dvq-tech .dvq-b span { font-size: 7.5pt !important; }
	/* miniatures : display:flex!important en ligne → masquées par la hauteur */
	#product-page #gallery-thumbs { height: 0 !important; overflow: hidden !important; visibility: hidden !important; margin: 0 !important; }
	.gallery-main-wrap { height: auto !important; min-height: 0 !important; }

	/* ---- Description ---- */
	h2, h3, h4, .dvq-h, summary { break-after: avoid; page-break-after: avoid; }
	p, li { orphans: 3; widows: 3; }
	img { max-width: 100% !important; break-inside: avoid; }
	table { break-inside: auto; }
	thead { display: table-header-group; }
	tr, .faq-item, .dv-fiche [class*="box"], .dv-fiche [class*="alert"], .dv-fiche [class*="note"] { break-inside: avoid; page-break-inside: avoid; }
	#tab-description, .dv-fw-details { border: 0 !important; padding: 0 !important; margin: 12px 0 0 !important; }
	.description-images > div { width: 100% !important; float: none !important; break-inside: avoid; display: flex !important; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
	.description-images > div::before, .description-images > div::after { display: none !important; }
	.description-images .visible-xs { display: none !important; }
	.description-images .hidden-xs { display: block !important; flex: 0 0 28%; width: auto !important; float: none !important; padding: 0 !important; }
	.description-images .col-xs-8 { flex: 1 1 auto; width: auto !important; float: none !important; padding: 0 !important; }
	.description-images h3 { margin-top: 0 !important; font-size: 12pt !important; }

	/* ---- Tarifs et disponibilités ---- */
	#variants-section { break-before: auto; margin-top: 12px !important; }
	#variants-section .table-responsive { overflow: visible !important; border: 0 !important; width: 100% !important; }
	#variants-section table { width: 100% !important; font-size: 8.5pt !important; }
	#variants-section th, #variants-section td { padding: 4px 5px !important; }
	#variants-section .vp-col-machine { display: table-cell !important; }
	#variants-section .mpq-chip { border: 1px solid #fbb81b !important; background: #fff8e1 !important; padding: 1px 5px !important; font-size: 8pt !important; white-space: normal !important; }

	/* ---- FAQ : NON imprimée (décision Nico 19/10/2026) ---- */
	.product-faq { display: none !important; }

	/* ---- Ordre de lecture papier : TARIFS juste après le haut de fiche ---- */
	#content { display: flex !important; flex-direction: column; }
	#content > .product-body-row ~ * { order: 2; }
	#content > .product-body-row ~ *:has(#variants-section) { order: 1; }
	#content > .dvp-note { order: 3; }
	#variants-section td:first-child > div { display: none !important; } /* libellé long répété sous la référence */

	/* ---- Description : plus dense ---- */
	#description-view p, #description-view li, #description-view td, #description-view th { font-size: 9.5pt !important; line-height: 1.45 !important; }
	#description-view p { margin: 0 0 5px !important; }
	#description-view h2 { font-size: 13pt !important; line-height: 1.3 !important; margin: 12px 0 5px !important; }
	#description-view h3 { font-size: 11pt !important; line-height: 1.3 !important; margin: 10px 0 4px !important; padding-bottom: 2px !important; }
	#description-view li { padding-top: 2px !important; padding-bottom: 2px !important; }
	#description-view td, #description-view th { padding: 4px 7px !important; }
	#description-view .dv-specs > * { padding: 4px 8px !important; font-size: 9.5pt !important; line-height: 1.4 !important; }
	.description-images > div { min-height: 0 !important; }
	#variants-section { break-inside: avoid; } /* titre « Tarifs » jamais isolé de son tableau */
	#content:has(#variants-section table) #box-commander-test { display: none !important; } /* prix déjà dans le tableau */
	#description-view .dv-cards { gap: 8px !important; break-inside: avoid; }
	#description-view .dv-card { padding: 7px 10px !important; break-inside: avoid; }
	/* liens internes : non cliquables sur papier → texte normal, sans soulignement */
	#description-view a:not(.dv-cta), .faq-answer a { text-decoration: none !important; color: inherit !important; font-weight: 600; }
	/* boutons d'appel à l'action → simple lien */
	#description-view .dv-cta, #description-view a[class*="btn"] { background: none !important; border: 0 !important; padding: 0 !important; color: #1e2d3d !important; text-decoration: underline !important; font-weight: 700; display: inline !important; }

	/* ---- Économie d'encre : bandeaux et en-têtes sombres → clairs ---- */
	.dv-fw-details > div:first-child { background: none !important; border-bottom: 2px solid #fbb81b; padding: 2px 0 4px !important; }
	.dv-fw-details > div:first-child h2 { color: #1e2d3d !important; font-size: 11pt !important; }
	#product-page thead tr, #product-page thead th, #description-view th { background: #eef1f5 !important; color: #1e2d3d !important; }
}
