/*
 * Page Nos formats (maquette docs/maquettes/formats.html), mobile d'abord. Styles limités à
 * .vitrine-formats ; le simulateur (simulateur.css) et les questions (faq-liste.css) sont partagés.
 */

/* ---------- Rythme des sections et interligne (celui de la maquette ; le simulateur garde le sien) ---------- */
.vitrine-formats {
	line-height: 1.55;
}

.vitrine-formats #devis {
	line-height: normal;
}

.vitrine-formats .mfaj-section {
	padding-top: 72px;
}

.vitrine-formats.contenu {
	padding-bottom: 72px;
}

@media (min-width: 960px) {
	.vitrine-formats .mfaj-section {
		padding-top: var(--space-section);
	}

	.vitrine-formats.contenu {
		padding-bottom: var(--space-section);
	}
}

.vitrine-formats h1,
.vitrine-formats h2,
.vitrine-formats h3 {
	text-wrap: balance;
}

.vitrine-formats .mfaj-titre {
	color: var(--encre);
}

.vitrine-formats .mfaj-entete-section {
	margin-bottom: var(--space-2xl);
}

.vitrine-formats .mfaj-entete-section .mfaj-btn {
	flex: none;
}

.vitrine-formats .fm-sous {
	margin: 16px 0 0;
	max-width: var(--texte-max);
	font-size: 17px;
	line-height: 1.6;
	color: var(--encre-2);
}

/* ---------- 1. Introduction ---------- */
.fm-intro {
	display: grid;
	gap: 28px 40px;
	padding-top: 32px;
}

.fm-intro .mfaj-titre {
	font-size: clamp(35px, 5vw, 68px);
}

.fm-guide {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: grid;
	gap: 12px;
	max-width: var(--texte-max);
}

.fm-guide li {
	position: relative;
	padding-left: 22px;
	font-size: 16.5px;
	line-height: 1.6;
	color: var(--encre-2);
}

.fm-guide li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: 0.6em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--d);
}

.fm-guide strong,
.fm-guide b {
	color: var(--encre);
	font-weight: 600;
}

.vitrine-formats .fm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
}

.fm-intro .fm-actions .mfaj-btn {
	flex: 1 1 auto;
}

@media (min-width: 480px) {
	.fm-intro .fm-actions .mfaj-btn {
		flex: 0 0 auto;
	}
}

.fm-points {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	font-size: 14.5px;
	font-weight: 500;
	color: var(--encre-2);
}

.fm-points li {
	display: flex;
	align-items: center;
	gap: 9px;
}

.fm-points li::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--d);
}

@media (min-width: 960px) {
	.fm-intro {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
		align-items: end;
		gap: 36px 56px;
		padding-top: 56px;
	}

	.fm-intro__titre {
		grid-column: 1 / -1;
	}

	.fm-intro__corps {
		align-self: end;
	}
}

/* Étagère : les quatre journaux à l'échelle */
.fm-etagere {
	--u: clamp(0.25px, 0.07vw, 0.5px);
	--g: clamp(10px, 1.8vw, 22px);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: var(--g);
	padding-top: 20px;
}

.fm-etagere figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}

.fm-etagere figcaption {
	align-self: stretch;
	margin-inline: calc(var(--g) / -2);
	padding: 10px 4px 0;
	border-top: 2px solid var(--encre);
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--encre);
	line-height: 1.35;
}

.fm-etagere figure:first-child figcaption {
	margin-left: calc(var(--g) * -1);
}

.fm-etagere figure:last-child figcaption {
	margin-right: calc(var(--g) * -1);
}

.fm-etagere figcaption span {
	display: block;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: none;
	font-size: 12px;
	color: var(--encre-3);
}

.fm-etagere .jr {
	margin-bottom: -1px;
}

@media (max-width: 479px) {
	.fm-etagere figcaption {
		font-size: 9.5px;
		letter-spacing: 0.06em;
	}

	.fm-etagere figcaption span {
		font-size: 10.5px;
		letter-spacing: 0;
	}
}

/* Dessin d'un journal à l'échelle (--w et --h en millimètres) */
.vitrine-formats .jr {
	position: relative;
	flex: none;
	width: calc(var(--w) * var(--u));
	height: calc(var(--h) * var(--u));
	padding: 6% 7%;
	display: flex;
	flex-direction: column;
	gap: 3.4%;
	background: var(--couverture);
	border: 1px solid var(--filet-papier);
	border-radius: 3px;
	box-shadow: var(--ombre-objet);
	overflow: hidden;
}

