/* Shared tokens and helpers for all Master Parfums blocks. */

/*
 * The theme declares Gotham with URLs on the old staging domain, so it never loads.
 * Declare it again from the live theme folder under our own family name.
 */
@font-face {
	font-family: "MP Gotham";
	src: url("/wp-content/themes/masterparfum/fonts/GothamBook.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "MP Gotham";
	src: url("/wp-content/themes/masterparfum/fonts/Gotham-Bold.otf") format("opentype");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/*
 * Open Sans: the theme only declares weights 300 and 600, so regular text fell back to Light.
 * Variable font, self-hosted (SIL Open Font License): every weight from 300 to 800, plus italics.
 */
@font-face {
	font-family: "Open Sans";
	src: url("fonts/open-sans-latin.woff2") format("woff2");
	font-weight: 300 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Open Sans";
	src: url("fonts/open-sans-latin-ext.woff2") format("woff2");
	font-weight: 300 800;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Open Sans";
	src: url("fonts/open-sans-italic-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Open Sans";
	src: url("fonts/open-sans-italic-latin-ext.woff2") format("woff2");
	font-weight: 400 700;
	font-style: italic;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Handwriting, self-hosted (SIL Open Font License). */
@font-face {
	font-family: "MP Caveat";
	src: url("fonts/caveat-latin.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "MP Caveat";
	src: url("fonts/caveat-latin-ext.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--mp-black: #000000;
	--mp-ink: #111111;
	--mp-text: #222222;
	--mp-muted: #444444;
	--mp-cream: #FEF7EF;
	--mp-pink: #E86B90;
	--mp-yellow: #FFD966;
	--mp-cat-histoire: #CB2167;
	--mp-cat-coulisses: #F7A21B;
	--mp-cat-marques: #93B436;
	--mp-cat-palette: #4486C1;
	--mp-font-title: "MP Gotham", Gotham, Montserrat, sans-serif;
	--mp-font-text: "Open Sans", sans-serif;
	--mp-font-hand: "MP Caveat", Caveat, cursive;
	--mp-wrap: 1240px;
	--mp-header-offset: 0px;
}

/* The theme header becomes fixed below 1295px: leave room when a block opens the page. */
@media (max-width: 1295px) {
	:root { --mp-header-offset: 120px; }
}

@media (max-width: 860px) {
	:root { --mp-header-offset: 140px; }
}

.content > .mp-block:first-child {
	margin-top: var(--mp-header-offset);
}

/* In-page links (#jeux, #rubrique-…) stop below the fixed header. */
.mp-block[id],
.mp-block [id] {
	scroll-margin-top: var(--mp-header-offset);
}

.mp-block {
	box-sizing: border-box;
	width: 100%;
	font-family: var(--mp-font-text);
	color: var(--mp-text);
}

.mp-block *,
.mp-block *::before,
.mp-block *::after {
	box-sizing: inherit;
}

.mp-wrap {
	max-width: var(--mp-wrap);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}

/* Hand-drawn pink underline used on key words of headings. */
.mp-scribble {
	white-space: nowrap;
	padding-bottom: 0.1em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 8c40-5 92-7 194-3' stroke='%23E86B90' stroke-width='4.5' fill='none' stroke-linecap='round'/%3E%3Cpath d='M28 12c52-3 104-3 150-1' stroke='%23E86B90' stroke-width='2.2' fill='none' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") no-repeat left bottom / 100% 0.3em;
}

/* Pill buttons shared by all blocks. */
.mp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 32px;
	border-radius: 100px;
	border: 2px solid var(--mp-black);
	font-family: var(--mp-font-text);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-decoration: none;
	transition: opacity 0.15s ease;
}

.mp-btn:hover,
.mp-btn:focus-visible {
	opacity: 0.85;
	text-decoration: none;
}

.mp-btn svg {
	width: 18px;
	height: 18px;
	flex: none;
}

.mp-btn--plein,
.mp-btn--plein:hover {
	background: var(--mp-black);
	color: #ffffff;
}

.mp-btn--contour,
.mp-btn--contour:hover {
	background: #ffffff;
	color: var(--mp-black);
}

@media (max-width: 760px) {
	.mp-btn {
		min-height: 50px;
		padding: 0 24px;
		font-size: 14px;
	}
}

/*
 * Section backgrounds shared by all blocks (field "Fond" + "Fondu").
 * The site's swirl is a fixed background behind the page: these layers let it show through.
 */
:root {
	--mp-base-blanc: rgba(255, 255, 255, 0.75);
	--mp-voile-creme: rgba(254, 247, 239, 0.9);
	--mp-fondu: 120px;
	--mp-fondu-base: 160px;
}

.mp-fond--transparent {
	background: transparent;
}

.mp-fond--creme {
	background: var(--mp-cream);
}

.mp-fond--blanc {
	background: #ffffff;
}

/* Light white over the swirl: keeps text readable while the swirl stays visible. */
.mp-fond--base {
	--mp-base-layer: linear-gradient(var(--mp-base-blanc), var(--mp-base-blanc));
	background: var(--mp-base-layer);
}

/* Cream veil fading in and out on top of the white base. */
.mp-fond--voile {
	--mp-base-layer: linear-gradient(var(--mp-base-blanc), var(--mp-base-blanc));
	background:
		linear-gradient(180deg, rgba(254, 247, 239, 0) 0, var(--mp-voile-creme) var(--mp-fondu), var(--mp-voile-creme) calc(100% - var(--mp-fondu)), rgba(254, 247, 239, 0) 100%),
		var(--mp-base-layer);
}

/* Fade the white base itself in or out, for the first or last section of a run. */
.mp-fond--fondu-haut {
	--mp-base-layer: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, var(--mp-base-blanc) var(--mp-fondu-base), var(--mp-base-blanc) 100%);
}

.mp-fond--fondu-bas {
	--mp-base-layer: linear-gradient(180deg, var(--mp-base-blanc) 0, var(--mp-base-blanc) calc(100% - var(--mp-fondu-base)), rgba(255, 255, 255, 0) 100%);
}

.mp-fond--fondu-haut.mp-fond--fondu-bas {
	--mp-base-layer: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, var(--mp-base-blanc) var(--mp-fondu-base), var(--mp-base-blanc) calc(100% - var(--mp-fondu-base)), rgba(255, 255, 255, 0) 100%);
}

/* Round coloured badge with a magazine rubrique icon. */
.mp-cbadge {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 100px;
	background: var(--c);
	color: #ffffff;
}

.mp-cbadge svg {
	width: 64%;
	height: 64%;
}

.mp-block .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

/* Coloured rubrique label on article cards. */
.mp-clabel {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mp-font-title);
	font-weight: 700;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--c);
}