.vitrine-formats .jr i {
	display: block;
	font-style: normal;
}

.vitrine-formats .jr .t {
	flex: none;
	height: 5%;
	width: 76%;
	margin: 0 auto 2%;
	border-radius: 2px;
	background: var(--encre);
}

.vitrine-formats .jr .ph {
	flex: none;
	height: 36%;
	border-radius: 2px;
	background-size: 4px 4px;
}

.vitrine-formats .jr .l {
	flex: none;
	height: 2.2%;
	border-radius: 2px;
	background: var(--filet);
}

.vitrine-formats .jr .l.c {
	width: 62%;
}

.vitrine-formats .jr .cols {
	flex: 1;
	min-height: 0;
	display: grid;
	grid-template-columns: repeat(var(--c, 2), 1fr);
	gap: 0 7%;
}

.vitrine-formats .jr .cols > i {
	display: flex;
	flex-direction: column;
	gap: 7%;
}

.vitrine-formats .jr .cols > i > i {
	height: 4.4%;
	flex: none;
	border-radius: 2px;
	background: var(--filet);
}

.vitrine-formats .jr .cols > i > .ph {
	height: 44%;
	background-size: 4px 4px;
}

.vitrine-formats .jr .cols > i > .ph--bas {
	height: 30%;
}

.vitrine-formats .jr--mag {
	background: linear-gradient(125deg, #fff 0%, var(--couverture) 38%, #fff 52%, var(--couverture) 70%);
}

.vitrine-formats .jr--mag::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3.5%;
	background: linear-gradient(90deg, rgba(30, 27, 23, 0.12), transparent);
}

.vitrine-formats .jr--eco {
	background: var(--filet-papier);
}

.vitrine-formats .jr--brd .t {
	height: 4.4%;
	width: 84%;
}

.vitrine-formats .jr--brd .ph {
	height: 30%;
}

/* ---------- 2. Cartes des formats ---------- */
.fm-cartes {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-l);
}

@media (min-width: 640px) {
	.fm-cartes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.fm-cartes {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.vitrine-formats .fc {
	position: relative;
	transition: translate 0.25s ease, box-shadow 0.25s ease;
}

.vitrine-formats .fc:hover {
	translate: 0 -6px;
	box-shadow: var(--ombre-survol);
}

.vitrine-formats .fc:has(.fc-lien:focus-visible) {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.vitrine-formats .fc-lien {
	color: var(--encre);
	text-decoration: none;
	outline: none;
}

.vitrine-formats .fc-lien::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	border-radius: var(--radius-xl);
}

.vitrine-formats .fc:hover .fc-lien {
	color: var(--rose);
}

.vitrine-formats .fc-fleche {
	position: absolute;
	z-index: 1;
	right: 12px;
	bottom: 12px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--papier);
	color: var(--encre);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 0 var(--trait-fin);
	transition: background-color 0.2s, color 0.2s;
}

.vitrine-formats .fc-fleche svg {
	width: 18px;
	height: 18px;
}

.vitrine-formats .fc:hover .fc-fleche {
	background: var(--encre);
	color: var(--sur-encre);
}

.vitrine-formats .fc .mfaj-carte__visuel {
	height: 176px;
	align-items: flex-end;
	padding-bottom: 14px;
	background: var(--papier-2);
}

@media (min-width: 640px) {
	.vitrine-formats .fc .mfaj-carte__visuel {
		height: 236px;
		padding-bottom: 18px;
	}
}

.vitrine-formats .fc .disque {
	position: absolute;
	width: 190px;
	height: 190px;
	border-radius: 50%;
	right: -36px;
	top: -40px;
	background-size: 6px 6px;
	opacity: 0.9;
}

.vitrine-formats .fc .jr {
	--u: 0.29px;
	z-index: 1;
	rotate: var(--r, 0deg);
}

@media (min-width: 640px) {
	.vitrine-formats .fc .jr {
		--u: 0.4px;
	}
}

.vitrine-formats .fc .mfaj-carte__corps {
	gap: 0;
	padding: 20px 8px 8px;
}

.vitrine-formats .fc .mfaj-surtitre {
	font-size: 11px;
}

.vitrine-formats .fc .mfaj-carte__titre {
	margin-top: 8px;
	font-size: 26px;
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.1;
}

.vitrine-formats .fc .mfaj-carte__texte {
	margin-top: 6px;
	font-size: 15.5px;
	text-wrap: pretty;
}

@media (min-width: 640px) {
	.vitrine-formats .fc .mfaj-carte__texte {
		min-height: 3.1em;
	}
}

.vitrine-formats .fc-spec {
	margin: 18px 0 0;
	border-top: 1px solid var(--trait);
}

.vitrine-formats .fc-spec div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 14px;
	padding: 9px 0;
	border-bottom: 1px solid var(--trait);
	font-size: 14.5px;
}

.vitrine-formats .fc-spec dt {
	color: var(--encre-3);
	flex: none;
}

.vitrine-formats .fc-spec dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.vitrine-formats .fc-actions {
	position: relative;
	z-index: 3;
	margin-top: auto;
	padding-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vitrine-formats .fc-actions .mfaj-btn {
	width: 100%;
}

/* Puces de couleur des formats */
.vitrine-formats .puce {
	flex: none;
	display: inline-block;
	width: 12px;
	height: 16px;
	border-radius: var(--radius-xs);
	background: var(--c);
}

/* ---------- 3. Comparateur de tailles ---------- */
.vitrine-formats .cmpz {
	padding: 10px;
	display: grid;
	gap: 10px;
}

@media (min-width: 960px) {
	.vitrine-formats .cmpz {
		padding: 14px;
		gap: 14px;
	}
}

.vitrine-formats .cmpz-ctl {
	background: var(--papier-2);
	border-radius: var(--radius-l);
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

@media (min-width: 960px) {
	.vitrine-formats .cmpz-ctl {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 20px 40px;
		padding: 18px 22px;
	}
}

.vitrine-formats .cmpz-ctl .mfaj-surtitre {
	color: var(--encre-3);
	margin-bottom: 10px;
}

.vitrine-formats .chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vitrine-formats .chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 16px 0 14px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--trait);
	background: var(--papier);
	color: var(--encre);
	font: 600 15px/1.2 var(--font-sans);
	cursor: pointer;
	text-align: left;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.vitrine-formats .chip:hover {
	border-color: var(--encre);
}

.vitrine-formats .chip[aria-pressed="true"] {
	background: var(--encre);
	color: var(--sur-encre);
	border-color: var(--encre);
}

.vitrine-formats .chip[aria-pressed="true"] .puce {
	box-shadow: 0 0 0 1.5px rgba(244, 240, 232, 0.55);
}

.vitrine-formats .chip .coche {
	margin-left: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid currentColor;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0.9;
}

.vitrine-formats .seg {
	display: inline-flex;
	padding: 4px;
	gap: 2px;
	border-radius: var(--radius-pill);
	background: var(--papier);
	border: 1px solid var(--trait-fin);
}

.vitrine-formats .seg button {
	min-height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--encre);
	font: 600 14.5px/1 var(--font-sans);
	cursor: pointer;
}

.vitrine-formats .seg button[aria-pressed="true"] {
	background: var(--encre);
	color: var(--sur-encre);
}

.vitrine-formats .cmpz-scene {
	position: relative;
	min-width: 0;
	background: var(--papier);
	border-radius: var(--radius-l);
	border: 1px solid var(--trait-fin);
	padding: 16px 14px 14px;
	display: grid;
	gap: 16px;
}

@media (min-width: 960px) {
	.vitrine-formats .cmpz-scene {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 28px;
		padding: 24px 28px 24px 18px;
		align-items: center;
	}
}

.vitrine-formats .cmpz-dessin {
	min-width: 0;
}

.vitrine-formats .cmpz-dessin svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.vitrine-formats .cmpz-liste {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--trait);
}

.vitrine-formats .cmpz-liste li {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 2px 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--trait);
}

.vitrine-formats .cmpz-liste .puce {
	grid-row: span 2;
	margin-top: 3px;
}

.vitrine-formats .cmpz-liste b {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.vitrine-formats .cmpz-liste .d {
	font-size: 13.5px;
	color: var(--encre-2);
}

.vitrine-formats .cmpz-liste .d strong {
	font-weight: 600;
	color: var(--encre);
}

.vitrine-formats .cmpz-legende {
	margin: 14px 0 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--encre-3);
}

.vitrine-formats .cmpz-legende:empty {
	display: none;
}

.vitrine-formats .cmpz-legende b {
	color: var(--encre);
}

/* ---------- 4. Fiche technique ---------- */
.vitrine-formats .tab-choix {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin-bottom: 16px;
	font-size: 15px;
	font-weight: 500;
	color: var(--encre-2);
}

.vitrine-formats .sel {
	position: relative;
}

.vitrine-formats .sel select {
	appearance: none;
	-webkit-appearance: none;
	min-height: 46px;
	padding: 0 42px 0 16px;
	border-radius: var(--radius-pill);
	border: 1px solid var(--trait);
	background: var(--papier);
	color: var(--encre);
	font: 600 15px var(--font-sans);
	cursor: pointer;
}

.vitrine-formats .sel::after {
	content: "";
	position: absolute;
	right: 18px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--encre);
	border-bottom: 2px solid var(--encre);
	rotate: 45deg;
	pointer-events: none;
}

.vitrine-formats .cmp-panneau {
	padding: 6px 10px;
	overflow: hidden;
}

.vitrine-formats .cmp {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 14.5px;
}

.vitrine-formats .cmp th,
.vitrine-formats .cmp td {
	padding: 14px 10px;
	border-bottom: 1px solid var(--trait);
	vertical-align: top;
	text-align: left;
}

.vitrine-formats .cmp tr:last-child th,
.vitrine-formats .cmp tr:last-child td {
	border-bottom: 0;
}

.vitrine-formats .cmp thead th {
	vertical-align: bottom;
	padding-top: 18px;
}

.vitrine-formats .cmp tbody th {
	width: 31%;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--encre-3);
	padding-top: 16px;
}

.vitrine-formats .cmp td {
	font-weight: 500;
	color: var(--encre);
}

.vitrine-formats .cmp td small {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--encre-3);
	margin-top: 2px;
}

.vitrine-formats .cmp .tete {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.vitrine-formats .cmp .tete b {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

@media (max-width: 759px) {
	.vitrine-formats .cmp [data-c]:not(.on) {
		display: none;
	}
}

@media (min-width: 760px) {
	.vitrine-formats .tab-choix {
		display: none;
	}

	.vitrine-formats .cmp tbody th {
		width: 18%;
	}

	.vitrine-formats .cmp-panneau {
		padding: 8px 18px;
	}
}

/* ---------- 7. Échantillon ---------- */
.vitrine-formats .mfaj-bloc-pistache {
	position: relative;
	overflow: hidden;
	background: var(--pistache);
	color: var(--encre);
	border-radius: var(--radius-xl);
	padding: clamp(32px, 5vw, 64px);
}

.vitrine-formats .mfaj-bloc-pistache .mfaj-surtitre,
.vitrine-formats .mfaj-bloc-pistache p {
	color: var(--pistache-profond);
}

.vitrine-formats .mfaj-liste-filets {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	border-top: 1px solid rgba(46, 61, 28, 0.3);
}

.vitrine-formats .mfaj-liste-filets li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(46, 61, 28, 0.3);
	font-size: 15.5px;
	font-weight: 600;
}

.vitrine-formats .mfaj-liste-filets li > span:first-child {
	flex: 1;
	min-width: 0;
}

.vitrine-formats .mfaj-liste-filets li > span:last-child {
	flex: none;
	text-align: right;
}

.vitrine-formats .mfaj-liste-filets small {
	display: block;
	font-size: 13px;
	color: var(--pistache-profond);
}

.fm-ech {
	display: grid;
	gap: 32px;
	align-items: center;
}

@media (min-width: 900px) {
	.fm-ech {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
		gap: 48px;
	}
}

.fm-ech__texte {
	margin: 16px 0 0;
	font-size: 17px;
	line-height: 1.6;
}

.fm-ech__aide {
	margin: 18px 0 0;
	font-size: 15px;
	line-height: 1.55;
}

.vitrine-formats .fm-ech .fm-ech__aide {
	color: var(--encre);
}

.fm-ech .fm-actions {
	margin-top: 26px;
}

.fm-ech__visuel {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin-inline: auto;
	aspect-ratio: 44 / 32;
}

.fm-ech__photo {
	position: absolute;
	left: 3%;
	top: 5%;
	width: 84%;
	height: 94%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 58%;
	border-radius: var(--radius-m);
	box-shadow: var(--ombre-tirage);
	rotate: -2deg;
}

.fm-ech__rond {
	position: absolute;
	z-index: 2;
	right: 2%;
	top: 0;
	width: 25%;
	aspect-ratio: 1;
	padding: 4%;
	border-radius: 50%;
	background: var(--rose);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	rotate: 10deg;
}

.fm-ech__rond span {
	font-size: clamp(8px, 2vw, 10px);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sur-rose);
	line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
	.vitrine-formats .fc,
	.vitrine-formats .fc-fleche,
	.vitrine-formats .chip {
		transition: none;
	}
}
